0

Since installing Linux Mint (XFCE) on my late-2010 Macbook Air, I've had problems changing the brightness while using the proprietary Nvidia drivers.

The function keys for brightness have never worked (though curiously the volume keys do), but until recently I was able to adjust the brightness using the xbacklight command. However, I recently removed the acpi_backlight=vendor flag from my grub config, which removed even this ability. Putting the flag back in did not bring back my ability to use xbacklight for some reason, so now I have no way to adjust the brightness at all.

At this point I would be happy just to regain the ability to use xbacklight. Using the command now gives no output whatsoever, no errors, messages, nothing.

Relevant parts of my /etc/default/grub (acpi_backlight=vendor being the only thing I had removed when it stopped working):

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="nomodeset quiet splash acpi_osi=linux 
acpi_backlight=vendor"
GRUB_CMDLINE_LINUX=""

I have a custom X11 config file at /usr/share/X11/xorg.conf.d/10-nvidia-brightness.conf:

Section "Device"
  Identifier "Default Device"
  Driver "nvidia"
  BoardName "GeForce 320M"
  Option "RegistryDwords" "EnableBrightnessControl=1"
EndSection

Does anyone know why removing the flag and putting it back in broke my ability to use xbacklight? (I've run update-grub several times to no avail).

Thanks in advance.

0

This problem is not only limited to Macbook. Other brands even the Toshiba satellite L510 has the same problem. I have found a simple enough solution

In all Linux systems that I have encountered so far, even in android phones and other android based appliances, there are configuration files in the directory /sys/class/backlight/acpi_video0 that pertain to screen brightness - to be more precise, the backlight of LED screens. Here is the output of ls /sys/class/backlight/acpi_video0

Output of ls /sys/class/backlight/acpi_video0:

Image

Different systems have different screen brightness resolutions. My system has a resolution of 8 i.e. [0,7]. you can see the upper limit of your screen brightness resolution by cat /sys/class/backlight/acpi_video0/max_brightness.

Then write whatever value you want to the file /sys/class/backlight/acpi_video0/brightness, as long as the number is less than the max_brightness and your system will immediately attain that brightness value. For example, since my system has a resolution that ranges from 0-7, echo 3 > /sys/class/backlight/acpi_video0/brightness makes my screen half-way bright. while echo 0 > /sys/class/backlight/acpi_video0/brightness makes the backlight as dark as possible without shutting the screen.

for the sake of convenience use the following script to adjust your screen brightness from terminal. Drop the script file in /bin or some other directory in your shell's $PATH environmental variable with the name backlight.sh and make it executable. here is the script

#!/bin/bash

## MAX_BRIGHTNESS variable takes the value in /sys/class/backlight/acpi_video0/max_brightness

MAX_BRIGHTNESS=$(cat /sys/class/backlight/acpi_video0/max_brightness);

error_report(){printf "error: the backlight brightness value \"$1\" is out of range, use only [0,$MAX_BRIGHTNESS]\n";}

if [ $1 -ge 0 ] && [ $1 -le $MAX_BRIGHTNESS ]; then echo $1 > /sys/class/backlight/acpi_video0/brightness ; else error_report ; fi;

after saving this script in a $PATH directory as backlight.sh, open a root terminal and run the following command.

root@local.machine-A500# backlight.sh 0

then your screen will go dark. play around with other values so long as the values don't exceed max_brightness.

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.