0

I used to run the command xbacklight -set 0 to make my brightness effectively 0 i.e. it was almost impossible to see anything, which was really helpful for conserving my battery power. However having upgraded to Ubuntu 15.10, when I run the command I only get partial dimming of the screen i.e. it is still possible to see the screen without any problems.

How can I turn the brightness completely down? For example when I lock my screen it goes completely blank how can I achieve that kind of a dimming of my screen without locking my computer?

Gonenc
  • 161
  • Well, its possible to turn off screen like that with dbus, but dimming is a different issue. Likely has to do either with new driver or the fact that 15.10 uses different init system to manage a lot of services. I can post the dbus way to dim the screen completely, but that probably won't help you if your goal is to have screen slightly lit while on lowest setting – Sergiy Kolodyazhnyy Feb 05 '16 at 13:21
  • I'd appreciate the dbus solution, even though it doesn't solve the problem completely. – Gonenc Feb 05 '16 at 13:48

1 Answers1

1

Since you have said that the dbus method is fine, that what I will post, plus some extra.

There is a way to turn off the screen through dbus service:

qdbus com.canonical.Unity /com/canonical/Unity/Session com.canonical.Unity.Session.ActivateScreenSaver/

There is also a way to programmatically alter brightness to lowest setting, namely

qdbus  org.gnome.SettingsDaemon.Power /org/gnome/SettingsDaemon/Power org.gnome.SettingsDaemon.Power.Screen.SetPercentage 0

The value 0 at the end is to set the brightness to lowest percentage, but it could be anything , an unsigned integer.

Thanks to this answer , there is also another approach:

xset dpms force off

I suggest you bind the xset dpms force off and xset dpms force on to two shortcuts on the keyboard, because this turns off the screen, it does not act as screen saver, so you will need methods to turn on and off the screen at will.

However,that may or may not work, depending on the graphics card. In my experience, with this command I can set one laptop with Intel graphics that I have to completely turn off the screen , but the other one with AMD doesn't completely turn off.

The less clean way is to find what is in your /sys/class/backlight/ directory, for instance I have the /sys/class/backlight/intel_backlight with brightness file in it. With root privilleges you can edit that file and set it to some value you like.

There is way to change brightness with xrandr however that's a software solution - it does not actually decrease power delivered to the screen, hence I'll omit it here

Sergiy Kolodyazhnyy
  • 105,154
  • 20
  • 279
  • 497
  • I do believe the xrandr -way saves battery, software or not, it dims the most power consuming section of the computer. – Jacob Vlijm Feb 05 '16 at 15:28
  • @JAcobVlijm man page itself states that it's preferable to use other approach than xrandr since its software only approach. When I dim down brightness with xrandr on my laptop the screen itself is still brightly lit, just the screen colored darker, in other words power itself doesn't decrease,which is OPs main concern here – Sergiy Kolodyazhnyy Feb 05 '16 at 15:45
  • Update: Just ran powerstat on my laptop with dimmed screen (xrandr way). The results seem to support your answer, practically no difference in power consumption! +1 from me. – Jacob Vlijm Feb 05 '16 at 16:06
  • My hardware keys reduce brightness to 1, but not 0, so if I want to turn the screen completely off, I have to edit /sys/class/backlight/intel_backlight/brightness and set the value to 0. Hilarious. – J. B. Rainsberger Sep 18 '18 at 21:56