raphaelquintao / QRedshiftCinnamon

Linux Cinnamon applet to change screen color temperature
https://cinnamon-spices.linuxmint.com/applets/view/313
Apache License 2.0
93 stars 12 forks source link

Please make qredshift systemd-aware #28

Closed dilinger closed 3 years ago

dilinger commented 3 years ago

On Debian testing (bullseye), the redshift package by default launches redshift via systemd. Specifically:

dilinger@e7470:~$ systemctl status --user redshift ● redshift.service - Redshift display colour temperature adjustment Loaded: loaded (/usr/lib/systemd/user/redshift.service; enabled; vendor pr> Active: active (running) since Wed 2021-02-17 22:08:37 EST; 2s ago Docs: http://jonls.dk/redshift/ Main PID: 50863 (redshift) Tasks: 5 (limit: 18799) Memory: 3.0M CPU: 56ms CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/redshift.s> └─50863 /usr/bin/redshift

Feb 17 22:08:37 e7470 systemd[1753]: Stopped Redshift display colour temperatur> Feb 17 22:08:37 e7470 systemd[1753]: Started Redshift display colour temperatur> Feb 17 22:08:37 e7470 redshift[50863]: Trying location provider geoclue2'... Feb 17 22:08:37 e7470 redshift[50863]: Using providergeoclue2'.

qredshift assumes that if redshift is running in the background, killing it will be enough. However, systemd immediately restarts it. So basically, systemd's redshift launcher and qredshift end up fighting (with somewhat hilarious results as my screen changes lots of colors).

The solution (for me) is to manually run systemctl stop --user redshift, but it'd be great if either qredshift learned how to do this, or if there was some kind of warning/notification to let users know that they'll need to do this.

raphaelquintao commented 3 years ago

Can you check if its fixed with the last version(1.5.3)? Thanks for the report.

dilinger commented 3 years ago

This appears to be working. I reinstalled the redshift package so that it had the default systemd settings, reinstalled qredshift, and it properly shut down and masked the redshift service. Thanks!