Can't dim monitor backlight Asus G75VW

Issues related to hardware problems
Post Reply
User avatar
igorek24
Posts: 90
Joined: 2013/11/13 06:11:37

Can't dim monitor backlight Asus G75VW

Post by igorek24 » 2014/11/02 12:00:48

I got almost fully functional CentOS 7 on my Asus G75VW. The only problem that I have is I cant adjust my monitor backlight using FN keys or System conf. The only way I can adjust is is by manualy echoing in to /sys/class/backlight/nv_backlight/brightness. Here is what I've ben dialing with:

First, I added acpi_backlight=vendor to kernal and I was able to change it in "Power Settings" but not FN keys. Then I realized that the asus-nb-wmi wasn't loading for some reason.

Code: Select all

[root@G75VW ~]# dmesg | grep asus
[   11.114789] asus_wmi: ASUS WMI generic driver loaded
[   11.116163] asus_wmi: Initialization: 0x1
[   11.116201] asus_wmi: BIOS WMI version: 7.9
[   11.116244] asus_wmi: SFUN value: 0x6a0877
[   11.117200] input: Asus WMI hotkeys as /devices/platform/asus-nb-wmi/input/input10
[   11.226181] asus-nb-wmi: probe of asus-nb-wmi failed with error -5
So I forced it

Code: Select all

echo "asus-nb-wmi" | tee /etc/modprobe.d/asus-nb-wmi.conf
echo "asus-nb-wmi" | tee /etc/modules-load.d/asus-nb-wmi.conf
After reboot, I cold only adjust it by:

Code: Select all

echo 50 | tee /sys/class/backlight/nv_backlight/brightness
or:

Code: Select all

echo 10 | tee /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0/card0-LVDS-1/nv_backlight/brightness
dmesg after reboot

Code: Select all

[root@G75VW ~]# dmesg | grep asus
[   11.114789] asus_wmi: ASUS WMI generic driver loaded
[   11.116163] asus_wmi: Initialization: 0x1
[   11.116201] asus_wmi: BIOS WMI version: 7.9
[   11.116244] asus_wmi: SFUN value: 0x6a0877
[   11.117200] input: Asus WMI hotkeys as /devices/platform/asus-nb-wmi/input/input10
[   11.226181] asus-nb-wmi: probe of asus-nb-wmi failed with error -5
[  981.984042] asus_wmi: Initialization: 0x1
[  981.984076] asus_wmi: BIOS WMI version: 7.9
[  981.984116] asus_wmi: SFUN value: 0x6a0877
[  981.985044] input: Asus WMI hotkeys as /devices/platform/asus-nb-wmi/input/input13
[  982.049824] asus_wmi: Disabling ACPI video driver
When I force asus-nb-wmi and have have acpi_backlight=vendor parameter, all of the FN keys and keyboard backlight are working, but if I remove acpi_backlight=vendor parameter, FN keys and keyboard backlight aren't working but I can adjust the monitor backlight in "Power Settings". Also without acpi_backlight=vendor parameter, there are two folders in /sys/class/backlight, acpi_video0 and acpi_video1 but with acpi_backlight=vendor parameter, there are asus-nb-wmi and nv_backlight.

If someone can help me figure this out, I'll be happiest man on earth.
BTW hardware list can be found here: https://www.theigor.net/other/g75vw-hardware.html

harden1@gmail.com
Posts: 2
Joined: 2015/08/30 20:04:32

Re: Can't dim monitor backlight Asus G75VW

Post by harden1@gmail.com » 2015/08/30 20:52:18

This works for me in Fedora 21 on an ASUS G750JX. Hopefully it will help you.

With the kernel parameter acpi_osi=
I have

Code: Select all

/sys/class/backlight/acpi_video0
/sys/class/backlight/acpi_video1
The function keys display the OSD and change /sys/class/backlight/acpi_video1/actual_brightness, but do not change the actual brightness.
They also display these values in acpi_listen

Code: Select all

 PNP0C14:00 000000ff 00000000
video/brightnessdown BRTDN 00000087 00000000 K
 PNP0C14:00 000000ff 00000000
video/brightnessup BRTUP 00000086 00000000 K
Fortunately xrandr is able to change the LCD brightness. So I am using acpi events to trigger xrandr commands
cat /etc/acpi/events/brtdnconf

Code: Select all

# ACPID config to decrease screen brightness

event=video/brightnessdown BRTDN 00000087 00000000
action=/etc/acpi/actions/backlight.sh BRTDN
cat /etc/acpi/events/brtupconf

Code: Select all

# ACPID config to increase screen brightness

event=video/brightnessup BRTUP 00000086 00000000
action=/etc/acpi/actions/backlight.sh BRTUP
cat /etc/acpi/actions/backlight.sh

Code: Select all

#!/bin/sh

PATH=/sbin:/bin:/usr/sbin:/usr/bin
# Needed to communicate with X
export XAUTHORITY=/home/$USER/.Xauthority
export DISPLAY=:0

XRANDR=$(which xrandr)
MONITOR=$($XRANDR -q | grep ' connected' | awk '{print $1}')
LEVEL=$(cat /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/backlight/acpi_video1/actual_brightness)

