Open lutingrong opened 2 years ago
While this won't fix GeoClue service, to bypass this issue, just define your own config:
vi ~/.config/redshift.conf
Make sure to set your Lat and Long for it to work for you.
My ~/.config/redshift.conf
:
; Global settings for redshift
[redshift]
; Set the day and night screen temperatures
temp-day=5700
temp-night=3500
; Enable/Disable a smooth transition between day and night
; 0 will cause a direct change from day to night screen temperature.
; 1 will gradually increase or decrease the screen temperature.
transition=1
; Set the screen brightness. Default is 1.0.
;brightness=0.9
; It is also possible to use different settings for day and night
; since version 1.8.
;brightness-day=0.7
;brightness-night=0.4
; Set the screen gamma (for all colors, or each color channel
; individually)
gamma=0.8
;gamma=0.8:0.7:0.8
; This can also be set individually for day and night since
; version 1.10.
;gamma-day=0.8:0.7:0.8
;gamma-night=0.6
; Set the location-provider: 'geoclue', 'geoclue2', 'manual'
; type 'redshift -l list' to see possible values.
; The location provider settings are in a different section.
location-provider=manual
; Set the adjustment-method: 'randr', 'vidmode'
; type 'redshift -m list' to see all possible values.
; 'randr' is the preferred method, 'vidmode' is an older API.
; but works in some cases when 'randr' does not.
; The adjustment method settings are in a different section.
adjustment-method=randr
; Configuration of the location-provider:
; type 'redshift -l PROVIDER:help' to see the settings.
; ex: 'redshift -l manual:help'
; Keep in mind that longitudes west of Greenwich (e.g. the Americas)
; are negative numbers.
[manual]
lat=26.715
lon=-80.053
; Configuration of the adjustment-method
; type 'redshift -m METHOD:help' to see the settings.
; ex: 'redshift -m randr:help'
; In this example, randr is configured to adjust screen 1.
; Note that the numbering starts from 0, so this is actually the
; second screen. If this option is not specified, Redshift will try
; to adjust _all_ screens.
[randr]
screen=0
Note: location-provider=manual
this bypasses geoclue
@jpSimkins Thank you very much for posting your redshift.conf. A very similar error to yours started for me after upgrading to Debian Bullseye. I realized that my .conf file was very similar to yours. However, my issue was that my redshift.conf file was stored in my Nextcloud folder and sym linked to my ~/.config directory. Once I copied the file to ~/.config, it resolved the issue.
However, my issue was that my redshift.conf file was stored in my Nextcloud folder and sym linked to my ~/.config directory. Once I copied the file to ~/.config, it resolved the issue.
There seem to be other causes of the problem. If so, then this bug is not fixed. The bug appears to have existed since at least 2020 (see here) and indeed I am pretty sure that I myself encountered the bug at a date earlier than that.
Describe the bug redshift Unable to start GeoClue client. The old issue persists with fedora 34.
To Reproduce [l@HP14 ~]$ redshift Trying location provider
geoclue2'... Using provider
geoclue2'. 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. [l@HP14 ~]$Expected behavior redshift should work with GeoClue client.
Error output/logs/screenshots If applicable, add screenshots to help explain your problem.
Software versions (please complete the following information):
OS: [e.g. Linux/Windows/macOS] [l@HP14 ~]$ uname -a Linux HP14.localdomain 5.13.4-200.fc34.x86_64 #1 SMP Tue Jul 20 20:27:29 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Redshift version: [e.g. 1.11, run
redshift -V
in a terminal] [l@HP14 ~]$ rpm -qa|grep redshift redshift-1.12-11.fc34.x86_64 redshift-gtk-1.12-11.fc34.x86_64Distribution: [e.g. Ubuntu] fedora 34
Redshift installed from: [e.g. "using apt-get", "built from source"] using yum install
Additional info
[l@HP14 ~]$ rpm -qa|grep geoclue geoclue2-2.5.7-2.fc34.x86_64 geoclue2-libs-2.5.7-2.fc34.x86_64 geoclue2-demos-2.5.7-2.fc34.x86_64
[l@HP14 ~]$ sudo systemctl status geoclue.service [sudo] password for l: ○ geoclue.service - Location Lookup Service Loaded: loaded (/usr/lib/systemd/system/geoclue.service; static) Active: inactive (dead)
Jul 24 22:08:13 HP14.localdomain systemd[1]: Starting Location Lookup Service... Jul 24 22:08:13 HP14.localdomain systemd[1]: Started Location Lookup Service. Jul 24 22:09:18 HP14.localdomain geoclue[2046]: Service not used for 60 seconds> Jul 24 22:09:18 HP14.localdomain systemd[1]: geoclue.service: Deactivated succe> [l@HP14 ~]$
[l@HP14 ~]$ tail -8 /etc/geoclue/geoclue.conf [redshift] allowed=true system=false users=