How can I disable automatic screen dimming when the wireless mouse has low battery?

6,246

Solution 1

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.

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

Solution 3

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.

Share:
6,246
tparker
Author by

tparker

Updated on September 18, 2022

Comments

  • tparker
    tparker over 1 year

    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.

    • WinEunuuchs2Unix
      WinEunuuchs2Unix over 5 years
      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?
    • tparker
      tparker over 5 years
      @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
    tparker over 5 years
    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
  • user285259
    user285259 over 5 years
    @tparker I updated my answer.
  • tparker
    tparker over 5 years
    I'd actually like to keep the notification, but just disable the screen dimming.
  • tparker
    tparker over 5 years
    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.
  • WinEunuuchs2Unix
    WinEunuuchs2Unix over 5 years
    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.
  • tparker
    tparker over 5 years
    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.
  • user285259
    user285259 over 5 years
    Ok, I explained.
  • n1k31t4
    n1k31t4 over 5 years
    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.
  • tparker
    tparker over 5 years
    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.
  • Ales Rebec
    Ales Rebec over 5 years
    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.