Posts by schneci

    Hi,

    I try to solve the tvheadend.power script problem by using the bash array function, but the busybox bash doesn't support it. My colleague create a good solution of it by using a complex loop. I have tested it and works fine in Libreelec environment. This script solve proper sequence of the module insert and remove using the REMOVE_MODULES variable, witch can be edited from DVB setup of Kodi Tvheadend plugin.


    If it is proper for you please put it in the distribution to /storage/.config/sleep.d directory.

    Thanks
    schneci

    Hi,

    I'm testing your version, and I think it is the stable version for suspend of TBS5281 dvb-c driver. I have modified the .config/sleep.d/89-tvheadend.power file as following:

    Please inform me if you will put this version to github or official download site of Libreelec8.x

    Hi Cvh,

    Thank you your advice, I have earlier put this issue on that Github site.

    The dvd-drivers branch of GitHub - CvH/LibreELEC.tv: 'Just enough OS' for Kodi site is working by TBS528 and I correctly use rmmod of cx231xx driver and I can use Librelec 7 (kodi 16.1) suspend power-off option. On this site I found the LE8-dvb-drivers branch but I couldn't use it because the dvb-drivers.txt file is handled inaccurate:

    LibreELEC.tv/init at LE8-dvb-drivers · CvH/LibreELEC.tv · GitHub



    Above code doesn't read dvb-drivers.txt.

    What was your goal of this branch? Has anybody used this version? I would like using the "tbsc" driver option for TBS-5281 adapter.

    I think I have found the main problem. The TBS 5281 usb card includes dual adapter. The TBS proprietary driver use the adap_cnt counter variable:

    The kernel BUG message in dmesg shows the problem is caused by dvb_fini process with kernel NULL point exception during rmmod. I have seen the TBS proprietary driver source and this calculates the adapter number in adapter release and unregister calling, but the opensource cx231xx driver not:

    What is your opinion? Can anybody help to solve this problem?


    so lets guess cx231xx_dvb_ci is kind of broken, do you need the CI ?
    If not you could blacklisting the module and maybe then the other stuff works.echo "blacklist cx231xx_dvb_ci" >> /storage/.config/modprobe.d/blacklist.conf
    then try rmmod without the ci module

    Unfortunately it did not help, because the cx231xx_dvb_ci module is loaded and rmmod worked the same mistake as before. I don't know what is the reason of the blacklist didn't disable the loading of cx231xx_dvb_ci module.

    You can see in end of dmesg what happened after rmmod cx231xx_dvb_ci:
    FNJj

    I think the following messages in dmesg are caused the rmmod Killed or Segfault output:

    [ 50.184375] BUG: unable to handle kernel NULL pointer dereference at 0000000000000010[ 50.184546] IP: [<ffffffffa09f7306>] dvb_fini+0xf6/0x150 [cx231xx_dvb_ci]

    I use OSCAM system for encrypted channels receiving with PCSCD conax card reader driver. I don't know that ci-api should be for encoding operation. I think tvheadend uses CCAM interface protocol with OSCAM

    yes this shouldn't be the correct response :/
    I guess you have Generic LE8.
    Here LibreELEC-Generic.x86_64-8.0.1-cc-2017-22-03.img.gz is a version with the latest TBS drivers, maybe it is fixed.

    I have installed above image without tvheadend plugin install, but unfortunately the same situation:

    • rmmod try stops the cx231xx_dvb_ci module with Segfault or Killed message
    • kodi suspend freezes
    • kodi suspend works unplugged dvb usb hardware


    lsmod output is before rmmod cx231xx_dvb_ci: GQSZ
    and after rmmod: NLHT

    The different is:
    Module Size Used bysi2157 5741 2si2168 8881 2cx231xx_dvb_ci 15513 0

    ...

    Module Size Used bysi2157 5741 1si2168 8881 1cx231xx_dvb_ci 15513 -1


    the easiest way to test it

    boot to normal LE
    systemctl stop service.tvheadend42
    rmmod cx231xx_dvb_ci cx231xx cx2341x

    the rmmod ... has to work without an error - if you have an error you have to adjust the chain (you can't unload something that is used from another module), if you have a working unload chain you can also input it into the addon settings, then you won't need to do some script :)

    I have test above mode but the result is not too promising:

    Code
    ~ # rmmod cx231xx_dvb_ci cx231xx cx2341x
    Segmentation fault
    ~ # rmmod cx231xx_dvb_ci cx231xx cx2341x
    rmmod: ERROR: Module cx231xx_dvb_ci is in use
    rmmod: ERROR: Module cx231xx is in use by: cx231xx_dvb_ci
    rmmod: ERROR: Module cx2341x is in use by: cx231xx

    I think segfault message is a dvb driver code problem or other mistake.

    I'm using the TBS-5281 dvb-c USB module with Tvheadend 4.2 in Libreelec 8.0.0 environment. This Libreelec version uses the Linux 4.9.8 version.

    I would like to sleep the system is used by Kodi Krypton suspend power-off option, but the system is freezed. If I have disconnected the USB module from system the suspend process has worked correctly.
    In next step I have rebooted and reconnected the USB hardware to Libreelec and I have tested the cx231xx module dependency tree by lsmod command:


    Before I removed from memory the dvb driver module I have stopped the tvheadend by using the following commands:

    Code
    systemctl stop service.tvheadend42
    
    
    systemctl is-active service.tvheadend42
    inactive


    After this randomly sometimes rmmod cx231xx_dvb_ci command answers:
    rmmod: ERROR: Module cx231xx_dvb_ci is in use
    or
    Killed

    I think it doesn't normal message, may be it is a Linux kernel module problem.

    BTW I will use the `89-tvheadend.power` script file in /storage/.config.sleep.d for stopping and restarting the dvb modules, but until doesn't solve above problem I couldn't use it. The `REMOVE_MODULE` variable can be set in Tvheadend42 addon configuration panel which will be included the removing module name sequence.

    Can somebody help me?

    PS: I'm sending some additional information:

    Code
    modinfo cx231xx_dvb_ci
    filename:       /lib/modules/4.9.8/updates/cx231xx-dvb-ci.ko
    license:        GPL
    author:         Srinivasa Deevi <[email protected]>
    description:    driver for cx231xx based DVB cards
    depends:        cx231xx,dvb-core,tas2101
    vermagic:       4.9.8 SMP mod_unload
    parm:           debug:enable debug messages [dvb] (int)
    parm:           adapter_nr:DVB adapter numbers (array of short)