redshift icon indicating copy to clipboard operation
redshift copied to clipboard

Allow ICC profile as parameter

Open raspbeguy opened this issue 9 years ago • 36 comments

Hello, It is annoying that redshift doesn't care if you are using an ICC profile. When you launch it, the screen just go back to original lack of color calibration and the redshift is done from that. I see that you can specify gamma parameters when you call redshift. I don't know a lot of things about color calibration, but I don't think that's enough, and even if it was, I just don't know how to extract these informations from my ICC profile. Anyway, I think it would be much easier if redshift could be aware of what initial calibration the screen is, or at least take an ICC profile as a parameter. Thanks.

raspbeguy avatar Feb 02 '16 13:02 raspbeguy

This should be possible with the preserve option in the latest version of Redshift. This option can be set for the gamma adjustment method (i.e. randr, vidmode, ...) on the command line or in the configuration file.

jonls avatar Feb 02 '16 17:02 jonls

I'm sorry, I don't really understand how it works. I have absolutely no idea witch one to use, and anyway none of them are properly working. I'm applying my icc file with the xcalib utility.

raspbeguy avatar Feb 03 '16 10:02 raspbeguy

Redshift messes up my color profiles as well. If I run either of these:

redshift -x redshift -o -l 0:0 -b 1 -O 6500

I should be seeing no change, but instead a color profile gets unapplied. This is annoying, since my laptop screen has a really noticeable blue tint. And it is present even if I lower the screen temperature.

Just make redshift apply a transformation atop of the current color profile.

strelec avatar Feb 29 '16 22:02 strelec

@strelec that is what the preserve option mentioned above does

sammoth avatar May 26 '16 22:05 sammoth

I'm having this issue as well. How do I use preserve?

Upon reading the output of redshift -m randr:help, I tried redshift -m randr preserve=1, but it still gets rid of any color correction before shifting the colors. Am I using preserve wrong?

coaxial avatar Nov 29 '16 03:11 coaxial

IIRC your command should be redshift -m randr:preserve=1. The preserve option is attached to the randr method with a :.

jonls avatar Nov 29 '16 14:11 jonls

I think this feature request is best handled with the preserve option. I would like to avoid having to handle ICC profiles explicitly in Redshift. In the future the preserve option will most likely be enabled by default.

jonls avatar Jan 08 '17 21:01 jonls

It worked with the preserve option, thanks. I would also think that preserve should be on by default, it would make sense since if you care enough to have an ICC profile enabled you'd want it enabled all the time.

On Sun, Jan 8, 2017, 16:13 Jon Lund Steffensen [email protected] wrote:

I think this feature request is best handled with the preserve option. I would like to avoid having to handle ICC profiles explicitly in Redshift. In the future the preserve option will most likely be enabled by default.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jonls/redshift/issues/309#issuecomment-271179907, or mute the thread https://github.com/notifications/unsubscribe-auth/ACys_ayS98SyC7A7LQHseDOyK86eRsCBks5rQVGBgaJpZM4HRe_N .

coaxial avatar Jan 08 '17 21:01 coaxial

No, even preserve does not work.

When I call this, my screen is violet (blue + red), because of the heavy screen blue tint: redshift -m randr:preserve=1 -o -l 0:0 -b 1 -O 3000

When I then call this, the screen loses calibration: redshift -x

strelec avatar Jan 10 '17 22:01 strelec

@jonls, from which version is the randr:preserve option available in? Ubuntu 16.04 installs 1.10 and the option isn't there.

coaxial avatar Mar 26 '17 00:03 coaxial

@Coaxial It was added in 1.11.

jonls avatar Mar 26 '17 00:03 jonls

Thanks, can't the issue be closed then?

coaxial avatar Mar 26 '17 00:03 coaxial

This thread is more than one year old, meanwhile my old computerwas broken, so now wwith my new computer I don't need any custom ICC so I am unable to test if it works. I guess that if it works on other people configuration the thread can be closed.

raspbeguy avatar Mar 26 '17 08:03 raspbeguy

I installed 1.11 from source a while ago on my Mac running elementary, and it worked IIRC. Now I'm using Ubuntu on an x230 and the changes introduced by the ICC profile are so subtle that it's hard to tell if the option does anything. I'm almost certain it did work on the Mac with 1.11 though.

On Sun, Mar 26, 2017, 04:52 Raspbeguy, [email protected] wrote:

This thread is more than one year old, meanwhile my old computerwas broken, so now wwith my new computer I don't need any custom ICC so I am unable to test if it works. I guess that if it works on other people configuration the thread can be closed.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jonls/redshift/issues/309#issuecomment-289267074, or mute the thread https://github.com/notifications/unsubscribe-auth/ACys_c41EWFP5R9ir38ndY8bZOtqcxlOks5rpidHgaJpZM4HRe_N .

