Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

The value of /sys/class/backlight/acpi_video0/brightness increments by four when the brightness controls are used, but I am able to force the value to anything in [0-10]. I have a HP Envy 17-3200. It may be more relevant to say, I'm using an integrated intel graphics card.

This problem persists in both unity and in gnome shell.

share|improve this question
    
Can you run /usr/lib/gnome-settings-daemon/gsd-backlight-helper --get-max-brightness and show the output? –  mfisch Nov 28 '12 at 19:58
    
Also are you using the slider in gnome-control-center or are you using the keys on your keyboard? –  mfisch Nov 28 '12 at 20:00
add comment

1 Answer

up vote 9 down vote accepted
+50

This problem (generally) doesn't arise if the slider in 'System Settings>Brightness and lock' is used.

This (generally) arises when the brightness control hotkeys are used because the acpi driver, intel driver and gnome power daemon (and possibly one more) all handle the hotkeys and pass them onto the next level -seems like stupid design really.

FIX 1:

An easy fix is to let the intel driver do the job and disable the rest as follows.

  1. As root edit /etc/default/grub: sudo nano /etc/default/grub
  2. Find the line containing GRUB_CMDLINE_LINUX_DEFAULT= and add the options acpi_backlight=vendor acpi_osi=Linux. For example, change GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" to GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor acpi_osi=Linux"
  3. Save file by pressing Ctrl-O and then enter. Press Ctrl-X to exit.
  4. Now, run sudo update-grub
  5. Restart the computer. Now, brightness should increase in steps of one.

Note: If you do this you will loose the brightness slider and the OSD notification for brightness change (as they are handled by gnome). In my opinion, however, these are not important. You can undo these changes by again editing /etc/default/grub to what it was, then running sudo update-grub and restarting.

FIX 2:

Not so easy fix: Let gnome handle the brightness controls.

Refer to http://askubuntu.com/a/178003/111720. Stopping acpi driver from handling keys should work as it is given in that answer. But to take care of intel driver, you'll have to port the instructions for thinkpad_acpi module to intel (This may not even be possible).

FIX 3:

More info:

Actually 256 (0-255) levels of brightness are available. To check that it works for you try sudo setpci -s '00:02.0' F4.B=xx where xx is a hex number. digits are 0,1,...9,a,b,c,d,e,f. Example: sudo setpci -s '00:02.0' F4.B=2b sets brightness to 2*16 + 11(b is eleven) = 43. 00 corresponds to absolute zero brightness (if you end up doing this, just use the hotkeys to regain brightness).

I find this really useful when working in the dark or reading a book (The least brightness you can set with the slider is actually pretty high, and the jumps in brightness level are also larger - as you've already figured out the slider is not continuous).

I've written a python script (remappable to shortcuts) which uses this to control brightness (increase and decrease, not just set) complete with OSD notification. If you're interested let me know (It may have to be edited to work in different hardware, I've not tested it in anything other my ACER ONE D270. So I may need some additional info).

share|improve this answer
    
nice entry explanation :) ... and fixes. +1 –  swift Dec 2 '12 at 14:25
    
Share the script :D I was considering making something similar so if you can throw it on github I'll gladly help out :) –  jackweirdy Dec 3 '12 at 21:21
    
github.com/prasanthcakewalk/brightnessctrl Read the README and let me know if it works. –  S Prasanth Dec 4 '12 at 4:39
    
@jackweirdy I thought you were going to gladly help out ;) Probably, you weren't notified because I didn't use @ - am new here. Probably, @ doesn't matter and you won't be notified of this comment either - again, am new here. Will find out soon, though! –  S Prasanth Dec 10 '12 at 16:46
    
@SPrasanth I've just forked it :) –  jackweirdy Dec 10 '12 at 17:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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