udifuchs/icc-brightness

XPS 7590

Closed this issue ยท 18 comments

Hello
I never managed to make this working unluckyly
Tried on ubuntu 19.10 and now on 20.04 keep having this error
Am I doing something wrong or is not supported?

dell xps 7590 oled-uhd

sudo ./icc-brightness apply Traceback (most recent call last): File "icc-brightness", line 157, in <module> main() File "icc-brightness", line 132, in main icc_brightness_apply() File "icc-brightness", line 108, in icc_brightness_apply icc_brightness(brightness, max_brightness) File "icc-brightness", line 83, in icc_brightness subprocess.run([ICC_BRIGHTNESS_GEN, icc_filepath, 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 1702, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'icc-brightness-gen'

when I type ./icc-brightness it shows the options*

Did you run sudo make install ?

@mich2k

To run ./icc-brighness standalone (as I understand you're trying), you don't need sudo. But you need to run make in order to compile icc-brightness-gen

Hello, sure I followed the guildeline:
mich@mich-XPS-15-7590:~/Scrivania/icc-brightness$ sudo make install mkdir -p /usr/local/bin/ install -m 755 icc-brightness-gen /usr/local/bin/ install -m 755 icc-brightness /usr/local/bin/ mkdir -p /usr/share/gnome/autostart/ install -m 644 icc-brightness.desktop /usr/share/gnome/autostart/ mich@mich-XPS-15-7590:~/Scrivania/icc-brightness$ icc-brightness apply Traceback (most recent call last): File "/usr/local/bin/icc-brightness", line 157, in <module> main() File "/usr/local/bin/icc-brightness", line 132, in main icc_brightness_apply() File "/usr/local/bin/icc-brightness", line 108, in icc_brightness_apply icc_brightness(brightness, max_brightness) File "/usr/local/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

even tried:

mich@mich-XPS-15-7590:~/Scrivania/icc-brightness$ gcc -W -Wall icc-brightness-gen.c -l lcms2 -o icc-brightness-gen mich@mich-XPS-15-7590:~/Scrivania/icc-brightness$ ls icc-brightness icc-brightness.desktop icc-brightness-gen icc-brightness-gen.c LICENSE Makefile README.md mich@mich-XPS-15-7590:~/Scrivania/icc-brightness$ ./icc-brightness apply Traceback (most recent call last): File "./icc-brightness", line 157, in <module> main() File "./icc-brightness", line 132, in main icc_brightness_apply() File "./icc-brightness", line 108, in icc_brightness_apply icc_brightness(brightness, max_brightness) File "./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_52284_120000.icc']' returned non-zero exit status 1.

but always the same error
When running watch, the error changes:

mich@mich-XPS-15-7590:~/Scrivania/icc-brightness$ icc-brightness watch ERROR: device-make-profile-default Traceback (most recent call last): File "/usr/local/bin/icc-brightness", line 136, in main icc_brightness_apply() File "/usr/local/bin/icc-brightness", line 108, in icc_brightness_apply icc_brightness(brightness, max_brightness) File "/usr/local/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_52284_120000.icc']' returned non-zero exit status 1. ^CTraceback (most recent call last): File "/usr/local/bin/icc-brightness", line 157, in <module> main() File "/usr/local/bin/icc-brightness", line 145, in main time.sleep(1000000) KeyboardInterrupt

Hi,
Exact same error for me on XPS 7590

ERROR: device-make-profile-default
Traceback (most recent call last):
  File "./icc-brightness", line 136, in main
    icc_brightness_apply()
  File "./icc-brightness", line 108, in icc_brightness_apply
    icc_brightness(brightness, max_brightness)
  File "./icc-brightness", line 85, in icc_brightness
    subprocess.check_output(['colormgr', 'import-profile', icc_filepath])
  File "/usr/lib/python3.6/subprocess.py", line 356, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['colormgr', 'import-profile', '/tmp/brightness_60000_120000.icc']' returned non-zero exit status 1.

I follow the guideline and do make and sudo make install
Kernel 5.3.0-46-generic #38~18.04.1-Ubuntu

And fn+F11 or F12 not working at reboot

If you guys updated from 19.10 to 20.04 try to run

./icc-brightness clean and try again

Already tried
After a clean upgrade from 19 to 20
Everything "as new"

Already tried too. Clean works with no error. But same error when I want to execute icc-brightness.

I heard that Ubuntu 20.04 fixed the brightness on oled systems
There is no official announcement about this?

Hello all, I am running openSUSE Tumbleweed with KDE on my XPS 7590.
I was fiddling around with the python code and found that the subprocess.check_output() was not working properly after the recent system update causing the icc-brightness to break.
Turns out reinstalling colord-kde and then running icc-brightness clean solved the issue.
I hope this helps.

Edit: I was getting the same error as @psyray

#23

This issue here might be the fix and the issue that we are all having
My Dell is set on Italian
Yours?
How can this affect the code..
EDIT:
This actually fixed it for me, but i can not change my whole system lang for a plugin..
hope this helps you all

Can be helpful (or not)
Just fixed mine by adding i915.enable_dpcd_backlight=1 to kernel boot settings.
Happened today with the latest fedora update.

https://wiki.archlinux.org/index.php/Backlight#Unable_to_control_eDP_Panel_brightness_(Intel_i915_only)

FIX:
https://github.com/lawleagle/oled-linux

Can confirm this works!
NOTE: You might wanna change the brightness_step_size=12 to a bigger number for faster response to brightness change. 10000 works good for me!

FIX:
https://github.com/lawleagle/oled-linux

Can confirm this works!
NOTE: You might wanna change the brightness_step_size=12 to a bigger number for a faster response to brightness change. 10000 works good for me!

Trust me or not I already did it, and was not so easy ๐Ÿคฃ
And I had to check in the code
Indeed I thought that was not working, then I did an echo $percent and saw that was extremely slow
And I understood the step was WAY too low
Now I fixed it at 1500, I guess I ll increase it

I asked why 12 to the code Dev and he replied me that is a good setup for Lenovo s

FIX:
https://github.com/lawleagle/oled-linux

Can confirm this works!
NOTE: You might wanna change the brightness_step_size=12 to a bigger number for a faster response to brightness change. 10000 works good for me!

Trust me or not I already did it, and was not so easy rofl
And I had to check in the code
Indeed I thought that was not working, then I did an echo $percent and saw that was extremely slow
And I understood the step was WAY too low
Now I fixed it at 1500, I guess I ll increase it

I asked why 12 to the code Dev and he replied me that is a good setup for Lenovo s

Lol I did the same!

Also, you can change
percent=echo "$current_brightness / $max_brightness * 0.9 + 0.1" | bc -l
To
percent=echo "$current_brightness / $max_brightness" | bc -l

This will allow the screen to completely go black when brightness is set to 0 (I use it very often :P)

How do you use a black screen ๐Ÿ˜…?

Linux kernel 5.12-rc6 supports OLED display's brightness control: torvalds/linux@2227816

I use Dell XPS 7590 / Ubuntu 20.04
Updating Linux kernel to 5.12-rc6 solved the issue.

Example how to update kernel on Ubuntu 20.04 (at one's own risk)

wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.12-rc6/amd64/linux-headers-5.12.0-051200rc6_5.12.0-051200rc6.202104042231_all.deb
wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.12-rc6/amd64/linux-headers-5.12.0-051200rc6-generic_5.12.0-051200rc6.202104042231_amd64.deb
wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.12-rc6/amd64/linux-image-unsigned-5.12.0-051200rc6-generic_5.12.0-051200rc6.202104042231_amd64.deb
wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.12-rc6/amd64/linux-modules-5.12.0-051200rc6-generic_5.12.0-051200rc6.202104042231_amd64.deb

sudo dpkg -i *.deb

sudo shutdown -r now

You can also install a Kernel Patch for 5.10, this is also available in AUR named 'oled-linux', just apply this patch and the brightness will kinda work (also the night-mode with redshift)
This is another solution if you dont want to upgrade to 5.12 yet