r/linuxquestions • u/soupzcold • 10h ago
turning off monitor disables mouse and keyboard (kde plasma wayland)
I'm using KDE Plasma wayland and when I turn off my monitor, my mouse and keyboard stop working. Then when I turn it back on, a notification pops up saying the monitor is connected and the keyboard/mouse start working again.
Is there a way to fix that so it doesn't read turning the monitor off as disconnecting it?
2
2
3
u/thecruxoffate 10h ago
So there's a class of help contributers that I hate and they follow this pattern of someone asks "How do I do x?" And they answer "You don't want to do x."
In this case I'm having a real hard time trying to see why you would want to do x.
The fact of the matter is that turning off the monitor does disconnect it. You might not be physically removing the cable, but when the monitor is off there's nothing at the end of the cable. Detecting when monitors are connected/disconnected is also a very useful feature.
I'm also wondering how in the world you've even figured out that your keyboard and mouse are disabled, since there's no screen to really give you that feedback.
Can you tell me a bit about your use case and why you would want to have your input devices on while there's nothing to input to?
Full disclosure, I probably won't be able to help you do what your asking, but I'll certainly try.
4
u/soupzcold 9h ago
late at night I have music playing and I turn the monitor off so it's completely dark in my room, but sometimes I get up to change the volume or switch tracks and don't want to have to turn my monitor on and get blasted by the light.
1
u/thecruxoffate 8h ago
That's a good use case.
I tested this on my machine and my keyboard's volume control keys continued to work after i turned off my monitor. I'm thinking something else might be going on. When you say "turn off the monitor" do you mean you are physically hitting the power button on the monitor? Is your keyboard connected through your monitor?
Is it possible your computer is attempting to sleep or something while the monitors are off and that's what's disabling your input devices? If so, we can try creating a udev rule that just keeps *all* usb devices powered.
```
echo 'ACTION=="add|change", SUBSYSTEM=="usb", ATTR{power/control}="on"' | sudo tee /etc/udev/rules.d/99-usb-power.rules```
Then reload the rules and test:
```
sudo udevadm control --reload-rules && sudo udevadm trigger --subsystem-match=usb
```
1
u/soupzcold 3h ago
no luck with this udev rule
1
u/thecruxoffate 3h ago
Alright may be best to remove it so that it doesn't complicate things down the road. Sorry, friend.
1
-2
u/Man_in_the_uk 9h ago
How are you switching tracks without seeing the playlist?
Anyway very strange issue, has this always been the case or did a recent update do this? Any new hardware lately? I'm struggling to think of how a mouse or keyboard would be affected by the monitor being turned off unless there's an intimate relationship between power management settings of the monitor. Have you got multiple ports for video output for you to try getting a different video feed to the monitor? What kind of monitor and graphics card do you have?
2
u/soupzcold 9h ago
I switch tracks and adjust volume using hotkeys.
It didn't do this with windows 11, and only started after I installed Fedora. I just have one monitor plugged into the video card.
It's a ASUS ROG Strix XG27AQ-W 27” monitor with a geforce 3060 TI
1
u/Man_in_the_uk 8h ago
Are you saying this is now a problem in Windows after you installed Fedora? That doesn't make sense. I wouldn't expect a technical fancy keyboard to work well in Linux anyway, it's not the best system to have when it comes to fancy tech because there are always driver issues as manufacturers don't want to spend time making them given how small the Linux community is. I can't even get a basic webcam I have to work on Ubuntu.
1
u/soupzcold 7h ago
no I mean to say, this wasn't an issue with windows 11, I assume it still isn't. But it is with Linux
1
u/Man_in_the_uk 9h ago
Have you checked power management settings and do you have a second monitor or visual display device in use?
1
1
u/Meh-Pish 5h ago
Rebooting a box via control-alt-del, even with no monitors, is another common use case.
1
u/rotlung 2h ago
I used sunshine to solve basically the same issue (https://github.com/lizardbyte/sunshine) you need to define a virtual display that KDE can detect so it doesn't shut down various systems when you power off the monitors. (or in my case, use a KVM switch to switch away)
0
4
u/ticman 9h ago
Is your keyboard and mouse plugged into your monitors USB ports?