You are not logged in.
I still meant how often (and when) you typically reboot the notebook.
another laptop … at my parents' home. It also failed to boot
Did it also shut down there? And how's their power-grid situation?
Did your other local system also act up in the meantime (in proximity to the main system)?
Offline
I still meant how often (and when) you typically reboot the notebook.
another laptop … at my parents' home. It also failed to boot
Did it also shut down there? And how's their power-grid situation?
Did your other local system also act up in the meantime (in proximity to the main system)?
Sorry for the late reply. First the answers to #51, then new data: it hung again and the shutdown hook caught the end of it.
Answers to #51
I shut down / reboot the main laptop several times a day.
Parents' laptop: yes, it also hangs on shutdown, and they have the same scheduled power outages as we do.
The second laptop here (Intel only, no NVIDIA, XFCE, wpa_supplicant, same router) hung on shutdown again after Dec 02 as well.
Hang on Dec 06, 00:36
Same symptoms as before: black screen, fans and power LED stay on, I had to force it off. Kernel 7.3.6-arch1-2, booted with systemd.log_level=debug systemd.log_target=kmsg log_buf_len=1M printk.devkmsg=on ignore_loglevel initcall_debug. The system-shutdown hook from #46 (remount / rw, dmesg > file, sync, remount ro) saved the dmesg below. It was the last shutdown before the next boot, so this log is from the hung poweroff. Tail:
[43236.845523] systemd-shutdown[1]: Sending SIGKILL to remaining processes...
[43236.856084] systemd-shutdown[1]: Unmounting file systems.
[43236.864481] (sd-umount)[4192694]: Unmounting '/run/credentials/systemd-journald.service'.
[43236.869561] (sd-remount)[4192695]: Remounting '/' read-only with options 'compress=zstd:3,ssd,discard=async,space_cache=v2,subvolid=1542,subvol=/@'.
[43236.947368] systemd-shutdown[1]: All filesystems unmounted.
[43236.948109] systemd-shutdown[1]: Deactivating swaps.
[43236.948845] systemd-shutdown[1]: All swaps deactivated.
[43236.949570] systemd-shutdown[1]: Detaching loop devices.
[43236.950993] systemd-shutdown[1]: Failed to chase block device, ignoring: No such file or directory
[43236.953044] systemd-shutdown[1]: All loop devices detached.
[43236.953701] systemd-shutdown[1]: Stopping MD devices.
[43236.954437] systemd-shutdown[1]: All MD devices stopped.
[43236.955061] systemd-shutdown[1]: Detaching DM devices.
[43236.955791] systemd-shutdown[1]: All DM devices detached.
[43236.956378] systemd-shutdown[1]: All filesystems, swaps, loop devices, MD devices and DM devices detached.
[43236.958211] systemd-shutdown[1]: Successfully forked off '(system-shutdown)' as PID 4192698.
[43236.958507] (system-shutdown)[4192698]: About to execute /usr/lib/systemd/system-shutdown/debug.sh
[43236.960107] (system-shutdown)[4192698]: About to execute /usr/lib/systemd/system-shutdown/mdadm.shutdownNo errors, no "blocked for more than", nothing unusual before it. Userspace finishes completely: every unit is stopped, all filesystems are unmounted and / is read-only, swap/loop/MD/DM are detached, and the system-shutdown hooks run. After that only the reboot(RB_POWER_OFF) syscall is left, meaning the kernel's device_shutdown() and then the ACPI S5 transition. So I think the hang is somewhere in there. That also explains why the journal always ends at "Stopping Flush Journal to Persistent Storage".
The full dmesg from the hook is ~8.4k lines, mostly udev/varlink debug noise. I can upload it if you want it.
Day change (your question in #47)
Both hangs I have logs for happened on the first shutdown after midnight, in a boot that had started the day before:
Nov 28/29 (#46): shutdown at 00:14, uptime 3 h 24 min, so the boot started around 20:50 on Nov 28.
Dec 06: shutdown at 00:36, uptime ~12 h (43236 s in dmesg), so the boot started around 12:35 on Dec 05.
Since I normally reboot several times a day, most of my boots don't cross midnight, so this doesn't look like pure coincidence.
It also looks a lot like these reports of intermittent "black screen, machine stays on" power-off hangs since 7.1.5 / 7.2.9:
CachyOS linux-cachyos#957 (labelled upstream, still open)
Bazzite #6220 (Intel Skylake, 7.2.8 good, 7.2.9+ hangs at the final power-off)
CachyOS forum (bisected to "wifi: mt76: Disable napi when removing device")
What I'm doing now / what I want to check next
1. Main laptop: capture the last kernel messages with pstore, following the kernel docs. I dropped the systemd debug parameters, added efi_pstore.pstore_disable=N and enabled systemd-pstore.service. The shutdown hook now keeps the last 10 dmesg logs with timestamps and arms the rest at runtime, right before the final reboot() syscall:
#!/bin/sh
# $1 = poweroff | reboot | halt | kexec
mount -o remount,rw / 2>/dev/null
mkdir -p /shutdown-logs
dmesg > "/shutdown-logs/$(date +%F_%H-%M-%S)_$1.txt"
ls -1t /shutdown-logs/*.txt 2>/dev/null | tail -n +11 | xargs -r rm -f
sync
mount -o remount,ro / 2>/dev/null
echo Y > /sys/module/printk/parameters/always_kmsg_dump
echo Y > /sys/module/kernel/parameters/initcall_debug
echo 30 > /proc/sys/kernel/hung_task_timeout_secs
echo 1 > /proc/sys/kernel/hung_task_panic
echo 1 > /proc/sys/kernel/softlockup_panic
echo 1 > /proc/sys/kernel/hardlockup_panic 2>/dev/null
echo 30 > /proc/sys/kernel/panic
exit 0It works: after a normal poweroff this morning, systemd-pstore collected a 17-part efi_pstore dmesg record into /var/lib/systemd/pstore/. On the next hang I expect one of three outcomes:
a hung-task panic with a backtrace naming the stuck driver (the machine reboots by itself after 30 s);
a record that ends with "reboot: Power down", meaning the kernel finished and the firmware hangs in S5;
no new record at all, meaning it hangs before kmsg_dump and the detectors don't catch it.
2. Day-change test on both laptops: on some evenings I'll keep the boot running past midnight and shut down after 00:00, and compare that with shutdowns within the same day. I'll write down the time of every hang.
3. Second laptop: run linux-lts 6.18 for the next 3-4 weeks, to see whether this is the 7.x regression.
Does this plan make sense? And what exactly would you check about the day change: the RTC (timedatectl), timers that fire at midnight, something else?
Offline