You are not logged in.

#1 2018-05-24 06:05:43

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

[SOLVED] Backlight not working on Intel Haswell laptop

Mod Note: Split from https://forums.bunsenlabs.org/viewtopic.php?id=4851

~~~~~~~~~~

Lovely, thanks for sharing!

Just to note though: the `xrandr` command cannot be used to alter the screen backlight level, it just changes the gamma of the display.

If xbacklight doesn't work then you can try a different video driver or experiment with kernel command line parameters to regain native hardware key support.

Last edited by twoion (2018-06-02 11:56:14)


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#2 2018-05-24 09:54:39

leonardo.marco
Member
Registered: 2017-10-12
Posts: 12

Re: [SOLVED] Backlight not working on Intel Haswell laptop

Head_on_a_Stick wrote:

Lovely, thanks for sharing!

Just to note though: the `xrandr` command cannot be used to alter the screen backlight level, it just changes the gamma of the display.

If xbacklight doesn't work then you can try a different video driver or experiment with kernel command line parameters to regain native hardware key support.

What do you mean connot be used? `xrand --brightness 0.7` works in my laptop.
I use it becouse in Helium xbacklight shows the error `No outputs have backlight property`. Howerver seems I have correct link configured in `/sys/class/backlight` becouse i can change the brightness manually ussing `echo 200 >> /sys/class/blacklight/brightness`.

Offline

#3 2018-05-24 17:52:11

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: [SOLVED] Backlight not working on Intel Haswell laptop

leonardo.marco wrote:

What do you mean connot be used? `xrand --brightness 0.7` works in my laptop.

No, it doesn't "work" because the backlight output level on your laptop is not changed, as the man page explains:

man xrandr wrote:

--brightness brightness
   Multiply  the gamma values on the crtc currently attached to the
   output to specified floating value. Useful for overly bright  or
   overly  dim outputs.  However, this is a software only modifica‐
   tion, if your  hardware  has  support  to  actually  change  the
   brightness, you will probably prefer to use xbacklight.

leonardo.marco wrote:

in Helium xbacklight shows the error `No outputs have backlight property`

Which video drivers are you using?

lspci -k | grep -iA2 'vga\|3d'
leonardo.marco wrote:

Howerver seems I have correct link configured in `/sys/class/backlight` becouse i can change the brightness manually ussing `echo 200 >> /sys/class/blacklight/brightness`.

I think there should be a folder named after the video driver (or called "acpi_0") in /sys/class/backlight, please post the output of

find /sys/class/backlight

“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#4 2018-05-24 18:36:56

leonardo.marco
Member
Registered: 2017-10-12
Posts: 12

Re: [SOLVED] Backlight not working on Intel Haswell laptop

Thanks for your support Head_on_a_Stick, there are the outputs:

$ lspci -k | grep -iA2 'vga\|3d'
00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 09)
	Subsystem: Toshiba America Info Systems Haswell-ULT Integrated Graphics Controller
	Kernel driver in use: i915


$ find /sys -name "*backlight*"
/sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight
/sys/class/backlight
/sys/class/backlight/intel_backlight
/sys/fs/cgroup/pids/system.slice/system-systemd\x2dbacklight.slice
/sys/fs/cgroup/devices/system.slice/system-systemd\x2dbacklight.slice
/sys/fs/cgroup/systemd/system.slice/system-systemd\x2dbacklight.slice
/sys/module/video/parameters/disable_backlight_sysfs_if
/sys/module/i915/parameters/enable_dpcd_backlight

$ ls -l /sys/class/backlight/
total 0
lrwxrwxrwx 1 root root 0 may 24 20:29 intel_backlight -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight

# This command works for me and change the brightness:
$ echo 500 > /sys/class/backlight/intel_backlight/brightness

Offline

#5 2018-05-24 18:39:55

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: [SOLVED] Backlight not working on Intel Haswell laptop

^ Hmmm, I have a Haswell laptop and the backlight works there with BL-He.

Is xfce4-power-manager installed and running?

Are the program preferences set to allow it to control the backlight?


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#6 2018-05-24 19:45:06

leonardo.marco
Member
Registered: 2017-10-12
Posts: 12

Re: [SOLVED] Backlight not working on Intel Haswell laptop

Head_on_a_Stick wrote:

^ Hmmm, I have a Haswell laptop and the backlight works there with BL-He.

Is xfce4-power-manager installed and running?

Are the program preferences set to allow it to control the backlight?

When i was in Deuterium it was working, but not in Helium.
xfce-power-manager are runing. What do you mean "set to allow it control the backlight"?

Offline

#7 2018-05-24 19:50:36

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: [SOLVED] Backlight not working on Intel Haswell laptop

leonardo.marco wrote:

What do you mean "set to allow it control the backlight"?

There should be option in

xfce4-power-manager-settings

that allows the program to control the backlight, is it enabled?

EDIT: I've split this out into it's own thread, hope you don't mind.

Last edited by Head_on_a_Stick (2018-05-24 19:52:31)


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#8 2018-05-24 20:47:14

leonardo.marco
Member
Registered: 2017-10-12
Posts: 12

Re: [SOLVED] Backlight not working on Intel Haswell laptop

Head_on_a_Stick wrote:
leonardo.marco wrote:

What do you mean "set to allow it control the backlight"?

There should be option in

xfce4-power-manager-settings

that allows the program to control the backlight, is it enabled?

EDIT: I've split this out into it's own thread, hope you don't mind.

I see an option to control energy screen (time to suspend the screen and poweroff) in screen tab (3r tab). This option is disabled, but when enable it i have the same error with xbacklight

Offline

#9 2018-05-24 21:14:10

twoion
ほやほや
Registered: 2015-08-10
Posts: 2,228

