You are not logged in.

#1 2020-05-07 10:17:32

Caspian
Member
Registered: 2007-05-22
Posts: 263

OLED screen brightness

I have a new laptop with an OLED screen. I know that OLED screens don't have a "standard" backlight, but the brightness is still configurable for them in e.g. Windows.
Brightness control is not working for me in Arch no matter what I try. The only thing that works for me is xrandr, but I would like to avoid using this as this is a software hack. I tried the latest Pop OS from a USB stick, just to test if brightness control works there and it does.
Did anyone manage to get this working in Arch?

Offline

#2 2020-05-07 15:51:13

sabroad
Member
Registered: 2015-05-24
Posts: 242

Re: OLED screen brightness

Caspian wrote:

Brightness control is not working for me in Arch no matter what I try.

Not got one but did you read/try the OLED note on Backlight, specifically about icc-brightness?


--
saint_abroad

Offline

#3 2020-05-08 07:15:54

Caspian
Member
Registered: 2007-05-22
Posts: 263

Re: OLED screen brightness

I tried icc-brightness at the very beginning and it didn't work. I gave it another try now and found out that it fails when calling colormgr. I fixed this by installing kde-colord. However, this didn't fix it completely. It now sort of works in a way that I don't get any more errors, but the brightness control still doesn't work as expected. Keyboard shortcuts don't work at all, but this is tolerable. Using brightness control in KDE acts totally random, sometimes it changes the brightness, sometimes it doesn't react at all. In pop os (using Gnome of course) it works flawlessly. Any ideas on how to debug and fix this?

EDIT:
Some additional things I found out.
I've added a icc-brightness .desktop file to ~/.config/autostart. When using only this, only the first change of the brightness (using KDE brightness control applet) works. After that first change the controls stop working.
However, when I run 'icc-brightness watch' in console it, works as expected on every change.
I noticed some errors in the console when changing the brightness sometimes. Is it possible that these errors crash the script that's run via the .desktop file and this causes it to stop working?

The errors are:

ERROR: device-make-profile-default
Traceback (most recent call last):
File "/usr/bin/icc-brightness", line 136, in main
icc_brightness_apply()
File "/usr/bin/icc-brightness", line 108, in icc_brightness_apply
icc_brightness(brightness, max_brightness)
File "/usr/bin/icc-brightness", line 85, in icc_brightness
subprocess.check_output(['colormgr', 'import-profile', icc_filepath])
File "/usr/lib/python3.8/subprocess.py", line 411, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.8/subprocess.py", line 512, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['colormgr', 'import-profile', '/tmp/brightness_66000_120000.icc']' returned non-zero exit status 1.

profile path '/org/freedesktop/ColorManager/profiles/icc_d41d8cd98f00b204e9800998ecf8427e_user_1000' not found
ERROR: Error during call to icc_brightness
Traceback (most recent call last):
File "/usr/bin/icc-brightness", line 114, in handler
icc_brightness_apply()
File "/usr/bin/icc-brightness", line 108, in icc_brightness_apply
icc_brightness(brightness, max_brightness)
File "/usr/bin/icc-brightness", line 99, in icc_brightness
subprocess.run(['colormgr', 'delete-profile', object_path], check=True)
File "/usr/lib/python3.8/subprocess.py", line 512, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['colormgr', 'delete-profile', '/org/freedesktop/ColorManager/profiles/icc_d41d8cd98f00b204e9800998ecf8427e_user_1000']' returned non-zero exit status 1.

ERROR: None
ERROR: Error during call to icc_brightness
Traceback (most recent call last):
File "/usr/bin/icc-brightness", line 114, in handler
icc_brightness_apply()
File "/usr/bin/icc-brightness", line 108, in icc_brightness_apply
icc_brightness(brightness, max_brightness)
File "/usr/bin/icc-brightness", line 88, in icc_brightness
subprocess.run(['colormgr', 'device-add-profile',
File "/usr/lib/python3.8/subprocess.py", line 489, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.8/subprocess.py", line 854, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.8/subprocess.py", line 1637, in _execute_child
self.pid = _posixsubprocess.fork_exec(
TypeError: expected str, bytes or os.PathLike object, not NoneType

ERROR: Error during call to icc_brightness
Traceback (most recent call last):
File "/usr/bin/icc-brightness", line 114, in handler
icc_brightness_apply()
File "/usr/bin/icc-brightness", line 108, in icc_brightness_apply
icc_brightness(brightness, max_brightness)
File "/usr/bin/icc-brightness", line 85, in icc_brightness
subprocess.check_output(['colormgr', 'import-profile', icc_filepath])
File "/usr/lib/python3.8/subprocess.py", line 411, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.8/subprocess.py", line 512, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['colormgr', 'import-profile', '/tmp/brightness_79200_120000.icc']' returned non-zero exit status 1.
ERROR: b'The profile /home/user/.local/share/icc/brightness_79200_120000.icc already exists

Using 'icc-brightness clean' as suggested by some posts I found doesn't help.

Last edited by Caspian (2020-05-08 10:27:10)

Offline

#4 2020-07-03 05:42:41

anarsoul
Member
Registered: 2011-10-08
Posts: 14

Re: OLED screen brightness

Alternatively you can try this linux branch: https://github.com/anarsoul/linux-2.6/t … y-intel-bl (sorry, no PKGBUILDs)

It has 2 patches from Lyude Paul (see last 2 commits) to add brightness control for OLED panels. It works fine for me on Dell XPS 15 7590 with OLED panel.

Offline

Board footer

Powered by FluxBB