Posts by ajiratech

    Thanks Iridium

    I'll try fsck and clean out any errors. I do occasionally power cycle the LE device which could have caused errors on HDD. I'll report back on how this goes.

    Other thoughts:

    The power supply I'm using has more than enough power for sure, its a 5V 3A adapter. The odroid came with 5V 2A.

    Any idea if there are any logs generated on LE if the Hard drive was not getting enough power ?

    do I not need to worry about auto sleep of HDD on LE ? I do want to turn off auto sleep of HDD's in any case.
    Thanks !

    My LE 8.2 running on odroid c2 keeps hanging every now and then. I believe the root cause is the USB hard drive going into sleep and then not waking up in a timely manner and failing. A reboot usually fixes the issue. But off late this has started happening almost daily.

    When I SSH and try to access a folder on the hard drive via 'ls' command or any other way, that SSH session hangs too. Even Ctrl+C does not help. I have to disconnect session and reconnect. My SSH session works as long as I stay away from accessing anything on the HDD.

    Here is the log entries from "journalctl -r" that makes me believe the problem is due to Hard drive:

    Oct 12 11:50:58 libreElec kernel: EXT4-fs warning (device sda1): __ext4_read_dirblock:901: error reading directory block (ino 9

    306186, block 0)

    Oct 12 11:50:58 libreElec kernel: end_request: I/O error, dev sda, sector 297863464

    Oct 12 11:50:58 libreElec kernel: cdb[0]=0x88: 88 00 00 00 00 00 11 c1 09 28 00 00 00 08 00 00

    Oct 12 11:50:58 libreElec kernel: sd 0:0:0:0: [sda] CDB:

    Oct 12 11:50:58 libreElec kernel: ASC=0x44 <<vendor>> ASCQ=0x81

    Oct 12 11:50:58 libreElec kernel: sd 0:0:0:0: [sda]

    Oct 12 11:50:58 libreElec kernel: Sense Key : 0x4 [current]

    Oct 12 11:50:58 libreElec kernel: sd 0:0:0:0: [sda]

    Oct 12 11:50:58 libreElec kernel: Result: hostbyte=0x00 driverbyte=0x08

    Oct 12 11:50:58 libreElec kernel: sd 0:0:0:0: [sda]

    Oct 12 11:50:58 libreElec kernel: sd 0:0:0:0: [sda] Unhandled sense code

    Oct 12 11:50:58 libreElec kernel: sd 0:0:0:0: timing out command, waited 180s


    Two questions:
    - How do I disable USB auto-suspend for hard drives and make it persist after reboots.

    - Is there any way to recover from the errors suggested in logs without reboot ? such as restarting a service or remounting hard drive ?

    Ideally, I would want the hard drives to spin down only at night. But that is assuming that it will come back up day after day without these errors.

    Please advice. Thanks in advance.

    Thanks mglae .

    That would have worked well and been an acceptable solution. In my situation the problem is that this embedded device does not have a RTC which means it was starting with incorrect time and correcting the time during boot up via NTP. I think that is preventing the OnBootSec= from working as desired.

    I removed everything and added the After=docker.service and that seems to have worked. It seems to kick off my script after Kodi loads even though I see docker starting up before kodi completes loading.

    I'll keep a close eye on it and will revert if this starts to fail. But for now, I think anyone wanting to run custom scripts that deal with docker and need kodi running before it could use the same settings

    Code
    [Unit]
    Description=Script to autostart Privatebox App after kodi has loaded
    After=docker.service
    
    [Service]
    ExecStart=/storage/.customScriptOnBoot
    
    [Install]
    WantedBy=multi-user.target 


    Thanks for your help!

    Thanks vpeter .


    This resolved the Format error message but there still are two issues:

    1. The script does not get executed automatically upon boot after kodi loads.

    2. When I start it manually 'systemctl start myServer.service' it fails with error message "docker: not found."


    It looks like that the shell I enter into is not able to access the docker, because when I execute the docker command from command line in LE ssh I am able to get the desired results - docker loads and everything works.

    I even tried this:
    ExecStart=/bin/sh -c "/storage/.customScriptOnBoot"

    and still get the same error "docker: not found".

    Any other way to execute the script without opening up another shell? Thanks in advance.

    I created a service under /storage/.config/system.d/myServer.service with contents:

    Code
    [Unit]
    Description=Script to autostart my Services after kodi has loaded
    
    [Service]
    After=kodi.service
    ExecStart=/storage/.customScriptOnBoot
    
    [Install]
    WantedBy=multi-user.target

    But this fails to run. I get the following error message in journalctl "

    myServer.service: Failed at step EXEC spawning /storage/.customScriptOnBoot: Exec format error

    I don't see where the problem is with the format. Please advice. Thanks in advance.

    Hi ,

    I"m able to successfully run a docker container and some scripts upon boot up via the use to autostart.sh. But some of my scripts need Kodi to be up and running. Adding sleep in autostart.sh does not help as it delays the loading of Kodi as well.

    Since I am troubleshooting some other issues with the scripts and need to restart it manually as well (without system reboot) - I cannot add sleep because then

    upon manual restart the sleep will slow me down while testing and troubleshooting.

    Is there a way to run a script in Librelec upon boot but after Kodi has loaded ?

    Hi ,

    I have a couple of alias that I'd like to set automatically when I log in to LE via SSH. I tried creating .bash_profile (with the alias commands) in /storage/ and made it executable, but that did not help.

    What is the recommended way to create a .bash_profile equivalent on Libreelec ?

    Thanks,

    Pankaj

    Platform - LE 8.2 for Odroid C2

    Hi,

    I need to start a docker upon boot and then run a couple of other commands after that so I've created autostart.sh under /storage/.config/autostart.sh and added the commands under it. I've also made autostart.sh executable. Upon reboot I do not see those commands being executed.

    Is there anything else I need to do ? Where can I see logs for the attempt to run autostart.sh ?

    Thanks in advance.

    Hi, I'm running 8.2.x on Odroid C2 and it works quite well in handling 4K Videos. GPU acceleration works for H.265 and H.264 codecs and probably other codecs too.

    Can someone tell which Video Library is used to do GPU acceleration for Video codecs and does the Amlogic S905 SoC include required Licenses for decoding these codecs ? Or does one need to buy Licenses like one does if they were using Raspberry pi and wanted GPU acceleration for MPEG2.

    I would like to change the hostname of LibreElec as I have more than one that I am testing out. I know I can go to /storage/.cache/hostname to change it.

    But the problem I'm seeing is that this box does not register its hostname with DHCP/DNS Server - which is my ASUS Wireless Router.

    Please advice if anyone has DDNS working for local network. (I'm not talking external IP using dons.org, I'm talking about DDNS within the local network)

    I believe I'm running a fairly newer LibreElec with Kodi 17.6. (Don't know exact version as I'd changed the skin). I am SSH'd into it and can get the version number from CLI quickly If I know where to look. Thanks.