Screen Brightness controls not working - Frequently Asked Questions -- Fatdog64 Linux

# Screen Brightness controls not working

The sven keyboard daemon, which displays its icons in the panel, calls a couple of scripts to control the screen brightness. Unfortunately this varies a bit between computers. There are a couple things that can go wrong with this.
1) Sven might not be configured to use the correct keys for your computer.
2) The two scripts that Sven calls (/usr/bin/brightness-up and /usr/bin/brightness-down) could be using the wrong file in /sys
So the first thing to do is open a terminal and type: brightness-up and then press Enter.
If it changes the screen brightness then it's probably problem 1, and you need to right-click on the sven panel icon and select Preferences. If you get an error about file not found , then it's probably problem 2.
The brightness-up script looks like this:

    #!/bin/ash
    DEVICE= #radeon_bl0, acpi_video0, etc
    DEVPATH=/sys/class/backlight

    [ -z $DEVICE ] && DEVICE=$(ls $DEVPATH | head -n 1)
    [ -z $DEVICE ] && exit 1

    CURRENT=$(cat $DEVPATH/$DEVICE/actual_brightness)
    MAX=$(cat $DEVPATH/$DEVICE/max_brightness)
    STEP=$((MAX/10))
    CURRENT=$(( CURRENT + STEP ))
    if [ "$CURRENT" -gt "$MAX" ]; then CURRENT=$MAX; fi
    echo $CURRENT > $DEVPATH/$DEVICE/brightness

For problem 2, you'll need to replace the DEVICE with the correct filename. You'll also need to make the corresponding changes to /usr/bin/brightness-down.
For problem 1, you'll need to edit the Brightness down and Brightness up properties in Sven (right click and select Preferences).

Fatdog64 | FAQ index | FAQ files | Fatdog64 online | FAQ online

This page was automatically converted from brightness.html on 2024-12-09.