You are not logged in.

#1 2022-01-12 23:08:59

Nihar M
Member
Registered: 2022-01-12
Posts: 4

[Solved] archlinux system shutdown blocked repeatedly

Solution TLDR: Check if your laptop has the ability to do a hard power off (as in shutting of the power to components) and how long you have to hold the power button down to do a hard power off. This was over 15 seconds for me and could be longer or shorter for you. Doing a hard power off did not break anything else in linux or windows (dual boot).

Hardware Specifications (if necessary):
- Dell G5 laptop
- Intel i7-9750H
- 32gb ram
- NVIDIA GeForce GTX 1660 Ti Mobile

Software Specifications (if necessary):
- windows 10 and arch linux (5.15.13-arch1-1) in a dual boot configuration
- windows 10 on nvme drive
- arch linux on seperate ssd (still withing laptop)
- using GRUB as a bootloader with os-prober
- automatically mounting windows 10 OS and DATA partitions in fstab file

The problem I have is that when shutting down my laptop at times the shutdown process gets stuck and I am unable do anything about it, even trying to use the power button on the laptop is ineffective.

[    OK    ] Reached target Unmount All File systems
[    OK    ] Reached target Late Shutdown Services.
[    OK    ] Finished System Power Off.
[    OK    ] Reached target System Power Off.
[ 4998.x] INFO: task shutdown:1 blocked for more than 122 seconds.
[ 4998.x]            Not tainted 5.15.13-arch1-1#1
[ 4998.x] "echo 0 > proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 4998.x] INFO: task kworker/5:1:180 blocked form more than 122 seconds.
[ 4998.x]            Not tainted 5.15.13-arch1-1#1
[ 4998.x] "echo 0 > proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 4998.x] INFO: task kworker/9:3:434 blocked form more than 122 seconds.
[ 4998.x]            Not tainted 5.15.13-arch1-1#1
[ 4998.x] "echo 0 > proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 4998.x] INFO: task kworker/u24:48:50704 blocked form more than 122 seconds.
[ 4998.x]            Not tainted 5.15.13-arch1-1#1
[ 4998.x] "echo 0 > proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 4998.x] INFO: task kworker/9:0:53925 blocked form more than 122 seconds.
[ 4998.x]            Not tainted 5.15.13-arch1-1#1
[ 4998.x] "echo 0 > proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 5121.x] INFO: task shutdown:1 blocked for more than 245 seconds.
[ 5121.x]            Not tainted 5.15.13-arch1-1#1
[ 5121.x] "echo 0 > proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 5121.x] INFO: task kworker/5:1:180 blocked form more than 245 seconds.
[ 5121.x]            Not tainted 5.15.13-arch1-1#1
[ 5121.x] "echo 0 > proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 5121.x] INFO: task kworker/9:3:434 blocked form more than 245 seconds.
[ 5121.x]            Not tainted 5.15.13-arch1-1#1
[ 5121.x] "echo 0 > proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 5121.x] INFO: task kworker/u24:48:50704 blocked form more than 245 seconds.
[ 5121.x]            Not tainted 5.15.13-arch1-1#1
[ 5121.x] "echo 0 > proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 5121.x] INFO: task kworker/9:0:53925 blocked form more than 245 seconds.
[ 5121.x]            Not tainted 5.15.13-arch1-1#1
[ 5121.x] "echo 0 > proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 6616.x] ACPI: button: THe lid device is not compliant to SW_LID

(I did not include the second part of the timestamps since I am copying this by hand from a photo I took.)

The final timecode is when I came back to see the laptop still on and tried closing the lid, then spamming the power button a few times, after about another minute the system shutdown. The previous times this happened I was there for the whole process and spamming the power button did nothing and after about 10 minutes it just shutdown (possible due to battery going below 10% not sure).

I have looked up to see if others had a similar problem, however it appeared their kernels were tainted which mine appears to not be. I will triple check that windows fast boot and such is turned off but I am 99% sure that this is not the issue. Another post mentioned that the unmounting of drives may have failed, but again this does not seem to be the problem here. I turned of the quiet kernel parameter to get more output but that produced no errors.

The problem does not occur every time I try to shutdown and has never happened when I reboot (although that may not really mean anything).

The dmesg and journalctl commands can help diagnose with boot problems as I understand, however this is a shutdown problem and the first dmesg log was the kernel run command.

If more information is needed please let me know, but understand I cant recreate the problem reliably so I will have to get lucky/unlucky to provide more info.

I did install linux on the nvme with dual boot on this laptop before, but then I uninstalled and reinstalled arch onto the ssd so I can have more space, and during that installation the problem never occured.

Thanks for any help in advance. smile

Last edited by Nihar M (2022-01-23 05:04:23)

Offline

#2 2022-01-13 09:24:45

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,091

Re: [Solved] archlinux system shutdown blocked repeatedly

Rule out
#1 windows fast-start (see 3rd link below) - no, the drive doesn't matter and since the ACPI is involed, this is very likely the cause. You'll have to shut down from windows and linux once or twice to "unconfuse the BIOS" (it's borderline voodoo)
#2 KDE, see eg. https://bbs.archlinux.org/viewtopic.php?id=269549

Offline

#3 2022-01-17 05:54:11

Nihar M
Member
Registered: 2022-01-12
Posts: 4

Re: [Solved] archlinux system shutdown blocked repeatedly

Update:

I broke grub somehow and had to reinstall/reconfigure grub using a usb with archiso. After this I did not have this problem for a few shutdowns then it occurred again.



[ 1098.x] watchdog: watchdog0: watchdog did not stop!
[ 1098.x] watchdog: watchdog0: watchdog did not stop!
[ 1098.x] sd-umoun[18722]: failed to unmount /oldroot: Device or resoure busy
[ 1098.x] sd-umoun[18723]: failed to unmount /oldroot/sys: Device or resoure busy
[ 1098.x] Failedto finalize file systems, ignoring.
[ 1098.x] psmouse serio1: Failed to disable mouse on isa0060/serio1

The problem with unmounting /oldroot is mentioned here: https://bbs.archlinux.org/viewtopic.php?id=233820, however this appears to be only an error message, not something that actually causes the shutdown process to hang. However, I do currently have proprietary nvidia drivers and prime-run installed to save power.


The above log is NOT from the failed shutdown, as I had to leave the house when the failed shutdown occurred. I left the laptop with around 80% battery and returned (~5 hours later) to see the laptop shutdown and on 1% battery (checked after booting into windows). If the laptop had shutdown correctly I do not believe the battery would have drained this quickly. As such the most likely event is that the shutdown hung until the laptops battery drained and it lost power.

Attempting to use

journalctl -b -1

provides:

Jan 16 08:28:07 nihar-archlinux systemd[1]: Reached target Unmount All Filesystems.
Jan 16 08:28:07 nihar-archlinux systemd[1]: Reached target Late Shutdown Services.
Jan 16 08:28:07 nihar-archlinux systemd[1]: systemd-poweroff.service: Deactivated successfully.
Jan 16 08:28:07 nihar-archlinux systemd[1]: Finished System Power Off.
Jan 16 08:28:07 nihar-archlinux audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-poweroff comm="systemd" exe=
"/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jan 16 08:28:07 nihar-archlinux audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-poweroff comm="systemd" exe="
/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jan 16 08:28:07 nihar-archlinux systemd[1]: Reached target System Power Off.
Jan 16 08:28:07 nihar-archlinux systemd[1]: Shutting down.
Jan 16 08:28:07 nihar-archlinux audit: BPF prog-id=0 op=UNLOAD
Jan 16 08:28:07 nihar-archlinux audit: BPF prog-id=0 op=UNLOAD
Jan 16 08:28:07 nihar-archlinux audit: BPF prog-id=0 op=UNLOAD
Jan 16 08:28:07 nihar-archlinux audit: BPF prog-id=0 op=UNLOAD
Jan 16 08:28:07 nihar-archlinux audit: BPF prog-id=0 op=UNLOAD
Jan 16 08:28:07 nihar-archlinux audit: BPF prog-id=0 op=UNLOAD
Jan 16 08:28:07 nihar-archlinux systemd-shutdown[1]: Syncing filesystems and block devices.
Jan 16 08:28:07 nihar-archlinux systemd-journald[306]: Journal stopped

Is there a way to access logs for the shutdown process after this point as this is when the problem occurs? (I think)

As for seth's suggestions windows fast start is disables and I use qtile and do not bother to run a compositor as I ended up finding the transparency on the terminal annoying in practice.

Finally is there a way to enter an emergency shell or such at this point in the boot, and are there any commands that can help diagnose the problem when it occurs or just force a shutdown.

Offline

#4 2022-01-17 08:18:17

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,091

Re: [Solved] archlinux system shutdown blocked repeatedly

Is there a way to access logs for the shutdown process after this point

The journal wrote:

Jan 16 08:28:07 nihar-archlinux systemd-shutdown[1]: Syncing filesystems and block devices.
Jan 16 08:28:07 nihar-archlinux systemd-journald[306]: Journal stopped

is there a way to enter an emergency shell or such at this point

You could try Alt+SysRq+b, https://wiki.archlinux.org/title/Keyboa … el_(SysRq) what will at best reboot the system and tell us whether the general ACPI calls work.

However:

After this I did not have this problem for a few shutdowns then it occurred again.

What happened interim? Can you re-establish functionality by booting from usb (not even installing grub)?
If the answers are "i booted windows" and "yes", I'd seriously re-check the state of windows fast-start (windows updates occasionally re-enable it, so if your assertion is based on old data, it might be dated …)

Offline

#5 2022-01-23 05:00:26

Nihar M
Member
Registered: 2022-01-12
Posts: 4

Re: [Solved] archlinux system shutdown blocked repeatedly

Thanks for the help seth, but I didnt manage to find a proper solution and every so often the shutdown process does hang. The SysRq keys did not work when the shutdown hangs either.

My final solution is that I just wasnt pressing the power off button on my laptop for long enough. It turns out I needed to hold it down for around 15 seconds for a full power off. This does not cause any problems with subsequent reboots and everything works fine.

Offline

#6 2022-01-23 08:14:48

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,091

Re: [Solved] archlinux system shutdown blocked repeatedly

It's a forceful poweroff - if you do that after the system has fully shut but doesn't power off, there's no problem with that - it's just nasty.
If you do that w/o the filesystem having been synced, you'll provoke data loss.

I still suspect the cause to be a hibernating windows, though.

Offline

Board footer

Powered by FluxBB