3 ms·
I recently ran into a similar case of idealism: in this case, systemd assuming that a laptop's lid "button" (and its S3 state) actually works correctly and assu
by yellowapple 10y ago
I recently ran into a similar case of idealism: in this case, systemd assuming that a laptop's lid "button" (and its S3 state) actually works correctly and assuming that the user wants the laptop to go to sleep if the lid is closed (regardless of power management settings).
For context, the laptop is an old one running openSUSE 13.2. User hands me the laptop to take care of routine updates. All of a sudden the screen goes blank, even in non-graphical modes. I was eventually able to read through 'dmesg' long enough to find out that the system was being told to go into standby exactly three minutes after boot.
After some WWW searching, I found out that systemd (or maybe logind specifically) does this as a "safety measure" (so that your laptop doesn't burn up in your backpack). Never mind that there are plenty of legitimate reasons for closing one's laptop lid besides putting it to sleep (for example, plugging into an external display). This wouldn't have normally been an issue if it weren't for the incorrect detection of the lid state; despite the laptop lid being wide open, it was mistakenly detected as closed. Further, the laptop has never really cooperated with Linux when it comes to standby, so instead of going to sleep, it'd end up just hanging at a blank screen entirely unresponsive, requiring a hard reboot.
Like, I appreciate that systemd wants to have my back, but I feel like they're overthinking things. I was thankfully able to edit some config file to tell systemd to ignore laptop lid events, but it's still rather silly.
- groks 10y agoSome lid switches are broken: https://who-t.blogspot.co.uk/2017/02/libinput-and-lid-switch-events.html https://who-t.blogspot.co.uk/2017/02/libinput-and-lid-switch...
- secabeen 10y agoThat's really strange. I've run multiple laptops in clamshell mode, with the system on my desk, closed, with external devices for all human interface. Do they not support that workflow, or are they being smart, and only doing that when there are no external displays connected?
- yellowapple 10y agoFrom what I gathered, they're trying to be "smart" about it by detecting if there are "docks", but I didn't really investigate much further (in particular, if "dock" means "external monitor is connected") beyond setting the relevant action to "ignore" in some config file (don't have the laptop in front of me at the moment, and my own machines don't use systemd, so hard to be more specific, unfortunately).