Posts by ghtester

    Probably it's not a bug in fact but a feature more likely. But the question is if it shouldn't be changed a bit.

    In several most fresh LE 9.80 Nightly test builds on my RPi 4B / 2GB I have experienced several unexpected crashes due to Out of memory event when oom-kill intervened.

    That's due to my Timeshift settings in Tvhedadend to use RAM only with Maximum RAM size set to 1024 MB. This limit I set in past experimentally by observing the Free memory value in Kodi / System info / Summary. So now after crashes it seemed that LE is using more RAM and I'l had to decrease the Maximum RAM size to avoid Out of memory.

    But I have found that the Free memory value is calculated and it is somewhat greater than free / avail Mem values reported by the top app.

    It looks that Free memory formula is Mem total - Mem used but this value is greater than Mem free / avail Mem reported by top so there's an overhead somewhere.

    This may be misleading as I would expect the Free memory in Kodi should display the lowest - real - value.

    I wonder why the Free memory is calculated by formula and why it does not show the free or avail Mem value instead? I suppose there's a reason but shouldn't be that changed?

    After some more extensive searching and testing I have found the reason why it did not work with the current hd44780.so driver (the same issue was in current Raspberry OS).

    A couple years ago the hd44780 driver was redesigned and it looks default pinout for i2c expander was changed and pinout configure options were added.

    Unfortunately so far there's no relevant information update in the LCDd.conf about it so it may confuse many users like me.

    In my case it was necessary to add the pinout configuration to [hd44780 ] section of the

    /storage/.kodi/userdata/addon_data/service.lcdd/LCDd.conf

    file and the following settings works fine with my display and the current hd44780.so driver:

    -------------------------------------

    ConnectionType=i2c

    Port=0x3f # depends on i2c expander type, use i2cdetect -y 1 command to check

    Device=/dev/i2c-1

    Size=16x2

    i2c_line_RS=0x01

    i2c_line_RW=0x02

    i2c_line_EN=0x04

    i2c_line_BL=0x08

    i2c_line_D4=0x10

    i2c_line_D5=0x20

    i2c_line_D6=0x40

    i2c_line_D7=0x80

    Backlight=external

    BacklightInvert=yes

    ----------------------------------

    No file replacement is necessary anymore, just the proper configuration is the solution.

    Hope this helps...

    After some more extensive testing with 3 USB DVB-T2 tuners I have found differences related to monitoring status returned by their drivers:

    Astrometa Sony CXD2837ER Kodi PVR info: Signal quality:0%, SNR:0%

    LibreELEC:~/tmp # dvb-fe-tool -f 1 --femon -c1

    Lock (0x1f) Signal= 122.47dBm C/N= 23.00dB UCB= 0 postBER= 456x10^3

    Astrometa Panasonic MN88473 Kodi PVR info: Signal quality:49%, SNR:0%

    LibreELEC:~/tmp # dvb-fe-tool -f 1 --femon -c1

    Lock (0x1f) Quality= Good Signal= 49.95% C/N= 23.59dB UCB= 0 PER= 0

    MyGica Silicon Labs Si2168 Kodi PVR info: Signal quality:0%, SNR:0%

    LibreELEC:~/tmp # dvb-fe-tool --femon -c1

    Lock (0x1f) Signal= -52.00dBm C/N= 26.00dB UCB= 161640 postBER= 0

    So it looks PVR info can show the Signal quality and SNR values only if the tuner driver reports these values in % but every tuner driver is returning very different values in fact, which are mostly incompatible.

    It would be nice when some configurable pass-through filter could be implemented above driver layer so for any tuner model would be possible to make it working properly.

    Otherwise PVR info page in Kodi should be changed to grab and display the Signal and C/N values as exactly provided by driver and not in % which is now obsolete.

    OK, as I don't know how the info labels work, I have created a temporary simple solution.

    If somebody else is interested, this is a primitive example script which displays the Signal quality and SNR on screen using the Notification action.

    Tested and working on LE 9.2.6 official and on LE 9.80 Nightly.

    #!/bin/bash

    COUNTER=0

    while [ $COUNTER -lt 1000 ]; do

    output_sig=$(dvb-fe-tool --femon -c1 &> /tmp/femon )

    read femon_output < /tmp/femon

    signal=$(echo $femon_output | cut -c 13-30)

    snr=$(echo $femon_output | cut -c 31-43)

    kodi-send --action="Notification($signal,$snr,1000,null)" > /dev/null

    let COUNTER=COUNTER+1

    sleep 1

    done

    Just discovered by searching the Net that femon is a bit obsolete and there's a replacement - dvb-fe-tool - which works fine on both LE official 9.2.6 and latest LE 9.8 Nightly / RPi 4B:

    =================================

    LibreELEC:~ # dvb-fe-tool

    Device Silicon Labs Si2168 (/dev/dvb/adapter0/frontend0) capabilities:

    CAN_2G_MODULATION

    CAN_FEC_1_2

    CAN_FEC_2_3

    CAN_FEC_3_4

    CAN_FEC_5_6

    CAN_FEC_7_8

    CAN_FEC_AUTO

    CAN_GUARD_INTERVAL_AUTO

    CAN_HIERARCHY_AUTO

    CAN_INVERSION_AUTO

    CAN_MULTISTREAM

    CAN_MUTE_TS

    CAN_QAM_16

    CAN_QAM_32

    CAN_QAM_64

    CAN_QAM_128

    CAN_QAM_256

    CAN_QAM_AUTO

    CAN_QPSK

    CAN_TRANSMISSION_MODE_AUTO

    DVB API Version 5.11, Current v5 delivery system: DVBT2

    Supported delivery systems:

    DVBT

    [DVBT2]

    DVBC/ANNEX_A

    Frequency range for the current standard:

    From: 48.0 MHz

    To: 870 MHz

    Step: 62.5 kHz

    ============================================

    LibreELEC:~ # dvb-fe-tool --femon

    Lock (0x1f) Signal= -50.00dBm C/N= 23.50dB UCB= 150 postBER= 0

    Lock (0x1f) Signal= -50.00dBm C/N= 23.75dB UCB= 150 postBER= 0

    Lock (0x1f) Signal= -51.00dBm C/N= 23.75dB UCB= 150 postBER= 0

    Lock (0x1f) Signal= -51.00dBm C/N= 23.75dB UCB= 150 postBER= 0

    Lock (0x1f) Signal= -50.00dBm C/N= 23.50dB UCB= 150 postBER= 0

    Lock (0x1f) Signal= -50.00dBm C/N= 23.00dB UCB= 150 postBER= 0

    Lock (0x1f) Signal= -50.00dBm C/N= 23.00dB UCB= 150 postBER= 0

    =============================================

    These values are OK and corresponds with Status values in Tvheadend.

    The question is - how to get them displayed in Kodi - PVR info (LE 9.8 - Kodi 19.0-ALPHA3) as it worked earlier (LE 9.2.6 - Kodi 18.9.0) ?

    Edit - additional info I have discovered so far:

    The PVR info is displayed by "o'' key press in Kodi when PVR is active or can be invoked by kodi-send --host=127.0.0.1 --button=o or by kodi-send -a "PlayerProcessInfo" when enabled in Settings / PVR&Live TV / Playback / Show signal quality

    The affected (not working) info labels are:

    PVR.ActStreamSignal {value)

    PVR.ActStreamProgrSignal (progress bar)

    PVR.ActStreamSNR (value)

    PVR.ActStreamProgrSNR {progress bar)

    As the new beta bootloader was released, I tried to upgrade it as usual (on official LE 9.2.5 it was working) but failed:

    # rpi-eeprom-update -d -f /tmp/pieeprom

    BCM2711 detected

    Dedicated VL805 EEPROM detected

    *** INSTALLING /tmp/pieeprom ***

    grep: /var/lib/dpkg/info//rpi-eeprom.md5sums: No such file or directory

    cat: can't open '/var/lib/dpkg/info//rpi-eeprom-images.md5sums': No such file or directory

    md5sum: /tmp/tmp.C1K9IA: no checksum lines found

    rpi-eeprom checksums failed - try reinstalling this package

    Unable to validate EEPROM image package checksums

    The current LE 9.80 Nightly installed:

    LibreELEC-RPi4.arm-9.80-nightly-20201105-57711b6.tar

    Raspberry Pi Tools add-on installed: 9.80.7.107


    I can confirm this issue still persists in latest official and test LibreELEC builds (9.2.5 official, 9.80 nightly) and hd44780.so file must be replaced (see the Momo90's link above) in folder /storage/.kodi/addons/service.lcdd/lib/lcdproc/ otherwise it does not work with HD44780 compatible displays connected through i2c adapter.

    Edit - not necessary anymore, see the next post.

    I am using the DVB-T2 adapter MyGica T230C on RPi 4B and with the same setup as in earlier official LibreELEC build 9.2.5 which worked (with checked Force old status checkbox in TV adapter config), I am not able to get the Signal quality / SNR displayed in Kodi anymore.

    Service backend is Tvheadend Server 4.2 ( HTS Tvheadend 4.2.8-36 ~ LibreELEC Tvh-addon v9.80.6.123 ), PVR client is Tvheadend HTSP Client 7.2.1.1 (both installed from the Nightly Add-ons list).

    Tested on some latest Nightly builds with the same results:

    LibreELEC-RPi4.arm-9.80-nightly-20201024-636e32e.tar

    LibreELEC-RPi4.arm-9.80-nightly-20201030-7f3b20d.tar

    LibreELEC-RPi4.arm-9.80-nightly-20201031-cf5a710.tar

    In TVheadend GUI on Status page the Signal quality / SNR is visible:

    SNR: 29.5 dB

    Signal Strength: -46.0 dBm

    When tried femon, I have found that SNR is still reported with the same - fix - value which does not reflect the Tvheadend's value and the Signal value is random after every femon start:

    LibreELEC:~ # femon -H

    FE: Silicon Labs Si2168 (DVBT)

    Problem retrieving frontend information: Unknown error 524

    status SCVYL | signal 7% | snr 71% | ber 0 | unc 0 | FE_HAS_LOCK

    ^C

    LibreELEC:~ # femon -H

    FE: Silicon Labs Si2168 (DVBT)

    Problem retrieving frontend information: Unknown error 524

    status SCVYL | signal 70% | snr 71% | ber 0 | unc 0 | FE_HAS_LOCK

    ^C

    LibreELEC:~ # femon -H

    FE: Silicon Labs Si2168 (DVBT)

    Problem retrieving frontend information: Unknown error 524

    status SCVYL | signal 38% | snr 71% | ber 0 | unc 0 | FE_HAS_LOCK

    ^C

    LibreELEC:~ # femon -H

    FE: Silicon Labs Si2168 (DVBT)

    Problem retrieving frontend information: Unknown error 524

    status SCVYL | signal 26% | snr 71% | ber 0 | unc 0 | FE_HAS_LOCK

    ^C

    LibreELEC:~ # femon -H

    FE: Silicon Labs Si2168 (DVBT)

    Problem retrieving frontend information: Unknown error 524

    status SCVYL | signal 57% | snr 71% | ber 0 | unc 0 | FE_HAS_LOCK


    Is there any chance it could be fixed in future please? For me that feature was quite useful as I need to struggle with room antenna position often due to bad signal.


    FYI I have also tested Astrometa DVB-T2 (with Sony CXD2837ER demod.) with the same result, it also have more other issues due to bad driver but In TVheadend GUI on Status page the Signal quality / SNR is also visible (with reversed Signal Strength sign):

    SNR: 25.7 dB

    Signal Strength: 90.6 dBm

    In this case femon does not return random signal value but always 0.

    Thanks for the hint, Hias, I can confirm cec-ctl works and can be used at the same time with Kodi, in my case at least for TV status monitoring and power on (all other commands, unfortunately including standby and power-off, are ignored by my 10 years old TV).

    Some examples, if someone else is interested:

    Show topology:

    LibreELEC:~ # cec-ctl -S

    Driver Info:

    Driver Name : vc4_hdmi

    Adapter Name : vc4

    Capabilities : 0x0000010e

    Logical Addresses

    Transmit

    Passthrough

    Connector Info

    Driver version : 5.9.0

    Available Logical Addresses: 1

    DRM Connector Info : card 0, connector 32

    Physical Address : 1.0.0.0

    Logical Address Mask : 0x0002

    CEC Version : 1.4

    Vendor ID : 0x001582 (Pulse-Eight)

    OSD Name : ''

    Logical Addresses : 1 (Allow Fallback to Unregistered)

    Logical Address : 1 (Recording Device 1)

    Primary Device Type : Record

    Logical Address Type : Record

    System Information for device 0 (TV) from device 1 (Recording Device 1):

    CEC Version : Tx, OK, Rx, Timeout

    Physical Address : Tx, OK, Rx, Timeout

    Vendor ID : 0x00e091 (LG)

    OSD Name : Tx, OK, Rx, Timeout

    Menu Language : kor

    Power Status : On

    Topology:

    1.0.0.0: Recording Device 1

    Power on:

    LibreELEC:~ # cec-ctl --user-control-pressed ui-cmd=power-on-function --to 0

    Driver Info:

    Driver Name : vc4_hdmi

    Adapter Name : vc4

    Capabilities : 0x0000010e

    Logical Addresses

    Transmit

    Passthrough

    Connector Info

    Driver version : 5.9.0

    Available Logical Addresses: 1

    DRM Connector Info : card 0, connector 32

    Physical Address : 1.0.0.0

    Logical Address Mask : 0x0002

    CEC Version : 1.4

    Vendor ID : 0x001582 (Pulse-Eight)

    OSD Name : ''

    Logical Addresses : 1 (Allow Fallback to Unregistered)

    Logical Address : 1 (Recording Device 1)

    Primary Device Type : Record

    Logical Address Type : Record


    Transmit from Recording Device 1 to TV (1 to 0):

    USER_CONTROL_PRESSED (0x44):

    ui-cmd: power-on-function (0x6d)

    Sequence: 178 Tx Timestamp: 654.417s


    Monitor CEC traffic:

    LibreELEC:~ # cec-ctl -m

    Driver Info:

    Driver Name : vc4_hdmi

    Adapter Name : vc4

    Capabilities : 0x0000010e

    Logical Addresses

    Transmit

    Passthrough

    Connector Info

    Driver version : 5.9.0

    Available Logical Addresses: 1

    DRM Connector Info : card 0, connector 32

    Physical Address : 1.0.0.0

    Logical Address Mask : 0x0002

    CEC Version : 1.4

    Vendor ID : 0x001582 (Pulse-Eight)

    OSD Name : ''

    Logical Addresses : 1 (Allow Fallback to Unregistered)

    Logical Address : 1 (Recording Device 1)

    Primary Device Type : Record

    Logical Address Type : Record


    Initial Event: State Change: PA: 1.0.0.0, LA mask: 0x0002, Conn Info: yes

    Received from TV to all (0 to 15): DEVICE_VENDOR_ID (0x87):

    vendor-id: 57489 (0x0000e091)

    Transmitted by Recording Device 1 to all (1 to 15): DEVICE_VENDOR_ID (0x87):

    vendor-id: 57489 (0x0000e091)

    Received from TV to all (0 to 15): DEVICE_VENDOR_ID (0x87):

    vendor-id: 57489 (0x0000e091)

    Transmitted by Recording Device 1 to all (1 to 15): DEVICE_VENDOR_ID (0x87):

    vendor-id: 57489 (0x0000e091)

    Received from TV to all (0 to 15): DEVICE_VENDOR_ID (0x87):

    vendor-id: 57489 (0x0000e091)

    Transmitted by Recording Device 1 to all (1 to 15): DEVICE_VENDOR_ID (0x87):

    vendor-id: 57489 (0x0000e091)

    Received from TV to all (0 to 15): STANDBY (0x36)

    Received from TV to all (0 to 15): STANDBY (0x36)

    Received from TV to all (0 to 15): DEVICE_VENDOR_ID (0x87):

    vendor-id: 57489 (0x0000e091)

    Transmitted by Recording Device 1 to all (1 to 15): DEVICE_VENDOR_ID (0x87):

    vendor-id: 57489 (0x0000e091)

    Received from TV to Recording Device 1 (0 to 1): GIVE_DEVICE_VENDOR_ID (0x8c)

    Transmitted by Recording Device 1 to all (1 to 15): DEVICE_VENDOR_ID (0x87):

    vendor-id: 57489 (0x0000e091)

    Received from TV to Recording Device 1 (0 to 1): VENDOR_COMMAND (0x89):

    vendor-specific-data: 0x01

    Transmitted by Recording Device 1 to TV (1 to 0): VENDOR_COMMAND (0x89):

    vendor-specific-data: 0x02 0x05

    Received from TV to Recording Device 1 (0 to 1): GIVE_DEVICE_POWER_STATUS (0x8f)

    Transmitted by Recording Device 1 to TV (1 to 0): REPORT_POWER_STATUS (0x90):

    pwr-state: to-on (0x02)

    Received from TV to Recording Device 1 (0 to 1): GIVE_PHYSICAL_ADDR (0x83)

    Transmitted by Recording Device 1 to all (1 to 15): REPORT_PHYSICAL_ADDR (0x84):

    phys-addr: 1.0.0.0

    prim-devtype: record (0x01)

    Received from TV to all (0 to 15): DEVICE_VENDOR_ID (0x87):

    vendor-id: 57489 (0x0000e091)

    Transmitted by Recording Device 1 to all (1 to 15): DEVICE_VENDOR_ID (0x87):

    vendor-id: 57489 (0x0000e091)

    Thanks a lot for explanation, you are absolutely right.

    So that means if I wish to keep the Kodi running, I am now a bit limited regarding to CEC commands which can be sent to TV.

    It looks there are only 3 CEC built-in commands in Kodi: CECActivateSource, CECStandby and CECToggleState ( List of built-in functions - Official Kodi Wiki )

    I have tested all, kodi-send -a "CECActivateSource" worked fine, remaining commands did not work but I suppose it's due my old TV which is not fully compatible with all CEC commands.

    Thanks again for your quick reply.

    It looks the cec-client in lates nightly 9.8's is compiled without RPi feature so it does not work anymore on RPi 4B.

    Please find the details below.

    Hardware: RPI 4B / 1 GB

    LG TV

    LE version:

    LibreELEC (community): nightly-20201024-636e32e (RPi4.arm)

    (LibreELEC-RPi4.arm-9.80-nightly-20201024-636e32e.tar)

    Upgraded from official 9.2.5 where the HDMI CEC was partially working, some comamnds did not work (maybe the TV issue), some working commands sometimes failed with Segmentation fault error

    On 9.2.5:

    LibreELEC (official): 9.2.5 (RPi4.arm)

    LibreELEC:~ # echo 'scan' | cec-client -s -d 1

    opening a connection to the CEC adapter...

    requesting CEC bus information ...

    CEC bus information

    ===================

    device #0: TV

    address: 0.0.0.0

    active source: no

    vendor: LG

    osd string: TV

    CEC version: 1.3a

    power status: on

    language: eng


    device #1: Recorder 1

    address: 1.0.0.0

    active source: no

    vendor: LG

    osd string: CECTester

    CEC version: 1.3a

    power status: on

    language: eng


    on 9.80:

    LibreELEC (community): nightly-20201024-636e32e (RPi4.arm)

    RPi feature is missing...

    LibreELEC:~/downloads # cec-client -l

    libCEC version: 4.0.7, compiled on 2020-10-24 09:04:10 by jenkins@tsuboi on Linux 4.19.0-8-amd64 (x86_64), features: P8_USB, DRM, P8_detect, Linux

    Found devices: 1

    device: 1

    com port: Linux

    vendor id: 0000

    product id: 0000

    firmware version: 0

    type: Linux


    LibreELEC:~/downloads # echo 'scan' | cec-client -s -d 1

    opening a connection to the CEC adapter...

    ERROR: [ 60] CLinuxCECAdapterCommunication::Open - ioctl CEC_S_MODE failed - errno=16

    ERROR: [ 60] could not open a connection (try 1)

    ERROR: [ 1060] CLinuxCECAdapterCommunication::Open - ioctl CEC_S_MODE failed - errno=16

    ERROR: [ 1060] could not open a connection (try 2)

    ERROR: [ 2060] CLinuxCECAdapterCommunication::Open - ioctl CEC_S_MODE failed - errno=16

    ERROR: [ 2060] could not open a connection (try 3)

    ERROR: [ 3060] CLinuxCECAdapterCommunication::Open - ioctl CEC_S_MODE failed - errno=16

    ERROR: [ 3060] could not open a connection (try 4)

    ERROR: [ 4061] CLinuxCECAdapterCommunication::Open - ioctl CEC_S_MODE failed - errno=16

    ERROR: [ 4061] could not open a connection (try 5)

    ERROR: [ 5061] CLinuxCECAdapterCommunication::Open - ioctl CEC_S_MODE failed - errno=16

    ERROR: [ 5061] could not open a connection (try 6)

    ERROR: [ 6061] CLinuxCECAdapterCommunication::Open - ioctl CEC_S_MODE failed - errno=16

    ERROR: [ 6062] could not open a connection (try 7)

    ERROR: [ 7062] CLinuxCECAdapterCommunication::Open - ioctl CEC_S_MODE failed - errno=16

    ERROR: [ 7062] could not open a connection (try 8)

    ERROR: [ 8062] CLinuxCECAdapterCommunication::Open - ioctl CEC_S_MODE failed - errno=16

    ERROR: [ 8062] could not open a connection (try 9)

    ERROR: [ 9063] CLinuxCECAdapterCommunication::Open - ioctl CEC_S_MODE failed - errno=16

    ERROR: [ 9063] could not open a connection (try 10)

    unable to open the device on port Linux

    ERROR: [ 10063] could not start CEC communications


    On RaspberryPI OS 5.4.51-v7l+:

    cec-client works

    pi@raspberrypi:~/Downloads $ cec-client -l

    libCEC version: 4.0.4, compiled on Linux-4.15.0-48-generic ... , features: P8_USB, DRM, P8_detect, randr, RPi, Exynos, AOCEC

    Found devices: 1

    device: 1

    com port: RPI

    vendor id: 2708

    product id: 1001

    firmware version: 1

    type: Raspberry Pi