FS#74363 - [redshift] randr error -1 even when using redshift.service

Attached to Project: Community Packages
Opened by drws (drws) - Tuesday, 05 April 2022, 20:44 GMT
Last edited by Robin Candau (Antiz) - Wednesday, 10 May 2023, 12:43 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Lukas Fleischer (lfleischer)
Robin Candau (Antiz)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

According to Wiki:
https://wiki.archlinux.org/title/Redshift#Autostart

...redshift.service should start only after the DM, preventing the "Initialization of randr failed". However, that is not the case with me. I'm using LightDM and Xfce and have enabled the redshift.service as instructed. Still, redshift.service fires too early, preventing the redshift to start. It works as expected if I manually start the service later.


Additional info:
* package version(s): 1.12-5


Steps to reproduce:
1. "systemctl --user enable redshift.service"
2. restart
3. observe "journalctl --user -u redshift.service" to confirm success or failure to start
This task depends upon

Closed by  Robin Candau (Antiz)
Wednesday, 10 May 2023, 12:43 GMT
Reason for closing:  Won't fix
Additional comments about closing:  I recommend to just use the autostart feature of your DE/WM to launch redshift at boot.
Comment by David Thurstenson (thurstylark) - Thursday, 28 April 2022, 02:24 GMT
The wiki says that redshift.service uses After=display-manager.service, but that's no longer accurate. See: https://github.com/jonls/redshift/commit/c1026be5bb51dd21d182fe545155b70adc869d61
Comment by Robin Candau (Antiz) - Tuesday, 02 May 2023, 08:46 GMT
The redshift.service still uses "After=display-manager.service" because no upstream release has been made since the related upstream change.

@drws, do you mind trying to reproduce this issue with `redshift-git` from the AUR (which should provide the latest redshift.service file: https://raw.githubusercontent.com/jonls/redshift/master/data/systemd/redshift.service.in)? If it solves the issue, I can patch/backport the new redshift{-gtk}.service files in the PKGBUILD.

(By the way, if all you need is a "quick and easy" fix, you can alternatively add `redshift` to the autostart app in XFCE settings instead of using the systemd service)
Comment by drws (drws) - Tuesday, 02 May 2023, 19:10 GMT
Actually I've been using a similar fix in the meantime. The built-in service is started as systemd user service with autostart.

I tried the new service file. Since graphical-session.target doesn't exist I changed it to graphical.target. Also replaced bindir, the path to redshift is correct. However, the service doesn't want to start and all that is known is that it exits with code 1 (no other helpful output in service status or journald).
Comment by Robin Candau (Antiz) - Wednesday, 03 May 2023, 07:18 GMT
Alright, it seems like using the autostart feature of your DE/WM to launch redshift at boot is still the preferred and easiest solution then.

I would just close this ticket and recommended people to use the above solution instead. Is that okay for you?

Loading...