You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 1, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 1, 2026. It is now read-only.
Could not connect to wayland display, exiting. #897
Describe the bug
The redshift is unable to change my screen, cannot get my location and keeps on loop. It seems like the errors of some people here, but mine doesn't say that is unable to connect to geoclue and says something about wayland.
To Reproduce
Just run redshift on terminal or in gtk version.
Expected behavior
It should change my screen based on my location.
Error output/logs/screenshots
I tried on terminal and gtk and the error is the same:
Trying location provider `geoclue2'...
Using the `geoclue2' provider.
Could not connect to wayland display, exiting.
Failed to start adjustment method wayland.
Trying next method...
Using the `randr' method.
Waiting for the initial location to be available...
Software versions (please complete the following information):
OS: [Linux]
Redshift version: [1.12]
Distribution: [Linux Mint]
Redshift installed from: ["using apt-get", it already came with Mint]
lovestaco@i3nux-mint:~$ sudo redshift
[sudo] password for lovestaco:
Trying location provider `geoclue2'...
Using provider `geoclue2'.
error: XDG_RUNTIME_DIR not set in the environment.
Could not connect to wayland display, exiting.
Failed to start adjustment method wayland.
Trying next method...
Authorization required, but no authorization protocol specified
`RANDR Query Version' returned error -1
Initialization of randr failed.
Trying next method...
Authorization required, but no authorization protocol specified
X request failed: XOpenDisplay
Initialization of vidmode failed.
Trying next method...
No more methods to try.
lovestaco@i3nux-mint:~$ redshift
Trying location provider `geoclue2'...
Using provider `geoclue2'.
Could not connect to wayland display, exiting.
Failed to start adjustment method wayland.
Trying next method...
Using method `randr'.
Waiting for initial location to become available...
Unable to start GeoClue client: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: 'redshift' disallowed, no agent for UID 1000.
Access to the current location was denied by GeoClue!
Make sure that location services are enabled and that Redshift is permitted
to use location services. See https://github.com/jonls/redshift#faq for more
information.
Unable to get location from provider.
Same system/software details as the original poster, same problem.
itzzme@itzziclaptop:~$ redshift -V
redshift 1.12
itzzme@itzziclaptop:~$ redshift
Trying location provider `geoclue2'...
Using provider `geoclue2'.
Could not connect to wayland display, exiting.
Failed to start adjustment method wayland.
Trying next method...
Using method `randr'.
Waiting for initial location to become available...
^Cpoll: Interrupted system call
Unable to get location from provider.
itzzme@itzziclaptop:~$ sudo redshift
[sudo] password for itzzme:
Trying location provider `geoclue2'...
Using provider `geoclue2'.
error: XDG_RUNTIME_DIR not set in the environment.
Could not connect to wayland display, exiting.
Failed to start adjustment method wayland.
Trying next method...
Authorization required, but no authorization protocol specified
`RANDR Query Version' returned error -1
Initialization of randr failed.
Trying next method...
Authorization required, but no authorization protocol specified
X request failed: XOpenDisplay
Initialization of vidmode failed.
Trying next method...
No more methods to try.
It stopped working several weeks ago on my debian 12 / xfce system, tried everything to get geolocation working (wifi configurations/different networks, reinstalling redshift and geoclue, etc).
Is the wayland warning expected? that and the permanent waiting for initial location warning are always in the output.
Trying location provider geoclue2'... Using provider geoclue2'.
Solar elevations: day above 3.0, night below -6.0
Temperatures: 6500K at day, 4500K at night
Brightness: 1.00:1.00
Gamma (Daytime): 1.000, 1.000, 1.000
Gamma (Night): 1.000, 1.000, 1.000
Could not connect to wayland display, exiting.
Failed to start adjustment method wayland.
Trying next method...
Using method `randr'.
Waiting for initial location to become available...
geoclue2 is down I guess. This has happened before, if I recall.
The workaround is to create a redshift.conf in your ~/.configdirectory. Mine looks like this because I am using an older version of redshift:
; Global settings
[redshift]
temp-day=5700
temp-night=3500
transition=1
gamma=0.8:0.7:0.8
location-provider=manual
adjustment-method=randr
; The location provider and adjustment method settings
; are in their own sections.
[manual]
lat=49.4
lon=1.1
; In this example screen 1 is adjusted by vidmode. Note
; that the numbering starts from 0, so this is actually
; the second screen.
[vidmode]
screen=0
there should be an example in /usr/share/doc/redshift and you just need to change the lat/lon values to test it out.
I just included the location-provider settings in the config and it seems to have worked, at least there is no error dialog.
; Global settings
[redshift]
location-provider=manual
; The location provider and adjustment method settings
; are in their own sections.
[manual]
lat=<your lat>
lon=<your lon>
lovestaco@i3nux-mint:~$ vim ~/.config/redshift.conf
lovestaco@i3nux-mint:~$ cat ~/.config/redshift.conf
; Global settings
[redshift]
location-provider=manual
; The location provider and adjustment method settings
; are in their own sections.
[manual]
lat=12.971599
lon=77.594566
lovestaco@i3nux-mint:~$ redshift
Could not connect to wayland display, exiting.
Failed to start adjustment method wayland.
Trying next method...
Using method `randr'.
Waiting for initial location to become available...
Location: 12.97 N, 77.59 E
I just included the location-provider settings in the config and it seems to have worked, at least there is no error dialog.
; Global settings
[redshift]
location-provider=manual
; The location provider and adjustment method settings
; are in their own sections.
[manual]
lat=<your lat>
lon=<your lon>
Thanks @sirnacnud that worked for me, got my lat and lon out of Google Maps. Running Linux Mint 21.2 Cinnamon.
geoclue2 is down I guess. This has happened before, if I recall.
The workaround is to create a redshift.conf in your ~/.configdirectory. Mine looks like this because I am using an older version of redshift:
; Global settings
[redshift]
temp-day=5700
temp-night=3500
transition=1
gamma=0.8:0.7:0.8
location-provider=manual
adjustment-method=randr
; The location provider and adjustment method settings
; are in their own sections.
[manual]
lat=49.4
lon=1.1
; In this example screen 1 is adjusted by vidmode. Note
; that the numbering starts from 0, so this is actually
; the second screen.
[vidmode]
screen=0
there should be an example in /usr/share/doc/redshift and you just need to change the lat/lon values to test it out.
I just included the location-provider settings in the config and it seems to have worked, at least there is no error dialog.
; Global settings
[redshift]
location-provider=manual
; The location provider and adjustment method settings
; are in their own sections.
[manual]
lat=<your lat>
lon=<your lon>
Thanks @sirnacnud that worked for me, got my lat and lon out of Google Maps. Running Linux Mint 21.2 Cinnamon.
Solved my issue as well - thanks!
By the way from Google Maps if you right-click anywhere on the map you can easily copy the lat and lon and it's in a pair in the format lat, long
Activity
lovestaco commentedon Jul 1, 2024
Same for me
Distribution: [Linux Mint] + i3wm
ItzzCode commentedon Jul 4, 2024
Same system/software details as the original poster, same problem.
Edit: probably the same issue as #895
ledufff commentedon Jul 7, 2024
It stopped working several weeks ago on my debian 12 / xfce system, tried everything to get geolocation working (wifi configurations/different networks, reinstalling redshift and geoclue, etc).
Is the wayland warning expected? that and the permanent waiting for initial location warning are always in the output.
Trying location provider
geoclue2'... Using providergeoclue2'.Solar elevations: day above 3.0, night below -6.0
Temperatures: 6500K at day, 4500K at night
Brightness: 1.00:1.00
Gamma (Daytime): 1.000, 1.000, 1.000
Gamma (Night): 1.000, 1.000, 1.000
Could not connect to wayland display, exiting.
Failed to start adjustment method wayland.
Trying next method...
Using method `randr'.
Waiting for initial location to become available...
bbbhltz commentedon Jul 8, 2024
geoclue2 is down I guess. This has happened before, if I recall.
The workaround is to create a
redshift.confin your~/.configdirectory. Mine looks like this because I am using an older version of redshift:there should be an example in
/usr/share/doc/redshiftand you just need to change the lat/lon values to test it out.other things to poke around at: #158 (comment) #445
janxkoci commentedon Jul 8, 2024
Maybe not geoclue - this was linked in another issue: mozilla/ichnaea#2065
ItzzCode commentedon Jul 9, 2024
i tried setting my config to manual location, but it seems to just ignore my config (which is at ~/.config/redshift/redshift.conf)
bbbhltz commentedon Jul 9, 2024
and at
~/.config/redshift.conf?ItzzCode commentedon Jul 9, 2024
not there because thats not what the README says?
bbbhltz commentedon Jul 9, 2024
that is a fallback if
$XDG_CONFIG_HOMEis not setexport XDG_CONFIG_HOME="$HOME/.config"needs to be set depending on your distro(keep in mind that I only sorted this out myself yesterday)
ItzzCode commentedon Jul 9, 2024
there we go! thanks!
sirnacnud commentedon Jul 11, 2024
I just included the location-provider settings in the config and it seems to have worked, at least there is no error dialog.
lovestaco commentedon Jul 12, 2024
This worked thanks!
maxyudin commentedon Oct 31, 2024
I solved this problem by replacing
~/.config/redshift/redshift.confwith
~/.config/redshift.confsuzunn commentedon Nov 11, 2024
Don't forget to reboot after all! Then it will be solved
Am0rphous commentedon Nov 15, 2024
Thank you @maxyudin . This fixed it for me (Kali with kernel 6.6.9-amd64).
chrisspadanuta commentedon Nov 25, 2024
Thanks @sirnacnud that worked for me, got my lat and lon out of Google Maps. Running Linux Mint 21.2 Cinnamon.
agustinegonzalez commentedon Mar 25, 2025
very useful. What solved my mistake was to specify lat and long.
jasdeepkhalsa commentedon Sep 1, 2025
Solved my issue as well - thanks!
By the way from Google Maps if you right-click anywhere on the map you can easily copy the lat and lon and it's in a pair in the format
lat, long