Ubuntu – Can I adjust the minimum brightness for the laptop’s LCD

brightnessgnomelaptopscreenubuntu-gnome

I'm running Ubuntu Gnome 15.04 on my Dell XPS 13 (9333, 2014 model). The LCD brightness can be controlled by the keyboard, and if possible I'd like to adjust the minimum value and/or adjust the increments used by the hotkeys.

Here's what I mean. This is the lowest setting for my screen brightness–the next step down completely shuts off my LCD:

Dim

I'd like to have the lowest setting be even dimmer than it currently is. It's anecdotal, but seems to run at lower levels in Windows–which makes me hope it's a driver or config tweak.

Best Answer

Check /etc/acpi/events/ and you should find some files named something like asus-keyboard-backlight-down and -up, along with several other events.

Don't edit those, but take a look at the shell scripts in /etc/acpi/. Mine, /etc/acpi/events/asus-keyboard-backlight.sh looks like this: (The comments are part of the script, NOT mine)

#!/bin/sh

# this directory is a symlink on my machine:
KEYS_DIR=/sys/class/leds/asus\:\:kbd_backlight

test -d $KEYS_DIR || exit 0

MIN=0
MAX=$(cat $KEYS_DIR/max_brightness)
VAL=$(cat $KEYS_DIR/brightness)

if [ "$1" = down ]; then
        VAL=$((VAL-1))
else
        VAL=$((VAL+1))
fi

if [ "$VAL" -lt $MIN ]; then
    VAL=$MIN
elif [ "$VAL" -gt $MAX ]; then
    VAL=$MAX
fi

echo $VAL > $KEYS_DIR/brightness

Obviously, given that script, the minimum brightness is already 0. It's also pretty obvious how to change the increments.

Perhaps your script is different, or perhaps you will be called upon to write a new script entirely.

I don't know what will happen if you mess with the max_brightness setting, and make it higher than the actual maximum. Probably something bad.

For more information on ACPI events like that, see here: https://help.ubuntu.com/community/LaptopSpecialKeys

Related Question