Control: clone -1 -2 Control: reassign -2 systemd 232-8 Control: retitle -2 systemd: power off without always a normal shutdown when resuming after suspend with the power button Control: severity -2 grave
as the lack of shutdown yields visible file corruption and potentially data loss. On 2017-01-11 16:20:35 +0100, Vincent Lefevre wrote: > On 2017-01-11 15:09:49 +0000, Ben Hutchings wrote: > > Unless you can show that some data had been written *and flushed* to > > disk by the application, but was not readable afterward - this does not > > count. Writes are buffered, and user space has to deal with that. > > If I understand the journalctl log correctly, the system does > a power off without a clean shutdown: > > [...] > Dec 23 10:51:01 zira systemd-logind[803]: Powering Off... > Dec 23 10:51:01 zira systemd-logind[803]: System is powering down. > Dec 23 10:51:01 zira systemd[1]: Stopping Manage, Install and Generate Color > Pro > > then nothing after that!!! This is where the problem is, not in the > application, which cannot know when the machine will power off. Well, there are two problems: 1. The fact that the system powers down instead of just resuming. systemd-logind reports "Power key pressed." but the power key was used to resume, so that I suppose that systemd-logind should have never seen this. 2. The fact that the system is powered off immediately without a clean shutdown. When I use the power button to power off the laptop, I get: Sep 17 19:36:13 zira systemd-logind[17281]: Power key pressed. Sep 17 19:36:13 zira systemd-logind[17281]: Powering Off... Sep 17 19:36:13 zira systemd-logind[17281]: System is powering down. Sep 17 19:36:13 zira systemd[1]: Stopped target Bluetooth. Sep 17 19:36:13 zira systemd[1]: Stopping Session 2041 of user vinc17. Sep 17 19:36:13 zira systemd[1]: Deactivating swap /dev/disk/by-id/dm-uuid-LVM-K Sep 17 19:36:13 zira systemd[1]: Stopping Disk Manager... [...] i.e. a normal shutdown, but when this is used just after a suspend in order to resume, I *occasionally* get (well, this occurred only twice): Jul 25 17:15:17 zira systemd-logind[769]: Power key pressed. Jul 25 17:15:17 zira systemd-logind[769]: Powering Off... Jul 25 17:15:17 zira systemd-logind[769]: System is powering down. -- Reboot -- Dec 23 10:51:01 zira systemd-logind[803]: Power key pressed. Dec 23 10:51:01 zira systemd-logind[803]: Powering Off... Dec 23 10:51:01 zira systemd-logind[803]: System is powering down. Dec 23 10:51:01 zira systemd[1]: Stopping Manage, Install and Generate Color Pro -- Reboot -- No normal shutdown! -- Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)