Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XPS 7590 #26

Closed
mich2k opened this issue Apr 15, 2020 · 18 comments
Closed

XPS 7590 #26

mich2k opened this issue Apr 15, 2020 · 18 comments

Comments

@mich2k
Copy link

mich2k commented Apr 15, 2020

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*

@agravelot
Copy link

Did you run sudo make install ?

@lfglopes
Copy link

@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

@mich2k
Copy link
Author

mich2k commented Apr 19, 2020

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

@psyray
Copy link

psyray commented Apr 19, 2020

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

@lfglopes
Copy link

If you guys updated from 19.10 to 20.04 try to run

./icc-brightness clean and try again

@mich2k
Copy link
Author

mich2k commented Apr 20, 2020

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

@psyray
Copy link

psyray commented Apr 20, 2020

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

@mich2k
Copy link
Author

mich2k commented Apr 20, 2020

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

@MadhurSahu
Copy link

MadhurSahu commented Apr 26, 2020

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

@mich2k
Copy link
Author

mich2k commented Apr 29, 2020

#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

@mich2k
Copy link
Author

mich2k commented May 15, 2020

@agravelot
Copy link

agravelot commented May 15, 2020

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)

@MadhurSahu
Copy link

MadhurSahu commented May 15, 2020

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!

@mich2k
Copy link
Author

mich2k commented May 15, 2020

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

@MadhurSahu
Copy link

MadhurSahu commented May 15, 2020

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)

@mich2k
Copy link
Author

mich2k commented May 20, 2020

How do you use a black screen 😅?

@metaer
Copy link

metaer commented Apr 10, 2021

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

@mich2k
Copy link
Author

mich2k commented Apr 10, 2021

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

@mich2k mich2k closed this as completed Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants