The workaround is for a long running program to listen for changes to /sys/class/backlight/intel_backlight
calculate the right luminance value
write them to xrandr.
Here's a slight improvement to the suggested script:
#!/bin/bash
#-----------------------------------------------------------------
# /usr/local/bin/brightness
# be sure this file is executable
#-----------------------------------------------------------------
There does appear to be a work around here:
https:/ /wiki.archlinux .org/index. php/HP_ Spectre_ x360_13- 4231ng# Brightness_ /_backlight
It requires bc and inotify-tools.
The workaround is for a long running program to listen for changes to /sys/class/ backlight/ intel_backlight
calculate the right luminance value
write them to xrandr.
Here's a slight improvement to the suggested script:
#!/bin/bash ------- ------- ------- ------- ------- ------- ------- ------- --- bin/brightness ------- ------- ------- ------- ------- ------- ------- ------- ---
#------
# /usr/local/
# be sure this file is executable
#------
backlight_ path=/sys/ class/backlight /intel_ backlight
device=`xrandr | grep -w connected | awk '{ print $1 }'`
luminance() { path"/actual_ brightness 10;$level/ $max"
read -r level < "$backlight_
bc <<< "scale=
}
read -r max < "$backlight_ path"/max_ brightness
xrandr --output "$device" --brightness "$(luminance)"
inotifywait -me modify --format '' "$backlight_ path"/actual_ brightness | while read; do
echo "$device" $(luminance)
xrandr --output "$device" --brightness "$(luminance)"
done