Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have just installed Debian Wheezy in my Toshiba Laptop and it works great. However, sometimes the brightness level is too low when starting the system.

If I use the keys Fn+F6 to decrease and Fn+F7 to increase it, a bar appears in the screen, increasing or decreasing but the brightness level did not change.

Do you have any ideas?

PS: I'm using the gnome fallback mode.

share|improve this question
    
exact model plz. You might also post name of backlight driver(s). cd /sys/class/backlight; ls –  sourcejedi Jul 20 '13 at 19:13
    
Hi! The laptop is a Toshiba Satellite A500-140 and the video card is an ATI Radeon HD 4500 . And in that directory you said, ls -la prints: toshiba -> ../../devices/LNXSYSTM:00/LNXSYBUS:00/TOS1900:00/backlight/toshiba/ –  Kio Marv Jul 20 '13 at 19:19
add comment

1 Answer 1

You might want to give this a try:

$ sudo echo 5 > /sys/class/backlight/acpi_video0/brightness

Change the value between 0-15 I believe to make it brighter or dimmer.

You might need to change these as well:

$ sudo echo 950 > /sys/class/backlight/intel_backlight/brightness
$ sudo echo 5 > /sys/class/backlight/acpi_video0/brightness
$ sudo echo 5 > /sys/class/backlight/acpi_video1/brightness

Changing brightness as a regular user

@JosephR. asked this folow-up in the comments and I thought it important enough to incorporate into my answer. If you want to expose this capbility to change brightness from the command line to regular users (the above echo ... > /sys/... is only accessible to root).

There is a package you can install called xbacklight which will allow user's to also change the brightness from the command line.

The package is available on Fedora and Ubuntu via repositories so just do either of these commands to install it:

# Ubuntu/Debian
$ sudo apt-get install xbacklight

# Fedora/CentOS
$ sudo yum install xbacklight

To use it:

# backlight 50%
$ xbacklight -set 50

# backlight 100%
$ xbacklight -set 100

xbacklight usage

$ xbacklight --help
usage: xbacklight [options]
  where options are:
  -display <display> or -d <display>
  -help
  -set <percentage> or = <percentage>
  -inc <percentage> or + <percentage>
  -dec <percentage> or - <percentage>
  -get
  -time <fade time in milliseconds>
  -steps <number of steps in fade>

How does user get elevated privileges to do this?

Again more follow-up to @JosephR. asking about this in a comment. It may seem like you as the user have elevated privileges to change the /sys/class/backlight/... when you use your laptops function keys (on my Thinkpad I use Fn+Home and Fn+End to change brightness). But you aren't really ever directly interacting with the /sys/class/backlight/... in the way that you think.

You're manipulating it indirectly through D-Bus. D-Bus is allowing you to manipulate this structure, org.freedesktop.Hal.Device.KeyboardBacklight, and HAL is allowing the privilege to do so. You can see this on my Fedora 14 system like this:

$ grep -i backlight /etc/dbus-1/system.d/*
/etc/dbus-1/system.d/hal.conf:         send_interface="org.freedesktop.Hal.Device.KeyboardBacklight"/>
/etc/dbus-1/system.d/hal.conf:         send_interface="org.freedesktop.Hal.Device.KeyboardBacklight"/>

In the file hal.conf:

  <!-- Only allow users at the local console to manipulate devices -->
  <policy at_console="true">
  ...
      <allow send_destination="org.freedesktop.Hal"
           send_interface="org.freedesktop.Hal.Device.KeyboardBacklight"/>

You can even mess with it from the command line via D-Bus like this. You can query the current value:

$ dbus-send \
     --print-reply \
     --system \
     --dest=org.freedesktop.Hal  \
     /org/freedesktop/Hal/devices/computer_backlight \
     org.freedesktop.Hal.Device.LaptopPanel.GetBrightness | \
     tail -1 | \
     awk '{print $2}'

Which returns the value:

15

Even cooler, you can mess with it like this (the bit int32:10 below is setting brightness to "10"):

$ dbus-send \
     --print-reply \
     --system \
     --dest=org.freedesktop.Hal  \
     /org/freedesktop/Hal/devices/computer_backlight \
     org.freedesktop.Hal.Device.LaptopPanel.SetBrightness \
     int32:10 #2&>1 > /dev/null

You can see that we changed the brightness:

$ cat /sys/class/backlight/acpi_video0/brightness
10

References

share|improve this answer
    
Hi! When trying the first line I got: bash: /sys/class/backlight/acpi_video0/brightness: No such file or directory. Inside /sys/class/backlight there is only a link named toshiba that points to ../../devices/LNXSYSTM:00/LNXSYBUS:00/TOS1900:00/backlight/toshiba/ –  Kio Marv Jul 20 '13 at 19:57
    
@KioMarv - is there anything under /sys/class/backlight? –  slm Jul 20 '13 at 20:08
    
+1 The range of accepted values is 0-15 on my Debian Wheezy. –  Joseph R. Jul 20 '13 at 23:06
    
@JosephR. - thanks for the correction. –  slm Jul 20 '13 at 23:46
1  
@JosephR. - see updates to my answer, shows how to use it. –  slm Jul 21 '13 at 13:40
show 6 more comments

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.