Re: [SOLVED] Backlight not working on Intel Haswell laptop

I suggest you use the following method which I used with my Haswell HD4400 laptop for years. xbacklight did not work on this laptop either (Thinkpad x240).

Check if this works first. Create this script as brightness.sh and make it executable (chmod +x $file):

#!/bin/bash
cur=$(</sys/class/backlight/intel_backlight/brightness)
max=$(</sys/class/backlight/intel_backlight/max_brightness)
if=/sys/class/backlight/intel_backlight/brightness
step=100
lower=$(($cur-$step))
higher=$(($cur+$step))
if ((higher>max)); then higher=$max; fi
sel=
case "$1" in
	video/brightnessdown) sel=$lower;;
	video/brightnessup)   sel=$higher;;
esac
echo $sel > $if
echo "echo $sel > $if"

Execute

sudo ./brightness.sh video/brightnessup
sudo ./brightness.sh video/brightnessdown

If the brightness actually changes, you're golden. You may adjust the step variable for bigger/smaller  steps. If yes, you can use this method with acpid to implement custom key handlers.

# Install acpid
sudo apt-get install acpid
# Clone my script repo which contains the above script
git clone https://github.com/2ion/scripts.git /tmp/scripts
# Copy the relevant files into place
sudo cp /tmp/scripts/acpi/events/brightness /etc/acpi/events/
sudo cp /tmp/scripts/acpi/brightness.sh /etc/acpi/ # or replace with a modified version of yours
# Make sure the modes are correct
sudo find /etc/acpi -exec chmod ga+rwx {} \+
# Activate acpid
sudo systemctl daemon-reload
sudo systemctl enable acpid.service
sudo systemctl enable acpid.socket
sudo systemctl restart acpid
# Delete the script repo clone
rm -rf /tmp/scripts

Then try and test if the brightness keys work.


Im grünen Wald, dort wo die Drossel singt…

Offline

#10 2018-05-25 16:24:51

leonardo.marco
Member
Registered: 2017-10-12
Posts: 12

Re: [SOLVED] Backlight not working on Intel Haswell laptop

Thanks twoion! Im traying your script, but the directory /etc/acpi and the service acpi dont exist in my system.

Offline

#11 2018-05-25 16:37:08

twoion
ほやほや
Registered: 2015-08-10
Posts: 2,228

Re: [SOLVED] Backlight not working on Intel Haswell laptop

leonardo.marco wrote:

Thanks twoion! Im traying your script, but the directory /etc/acpi and the service acpi dont exist in my system.

It will be created when installing

sudo apt-get install acpid

Try the standalone script first, if that doesn't work you don't need to bother with the rest.


Im grünen Wald, dort wo die Drossel singt…

Offline

#12 2018-05-26 15:02:28

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: [SOLVED] Backlight not working on Intel Haswell laptop

leonardo.marco wrote:

I see an option to control energy screen

No, not that option.

There should be an option to allow the hardware backlight keys to control the backlight through xfce4-power-manager, you need to check if this option is enabled.

You shouldn't need a custom script to set the backlight level on an Intel Haswell laptop, that's what we use xfce4-power-manager for wink


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#13 2018-05-26 19:07:40

leonardo.marco
Member
Registered: 2017-10-12
Posts: 12

Re: [SOLVED] Backlight not working on Intel Haswell laptop

Head_on_a_Stick wrote:
leonardo.marco wrote:

I see an option to control energy screen

There should be an option to allow the hardware backlight keys to control the backlight through xfce4-power-manager, you need to check if this option is enabled.

I cant see this option. Could you post a screenshot please? I only see these options

Offline

#14 2018-05-26 21:01:01

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: [SOLVED] Backlight not working on Intel Haswell laptop

leonardo.marco wrote:

^ It's in that screenshot: "Handle display backlight keys" — at the end of the "Buttons" section, immediately above "Laptop Lid".


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#15 2018-05-28 21:45:40

pepemopap
Member
Registered: 2015-09-30
Posts: 33

Re: [SOLVED] Backlight not working on Intel Haswell laptop

Head_on_a_Stick wrote:

^ It's in that screenshot: "Handle display backlight keys" — at the end of the "Buttons" section, immediately above "Laptop Lid".

True! I have this option enabled, but xbacklight dont work. The strange thins is that in Deuterium works.

Offline

#16 2018-05-29 06:03:21

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: [SOLVED] Backlight not working on Intel Haswell laptop

^ Then you may be a victim of a kernel regression.

You could try fiddling with the kernel command line parameters:

https://wiki.archlinux.org/index.php/Ba … ne_options


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#17 2018-05-29 20:25:50

pepemopap
Member
Registered: 2015-09-30
Posts: 33

Re: [SOLVED] Backlight not working on Intel Haswell laptop

Thanks very mucho Head_on_a_Stick and twoion!  I will try both solutions.

Offline

#18 2018-06-02 11:41:28

pepemopap
Member
Registered: 2015-09-30
Posts: 33

Re: [SOLVED] Backlight not working on Intel Haswell laptop

It works in my laptop:

xdotool key XF86MonBrightnessUp
xdotool key XF86MonBrightnessDown

Thanks!
The post can be marked as solved

Last edited by pepemopap (2018-06-02 11:42:04)

Offline

#19 2018-06-03 19:59:06

pepemopap
Member
Registered: 2015-09-30
Posts: 33

Re: [SOLVED] Backlight not working on Intel Haswell laptop

Finally i have used a similar script than proposed by twoion and add these lines to /etc/udev/rules.d/backlight.rules file for permit users from video group modify brightness file:

ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="intel_backlight", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness"
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="intel_backlight", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"

I prefer the script because can change brightness by small steps and can stop before total black window when down brightness.

Offline

Board footer

Powered by FluxBB