How do I prevent sleep mode: my docked Laptop with an external Monitor and a closed Lid always enters suspend to RAM when given the shutdown command.
I am using 13.2 and KDE.
I have already disabled sleep within KDE’s energy settings. The problem occurs after shutdown with a closed lid. If the lid is opened later, the machine only resumes to complete the shutdown. There is no way to continue using the laptop without avoiding the shutdown then, so the sleep is futile.
Advice from old threads here about preventing sleep seems to be outdated, as I no longer find the configuration filed mentioned within the old threads.
Have a look at /etc/systemd/logind.conf. You can configure systemd-logind’s action when the lid is closed there (option “HandleLidSwitch”), see “man logind.conf” for further details.
I remember a (quite old) bug report about this, but I’m not sure if I can find it. And I thought this was fixed since a while already…
Probably file a new one. A closed lid during shutdown should definitely not suspend the system.
I had the same problem and this thread helps me a lot. But like STurtle mentioned “The above solution fixes this by disabling the lid detection entirely.”.
I found a solution which is preventing the sleep mode when the laptop is in a dockingstation.
and add the following line
Now the laptop should be shutdown/log out without switching to suspend.
Quick update from my side:
The solution which I wrote in my previous post works only for a view minutes after booting the laptop into KDE. When I start the laptop, login into KDE and make a reboot, the laptop went down without going in suspend mode. But when I make shutdown or reboot after using the laptop for a longer period, the suspend-problem occurs again.
Well, I only tried the HandleLidSwitch-option, but from what I learned, it only takes any effect outside of KDE, which is incidentally exactly what I wanted.
Without it, the Laptop would suspend while docked with lid closed, once I issue the shutdown command in KDE. Now, it no longer does that. However, KDE suspend and lid closing still works as before, as set in the KDE power settings. Looks like KDE ignores/supersedes these kind of settings while it is running, but not during startup and shutdown.
Strange thing. I had the “chance” to reinstall openSUSE recently and decided not to install nvidia drivers give noveau a go. What shall I say. Everything works flawlessly…except playing Fahrenheit :). Maybe I have to live with that problem and hope that it will be fixed in newer version of KDE/nvidia/kernel.