Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redshift fails to access location services #22

Closed
etkeys opened this issue Jun 1, 2021 · 5 comments
Closed

Redshift fails to access location services #22

etkeys opened this issue Jun 1, 2021 · 5 comments
Labels
bug Something isn't working harper

Comments

@etkeys
Copy link
Owner

etkeys commented Jun 1, 2021

When logging into any desktop session, redshift produces the failed to retrieve location information. The current redshift config uses manual mode, but the error is still present. Why didn't this happen when aludra was upgraded to 20.04?

Also, when logging in to i3 session, there are 3 instances of redshift running. One is from i3 config and there are two others that get restarted even after kill -9.

Right now, redshift has been uninstalled because the errors never go away and while the error message is present, the CPU is maxed out.

@etkeys etkeys added this to the Harper: post-upgrade round 1 milestone Jun 1, 2021
@etkeys etkeys added bug Something isn't working harper labels Jun 1, 2021
@etkeys
Copy link
Owner Author

etkeys commented Jun 2, 2021

Made some progress that seems stable

  • Removed `exec --no-startup-id "sleep 3; redshift-gtk" from i3 config
  • Removed ~/.config/autostart/redshift.desktop

Overcoming "failed to connect to geoclue-2.0"

  1. Added redshift entry to /etc/geoclue/geoclue.conf. Did not work.
  2. Added exec --no-startup-id /usr/libexec/geoclue-2.0/demos/agent to i3 config (thanks to this comment)
  3. Started redshift and redshift-gtk manually and no errors for geoclue-2.0, but now config file was not being read correctly.

Overcoming "permission denied" when reading config file

  1. Tried these locations for config, all resulted with fopen: Permission denied
  • ~/.config/redshift/redshift.conf (v1.12 preferred location)
  • ~/.config/redshift.conf (v1.11 preferred location)
  • ~/redshift.conf (tried with -c option)
  • /etc/redshift.conf (v1.11 and v1.12 system default, if present)
  1. Found this thread which suggests that the changes in v1.12 do not play nicely when app is packaged by distros.
  • Suggested work around was to use the preferred location in v1.11, ~/.config/redshift.conf. I tried this but still didn't work.
  1. Still based on the same thread, decided to compile from source
  2. uninstall redshift
  3. Added the following packages
    - autopoint
    - intltool
    - libdrm-dev
    - libxcb1-dev (already installed)
    - libxcb-randr0-dev
    - libx11-dev (already installed)
    - libxxf86-dev
    - libglib2.0-dev
    - libtool
    - geoclue-2.0
  4. Built redshift from source, checked out to v1.12
  • Download and apply Ayatana AppIndicator3 patch
    curl -o 757.patch https://github.com/jonls/redshift/pull/757.patch
    git am 757.patch
  • Do the build
    ./bootstrap
    ./configure
    make
    sudo make install
  • During the build, bootstrap compailed about configure.ac:15: error possibly undefined macro AC_PROG_LIBTOOL ....
    • Thinking that some of the libraries needed for autoconf were not where they were supposed to be, created symlink ln -s /usr/share/aclocal /usr/local/share/aclocal. Did not work
    • Then tried installing libtool. That worked.
  1. Restarted and redshift worked as expected. Except the indicator is not the same one that Ubuntu Mate uses.
  • It seams that compiling redshift from source added ~/.config/autostart/redshift.desktop back. So there is no need to keep it in the i3 config?

Todo

  • Update packages.csv
  • Remove redshift from /etc/geoclue/geoclue.conf to see if it is needed.
  • Create systemd service to start geoclue-demo-agent after geoclue-2.0.service
  • Add redshift as submodule. Add build steps.
  • Investigate how to restore app indicator icon to be the one that gets used when install from Ubuntu repo.
  • Determine if Ayatana AppIndicator3 patch needs is applicable to aludra.
  • Determine how to restore geoclue usage to jet. Converted to manual mode late last year due to geoclue connection error. Maybe starting the demo agent as a service will fix the problem?

@etkeys
Copy link
Owner Author

etkeys commented Jun 2, 2021

  • Redshift does not need an entry in /etc/geoclue/geoclue.conf
  • redshift-gtk is only started on first login. If I log out and log back in, redshift-gtk does not start.

Todo

  • Get redshift to always start on every login.

@etkeys
Copy link
Owner Author

etkeys commented Jun 3, 2021

  • To enable app indicators like the ones that are installed from the Ubuntu repo, need to call ./configure with --enable-ubuntu.

@etkeys
Copy link
Owner Author

etkeys commented Jun 3, 2021

  • Copied redshift-gtk.service from redshift/data/systemd after build to ~/.config/system/user/. Updated restart elements under Service so app would restart correctly after first login.
  • Removed starting redshift-gtk from i3 config.

@etkeys
Copy link
Owner Author

etkeys commented Jun 3, 2021

Everything appears fixed. Will push changes once other issues have been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working harper
Projects
None yet
Development

No branches or pull requests

1 participant