Hi!
Sometimes I have power outages at home. I have a small UPS connected to my computer to prevent data loss. The monitor isn’t connected, so it turns off.
Years ago (when I was using X11), I could put the computer to sleep or shut it down even if the monitor wasn’t connected, by pressing the corresponding key on my keyboard or PC tower.
Another problem is that if I was pressing a key when the power and monitor go out, KDE keeps that key pressed until the monitor turns back on.
Is this a bug? If not, any help on how to fix it?
Thanks for your help.
P.S. I know I can use NUT, but it’s too complicated for my use case, which is very simple: to put the system into sleep mode or shut it down if the power goes out.
is your keyboard connected to your monitor?
settings > energy saving > button event handling
has options for you to set what the button on he PC does when you press it.
pc behavior around power failures has little to do with KDE, i would suggest plugging your monitor into the UPS as well… it will shorten the time you have to shut things down but at least you will have full use of the machine for a time.
is your keyboard connected to your monitor?
It’s connected to the computer, not monitor.
settings > energy saving > button event handling
has options for you to set what the button on he PC does when you press it.
The PC’s power button isn’t working either. I tried configuring that button to put the PC into sleep mode.
It seems that all input (keyboard, mouse, etc.) stops working when there is no output device, such as a monitor.
pc behavior around power failures has little to do with KDE, i would suggest plugging your monitor into the UPS as well… it will shorten the time you have to shut things down but at least you will have full use of the machine for a time.
The UPS is small. It has enough power for the computer, but not for the monitor. 
it will have enough power for both, but for a shorter period of time.
try it, you will see.
or perhaps time to invest in a larger UPS… the pc is not much use without the monitor anyway.
I installed kwin-x11 and plasma-login-x11 to test them on X. If I disconnect my monitor, the keyboard and the PC’s power button still work, and I can put it to sleep or shut it down.
After doing a little more research, I found that other people had already been experiencing this problem for some time, with something as simple as pausing a song with the monitor turned off:
“cant-interact-with-the-system-when-monitor-is-turned-off/7400”
(I can’t post links
from own discuss)
Is this a bug or a limitation of Plasma with Wayland?
Should I submit a report?
My “solution”: send the suspend command using KDE Connect. 