1

I recently purchased a Dell xps 15 9570 and installed ubuntu 19.04 onto it, removing windows 10. There were a lot of issues with ubuntu not being able to detect certain drivers but I was able to solve them. But one issue I cannot solve is the fact I cannot change the brightness via the functions keys. xbacklight doesn't work, the only way I can change the brightness, is by typing xrandr --output eDP1 --brightness 0.4 into console.

The screen is OLED, also using intel's inbuilt UHD Graphics 630 and not nvidia but I have both.

0
2

Ivo's (https://askubuntu.com/users/632873/ivo-bl%c3%b6chliger) solution at Lenovo ThinkPad X1 Yoga OLED Brightness for a Yoga laptop also works for the Dell XPS 15-9570. The only thing I had to change was to subtract/add 6000 instead of the 71 in the script. That gives me a 20 step change, i.e. up/down by 5% for every key press.

This is what the modified solution looks like for the XPS 15, using similar three files. The first one is /etc/acpi/events/xps-brightness-up:

event=video/brightnessup BRTUP 00000086
action=/etc/acpi/xps-brightness.sh up

nuber two is /etc/acpi/events/xps-brightness-down:

event=video/brightnessdown BRTDN 00000087
action=/etc/acpi/xps-brightness.sh down

and then the main script /etc/acpi/xps-brightness.sh:

#!/bin/sh

# Where the backlight brightness is stored
BR_DIR="/sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight/"


test -d "$BR_DIR" || exit 0

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

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

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

PERCENT=`echo "$VAL / $MAX" | bc -l`

export XAUTHORITY=/home/user/.Xauthority  # CHANGE "user" TO YOUR USER
export DISPLAY=:0.0

echo "xrandr --output eDP-1 --brightness $PERCENT" > /tmp/xps-brightness.log
xrandr --output eDP-1 --brightness $PERCENT

echo $VAL > "$BR_DIR/brightness"

Don't forget to do a chmod a+x /etc/acpi/xps-brightness.sh and restart acpi by typing

sudo service acpid reload

I hope, this helps ;-)

1
  • I recommend that you edit this to also include the solution itself (with your modifications). I think you're referring to P.Meyer's answer but I am not totally sure, which is why I didn't add this myself in my edit. – Eliah Kagan Nov 5 '19 at 21:19
0

Alas, not all PC makers make all of their equipment Ubuntu-ready, and the keyboard Dell selected for that laptop could be one of those. I checked, and Dell does not offer Linux drivers for that laptop. However, since it is new, they may have a solution anyway, so I'd suggest you contact Dell Support by entering your Service Tag.

In addition to the CLI command you found, there are more GUI methods for brightness adjustments at https://help.ubuntu.com/stable/ubuntu-help/display-brightness.html.en

0

OLED screens do not usually provide hardware brightness levels.

There are many scripts available that will use xrandr to automatically set brightness and gamma at sunrise and sunset though.

On my Dell laptops I just shrink the size of Windows. I keep Windows around for gaming and to apply firmware updates from Dell.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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