kotelnik / plasma-applet-redshift-control

Plasma 5 applet for controlling redshift (screen temperature modifying). It allowes basic redshift settings and fast manual temperature control by mouse wheel.
GNU General Public License v2.0
66 stars 12 forks source link

Two clashing redshift processes if systemd's startup of redshift isn't masked #66

Open daver1691 opened 3 years ago

daver1691 commented 3 years ago

On Kubuntu 21.04, once the "redshift" package is installed, then by default, systemd will automatically start redshift, and will even promptly restart it again if you kill the process. (Kubuntu 20.10 and earlier did not do this by default). Since this is due to an update of the redshift package, I assume that this will be the default on other recent linux distros too.

If this applet is then installed via "Get new widgets" (I hope that it will become a default widget since it's being moved to phabricator) then it will start another redshift process causing the screen to flash color changes every second or two.

To "mask" (i.e. permanently disable) the systemd startup of redshift for the current user, issue this command:

systemctl --user mask redshift

Details:

The installation of version 1.12-4 of the redshift package creates a link that instructs systemd to start redshift:

/etc/systemd/user/default.target.wants/redshift.service -->
    /usr/lib/systemd/user/redshift.service

This link can be removed with the following command:

sudo systemctl --global disable redshift

Or this can be overridden and disabled for a single user with:

systemctl --user mask redshift

Which creates a link:

~/.config/systemd/user/redshift.service --> /dev/null

I assume that the easiest way to fix this problem is to have this applet create the above link.

david-cortes commented 3 years ago

@daver1691 Have you by any chance created any fork that does this step?