Bug 1585970

Summary: Redshift cannot get location
Product: [Fedora] Fedora Reporter: Nerijus Baliūnas <nerijus>
Component: redshiftAssignee: Miloš Komarčević <kmilos>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 30CC: akostadi, arcadiy, awerner, chorn, d.bz-redhat, edouard, fedora, greenrd, jalalsfs, kmilos, marco.guazzone, mh+fedora, mhroncok, michal.halenka, oliver, pstassen, skipastas, sudhir, tlestach, ToddAndMargo, twegener, zebob.m
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-26 14:32:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
geoclue2 error none

Description Nerijus Baliūnas 2018-06-05 08:32:39 UTC
Trying to run redshift-gtk I get an error box:

Failed to run Redshift
Trying location provider @geoclue2'...
Unable to start GeoClue client:
GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: 'redshift' disallowed, no
agent for UID 1000.
Unable to connect to GeoClue.
Unable to get location from provider.

sudo redshift-gtk does not work neither:
GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: 'redshift' disallowed, no
agent for UID 0.

Comment 1 Nerijus Baliūnas 2018-06-05 08:43:43 UTC
If I create ~/.config/redshift/redshift.conf with a manual latitude and longitude, I get:

GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying.

Comment 2 Gereon Recht 2018-06-11 16:05:09 UTC
Downgrading geoclue2 solves the problem (at least temporarily).

Comment 3 Edouard Duliège 2018-06-11 22:22:20 UTC
I can report the exact same problem with geoclue2-2.4.10-2.fc28.x86_64
downgrading to geoclue2-2.4.8-1.fc28.x86_64 is a valid workaround.

Comment 4 Jalal Ahmed 2018-06-16 05:53:10 UTC
Yeah, downgrade geoclue2 is a temporary workaround.
But I hope the new version of Redshift 1.12 will solve the issue.

Comment 5 Sudhir Khanger 2018-06-18 11:29:32 UTC
I am also encountering the same error.

$ redshift
Trying location provider `geoclue2'...
Using provider `geoclue2'.
Unable to start GeoClue client: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: 'redshift' disallowed, no agent for UID 1000.
Unable to connect to GeoClue.
Unable to get location from provider.

geoclue2.x86_64 2.4.10-2.fc28
redshift.x86_64 1.11-8.fc28
plasma-applet-redshift-control.noarch 1.0.18-4.fc28

>Why does GeoClue fail with access denied error?

>It is possible that the location services have been disabled completely. The check for this case varies by desktop environment. For example, in GNOME the location services can be toggled in Settings > Privacy > Location Services.

>If this is not the case, it is possible that Redshift has been improperly installed or not been given the required permissions to obtain location updates from a system administrator. See https://github.com/jonls/redshift/issues/318 for further discussion on this issue.

https://github.com/jonls/redshift#faq

Comment 6 Todd 2018-06-23 00:34:05 UTC
I get the same error:

redshift-gtk-1.11-8.fc28.x86_64
redshift-1.11-8.fc28.x86_64
geoclue2-libs-2.4.10-2.fc28.x86_64
geoclue2-2.4.10-2.fc28.x86_64

Comment 7 Miro Hrončok 2018-06-23 09:07:26 UTC
What seems to by the info you need from me?

Comment 8 Jalal Ahmed 2018-06-23 19:28:09 UTC
Miro, have you tried Redshift 1.12 with geoclue2 2.4.10?

Comment 9 Miro Hrončok 2018-06-23 19:53:57 UTC
But why me? Am I missing something?

