Bug 462126 - After KWin restarts, Night Color Control becomes Night Color Is Not In Control
Summary: After KWin restarts, Night Color Control becomes Night Color Is Not In Control
Status: RESOLVED DUPLICATE of bug 428854
Alias: None
Product: kdeplasma-addons
Classification: Plasma
Component: Night Color Control (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-22 13:49 UTC by ratijas
Modified: 2022-11-30 10:45 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ratijas 2022-11-22 13:49:30 UTC
SUMMARY

Night Color mode can't be toggled after KWin crash (or restart) until Plasma shell is also restarted.

STEPS TO REPRODUCE
1. Enable Night Color effect in System Settings, and turn it on. An icon should appear in system tray.
2. Crash KWin (it's easier than you think), or if you are not up to playing villain's role just restart it via systemctl.
3. Night Color Control applet's tooltip now says "Night Control is unavailable". Clicking it does nothing.
4. Restart plasmashell process.
5. Observe that applet is active and once again works as expected.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE: git-master
Qt Version: 5.15.7
Kernel Version: 6.0.9-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-6700HQ CPU @ 2.60GHz
Memory: 15.6 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 970M/PCIe/SSE2
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: G752VT
System Version: 1.0
Comment 1 ratijas 2022-11-23 00:34:04 UTC
Can reproduce the issue with plain Rust & dbus-rs code. Trying to GetAll as soon as QDBusServiceWatcher::serviceRegistered happens results in this:

Error: D-Bus error: No such object path '/ColorCorrect' (org.freedesktop.DBus.Error.UnknownObject)

Basically, ColorCorrect is not yet initialized at the time of query. But if I add 0,5 second sleep, then it works.
Comment 2 Bug Janitor Service 2022-11-23 01:19:18 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kdeplasma-addons/-/merge_requests/280
Comment 3 Bug Janitor Service 2022-11-29 17:40:02 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/3251
Comment 4 ratijas 2022-11-29 22:40:52 UTC

*** This bug has been marked as a duplicate of bug 428854 ***
Comment 5 Bug Janitor Service 2022-11-30 10:45:58 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/3253