Redshift fails to start with session if no external location provider is available

Bug #868904 reported by Roger Binns
644
This bug affects 168 people
Affects Status Importance Assigned to Milestone
Redshift
Confirmed
High
Unassigned
Ubuntu GeoIP
Confirmed
Undecided
Unassigned
redshift (Ubuntu)
Fix Released
High
Unassigned
ubuntu-geoip (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Since switching to oneiric redshift won't start. It is listed as a startup application and these lines are present in .xsession-error from it:

    Unable to get location from provider.
    Started Geoclue provider `Geoclue Master'.
   Using provider `geoclue'.

There is also no process in a ps listing. If I start it from the command prompt then it starts just fine often with substantially similar messages.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: redshift 1.7-0ubuntu1
ProcVersionSignature: Ubuntu 3.0.0-12.19-generic 3.0.4
Uname: Linux 3.0.0-12-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 1.23-0ubuntu2
Architecture: amd64
Date: Wed Oct 5 22:39:15 2011
SourcePackage: redshift
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Roger Binns (ubuntu-rogerbinns) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in redshift (Ubuntu):
status: New → Confirmed
Revision history for this message
Erik (eedlun) wrote :

I'm a complete novice here but could this have something to do with the startup command "gtk+redshift" and gtk in general?

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

This seems to be a problem with the way the geoclue provider is done.. it should probably block and retry for a while before giving up, as geoclue just might be unable to determine the location at this moment.

Changed in redshift (Ubuntu):
importance: Undecided → High
summary: - Redshift fails to start with session
+ Redshift fails to start with session due to geoclue failure
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: Redshift fails to start with session due to geoclue failure

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in redshift (Ubuntu Oneiric):
status: New → Confirmed
Revision history for this message
Rafał Błaszczyk (rblaszczyk) wrote :

The workaround in Oneiric is to install geoclue and geoclue-hostip It works without additional configuration after installing these two. I think it could be a problem with installed (by default) geoclue-ubuntu-geoip.

Revision history for this message
rodlaycock (rod-laycock) wrote :

I installed geoclue and geoclue-hostip and now Redshift won't start automatically or manually.

Revision history for this message
Roger Binns (ubuntu-rogerbinns) wrote :

geoclue was already installed for me and so geoclue-hostip was added. The consequence was that I couldn't start redshift at all, and even uninstalling didn't help. Totally hosed the setup.

In the end the fix is to make redshift not use geoclue at all until Ubuntu fix that package. Use 'redshift -l list' to see a list of other providers it can use. I'm using 'redshift -l gnome-clock' which works perfectly.

Revision history for this message
Daniel Hahler (blueyed) wrote :

It works for me in Oneiric, having the following geoclue packages installed:
    geoclue, geoclue-ubuntu-geoip and libgeoclue0

I am affected by another bug, where it crashes during startup, related to geoclue apparently: bug 888661.

Changed in redshift:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
tellapu (tellapu) wrote :

Thanks Roger (#8) for the tip, but it does not work for me in Ubuntu 11.10, although gnome-clock is listed as provider, I get his output in the terminal:
$ redshift -l gnome-clock
Cannot list GNOME panel applets.
Initialization of gnome-clock failed.

Anything I can change to make it run?

Revision history for this message
Roger Binns (ubuntu-rogerbinns) wrote :

I use gnome-shell as my desktop, not Unity. That is probably what makes it work.

Revision history for this message
Don Myers (donmyers) wrote :

On two machines with Ubuntu 11.10, it will not start automatically even though startup applications shows it is supposed to start. When booting it looks like it is trying to start, but then stalls, the desktop picture flashes, and then the boot completes normally. If I click the dash button, then type in redshift, and then left click the icon, it loads, and I get an icon for it in the top bar. Then everything works fine until shutdown. If I don't click on the button in the top bar and select to quit redshift, both computers freeze during shutdown. The only way to turn them off is to hold the power button down.

Revision history for this message
Jon Lund Steffensen (jonls) wrote :

The workaround is to ensure that redshift can start successfully at boot even though network and such is not up yet. This may be possible with some geoclue providers. Otherwise a configuration file with the location entered manually can be created.

Revision history for this message
Felix Möller (felix-derklecks) wrote :

This is a duplicate of bug #808006 i guess.

Revision history for this message
Simba MacDhuibh (spacesimba08) wrote :

After installing geoclue-hostip it worked, but produced bug #808006 kindof, which means they are not duplicates.
geoclue-hostip should definitely be included in dependancies so apt-get/yum can work the magic. Ubuntu 11.10 AMD64.

Revision history for this message
ethanay (ethan-y-us) wrote :

does the workaround exist yet? is it possible to specificy a "manual fallback location" in a config file if/when redshift fails to start?

ideally, if redshift starts without network access, would the program fall back to its last known good location setting, and then wait for an internet connection to confirm or update location?

it was really nice when redshift played nice w/the gnome clock applet's location settings, esp for mobile users. maybe we can work with gnome or cinnamon to restore that functionality?

Revision history for this message
Mark van den Bergh (mark-vandenbergh) wrote :

What I use as a workaround is defining the latitude and longitude at startup. I don't travel that much to benefit from the service to look it up every time I boot.

1) use http://itouchmap.com/latlong.html or any other service to find your latitude/longitude
2) adjust the startup command of redshift to: gtk-redshift -l <latitude>:<longitude>
Example of latitude/longitude of Amsterdam for redshift: gtk-redshift -l 52.37:4.9

