11

Similarly to this question, I find that when a wireless mouse with low battery is plugged into a laptop running Ubuntu 18.04 on battery power, the screen automatically dims after 15 seconds of inactivity, even if the Power setting "Dim screen when inactive" is set to "Off". This doesn't make any sense to me - why would the dimming the screen help preserve power in the mouse?

15 seconds is very inconveniently short - how can I disable this automatic screen dimming? I do not have any power management programs like jupiter or tlp installed. This answer suggests running

gsettings set org.gnome.desktop.session idle-delay <seconds>

on the terminal, but that doesn't change anything for me. Disabling DPMS as suggested in this answer doesn't work either. The only thing that works is unplugging the mouse and restarting my computer, which is obviously kind of annoying.

tparker
  • 377

5 Answers5

8

Read your current value :

gsettings get org.gnome.settings-daemon.plugins.power idle-dim
gsettings get org.gnome.settings-daemon.plugins.power idle-brightness

Then try :

gsettings set org.gnome.settings-daemon.plugins.power idle-dim false

Or if this do not work, try different values for org.gnome.settings-daemon.plugins.power idle-brightness

org.gnome.desktop.session idle-delay is just the delay before the screensaver activates !


I guess the system see your mouse battery as a laptop battery. Udev handles peripherals and power supplies, so it is the first suspect. Sorry I cannot give you a clear solution right now, we have to find a clue of what is wrong first. Post these details, I hope it will help :

  • What is the content of /sys/class/power_supply/ when the mouse is plugged and when it is not ?
  • Run sudo udevadm monitor -p. This will monitor events, so you need to plug the mouse after. Check if the output is the same when the battery is high or low.
  • Run sudo journalctl --since=-2m just after plugging the mouse. Likewise, check if the output is the same when the battery is high or low.
2

You can try this Q&A: Disable "Mouse battery low" spam notification

For ubuntu 17.10 go to org --> gnome --> settings-daemon --> plugins --> power Alter the "percentage-low" setting to what you want. I changed from 10% to 4%.

Not having the problem you have means I can't test it though...

2

For others looking. This did the trick for me

xset -dpms # Disables Energy Star features xset s off # Disables screen saver

found solution here

https://unix.stackexchange.com/questions/329893/screen-turns-off-after-10-minutes-and-i-cant-find-out-why

1

Have you tried restarting your PC? It helped me on 18.04. Had the same issue with 15 sec screen dimming with the setting OFF, and after a restart it's gone.

alesr
  • 11
1

I have a fully charged laptop and mouse battery, so not quite the original problem. However under Ubuntu 22.04, Why does my screen go dim after a while? worked for me.

After precisely 30 seconds, if I had "Power Saver" mode enabled, Ubuntu would dim only the main screen (and not an external HDMI-attached screen) independently of all the other dimmer switches.

Opening the top right menu and switching to "Balanced" fixed it.

top right menu change power saver to balanced

pzrq
  • 301