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.

  • If your mouse has a rechargeable battery does plugging in the USB cable solve the problem? In any respect it sounds like power management is confusing low mouse battery with low laptop battery and dimming screen to save electricity. What kind of mouse do you have? What kind of computer do you have? Are you using Gnome or Unity desktop? (probably doesn't matter in this case but doesn't hurt to ask). Are you using Xorg or Wayland for Input/Ouput device management? – WinEunuuchs2Unix Sep 22 '18 at 2:17
  • @WinEunuuchs2Unix My mouse doesn't have a rechargeable battery. Mouse is Logitech M510, computer is a 2014 System76 Gazelle Pro Linux laptop running Ubuntu 18.04 with Gnome 3.28.2 and X11. – tparker Sep 22 '18 at 3:26

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...

  • I'd actually like to keep the notification, but just disable the screen dimming. – tparker Sep 23 '18 at 18:35
  • Well to assist in learning if this on the right track can you temporarily disable the low-battery spam and see if it solves the problem? If it does we can refine the answer, if it doesn't then we can switch to a different tract altogether. – WinEunuuchs2Unix Sep 23 '18 at 18:45
  • Good point. As Ohto Nordberg mentions in a comment below the answer, it doesn't work in 18.04. The "low battery" notification still appears on restart and the screen still dims after 15 seconds. – tparker Sep 23 '18 at 20:30
  • 1
    I will keep digging then. – WinEunuuchs2Unix Sep 23 '18 at 20:36

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.
  • idle-dim returns false, idle-brightness returns 30, but the screen dims after 15 seconds. Manually increasing the idle brightness seems like too much of a hack, I'd rather figure out what's causing the dimming in the first place – tparker Sep 22 '18 at 3:15
  • @tparker I updated my answer. – user285259 Sep 22 '18 at 11:36
  • Could you clarify what you mean by "What do you see there?" The first command is just a directory - do you want its contents? The second command returns "monitor will print the received events for: UDEV - the event which udev sends out after rule processing KERNEL - the kernel uevent". The third and fourth commands each return tens of thousands of lines of output. – tparker Sep 23 '18 at 18:44
  • Ok, I explained. – user285259 Sep 24 '18 at 17:48
  • In my case, it seems the problem is really because of low battery on a peripherla device. This is a bug in my opinion i.e. that the screen is dimmed when my mouse needs recharging, but the laptop itself is full charged. – n1k31t4 Nov 11 '18 at 17:45

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.

  • 1
    If I first unplug the mouse and then restart, then the screen dim goes away, but as soon as I plug the mouse back in it starts again. – tparker Dec 13 '18 at 0:22
  • I plugged in my colleagues mouse and had that problem until I restarted it. The problem would probably reappear if I do the same again. Look like a bug that needs to be fixed somehow. – Ales Rebec Dec 13 '18 at 16:26

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.