Skip to content

configure_night_color: restart service, poll for fix, and offer fallback when geoclue doesn't deliver#2

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-night-color-mode-0-issue
Draft

configure_night_color: restart service, poll for fix, and offer fallback when geoclue doesn't deliver#2
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-night-color-mode-0-issue

Conversation

Copy link
Copy Markdown

Copilot AI commented May 8, 2026

When the user picks option [1] (Install geoclue2), the installer previously just ran the package manager and moved on — leaving dark/light switching broken if geoclue failed to obtain a location fix in the current session.

Changes

  • Restart plasma-knighttimed.service after geoclue install (guarded by systemctl --user is-active) so Plasma's Night Color daemon immediately retries the location lookup rather than waiting for the next login.
  • Poke KWin via qdbus6 org.kde.KWin /KWin reconfigure right after install to reload Night Color config.
  • Poll scheduledTransitionDateTime for up to 10 seconds with 1-second intervals (progress dots printed). Confirms a fix was obtained before proceeding.
  • Secondary fallback prompt on timeout: warns about xdg-desktop-portal misconfiguration as the likely cause, then offers to either switch to fixed times (07:00/19:00) or leave as-is for the user to resolve after next login/portal setup.
[INFO] Waiting for geoclue to provide a location fix (up to 10 s)...
..........
[WARN] geoclue did not provide a location fix within 10 seconds.
[WARN] The geoclue portal (xdg-desktop-portal) may need configuration.

  [1] Set fixed times  (sunrise 07:00, sunset 19:00 — works without geoclue)
  [2] Leave as-is      (geoclue may work after next login or portal setup)

Choose [1/2]:

Copilot AI changed the title [WIP] Fix Night Color Mode=0 issue without geoclue2 configure_night_color: restart service, poll for fix, and offer fallback when geoclue doesn't deliver May 8, 2026
Copilot AI requested a review from TuxLux40 May 8, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Night Color Mode=0 (automatic location) broken without geoclue2

2 participants