poweroff nuisance

  • This topic has 5 replies, 3 voices, and was last updated Dec 9-6:24 pm by Vincent17.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #46643
    Member
    Vincent17

    A full install of antiX 17.4 on my netbook reliably powered off, but the SSD failed and now I have a live install on an SD card. In this post I described problems getting it to power off. Commands such as
    desktop-session-exit –shutdown,
    persist-config –shutdown –command poweroff,
    shutdown -hP now
    etc. halt the computer but about half the time leave the power on, requiring a long press on the power button. The only command I have found that has not yet failed is halt -dfiph (or init.d/halt stop or poweroff -dfih). For the moment, I use

    persist-config --shutdown
    sync ; chvt 1
    /sbin/halt -dfiph

    I’m nervous about skipping all the shutdown steps in rc0.d and live/bin, but so far it hasn’t caused a problem. Will it? Thanks for any insights.

    MSI Wind U100 netbook, atom processor, encrypted live install of antiX-17.4.1_386-base on SD card. Kernel 4.9.240. Full inxi output in the link above.

    #46650
    Member
    Xecure
    Helpful
    Up
    0
    :D

    Hi.

    If I understand correctly, this is an ENCRYPTED frugal install with dynamic persistence. Correct? And you have it set to ask to save persistence changes before powering off.
    Your post in MX forum states things related to FRUGAL install and FULL install. Though here you mention “Live” install, I am assuming this means frugal. If I am wrong, please correct me (and ignore the following procedures).
    There are a few things I would like you to try, to see if this is related to the persist save or if this is related to the system not being able to un-mount the live system or maybe even the SD while powering off.

    1. Boot to the live system, set the Persistence auto-save configuration to “Manual”, save persistence changes and poweroff using the desktop-session-exit menu.
    If it powers off properly, then it isn’t related to persistence check before powering off.

    2. If it doesn’t poweroff properly, we will try something else. When you suspend (via Session exit script), does it suspend correctly or does it also hangs? If it

    Depending on if frugal or full install, we will have to check different logs to see what is going on.

    On your inxi we see:

    Drives:
      Local Storage: total: 14.84 GiB used: 3.08 GiB (20.7%) 
      ID-1: /dev/sda type: USB vendor: Generic model: Multi-Card size: 14.84 GiB 
    Partition:
      ID-1: / size: 1.54 GiB used: 16.2 MiB (1.0%) fs: overlay source: ERR-102 

    I remember an issue with an SD card having problems mounting on an old system except when using the 4.4 kernel, but I am not sure if this would help your case.

    Hopefully you can provide more info and some experts can provide some guidance.

    #46686
    Member
    Vincent17
    Helpful
    Up
    0
    :D

    Hi Xecure, thanks for your reply.
    I think what I have is an encrypted live install with persist-all root persist manual. Not frugal, right? I apologize for botching the terminology 🙁 The install to SD card was made with live-usb-maker.

    Before poweroff I run persist-save -q if I need to save rootfs. That does not seem to affect whether or not it successfully powers off.

    1. It hangs with desktop-session-exit shutdown button. Any command that goes through init 0 and /etc/live/bin/live-umount displays at the end:

    ... 
    live-umount: Kill any remaining processes
    live-umount: Dismount most filesystems
    live-umount: Disable swap
    live-umount: Ready to poweroff

    Then the screen goes black but about half the time the power remains on (power switch led and fan on, hot)

    2. It seems to suspend and wake properly from logout menu. The power switch led goes out (?!), one of the status leds blinks. It recovers instantly when I press the power switch.

    3. I will try a 4.4 kernel and report back.

    #46702
    Member
    skidoo
    Helpful
    Up
    0
    :D

    so far it hasn’t caused a problem. Will it?

    Given that the system reaches the point where “Ready to poweroff” is reported, I would not expect a hard poweroff to cause a problem. When I’ve intermittently experienced (across versions, using various kernels, never encrypted) this at-shutdown behavior, IIRC it has been due to ACPI ~~ module not loaded, or I had disabled it to save a megabyte or two…

    #46710
    Member
    Vincent17
    Helpful
    Up
    0
    :D

    Unfortunately, when halt is used, the system shuts down immediately. The scripts in rc0 and /etc/live/bin are skipped and “Ready to poweroff” is not displayed.
    In ubuntu forum, some people say to add acpi=force to grub; I tried that but it made no difference; anyway acpi is enabled as a startup service. But acpid is stopped before the live-umount script reaches the poweroff step…I wondered about that. I speculate that busybox acpid lacks the ability to poweroff my machine.
    EDIT: /etc/live/bin/busybox does not have acpid. poweroff itself tries to send signal to hardware?

    Xecure, I tried kernel 4.4.212-antix.1-486.smp and poweroff still fails 🙁

    • This reply was modified 6 months, 2 weeks ago by Vincent17.
    • This reply was modified 6 months, 2 weeks ago by Vincent17.
    #46918
    Member
    Vincent17
    Helpful
    Up
    0
    :D

    Solved — knock wood — by new approach: just after the “Ready to poweroff” message is displayed by /etc/live/bin/live-umount, insert an alternative shutdown command. I think all the preparation for shutdown has been done, so an abrupt poweroff should do no harm here. Almost everything has been unmounted, only busybox commands are available.

    What worked: copy /sbin/halt to /etc/live/bin/HALT and insert “exec HALT -dfiph” into live-umount (via commands in rc.local). I didn’t expect this to work because /sbin/halt needs libs according to ldd, but it does 🙂

    Everything else I tried failed to poweroff about half the time: poweroff -f -n (busybox poweroff, the default); reboot(RB_POWER_OFF) in c; echo o > /proc/sysrq-trigger; an assembly language program from here “This is equivalent to pressing the power button” and still it fails 🙁

    Thanks for the support, Xecure and skidoo.
    Cheers

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.