4

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.

2
  • exact model plz. You might also post name of backlight driver(s). cd /sys/class/backlight; ls
    – sourcejedi
    Jul 20, 2013 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, 2013 at 19:19

4 Answers 4

6

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

10
  • 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, 2013 at 19:57
  • @KioMarv - is there anything under /sys/class/backlight?
    – slm
    Jul 20, 2013 at 20:08
  • +1 The range of accepted values is 0-15 on my Debian Wheezy.
    – Joseph R.
    Jul 20, 2013 at 23:06
  • @slm Do you happen to know if there's a wrapper/helper tool that lets you control brightness as a regular user?
    – Joseph R.
    Jul 21, 2013 at 7:55
  • 1
    @JosephR. - see updates to my answer, shows how to use it.
    – slm
    Jul 21, 2013 at 13:40
1

Edit /etc/default/grub and add:

pcie_aspm=force acpi_backlight=vendor 

after:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" 

After the changes, the whole line will look like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pcie_aspm=force acpi_backlight=vendor"
1
  • Please do not just paste links: include some detail so that the answer stands alone.
    – jasonwryan
    Feb 13, 2015 at 20:05
0

Try in the bootloader, passing the nomodeset argument to the kernel and removing vt.handoff=X

0

I had the same problem, and this was a simple solution for this ugly problem. I installed olpc from the repositories of debian wheezy, then you can use two commands

 - sudo olpc-brightness up 
 - sudo olpc-brightness down

To allow key shortcuts, in the system configuration->keyboard configurations i did the two shortcuts. Then you have to add this line

my_user ALL=  NOPASSWD: /usr/bin/olpc-brightness

at the end for the file /etc/sudoers using an editor

sudo gedit /etc/sudoers

.This allow the command olpc-brightness change the file that stores the bright value.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .