You are not logged in.

#1 2014-02-07 06:04:05

sheomualjy
Member
Registered: 2011-12-23
Posts: 37

systemd-backlight using intel_backlight?

Hi,

The backlight on my new laptop is controlled by values inside the intel_backlight directory (/sys/class/backlight/intel_backlight) however the systemd-backlight service (which saves the current backlight settings at shutdown and restores them at bootup) is configured to use the values inside the neighbouring acpi_video0 directory (/sys/class/backlight/acpi_video0), which for me does not affect the backlight. Currently, the laptop boots with full brightness, which I do not want.

I tried writing a script to set the intel_backlight brightness at bootup to my own custom value, however the brightness keys on the laptop behave as if it was still the maximum. For example, if I set the brightness to minimum at bootup via the script, then trying to decrease the brightness via the keys results in it being set to one below the maximum value.

How do I configure systemd-backlight@.service to use intel_backlight rather than acpi_video0? If this is not possible, how can I store the current backlight levels at shutdown and restore them at bootup while retaining proper use of the brightness keys?


EDIT: googling found someone with an identical problem: http://unix.stackexchange.com/questions … cpi-video0


Thanks,
James

Last edited by sheomualjy (2014-02-07 06:04:46)

Offline

#2 2014-02-07 06:11:19

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: systemd-backlight using intel_backlight?

What if you just manually symlink /etc/systemd/system/suspend.target.wants/systemd-backlight@intel_backlight.service to /usr/lib/systemd/system/systemd-suspend@.service?

Offline

#3 2014-02-07 06:30:29

sheomualjy
Member
Registered: 2011-12-23
Posts: 37

Re: systemd-backlight using intel_backlight?

Thanks!

I created a symlink at /etc/systemd/system/suspend.target.wants called systemd-backlight@intel_backlight.service which points to /usr/lib/systemd/system/systemd-suspend@.service however that does not seem to change the behaviour at all. The brightness is still not stored across reboots and defaults to a specific value.

I also tried symlinking it into multi-user.target.wants just to see what happened (I still don't really understand the systemd loading process!) and running "systemctl" returns the following:

...
systemd-backlight@acpi_video0.service                                               loaded active exited    Load/Save Screen Backlight Brightness of acpi_video0
systemd-backlight@intel_backlight.service                                           loaded failed failed    Load/Save Screen Backlight Brightness of intel_backlight
...

Not sure if that would be useful but maybe it indicates that systemd-backlight@.service can't run when attached to intel_backlight?

Last edited by sheomualjy (2014-02-07 06:36:28)

Offline

#4 2014-02-07 17:16:11

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: systemd-backlight using intel_backlight?

Maybe you need to also mask systemd-backlight@acpi_video0.service?  I don't have this problem with my Intel graphics, so I am just kind of guessing here.  Its worth a shot though I guess.

Also, maybe systemctl status might give some insight into why it failed...

Offline

#5 2014-02-08 07:45:30

sheomualjy
Member
Registered: 2011-12-23
Posts: 37

Re: systemd-backlight using intel_backlight?

I have found some more information that may make the issue easier to solve.

Changing the value of /sys/class/backlight/acpi_video0/brightness does indeed change the backlight level. It also alters /sys/class/backlight/intel_backlight/brightness when changed. Changing the brightness inside acpi_video0 to 0 changes the brightness inside intel_backlight to 75, 1 changes it to 135, 2 changes it to 174, and so on.

Values placed into the acpi_video0 brightness file are what are loaded on boot. If the file contains 10 (maximum brightness) at shutdown, the backlight will be at maximum on bootup. If the file contains 0, the backlight will start up at minimum.

The brightness control keys on my laptop affect the intel_backlight folder but not the acpi_video0 folder.

If there was a way to change how the brightness control keys on the laptop work, I think the problem will be effectively fixed.

Offline

#6 2014-02-08 08:26:09

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: systemd-backlight using intel_backlight?

You can force it to use the acpi_video0.  See the bottom of the Intel wiki page on Intel graphics.

Offline

#7 2014-09-02 06:31:19

cjxgm
Member
From: Zhejiang, China
Registered: 2013-09-03
Posts: 9
Website

Re: systemd-backlight using intel_backlight?

I found something strange:

I figured out the command that systemd executes to save/load backlight brightness.

# /usr/lib/systemd/systemd-backlight save backlight:acpi_video0

The above command saves the brightness into /var/lib/systemd/backlight/pci-0000:00:02.0:backlight:acpi_video0
But if I execute the following command:

# /usr/lib/systemd/systemd-backlight save backlight:intel_backlight

no new file is created in /var/lib/systemd/backlight/  (while I expect some file called blahblahblah-backlight:intel_backlight)

If I run

# /usr/lib/systemd/systemd-backlight load backlight:acpi_video0

the brightness is resumed to what I saved.
But if I run

# /usr/lib/systemd/systemd-backlight load backlight:intel_backlight

nothing changed. It's not a surprise because the brightness is not even saved onto disk.

It might be a bug of systemd.

Offline

#8 2014-09-03 02:30:29

Pse
Member
Registered: 2008-03-15
Posts: 413

Re: systemd-backlight using intel_backlight?

Are you sure this is not related to the known issue of the Intel driver switching to max brightness when switching to a VT? This usually results in systemd-backlight saving the brightness at 100% when rebooting.

Edit: add reference: https://bbs.archlinux.org/viewtopic.php?id=186521

Last edited by Pse (2014-09-03 13:20:37)

Offline

#9 2014-09-03 11:37:18

teateawhy
Member
From: GER
Registered: 2012-03-05
Posts: 1,138
Website

Re: systemd-backlight using intel_backlight?

What fixes the problems for me is using this kernel parameter,

video.use_native_backlight=0

then masking the systemd-backlight@.service, and setting the backlight manually with a script run at boot.
EDIT: set it to 0 , not 1

Last edited by teateawhy (2014-09-05 12:06:59)

Offline

Board footer

Powered by FluxBB