Bug 420861 - Powerdevil can’t adjust brightness: wrong sysfs entry
Summary: Powerdevil can’t adjust brightness: wrong sysfs entry
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Power management & brightness (other bugs)
Version First Reported In: 5.18.4
Platform: Ubuntu Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-01 15:13 UTC by Roman Odaisky
Modified: 2025-03-06 21:18 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
please check error attached in image (3.66 MB, image/jpeg)
2021-11-18 13:03 UTC, Devaraj Singh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Odaisky 2020-05-01 15:13:40 UTC
On my Dell XPS 9570 Powerdevil is unable to adjust screen brightness. This is because the laptop has two sysfs entries:

$ grep -s . /sys/class/backlight/*/*
/sys/class/backlight/acpi_video0/actual_brightness:2
/sys/class/backlight/acpi_video0/bl_power:0
/sys/class/backlight/acpi_video0/brightness:2
/sys/class/backlight/acpi_video0/max_brightness:10
/sys/class/backlight/acpi_video0/scale:unknown
/sys/class/backlight/acpi_video0/type:firmware
/sys/class/backlight/intel_backlight/actual_brightness:12000
/sys/class/backlight/intel_backlight/bl_power:0
/sys/class/backlight/intel_backlight/brightness:12000
/sys/class/backlight/intel_backlight/max_brightness:120000
/sys/class/backlight/intel_backlight/scale:unknown
/sys/class/backlight/intel_backlight/type:raw

Writing to acpi_video0/brightness does nothing. Writing to intel_backlight/brightness works.

However, the code in daemon/backends/upower/backlighthelper.cpp looks at the “type” parameter and prefers “firmware” to “platform” to “raw”, which, in this case, chooses the wrong device. The error is fixed, at least on my laptop, if I edit the code to make “raw” entries the top preference.

Please add more logic to choose the correct sysfs entry or make it user configurable.
Comment 1 Devaraj Singh 2021-11-18 13:03:59 UTC
Created attachment 143693 [details]
please check error attached in image

failed to start load/save screen backlight brightness of backlight:acpi_video0.
failed to start pkgfile database update.
Comment 2 Roman Odaisky 2021-11-18 17:51:54 UTC
(In reply to Devaraj Singh from comment #1)

> failed to start load/save screen backlight brightness of
> backlight:acpi_video0.
> failed to start pkgfile database update.

That looks entirely unrelated. Please report a new bug instead.
Comment 3 TraceyC 2025-03-06 21:18:12 UTC
There have been a lot of improvements and bug fixes to brightness control since this report was opened. If you still are experiencing a bug, please open a new report. Thanks.