Open yuriccosta opened 5 months ago
Same for me Distribution: [Linux Mint] + i3wm
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.
Edit: probably the same issue as #895
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 ~/.config
directory. 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.
other things to poke around at: https://github.com/jonls/redshift/issues/158#issuecomment-71329118 #445
Maybe not geoclue - this was linked in another issue: https://github.com/mozilla/ichnaea/issues/2065
i tried setting my config to manual location, but it seems to just ignore my config (which is at ~/.config/redshift/redshift.conf)
i tried setting my config to manual location, but it seems to just ignore my config (which is at ~/.config/redshift/redshift.conf)
and at ~/.config/redshift.conf
?
not there because thats not what the README says?
that is a fallback if $XDG_CONFIG_HOME
is not set
export XDG_CONFIG_HOME="$HOME/.config"
needs to be set depending on your distro
(keep in mind that I only sorted this out myself yesterday)
there we go! thanks!
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>
export XDG_CONFIG_HOME="$HOME/.config"
This worked thanks!
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 solved this problem by replacing
~/.config/redshift/redshift.conf
with
~/.config/redshift.conf
Don't forget to reboot after all! Then it will be solved
Thank you @maxyudin . This fixed it for me (Kali with kernel 6.6.9-amd64).
mv ~/.config/redshift/redshift.conf ~/.config/redshift.conf
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:
Software versions (please complete the following information):