LibreElec on Wyse 5010 does not properly shut down

  • I installed LibreElec 10.0.2 (previously 9.something) on my Wyse 5010 Thin Client.

    Everything seems to work okay except for the shutdown. The system does not power off.

    It hangs with:

    Code
    (LibreELEC (official): 10.0.2
    242.7689931 [12531: Failed to unmount /flash: Device or resource busy
    [ 242.7713681 systemd-shutdownt11: Failed to finalize file systems, loop devices, ignoring.
    242.9591521 reboot: Power down

    I tried journalctl -f via ssh but it doesn't give me a clue what's going wrong. Can anybody please give me some guidance?

    journalctl output
  • Go to Best Answer
  • Probably broken customization since the update. /storage/.config/shutdown.sh doesn't exist by default, but you call it somewhere:

    Code
    Dec 24 16:17:53 KodiWyse sh[1230]: /bin/sh: can't open '/storage/.config/shutdown.sh': No such file or directory

    Find the reason of shutdown.sh.

  • I do not call it. It's a vanilla generic installation I have here.

    As far as I understood on other pages, the /storage/.config/shutdown.sh is called by default by the shutdown process, so this error / warning should be expected.

    My assumption is: The wyse needs some special shutdown no one knows about :D So there is no machine-specific shutdown procedure in LibreElec's kernel. I also assume that it's safe, but yet annoying, to power it down manually when the "Power Down" message appears.

  • I see. The message only appears after an incomplete shutdown, so I never had this.

    Please provide a full debug log.

    How to post a log (wiki)

    1. Enable debugging in Settings>System Settings>Logging
    2. Restart Kodi
    3. Replicate the problem
    4. Generate a log URL (do not post/upload logs to the forum)

    use "Settings > LibreELEC > System > Paste system logs" or run "pastekodi" over SSH, then post the URL link
  • My assumption is: The wyse needs some special shutdown no one knows about :D So there is no machine-specific shutdown procedure in LibreElec's kernel. I also assume that it's safe, but yet annoying, to power it down manually when the "Power Down" message appears.

    I found a couple of other references, but no solution:

    201965 – Power off / Shutdown hangs after echoing "Reboot: Power down" on DELL / WYSE Thin Client - AMD G-T56N

    GitHub - sanrab/Dell-Wyse-Thin-Client-Dx0D-5010: Linux install on Dell Wyse Thin Client Dx0D/5010
    Linux install on Dell Wyse Thin Client Dx0D/5010. Contribute to sanrab/Dell-Wyse-Thin-Client-Dx0D-5010 development by creating an account on GitHub.
    github.com

    I'd start with ensuring the device has the latest/last available BIOS/firmware update installed, and seeing what if-anything can be configured in the BIOS for the device with respect to power states.

    These devices do claim to support SUSE Linux (SLES 12) so any attempt to triage the process might require comparisons with that OS to see what state certain registers or things are being set to (or not) and upstream linux. How to diagnose power-state issues are way beyond my sphere of knowledge though. I did attempt to Google ACPI and references to Wyse but drew blanks. NB: Userspace shutdown scripts are not the problem or solution here. The issue (and any resolution) will be in lower-level code.

  • I see. The message only appears after an incomplete shutdown, so I never had this.

    Please provide a full debug log.

    How to post a log (wiki)

    1. Enable debugging in Settings>System Settings>Logging
    2. Restart Kodi
    3. Replicate the problem
    4. Generate a log URL (do not post/upload logs to the forum)

    use "Settings > LibreELEC > System > Paste system logs" or run "pastekodi" over SSH, then post the URL link

    The logging does not work. You see… I think you'd need the power-off logs which seem to be lost when powering on again.

    But you may give it a try: https://ix.io/4kb7


    I tried to run the two log file commands manually and then shutting down. So additionally you might see something in these two logs:
    http://ix.io/4kbb

    http://ix.io/4kbc

    Edited once, last by Skeeve: Ein Beitrag von Skeeve mit diesem Beitrag zusammengefügt. (January 2, 2023 at 3:32 PM).

  • You probably need to test the specific (not Open) SUSE images provided for these devices as those are more likely to have some tweaked power management code. If not, you're needing to read up on ACPI debugging and/or sending emails to the Linux kernel mailing list asking for help on how to debug it. Understanding power states is one of those less-easily understood bit of the kernel .. I don't have any docs I can point you to.

  • I have same issue on Mint xfce and lubuntu on my DX0D 5010 with 16GB flash without wifi card.

    I've installed thinOS and SUSE (from dell, if someone is interested how to do that, I can post detailed instructions), both can shutdown device with no problem. I also tried Damn Small Linux and it also works fine (at least once). Both (SUSE and DSM) works on very very old kernels like 2.x. However today linux with such an old kernel is almost unusable. So it is not about "tweaks" it is more about some bug in new kernel version (maybe 4.20) or maybe related to some issue with amdgpu drivers - I'm not sure, I have no knowledge how to proceed with further debug. Best solution I already have is to install smart plug and cut the power off about 5 minutes after scheduling shutdown - it is ugly as hell, disable option to use WOL and consume electricity 24/7, but it does the job.

    This is caused probably by race condition somewhere in cpufreq. You can read more here:

    - https://bugzilla.kernel.org/show_bug.cgi?id=201965

    - https://bugzilla.kernel.org/show_bug.cgi?id=199349

    - https://lkml.org/lkml/2018/11/13/857

  • I found the solution:
    Add noefi to

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash noefi" <-here

    in /etc/default/grub

    Then run sudo update-grub and restart. Now you can power off

  • Hi,

    Just to chip in had the same issue with libreelec - Nexus on Dell Wyse 5010.

    Using General MAD_X64 build you will need to follow these steps (worked for me):

    1.mount -o remount,rw /flash

    2.vi /flash/syslinux.cfg

    add noefi to the line and save

    Code
    APPEND boot=UUID=1106-4449 disk=UUID=25c49e90-d6b6-4486-8c2c-12f15a6bef65 noefi quiet

    3.vi /flash/EFI/BOOT/grub.cfg

    add noefi to the line and save

    Code
    APPEND boot=UUID=1106-4449 disk=UUID=25c49e90-d6b6-4486-8c2c-12f15a6bef65 noefi quiet

    reboot, after that shutdown work properly and the blue power bottom properly goes off.

    Cheers,

    Hemant