Adjusting the startup command in Ubuntu 11.10:
Start the dash and enter "startup applications", select Redshift and click "Edit", adjust the command as mentioned above.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu-geoip (Ubuntu Oneiric):
status: New → Confirmed
Changed in ubuntu-geoip (Ubuntu):
status: New → Confirmed
Daniel Hahler (blueyed)
Changed in redshift (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package redshift - 1.7-1ubuntu2

---------------
redshift (1.7-1ubuntu2) precise; urgency=low

  * d/patches/retry-geoclue.patch: Retry geoclue a few times so
    redshift does not explode at startup. (LP: #868904)
 -- Clint Byrum <email address hidden> Fri, 02 Mar 2012 19:14:43 -0800

Changed in redshift (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

It appears to me that the problem is that geoclue_position_get_position() is not blocking until a response comes from geoclue *OR* its possible that the ubuntu-geoip is doing the wrong thing and is fooling geoclue into thinking there's a response, but since the fields come back as not set, I think its geoclue working in a confusing way.

As a workaround, I added a sleep loop that waits 1 second between retries, which should be long enough if you boot up with network connectivity.

Long term, redshift should be trying repeatedly to get a location forever, not just at startup. If I put my laptop to sleep in Los Angeles, and get on a plane to New York, I'd like for redshift to adjust. This would also make it more resilient to not having a defined location at startup. It should basically just refuse to start messing with the display until a location is available.

Changed in redshift (Ubuntu):
assignee: nobody → Clint Byrum (clint-fewbar)
Revision history for this message
Jose Luis Navarro (jlnavarro111) wrote :

It doesn't work at 12.04 when there are not internet connection.

Revision history for this message
Clint Byrum (clint-fewbar) wrote : Re: [Bug 868904] Re: Redshift fails to start with session due to geoclue failure

Excerpts from Jose Luis Navarro's message of 2012-06-02 11:31:56 UTC:
> It doesn't work at 12.04 when there are not internet connection.
>

Indeed, redshift needs a bit of refactoring to keep trying even w/o a
location result.

Revision history for this message
Jimmy (jimmy-axenhus) wrote : Re: Redshift fails to start with session due to geoclue failure

For those having this bug, do you also have this one?
https://bugs.launchpad.net/ubuntu/+source/ubuntu-geoip/+bug/1010993

Revision history for this message
Fred (eldmannen+launchpad) wrote :

I didn't have this issue in Ubuntu 12.04 LTS, but now I got this in 12.10.

$ redshift
Started Geoclue provider `Geoclue Master'.
Using provider `geoclue'.
Could not get location (3 retries left): Geoclue master client has no
usable Position providers.
Unable to get location from provider.

$ redshift -l gnome-clock
Cannot list GNOME panel applets.
Initialization of gnome-clock failed.

Revision history for this message
zEn (der-eremit) wrote :

also started experiencing that exact same problem when switching to quantal beta 1

Revision history for this message
Prasanna K (onlineprasanna) wrote :

Above mentioned work around works without active internet connection. i.e, redshift doesn't go looking for geolocations if you use this workaround.

But if we tuse terminal and use command : $ redshift
(it shows)

** (process:3248): WARNING **: Metadata for error domain "geoclue-error-quark" already registered

Started Geoclue provider `Geoclue Master'.
Using provider `geoclue'.
Could not get location (3 retries left): Geoclue master client has no usable Position providers.
Unable to get location from provider.

But when you type command $ gtk-redshift -l LAT:LONG (Where LAT and LONG correspond with your coordinates.)
it runs soomthly as send in the above question. Hence forth a startup application is created using this command.

By the way when you click Applications>Accessories>Redshift it works through geolocation and needs a active internet connection every time where as the little workout in http://askubuntu.com/questions/194525/does-redshift-need-active-internet-connection-to-work/194582#194582 helps the otherway by mannually creating the geolocation.

Revision history for this message
ethanay (ethan-y-us) wrote :

The -l lat:lon is what I use and sufficient for me, but the workaround is insufficient, though, from a design perspective. For example, both my parents and my girlfriend just think the program is completely broken if they try to use it while not connected to the internet.

Both Unity and Gnome allow setting your current location. Redshift should probably do the following automatically by default unless given a manual over-ride (such as using the -l lat:lon option):

1. Try to find current location using geoclue and internet connection
2. If #1 doesn't work, fall back to using Unity / Gnome location in the clock applet
3. If #2 doesn't work, fall back to using last-known good startup location
4. If #3 doesn't work, prompt use to enter a location manually at least once using the -l switch (so it can create a config file and fall back to #3 next time)

Revision history for this message
jawz101 (jawz101-deactivatedaccount-deactivatedaccount) wrote :

holy crap this bug has been ongoing for a year

Revision history for this message
Derek Roberts (derek-roberts) wrote :

A fix for 12.10 would be great, because I'm having this problem as well.

Revision history for this message
Jonathan Davies (jpds) wrote :

Installing the 'geoclue-hostip' package fixes it for me on 12.10.

Revision history for this message
Kay (ksthiele) wrote :

Could we just add an option to remove geo clue and let work with the clock?

Revision history for this message
Kay (ksthiele) wrote :

btw I handled it this way:

open "Startup Applications"
Add -> Name: Redshift
-> Command gtk-redshift -l <your coordinations (00.00:00:00)>

works perfectly

Revision history for this message
jc00ke (jesse-jc00ke) wrote :

@ksthiele nice, I was doing that too, but I didn't want to always find my lat/long. Installing geoclude-hostip didn't fix it for me, so I whipped up a little Ruby script to grab my coordinates: https://gist.github.com/4180325

Revision history for this message
Ian Nicholson (imnichol) wrote :

So has a fix been released? Because I'm still experiencing this on an up to date 12.10 machine.

Revision history for this message
Robin (r1579) wrote :

redshift will not load from the startup programs or the terminal in my Ubuntu 12.04

In terminal I have tried

redshift
/usr/bin/redshift

In both cases it hangs and gives no error message.

It does start when the redshift icon is clicked in the unity dock.

I have set up the ~/.config/redshift.conf
so that it uses the lat/ long within the conf file.

Internet always starts on startup.

Revision history for this message
valent (valent-turkovic) wrote :

Same issue on Fedora 17 with geoclue installed redshift doesn't start:

Started Geoclue provider `Geoclue Master'.
Using provider `geoclue'.
Could not get location: Router mac address query failed.
Unable to get location from provider.

and then crashes

Revision history for this message
Sylvhem (sylvhem) wrote :

There is the same issue on Ubuntu 12.10 Quantal Quetzal. The command line return:

Started Geoclue provider `Geoclue Master'.
Utilisation du fournisseur « geoclue ».

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

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

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

** (process:8284): WARNING **: Provider does not have a valid location available.
Impossible d'obtenir une localisation du fournisseur.

Revision history for this message
Sasa Paporovic (melchiaros) wrote :

In respect to the comments the tags precise and quantal were added.

My own observation brings this bug also to raring.

tags: added: precise quantal raring
Revision history for this message
Sasa Paporovic (melchiaros) wrote :

@Clint Byrum

Your patch do not solv the problem. It is only shifting it a bit to:

 redshift
Started Geoclue provider `Geoclue Master'.
Dienst »geoclue« wird benutzt.

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

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

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

** (process:2886): WARNING **: Provider does not have a valid location available.

Revision history for this message
Matt Zimmerman (mdz) wrote :

geoclue_position_get_position is returning a latitude, but not a longitude, i.e. fields contains GEOCLUE_POSITION_FIELDS_LATITUDE but not GEOCLUE_POSITION_FIELDS_LONGITUDE. I'm not sure why this is, since when I run geoclue-test-gui, it shows both latitude and longitude.

Revision history for this message
Matt Zimmerman (mdz) wrote :

The issue I'm experiencing with getting latitude but not longitude seems to be covered by bug #1060645

Revision history for this message
O Gopal (jswami) wrote :

Comment 29 by ethanay is right on target. He has rightly understood the problem, and his proposed behavior would admirably solve it.

Revision history for this message
Olivier Berger (olivierberger) wrote :

See my suggestions for solving these geoclue-hostip issues : https://bugs.launchpad.net/redshift/+bug/808006/comments/15

I have now in my ~/.config/redshift.conf :

[redshift]
              location-provider=geoclue

[geoclue]
name=org.freedesktop.Geoclue.Providers.Hostip
path=/org/freedesktop/Geoclue/Providers/Hostip

; The location provider and adjustment method settings
; are in their own sections.
[manual]
lat=48.530344
lon=2.250073

and can the switch to gtk-redshift -l manual if needed for a fallback when geoclue-hostip won't work (and when I'm in Paris).

I'm not sure the DEFAULT_PROVIDER and DEFAULT_PROVIDER_PATH in src/location-geoclue.c are valid outside the Ubuntu world, so hence the name and path...

Hope this helps

Revision history for this message
gcb (gcb0) wrote :

On the first time i installed redshift on ubuntu 12.10 it worked. on all other tries i get the geolocation error

Revision history for this message
Karl M. Davis (karlmdavis) wrote :

I'm also having the same problem with redshift and gtk-redshift. Here's the debugging info I've compiled so far:

$ redshift
Started Geoclue provider `Geoclue Master'.
Using provider `geoclue'.
** (process:11896): WARNING **: Could not get location, 3 retries left.
** (process:11896): WARNING **: Could not get location, 2 retries left.
** (process:11896): WARNING **: Could not get location, 1 retries left.
** (process:11896): WARNING **: Provider does not have a valid location available.
Unable to get location from provider.

$ redshift -l list
Available location providers:
  geoclue
  gnome-clock
  manual

$ redshift -l gnome-clock
Cannot list GNOME panel applets.
Initialization of gnome-clock failed.

$ lsb_release -d
Description: Ubuntu 12.10

$ dpkg --get-selections|grep geoclue
geoclue install
geoclue-ubuntu-geoip install
libgeoclue0 install

Revision history for this message
Jeremy Pallats (starcraft.man) (starcraft.man) wrote :

I've recently started using f.lux and settled on this program for when I'm using Linux. I ran into this and investigated the issue a bit. It appears that the problem is hostip.info simply isn't reliable. Geoclue via hostip was working fine until my ability to reach the server ended. I assume the problem lies with hostip server and when it cannot even establish a connection geoclueinstantly fails rather than ping it on some schedule.

For those wanting to use this program reliably without having to depend on either geoclue OR gnome-clock as a location provider, I'd recommend manual configuration. You can do this using the legacy manual lat/lon command. Find your current location using another service such as http://www.itouchmap.com/latlong.html. Some people above seemed confused by the format for redshift's manual command, it follows standard +/- notation where +latitude is north and - latitude is south and + longitude is east while -longitude is west.

Command example:
redshift -t 6500:3400 -l 43.63:-79.33 &

The above command starts redshift with coordinates for Toronto area of Canada, I have also provided new defaults for daytime/night color values (same values as f.lux) with -t. The & makes the process execute in the background.

Likely redshift should find a more reliable internet mechanism than hostip.info for the future though it isn't really the programs fault.

As a final note, if you are like me and don't want to have to execute that on each reboot. I'd advise putting that in a tiny script and having it execute on startup via whatever startup manager/process your flavor of Ubuntu uses.

Revision history for this message
mike beqiri (mxls10) wrote :

shift doesn't work on ubuntu 12.04 LTS, I had a edition of ubuntu, Cylon 12.04 LTS in with Gnome user face, which was working fine, but in Unity doesn't seem to work. Also I installed Grome user face.changed desktop to Gnome user face.was same anyway. Any helf please!!

Changed in redshift (Ubuntu):
assignee: Clint Byrum (clint-fewbar) → mike beqiri (mxls10)
Revision history for this message
Jan Vlnas (jnv) wrote :

The problem is still present in Raring (13.04). If gtk-redshift is added as a startup application, geoclue-ubuntu-geoip crashes after login.

To build upon's Jeremy's workaround (#48), you can also specify provider and your location in ~/.config/redshift.conf – this way, gtk-redshift always uses correct settings. Configuration example follows:

[redshift]
location-provider=manual

[manual]
lat=<latitude>
lon=<longitude>

Revision history for this message
mike beqiri (mxls10) wrote : Re: [Bug 868904] Re: Redshift fails to start with session due to geoclue failure

Thanks for your information, is very helpfull.

Revision history for this message
Jaideep Kekre (jaideepkekre) wrote : Re: Redshift fails to start with session due to geoclue failure

What works for me (13.04)

1.Add this to startup applications "redshift -l 22.00:77.00 -t 4500:4000 -v "

2.Replace "22.00:77.00" with your location.(hint : find your location here "http://whatsmylatlng.com/" )

3.This sets the location manually , bypassing geoclue ( hint : "redshift -l lists")

4. The -t 4500:4000 is of the form -t DAY:NIGHT , replace with desired values

5. -v is for verbose output

Changed in ubuntu-geoip (Ubuntu):
importance: Undecided → Medium
no longer affects: redshift (Ubuntu Oneiric)
no longer affects: ubuntu-geoip (Ubuntu Oneiric)
Revision history for this message
Fred (eldmannen+launchpad) wrote :

Hmm... this problem goes away after I install 'geoclue-hostip' and 'geoclue-yahoo'.
Even though 'geoclue-ubuntu-geoip' already was installed.

Revision history for this message
valent (valent-turkovic) wrote :

I can confirm this. After installing "geoclue-hostip" RedShift works. So it is a simple missing dependency issue.
Package maintainter can fix this issue really fast...

 $ gtk-redshift
Started Geoclue provider `Geoclue Master'.
Using provider `geoclue'.
Could not get location (3 retries left): Geoclue master client has no usable Position providers.
Unable to get location from provider.

$ sudo apt-get install geoclue-hostip

$ gtk-redshift
Started Geoclue provider `Geoclue Master'.
Using provider `geoclue'.
According to the geoclue provider we're at: 45.80, 15.78
Using method `randr'.

Revision history for this message
Mark Russell (marrusl) wrote :

Thank you @Fred and @valent! This has been bugging me for ages. Though I lived with it by hardcoding my location, it was still really annoying when traveling.

I prepared a debdiff for saucy adding a dependency on geoclue-hostip. But I also took a look for geoclue-ubuntu-geoip bugs and sure enough, I found LP bug 1239082 which seems to confirm that it is broken in general.

So I'll upload this first debdiff, as adding a dependency on geoclue-hostip does solve the problem alone, and perhaps the ubuntu-geoip provider will be fixed later.

Revision history for this message
Mark Russell (marrusl) wrote :

Here's another debdiff with a patch to add the dependency _and_ change the default provider in source from

#define DEFAULT_PROVIDER "org.freedesktop.Geoclue.Providers.UbuntuGeoIP"
#define DEFAULT_PROVIDER_PATH "/org/freedesktop/Geoclue/Providers/UbuntuGeoIP"

to:

#define DEFAULT_PROVIDER "org.freedesktop.Geoclue.Providers.Hostip"
#define DEFAULT_PROVIDER_PATH "/org/freedesktop/Geoclue/Providers/Hostip"

I'm not sure this proves anything but I also noticed that UbuntuGeoIP is not on Freedesktop.org's list of providers:
http://www.freedesktop.org/wiki/Software/GeoClue/Providers/

Really, redshift should have some sort of dependency on a working provider regardless. geoclue-ubuntu-geoip was only there on Unity-based desktops because it happens to already be pulled in by indicator-datetime and unity-webapps-service. The dependency was always missing, it just happened to work as long as geoclue-ubuntu-geoip was there and still working.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "redshift.saucy.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
mike beqiri (mxls10)
Changed in ubuntu-geoip:
assignee: nobody → mike beqiri (mxls10)
status: New → Confirmed
mike beqiri (mxls10)
Changed in redshift (Ubuntu):
assignee: mike beqiri (mxls10) → nobody
Changed in ubuntu-geoip:
assignee: mike beqiri (mxls10) → nobody
Revision history for this message
Alexander Kallenbach (kallenbachalex) wrote :

Still a bug in Ubuntu 13.10.

Revision history for this message
Michael Vorburger (mike-vorburger) wrote :

> Still a bug in Ubuntu 13.10.

Confirming - I'm seeing the same, with redshift 1.7. As others have said above, confirming that I was also able to workaround the clearly missing dependency via manually doing:

sudo apt-get install geoclue-hostip

Still using 1.7 instead of 1.8 as that's the vesion you still get when you do sudo apt-get install redshift today in 13.10; if this is fixed in 1.8, maybe 1.8 could be released for 13.10 as well?

summary: - Redshift fails to start with session due to geoclue failure
+ Redshift fails to start with session - missing dependency? (geoclue-
+ hostip)
Revision history for this message
LeandroDoctors (ldoctors-gmail) wrote : Re: Redshift fails to start with session - missing dependency? (geoclue-hostip)

Still present in 14.04 (even with the new dependency installed). Please see attachments in https://bugs.launchpad.net/redshift/+bug/1283794

Revision history for this message
Igor Ribeiro Sucupira (igorrs) wrote :

I still hit this bug in Ubuntu 13.10.
With geoclue-hostip installed, redshift works IF there's a network connection when Unity starts up.

My workaround is to start gtk-redshift with this simple Bash script (added to Startup Applications):
https://gist.github.com/igorrs/9480073

Revision history for this message
LeandroDoctors (ldoctors-gmail) wrote : Re: Redshift fails to start with session if no external location provider in available

Thanks for your comment, Igor.

So how can we relay this to the upstream developers?

summary: - Redshift fails to start with session - missing dependency? (geoclue-
- hostip)
+ Redshift fails to start with session if no external location provider in
+ available
Revision history for this message
LeandroDoctors (ldoctors-gmail) wrote :

I commented upstream and let a link to this ticket: https://github.com/jonls/redshift/issues/36#issuecomment-37524429

Revision history for this message
Francis Thérien (frtherien) wrote :

Lubuntu 14.10, have all the packages installed:

geoclue
libgeoclue0
geoclue-hostip
geoclue-ubuntu-geoip
geoclue-yahoo

Still experiencing the issue, *even if I have an internet connection*

Let me know if I can invoke geoclue with more output to help diagnose.

Revision history for this message
fleamour (gtx-swift) wrote :

Ubuntu 15.04 MATE

Revision history for this message
Christopher Jazzcat (chuckyanutsup) wrote :

It seems the database at http://www.hostip.info/index.html is incomplete. I manually added my details and have not had a problem since.

Revision history for this message
Patrik B. (inoki-deactivatedaccount) wrote :

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

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

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

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

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

14.04.2 x64 3.16.0-38-generic

Revision history for this message
Ted (tedks) wrote :

@inoki -- can you attach the contents of /etc/geoclue/geoclue.conf??

I have also had this problem since upgrading, and I think it's related to Geoclue's whitelisting. The redshift package should be editing /etc/geoclue/geoclue.conf to add a stanza like these:

[redshift]
allowed=true
system=false
users=

[gtk-redshift]
allowed=true
system=false
users=

With this in /etc/geoclue/geoclue.conf, Redshift gets a location on startup and works correctly.

summary: - Redshift fails to start with session if no external location provider in
+ Redshift fails to start with session if no external location provider is
available
Revision history for this message
Stu (stu-axon) wrote :

I've just upgraded to 15.10 and experienced this, adding the stanza above fixed it.

Below is /etc/geoclue/geoclue.conf from before I edited it -

# Configuration file for Geoclue

# Agent configuration options
[agent]

# Whitelist of desktop IDs (without .desktop part) of all agents we recognise,
# separated by a ';'.
whitelist=gnome-shell

# WiFi source configuration options
[wifi]

# URL to the wifi geolocation service. The key can currenty be anything, just
# needs to be present but that is likely going to change in future.
url=https://location.services.mozilla.com/v1/geolocate?key=geoclue

# To use the Google geolocation service instead of mozilla's, simply uncomment
# this url while changing API_KEY to your Google API key and comment out or
# remove the url above.
#
#url=https://www.googleapis.com/geolocation/v1/geolocate?key=YOUR_KEY

# Submit data to Mozilla Location Service
# If set to true, geoclue will automatically submit network data to Mozilla
# each time it gets a GPS lock.
#
submit-data=false

# URL to submission API of Mozilla Location Service
submission-url=https://location.services.mozilla.com/v1/submit?key=geoclue

# A nickname to submit network data with. This is currently used for leaderboard:
# https://location.services.mozilla.com/leaders
# A nickname must be 2-32 characters long.
submission-nick=geoclue

# Application configuration options
#
# Format:
#
# # Desktop ID of application without .desktop part
# [random-app]
#
# # Allowed access to location information?
# allowed=true|false
#
# # Is application a system component?
# system=true|false
#
# # List of UIDs of all users for which this application is allowed location
# # info access, separate by ';'. Keep it empty for allowing it for all users.
# users=

[gnome-datetime-panel]
allowed=true
system=true
users=

[epiphany]
allowed=true
system=false
users=

[epiphany-browser]
allowed=true
system=false
users=

[firefox]
allowed=true
system=false
users=

[iceweasel]
allowed=true
system=false
users=

Revision history for this message
Stu (stu-axon) wrote :

Ah, it still complains about location but does seem to actually start.

Revision history for this message
Yves-Gwenael Bourhis (yves-gwenael-bourhis) wrote :

The only work around I found was to configure redshift with manual location, and to have a script launched buy my window manager (I use 'mate') which automatically configures the location in the ~/.config/redshift.conf file.

Like this:
https://gist.github.com/ygbourhis/53f1ef5c6cb4b70ba910

So with this, redshift starts even with no network and will use the last saved position (in fact works the way it should).

Revision history for this message
Henry J. Douglas (cyberdoug42-deactivatedaccount) wrote :

After resuming from screen lock or suspend, Redshift stops with "unable to find location via geoclue2" or something like that. When I run it again, it works until the next lock or suspend.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.