1

I can't get Redshift to retrieve geolocation information from GeoClue2. The state right now, after a reboot and without having changed any packages or configuration since the reboot, is that

  • the GeoClue service is running:

    $ systemctl status geoclue.service
    ● geoclue.service - Location Lookup Service
       Loaded: loaded (/usr/lib/systemd/system/geoclue.service; static; vendor preset: disabled)
       Active: active (running) since Wed 2018-09-05 18:49:03 NZST; 3s ago
     Main PID: 8489 (geoclue)
        Tasks: 4 (limit: 4915)
       Memory: 2.1M
       CGroup: /system.slice/geoclue.service
               └─8489 /usr/lib/geoclue
    
    Sep 05 18:49:03 machine systemd[1]: Starting Location Lookup Service...
    Sep 05 18:49:03 machine systemd[1]: Started Location Lookup Service.
    
  • the packages are up to date:

    $ pacman --sync --info geoclue2 redshift
    Repository      : extra
    Name            : geoclue2
    Version         : 2.4.12-1
    Description     : Modular geoinformation service built on the D-Bus messaging system
    Architecture    : x86_64
    URL             : https://www.freedesktop.org/wiki/Software/GeoClue/
    Licenses        : LGPL
    Groups          : None
    Provides        : None
    Depends On      : libsoup  json-glib  libmm-glib  avahi  libnotify
    Optional Deps   : None
    Conflicts With  : geoclue
    Replaces        : None
    Download Size   : 154.42 KiB
    Installed Size  : 1206.00 KiB
    Packager        : Jan Alexander Steffens (heftig) <[email protected]>
    Build Date      : Sun 02 Sep 2018 07:42:59 NZST
    Validated By    : MD5 Sum  SHA-256 Sum  Signature
    
    Repository      : community
    Name            : redshift
    Version         : 1.12-2
    Description     : Adjusts the color temperature of your screen according to your surroundings.
    Architecture    : x86_64
    URL             : http://jonls.dk/redshift/
    Licenses        : GPL3
    Groups          : None
    Provides        : None
    Depends On      : geoclue2  libdrm  libxcb  libxxf86vm
    Optional Deps   : python-gobject: for redshift-gtk
                      python-xdg: for redshift-gtk
                      gtk3: for redshift-gtk
    Conflicts With  : None
    Replaces        : None
    Download Size   : 130.88 KiB
    Installed Size  : 851.00 KiB
    Packager        : Evangelos Foutras <[email protected]>
    Build Date      : Tue 24 Jul 2018 03:19:05 NZST
    Validated By    : MD5 Sum  SHA-256 Sum  Signature
    
  • GeoClue is configured to allow access from Redshift:

    $ tail --lines=4 /etc/geoclue/geoclue.conf
    [redshift]
    allowed=true
    system=false
    users=
    

and yet Redshift is unable to start:

$ 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.NoReply: Message recipient disconnected from message bus without replying.
Unable to get location from provider.

The user service exhibits a different behaviour:

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.

There seems to be a hack available to work around a similar problem - the error message above is different from that page when starting the program manually - but I'm interested in whether a more permanent fix is available or being worked on.

2
  • I bet you already read the Wiki. Just a quick guess: Are you using Gnome? If so, did you toggle Location Services in the privacy settings? Commented Sep 6, 2018 at 12:08
  • Nope. I'm using Awesome WM and LightDM. Commented Sep 6, 2018 at 22:24

1 Answer 1

1

This is a known issue in the GeoClue program but is has already been fixed in version 2.5.0. Upgrading to that version should solve your problem.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.