After upgrading to systemd 217, my laptop can't shutdown correctly. When running shutdown command (any, I tried "shitdown -h now", "poweroff", "systemctl poweroff"), my laptop rebooting instead of shuting down. Downgrading to systemd 216 helps. Some details: Distribution: Arch Linux x64 Hardware: System76 Galago Ultra Pro Kernel: 3.17.2-1-ARCH I am attaching two debug logs for systemd 216 and systemd 217. Please let me know, if additional logs or information requested. I also create bug in the arch bug tracker: https://bugs.archlinux.org/task/42612
Created attachment 108748 [details] systemd 216 log
Created attachment 108749 [details] systemd 217 log
Does 'systemctl poweroff -f' shutdown the machine?
No, machine is rebooting when I run 'systemctl poweroff -f'
Then most likely this is a kernel problem. Where there any other changes in parallel to the systemd 216-217 change, especially of the kernel package?
I checked all dependencies and cases I can blame in the issue, including downgrading the kernel version, but nothing helps when systemd 217 installed (I tried with kernels 3.16.x and 3.17.x). It may be related to kernel, but I do not think this is only kernel problem because of the following behavior: - when I boot with systemd 217 and then I downgrade it to 216 and do poweroff, then poweroff works normally; - when I boot with systemd 216 and then upgrade systemd to 217 and do poweroff, poweroff doesn't work. I can't explain this two facts by kernel problems, since I see poweroff behavior changed just by upgrading/downgrading systemd without reboot.
OK, let's drill down then... If you compile and run the following program, does it also reboot? ############# reboot-force.c ########### #include <stdio.h> #include <unistd.h> #include <sys/reboot.h> int main(void) { reboot(RB_POWER_OFF); perror("poweroff"); return 1; } // gcc -Wall -o reboot-force reboot-force.c && sudo ./reboot-force #########################################
Yes, it does: sudo ./reboot-force shuts down my laptop.
Sorry, I mean it does NOT reboot the PC, it DOES shut it down.
Downstream bug report in Mageia too for reference https://bugs.mageia.org/show_bug.cgi?id=14432
Uneducated guess, but perhaps it's due to the failure-action rework... perhaps some service is failing with a failure action of reboot or something similar. e.g. something in or around 2928b0a863091f8f291fddb168988711afd389ef
(In reply to Colin Guthrie from comment #11) > Uneducated guess, but perhaps it's due to the failure-action rework... > perhaps some service is failing with a failure action of reboot or something > similar. > > e.g. something in or around 2928b0a863091f8f291fddb168988711afd389ef This would seem resonable, but... the shutdown commands have JobTimeoutAction=poweroff-force, so if anything, the machine should shut down hard. The result in comment #9 shows that poweroff works, so this is not a kernel issue. I just tried, and a failing job with JobTimeoutAction=poweroff-force shuts down the machine. @Alex, can you remove the JobTimeoutAction settings, by adding /etc/systemd/system/basic.target.d/timeout.conf, /etc/systemd/system/poweroff.target.d/timeout.conf, /etc/systemd/system/reboot.target.d/timeout.conf, each containing: [Unit] JobTimeoutSec=0 JobTimeoutAction=none and systemctl daemon-reload and shut down. Does this change anythign?
> Does this change anythign? Unfortunately, no :( I still getting reboot on shutdown operation.
OK, looks like issue was finally identified and resolved: https://github.com/systemd/systemd/commit/4b5d8d0f22ae61ceb45a25391354ba53b43ee992 I applied the patch for the 217 version and shutdown works good now. Thanks everybody for participation and help!
But I still curios - why only limited number of people was affected by this issue? As per fix description it sounds like a problem, which affects all systems, having initrd. Or I am missing something here?
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.