Comment 10 Jalal Ahmed 2018-06-24 05:05:29 UTC
(In reply to Miro Hrončok from comment #9)
> But why me? Am I missing something?

No, just because you are the one who packages and maintains it.

Comment 11 Miro Hrončok 2018-06-24 09:09:30 UTC
I don't package geoclue2 nor redshift. Sorry.

Comment 12 Jalal Ahmed 2018-06-24 12:59:43 UTC
I am sorry Miro, I saw your name on the changelog https://koji.fedoraproject.org/koji/buildinfo?buildID=1095229, that what let me tagged you!.

Thank you.

Comment 13 Miro Hrončok 2018-06-24 14:33:34 UTC
I'm rebuilding 2500 packages that buildrequire python3-devel. I have very little knowledge about most of them.

Requesting needinfo from the maintainer instead.

Comment 14 Robert-André Mauchin 🐧 2018-06-26 13:48:07 UTC
It might be related to this bug:

https://gitlab.freedesktop.org/geoclue/geoclue/issues/68

By starting the agent after geoclue, I was able to start Redshift.

Comment 15 Miro Hrončok 2018-07-04 22:51:51 UTC
Ok finally now I'm also affected by this :(

Comment 16 Miro Hrončok 2018-07-04 23:11:14 UTC
Update to 1.12 does not solve this. Here it si anyway:

https://src.fedoraproject.org/rpms/redshift/c/1fddd3393891def1ba740f6107d401227f76f715?branch=master

Comment 17 Miro Hrončok 2018-07-10 10:37:32 UTC
To pin the geoclue2 version:

dnf install 'dnf-command(versionlock)'
dnf versionlock add geoclue2

Comment 18 Aleksandar Kostadinov 2018-07-16 10:13:09 UTC
Hi all, can somebody create a build for fedora 28 with [1]? Perhaps it will resolve the issue.

Running on XFCE spin and redshift can't start as described above. Removing needinfo flag as it seems Miro provided the requested information.


[1] https://gitlab.freedesktop.org/geoclue/geoclue/merge_requests/6

Comment 19 Robert-André Mauchin 🐧 2018-07-17 16:37:12 UTC
(In reply to Aleksandar Kostadinov from comment #18)
> Hi all, can somebody create a build for fedora 28 with [1]? Perhaps it will
> resolve the issue.
> 
> Running on XFCE spin and redshift can't start as described above. Removing
> needinfo flag as it seems Miro provided the requested information.
> 
> 
> [1] https://gitlab.freedesktop.org/geoclue/geoclue/merge_requests/6

I did open a PR with that patch two weeks ago:
https://src.fedoraproject.org/rpms/geoclue2/pull-request/2

Still waiting on the maintainer answer.

Comment 20 Nerijus Baliūnas 2018-07-25 17:22:27 UTC
Geoclue 2.4.11 changes:
- Don't crash on invalid accuracy level request.
- The demo agent now watches for geoclue on D-Bus if it's not running already,
  instead of giving up. This solves a race-condition, which makes geoclue
  completely unusable.
- Provide Vala bindings for libgeoclue.
- Add gclue_client_get/set_time_threshold() to docs.

It seems it fixes our problem.

Comment 21 Nerijus Baliūnas 2018-07-26 13:34:47 UTC
I've built geoclue2-2.4.11 rpm, but it did not help.

Comment 22 Nerijus Baliūnas 2018-07-27 12:08:00 UTC
geoclue2.x86_64 2.4.11-1.fc28 was just released in updates-testing and it seems it fixes redshift, can anyone confirm?

Comment 23 Todd 2018-07-27 16:31:01 UTC
Created attachment 1471139 [details]
geoclue2 error

# rpm -qa geoclue2
geoclue2-2.4.11-1.fc28.x86_64

Did not solve the issue.  I have upload a screenshot of the error message

Comment 24 Aleksandar Kostadinov 2018-07-30 07:55:51 UTC
Todd, did you restart or did you restart the agent after updating the RPM?

Comment 25 Jalal Ahmed 2018-07-30 08:19:02 UTC
I have installed geoclue2-2.4.11-1 and after rebooting the system, and once I logged in the window of the issue appears, but only I have to run redshift-gtk and everything is okay,
So it's working.
Thank you.

Comment 26 Aleksandar Kostadinov 2018-07-30 10:28:52 UTC
I hate to reboot so can't try. Maybe geoclue agent is started after redshift, that's why Jalal initially sees an error. Anybody that has similar experience, better report what Desktop environment you are running.

Comment 27 Todd 2018-07-30 11:48:45 UTC
(In reply to Aleksandar Kostadinov from comment #24)
> Todd, did you restart or did you restart the agent after updating the RPM?

Not when I installed the RPM, but I have reboot my machine about three times or more since with no symptom change

Comment 28 Stanislav 2018-07-30 14:00:48 UTC
I updated geoclue2 from testing-repo and reboot my computer after it but it didn't solve the problem. It still cannot gather geoinformation.

Comment 29 Dridi Boukelmoune 2018-09-09 11:30:25 UTC
I have the same problem with geoclue2-2.4.11-1.fc28.x86_64 and downgrading to geoclue2-2.4.8-1.fc28.x86_64 fixes the problem. I'm using Xfce and just installed redshift-gtk-1.11-8.fc28.x86_64 on my laptop.

Comment 30 Arcadiy Ivanov 2018-10-21 03:03:04 UTC
This is caused by bug #1641313.

Comment 31 Christian Horn 2018-11-03 08:23:21 UTC
Issue also occurs on Fedora 29, so the workaround involves now to downgrade to fc28 packages.

Comment 32 Ben Cotton 2019-05-02 20:21:24 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 33 Arcadiy Ivanov 2019-05-02 21:16:13 UTC
Same issue Fedora 30.

Comment 34 Ben Cotton 2020-04-30 22:09:00 UTC
This message is a reminder that Fedora 30 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 30 on 2020-05-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '30'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 30 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 35 Dridi Boukelmoune 2020-05-05 21:35:52 UTC
Works for me on f31 and f32.

Comment 36 Ben Cotton 2020-05-26 14:32:45 UTC
Fedora 30 changed to end-of-life (EOL) status on 2020-05-26. Fedora 30 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.