Redshift: Could not get location / Provider does not have a valid location available

Created on 10 Feb 2015  Â·  16Comments  Â·  Source: jonls/redshift

Xubuntu 14.04 LTS. redshift-gtk 1.8-0ubuntu6 from Ubuntu Software Center.

Running the GTK app results in the app appearing in the tray for a second and then silently crashing. Running "redshift" in the terminal results in the following output:

Trying location provider `geoclue'...
Started Geoclue provider `Geoclue Master'.
Using provider `geoclue'.

** (process:17144): WARNING **: Could not get location, 3 retries left.


** (process:17144): WARNING **: Could not get location, 2 retries left.


** (process:17144): WARNING **: Could not get location, 1 retries left.


** (process:17144): WARNING **: Provider does not have a valid location available.
Unable to get location from provider.

Help appreciated.

question

Most helpful comment

Same on Fedora 22: had to add this to /etc/geoclue/geoclue.conf:

[redshift]
allowed=true
system=false
users=

All 16 comments

You may be missing some part of Geoclue (the software component that Redshift uses to obtain the current location). You can look for a geoclue hostip component using your package manager, I think that could be what is missing. Also the hostip component only works if you are connected to the internet.

Alternatively you can specify your location manually, either using -l LAT:LON on the command line or in the configuration file.

Seems to me like it was installed just fine: https://i.imgur.com/mv1B0Do.png And I'm always connected to the internet over ethernet.

I ran that command and it now appears have applied the effect to my screens. However - the GUI app is still silently crashing. Any idea what's causing that?

Can you run redshift-gtk from the terminal and see what output you get?

That provides an identical error to the original post (Could not get location / Provider does not have a valid location).

I would recommend using the manual location as a workaround for now. At some point you will be able to upgrade Redshift to version 1.10 and you will have GeoClue2 support which seems to work better. The original GeoClue had some issues and has been discontinued.

I have the same problem when I use Redshift 1.10.

Running it with redshift-gtk -l 43.1356:10.46069 works for me. But even GeoClue2 has problems. Currently running it on arch.

Same for me here, on Debian. I just pushed version 1.10, dropping Geoclue support and introducing Geoclue 2.

But it does not seem to be working...

rrs@learner:~/Community/Packaging/redshift (master)$ redshift -l geoclue2 -vv
Unable to start GeoClue client: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Access denied.
Unable to connect to GeoClue.
Unable to get location from provider.
15:47 ♒♒♒ ☹ => 1

Actually, I think the problem lies with the fact that, dbus never had geoclue active on either of the buses. Let me investigate further.

Okay!! Atleast on Debian, something is broken.

You code:

    /* Obtain location */
    GError *error = NULL;
    GDBusProxy *location =
            g_dbus_proxy_new_for_bus_sync(G_BUS_TYPE_SYSTEM,
                                          G_DBUS_PROXY_FLAGS_NONE,
                                          NULL,
                                          "org.freedesktop.GeoClue2",
                                          location_path,
                                          "org.freedesktop.GeoClue2.Location",
                                          NULL, &error);
    if (location == NULL) {
            g_printerr(_("Unable to obtain location: %s.\n"),
                       error->message);
            g_error_free(error);
            return;
    }

You're looking for o.f.GeoClue2.Location whereas in Debian, it is available under o.f.GeoClue2.Client.Location, which is not callable by the normal user.

I need to check with the GeoClue2 maintainers in Debian.

Unable to start GeoClue client: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Access denied.

You may have to configure GeoClue2 to allow redshift to access the current location.

On Wednesday 27 May 2015 01:58 AM, Jon Lund Steffensen wrote:

Unable to start GeoClue client:
GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Access denied.

You may have to configure GeoClue2 to allow redshift to access the
current location.

Yes. The following is required in geoclue.conf for redshift to have access.

[redshift]
allowed=true
system=false
users=

Thanks...

Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."

hm , cant get this going either ... fresh install , providing command line -l arguments work .. but did require a bit of digging to get this going , cant redshift-gtk just ask for lat / lng if unable to automatically detect ?

Same on Fedora 22: had to add this to /etc/geoclue/geoclue.conf:

[redshift]
allowed=true
system=false
users=

I think ticket should be closed, and above resolution should be added in some FAQ

I'd be happy with that, I've since moved onto Arch and everything works fine for me here. Anyone still experiencing this issue can check above or alternatively create a new ticket. :smile:

Was this page helpful?
0 / 5 - 0 ratings