coaxial avatar Mar 26 '17 13:03 coaxial

I can confirm preserve works for me. ICC profiles are preserved with these settings (among others) in config:

[redshift]
adjustment-method=randr

[randr]
preserve=1

I am using redshift 1.11 on Arch Linux. Output from dispwin:

sh-4.4$ redshift -V
redshift 1.11
sh-4.4$ dispwin -V ~/.color.icc
Verify: '/home/username/.color.icc' IS loaded (discrepancy 0.0%)

In .xinitrc my monitor's ICC calibration is loaded before redshift.

ghost avatar Feb 05 '18 21:02 ghost

preserve seems to break reset (-x) command for me, e.g. calling

$ redshift -m randr:preserve=1 -O 3000
$ redshift -m randr:preserve=1 -x

doesn't reset anything at all, and subsequent calls lower the screen temperature even further. Calling reset without preserve finally resets everything. This also breaks tools that rely on it (e.g. plasma-redshift-integration) as a result.

Related, but probably belongs to issue #225, if colord is used, seems like following calls can be used to preserve color correction (e.g. call inhibit for every screen when applying settings and call uninhibit when using reset) https://www.freedesktop.org/software/colord/gtk-doc/Device.html#Device.ProfilingInhibit https://www.freedesktop.org/software/colord/gtk-doc/Device.html#Device.ProfilingUninhibit

Chemrat avatar Apr 29 '18 21:04 Chemrat

This made redshift-gtk respect my ICC profile when disabled:

~/.config/redshift/redshift.conf:

[randr]
preserve=0

LiSongMWO avatar Dec 01 '18 22:12 LiSongMWO

Any update on that topic ? I have the same issue :(

@EmilyBjoerk did you create the file ? It doesn't exist on my system (I'm using KDE).

lapineige avatar May 02 '19 16:05 lapineige

@lapineige yes. I had to create it. Your install should come with a default config, otherwise you can find it in this repo I think.

LiSongMWO avatar May 03 '19 18:05 LiSongMWO

You mean there is something else that the lines you quoted in that file ?

lapineige avatar May 03 '19 18:05 lapineige

yes

On Fri, 3 May 2019 at 20:22, lapineige [email protected] wrote:

You mean there is something else that the lines you quoted in that file ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jonls/redshift/issues/309#issuecomment-489192927, or mute the thread https://github.com/notifications/unsubscribe-auth/ABIPUMM2OJCLXU4KNEOJJV3PTR7FXANCNFSM4B2F57GQ .

LiSongMWO avatar May 03 '19 18:05 LiSongMWO

OK, people.

The config file should contain:

[randr]
preserve=1

Not 0. This can be all the content of the file, nothing else needed.

Config file location is: ~/.config/redshift.conf for version 1.11 ~/.config/redshift/redshift.conf for version 1.12, but it can fall back to 1.11's location.

To get your version: redshift -V (capital V that is). Ubuntu users: 18.04 LTS has 1.11, everything newer - 1.12.

To developers I strongly suggest to make this setting default.

Forkest avatar May 18 '19 07:05 Forkest

./config/redshift/redshift.conf

And not ~/.config/redshift/redshift.conf ?

This doesn't work at all in my case (with this ↑ file).

lapineige avatar May 18 '19 08:05 lapineige

@lapineige Of course, you're right. My fault, I was focusing on the second part of the path. I've edited my message.

Forkest avatar May 18 '19 22:05 Forkest

Config file location is: [...] To developers I strongly suggest to make this setting default.

And packagers can drop a system default in /etc/xdg/redshift.conf.

chrylis avatar Jul 22 '19 01:07 chrylis

For my part, adding

[randr] preserve=1

in ~/.config/redshift/redshift.conf doesn't resolve the issue completely. I have to disable redshift, switch off the ICC profile if in use, activate the profile, then activate redshift. Then it works fine all the time.

If I disable redshift, it breaks the ICC profile.

lapineige avatar Jul 22 '19 06:07 lapineige

Any update on this ? How can I provide you more logs or some help to fix this ?

lapineige avatar Sep 22 '19 13:09 lapineige

There's any reason why the default settings do not contain preserve?

[randr]
preserve=1

Zeioth avatar Jun 04 '20 13:06 Zeioth

A quick update: I'm using v1.12, with that setting in ~/.config/redshift/redshift.conf, there is no /etc/xdg/redshift.conf or ~/.config/redshift.conf. It still fails.

lapineige avatar Jun 04 '20 14:06 lapineige

In 1.12, preserve is the default. It's controlled by the -P option (to disable) instead of having to specify it specifically for each adjustment method.

jonls avatar Jun 14 '20 03:06 jonls