You are not logged in.

#1 2015-06-25 09:52:01

arietux
Member
Registered: 2015-06-25
Posts: 9

[SOLVED] Cannot set Brightness on Gnome 3.16

before i upgrade gnome to gnome 3.16. i was able to configure the brightness. but after i upgrade gnome to 3.16. i was unable to configure the brightness.

actually i have created a 20-intel.conf in /usr/X11/xorg.conf.d/ with the following :

Section "Device"
        Identifier  "card0"
        Driver      "intel"
        Option      "Backlight"  "intel_backlight"
        BusID       "PCI:0:2:0"
EndSection

also i have try another method using parameter "acpi_backlight=vendor" or "video.use_native_backlight=1". but that's not worked too.

in xfce4, i was able configure the brightness just using a 20-intel.conf above.
i was able too configure brightness using xbacklight.

thank you.
sorry for my bad english.

Last edited by arietux (2015-06-26 10:16:07)

Offline

#2 2015-06-25 13:49:58

sbmomeni
Member
Registered: 2013-07-26
Posts: 29

Re: [SOLVED] Cannot set Brightness on Gnome 3.16

Which options are in the backlight folder?

ls -l /sys/class/backlight/

If there are two folders, like "interl_backlight" and "acpi_video0" folders, check contents of "brightness" file in both of them.

cat acpi_video0/brightness

Does it change when you try to adjust the brightness?

Offline

#3 2015-06-25 15:38:54

arietux
Member
Registered: 2015-06-25
Posts: 9

Re: [SOLVED] Cannot set Brightness on Gnome 3.16

sbmomeni wrote:

Which options are in the backlight folder?

ls -l /sys/class/backlight/

If there are two folders, like "interl_backlight" and "acpi_video0" folders, check contents of "brightness" file in both of them.

cat acpi_video0/brightness

Does it change when you try to adjust the brightness?

i checked and find two folder "acpi_video0" and "intel_backlight".

when i change value of acpi_video0/brightness to 5 or 0 ( default 3 ), nothing happen
but when i change value a little bit higher of intel_backlight/brightness, it's increase the brightness. ( like using xbacklight )

Offline

#4 2015-06-25 16:14:27

sbmomeni
Member
Registered: 2013-07-26
Posts: 29

Re: [SOLVED] Cannot set Brightness on Gnome 3.16

arietux wrote:

i checked and find two folder "acpi_video0" and "intel_backlight".

when i change value of acpi_video0/brightness to 5 or 0 ( default 3 ), nothing happen
but when i change value a little bit higher of intel_backlight/brightness, it's increase the brightness. ( like using xbacklight )

Problem is that gnome assumes that "acpi_video0" is the correct interface and changes its brightness file instead of modifying brightness file of the "intel_backlight" interface.
One workaround is to connect those two files using udev rules so when gnome modifies the wrong file, the correct file gets adjusted automatically.

Put following udev rules in the "/etc/udev/rules.d/50-backlight.rules" file:

ACTION=="add", KERNEL=="intel_backlight", SUBSYSTEM=="backlight", SUBSYSTEMS=="pci", DRIVERS=="i915", ATTR{brightness}="700"
ACTION=="add", KERNEL=="acpi_video0", SUBSYSTEM=="backlight", SUBSYSTEMS=="pci", DRIVERS=="i915", ATTR{brightness}="5"
ACTION=="change", KERNEL=="acpi_video0", SUBSYSTEM=="backlight", SUBSYSTEMS=="pci", DRIVERS=="i915", RUN+="/usr/sbin/writeintelbacklight.sh"

These rules set brightness of two interfaces to 700 and 5 at boot time (you may want to modify them as initial brightness values) and then runs "/usr/sbin/writeintelbacklight.sh" script whenever the wrong brightness file is modified (to adjust the correct brightness file).

Put following script in the "/usr/sbin/writeintelbacklight.sh" file:

#!/bin/bash

intelmaxbrightness=1400
acpimaxbrightness=`cat /sys/class/backlight/acpi_video0/max_brightness`
scale=`expr $intelmaxbrightness / $acpimaxbrightness`
acpibrightness=`cat /sys/class/backlight/acpi_video0/brightness`
newintelbrightness=`expr $acpibrightness \* $scale`
curintelbrightness=`cat /sys/class/backlight/intel_backlight/actual_brightness`
if [ "$newintelbrightness" -ne "$curintelbrightness" ]; then
  echo $newintelbrightness > /sys/class/backlight/intel_backlight/brightness
fi
exit 0

You may want to modify the 1400 (maximum brightness) in above script too.

Offline

#5 2015-06-25 16:18:27

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,822

Re: [SOLVED] Cannot set Brightness on Gnome 3.16

Modify your bootloader configuration for the Linux command line and add video.use_native_backlight=1

ewaller@turing ~/devel/C/dupfinder 1025 %cat /proc/cmdline                                                            │
initrd=\intel-ucode.img initrd=\initramfs-linux.img root=/dev/sda6 rw video.use_native_backlight=1                    │
ewaller@turing ~/devel/C/dupfinder 1026 %        

After reboot, You will have only the Intel backlight directory

Last edited by ewaller (2015-06-25 16:19:12)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#6 2015-06-26 10:15:51

arietux
Member
Registered: 2015-06-25
Posts: 9

Re: [SOLVED] Cannot set Brightness on Gnome 3.16

sbmomeni wrote:
arietux wrote:

i checked and find two folder "acpi_video0" and "intel_backlight".

when i change value of acpi_video0/brightness to 5 or 0 ( default 3 ), nothing happen
but when i change value a little bit higher of intel_backlight/brightness, it's increase the brightness. ( like using xbacklight )

Problem is that gnome assumes that "acpi_video0" is the correct interface and changes its brightness file instead of modifying brightness file of the "intel_backlight" interface.
One workaround is to connect those two files using udev rules so when gnome modifies the wrong file, the correct file gets adjusted automatically.

Put following udev rules in the "/etc/udev/rules.d/50-backlight.rules" file:

ACTION=="add", KERNEL=="intel_backlight", SUBSYSTEM=="backlight", SUBSYSTEMS=="pci", DRIVERS=="i915", ATTR{brightness}="700"
ACTION=="add", KERNEL=="acpi_video0", SUBSYSTEM=="backlight", SUBSYSTEMS=="pci", DRIVERS=="i915", ATTR{brightness}="5"
ACTION=="change", KERNEL=="acpi_video0", SUBSYSTEM=="backlight", SUBSYSTEMS=="pci", DRIVERS=="i915", RUN+="/usr/sbin/writeintelbacklight.sh"

These rules set brightness of two interfaces to 700 and 5 at boot time (you may want to modify them as initial brightness values) and then runs "/usr/sbin/writeintelbacklight.sh" script whenever the wrong brightness file is modified (to adjust the correct brightness file).

Put following script in the "/usr/sbin/writeintelbacklight.sh" file:

#!/bin/bash

intelmaxbrightness=1400
acpimaxbrightness=`cat /sys/class/backlight/acpi_video0/max_brightness`
scale=`expr $intelmaxbrightness / $acpimaxbrightness`
acpibrightness=`cat /sys/class/backlight/acpi_video0/brightness`
newintelbrightness=`expr $acpibrightness \* $scale`
curintelbrightness=`cat /sys/class/backlight/intel_backlight/actual_brightness`
if [ "$newintelbrightness" -ne "$curintelbrightness" ]; then
  echo $newintelbrightness > /sys/class/backlight/intel_backlight/brightness
fi
exit 0

You may want to modify the 1400 (maximum brightness) in above script too.

thank you so much.
now i can set brightness on gnome 3.16

Offline

Board footer

Powered by FluxBB