case "$1" in
    BRTDN)
        logger "Blacklight DOWN"
        if (( $LEVEL > 0 )); then
            SET=$(echo "scale=2; ($LEVEL - 1)/10" | bc)
        else
            SET=0
        fi
        ;;
    BRTUP)
        logger "Blacklight UP"
        if (( $LEVEL < 10 )); then
            SET=$(echo "scale=2; ($LEVEL + 1)/10" | bc)
        else
            SET=1.0
        fi
        ;;
esac

$XRANDR --screen 0 --output $MONITOR --brightness $SET
Restart acpid

Code: Select all

systemctl restart acpid.service

User avatar
igorek24
Posts: 90
Joined: 2013/11/13 06:11:37

Re: Can't dim monitor backlight Asus G75VW

Post by igorek24 » 2015/08/30 22:03:07

harden1@gmail.com wrote:This works for me in Fedora 21 on an ASUS G750JX. Hopefully it will help you.

With the kernel parameter acpi_osi=
I have

Code: Select all

/sys/class/backlight/acpi_video0
/sys/class/backlight/acpi_video1
The function keys display the OSD and change /sys/class/backlight/acpi_video1/actual_brightness, but do not change the actual brightness.
They also display these values in acpi_listen

Code: Select all

 PNP0C14:00 000000ff 00000000
video/brightnessdown BRTDN 00000087 00000000 K
 PNP0C14:00 000000ff 00000000
video/brightnessup BRTUP 00000086 00000000 K
Fortunately xrandr is able to change the LCD brightness. So I am using acpi events to trigger xrandr commands
cat /etc/acpi/events/brtdnconf

Code: Select all

# ACPID config to decrease screen brightness

event=video/brightnessdown BRTDN 00000087 00000000
action=/etc/acpi/actions/backlight.sh BRTDN
cat /etc/acpi/events/brtupconf

Code: Select all

# ACPID config to increase screen brightness

event=video/brightnessup BRTUP 00000086 00000000
action=/etc/acpi/actions/backlight.sh BRTUP
cat /etc/acpi/actions/backlight.sh

Code: Select all

#!/bin/sh

PATH=/sbin:/bin:/usr/sbin:/usr/bin
# Needed to communicate with X
export XAUTHORITY=/home/$USER/.Xauthority
export DISPLAY=:0

XRANDR=$(which xrandr)
MONITOR=$($XRANDR -q | grep ' connected' | awk '{print $1}')
LEVEL=$(cat /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/backlight/acpi_video1/actual_brightness)

case "$1" in
    BRTDN)
        logger "Blacklight DOWN"
        if (( $LEVEL > 0 )); then
            SET=$(echo "scale=2; ($LEVEL - 1)/10" | bc)
        else
            SET=0
        fi
        ;;
    BRTUP)
        logger "Blacklight UP"
        if (( $LEVEL < 10 )); then
            SET=$(echo "scale=2; ($LEVEL + 1)/10" | bc)
        else
            SET=1.0
        fi
        ;;
esac

$XRANDR --screen 0 --output $MONITOR --brightness $SET
Restart acpid

Code: Select all

systemctl restart acpid.service
Do you have nvidia drivers installed? I'm running Fedora 22 now and cant even dim my screen manually. BTW. thanks for the reply

harden1@gmail.com
Posts: 2
Joined: 2015/08/30 20:04:32

Re: Can't dim monitor backlight Asus G75VW

Post by harden1@gmail.com » 2015/08/31 10:49:51

Yes, I have the nVidia driver from RPM Fusion installed.

The acpid script method will work only if your FN keys produce ACPI events. Also, in the /etc/acpi/event/configs you have to use the values displayed by acpi_listen for your FN keys.

If acpi_backlight=vendor allows you to adjust your backlight via /sys/class/backlight/nv_backlight/brightness, you could try sticking with acpi_backlight=vendor and use /sys/class/backlight/nv_backlight/brightness values instead or xrandr to in an acpi script.
Also:
1) replace $USER with your username.
2) set the DISPLAY to what you get when typing echo $DISPLAY in a shell

Something like this might work.

Code: Select all

#!/bin/sh

PATH=/sbin:/bin:/usr/sbin:/usr/bin
# set some variables needed to control the x server
export XAUTHORITY=/home/<YOUR USERNAME>/.Xauthority
export DISPLAY=:0

XRANDR=$(which xrandr)
MONITOR=$($XRANDR -q | grep ' connected' | awk '{print $1}')
LEVEL=$(cat /sys/class/backlight/nv_backlight/brightness)

case "$1" in
    BRTDN)
        logger "Blacklight DOWN"
        if (( $LEVEL > 0 )); then
            SET=$(echo "scale=2; ($LEVEL - 1)/10" | bc)
        else
            SET=0
        fi
        ;;
    BRTUP)
        logger "Blacklight UP"
        if (( $LEVEL < 10 )); then
            SET=$(echo "scale=2; ($LEVEL + 1)/10" | bc)
        else
            SET=1.0
        fi
        ;;
esac

echo $SET > /sys/class/backlight/nv_backlight/brightness

Post Reply