After trawling here and there and trying lots of different things, for me this works on my late 2012 21″ iMac with an ACPI card.
It’s best to put the script into a file, make sure the file is discoverable on PATH.
All details are in the folder:
DISCLAIMER: If you damage your machine, that’s your fault not mine!!!
It’s best to put the script into a file, make sure the file is discoverable on PATH.
All details are in the folder:
/sys/class/backlight/acpi_video0which on my machine looks like this:
ubuntu@ubuntu:~/mc2$ cd /sys/class/backlight/acpi_video0 ubuntu@ubuntu:/sys/class/backlight/acpi_video0$ ls -l total 0 -r--r--r-- 1 root root 4096 Oct 7 08:29 actual_brightness -rw-r--r-- 1 root root 4096 Oct 7 08:29 bl_power -rw-r--r-- 1 root root 4096 Oct 7 08:28 brightness lrwxrwxrwx 1 root root 0 Oct 7 08:29 device -> ../../../0000:01:00.0 -r--r--r-- 1 root root 4096 Oct 7 08:03 max_brightness drwxr-xr-x 2 root root 0 Oct 7 08:29 power lrwxrwxrwx 1 root root 0 Oct 7 08:29 subsystem -> ../../../../../../class/backlight -r--r--r-- 1 root root 4096 Oct 7 08:03 type -rw-r--r-- 1 root root 4096 Oct 7 08:03 ueventWARNING: If you use values higher than the maximum allowed for your card you *MAY* cause damage. The limit on my machine is 15 as indicated in the file
echo $1 | sudo tee /sys/class/backlight/acpi_video0/max_brightnessThere are more exhaustive solutions out there including one I saw that didn’t work first time for me that limits the value but for me, being a hacker, I only needed a one liner. YMMV.
DISCLAIMER: If you damage your machine, that’s your fault not mine!!!
Comments
Post a Comment