1

I have a Lenovo Yoga X1 2nd Gen laptop with Ubuntu 16.04

I have both windows 10 and ubuntu installed.

In windows, everything works fine, but in ubuntu when I press the brigghtness buttons, ubuntu shows me the value of the brightness is changing, but the actual brightness of the screen is not changing at all! I have tried most of the methods what I found online, like changing things in 20-intel.conf, grub. Neither of them worked. What should I do?

UPDATE:

xrandr --output eDP1 --brightness 1 # no dimming

the following command changes the brightness to max, and I can change the value 1 to something between 0 and 1 which then effectively changes the brightness. Is there a way to make the brightness keys work?

0

You should be able to enable brightness adjustment via the buttons by following the solution posted in https://askubuntu.com/a/862575/589172:

Create file: /etc/acpi/events/yoga-brightness-up with following content:

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

Create file: /etc/acpi/events/yoga-brightness-down with following content:

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

Create file /etc/acpi/yoga-brightness.sh with following content:

#!/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-71))
else
    VAL=$((VAL+71))
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/ivo/.Xauthority  # CHANGE "ivo" TO YOUR USER
export DISPLAY=:0.0

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

echo $VAL > "$BR_DIR/brightness"

Make it executable

chmod a+rx /etc/acpi/yoga-brightness.sh

Restart acpi by typing

sudo service acpid reload

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.