| Summary: | PowerManagementInterface printing incessantly about non-existent service | ||
|---|---|---|---|
| Product: | [Applications] Elisa | Reporter: | Gabriel Marcano <gabemarcano> |
| Component: | general | Assignee: | Matthieu Gallien <matthieu_gallien> |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | CC: | gabemarcano, nate |
| Priority: | NOR | ||
| Version First Reported In: | 20.04.1 | ||
| Target Milestone: | --- | ||
| Platform: | Gentoo Packages | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/multimedia/elisa/commit/c2b3d0d312ac20c0aa1a4e7a34a765484c420cc3 | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
Patches welcome. :) https://invent.kde.org/multimedia/elisa/-/merge_requests https://community.kde.org/Infrastructure/GitLab Feel free, we don't bite! I know, I'd love to offer a patch, but due to IP waiver forms I signed with my employer I can't release code without their consent, even if I develop it on my own time :( This is what happens in the US when there are poor worker protections in place, even for a well paid software engineer. On the plus side, I'll be going back to grad school come August, so I won't be under said contract limitations then. If no one has provided a patch by then, I'll try making one. A possibly relevant merge request was started @ https://invent.kde.org/multimedia/elisa/-/merge_requests/209 Git commit c2b3d0d312ac20c0aa1a4e7a34a765484c420cc3 by Matthieu Gallien. Committed on 14/01/2021 at 21:59. Pushed by mgallien into branch 'release/20.12'. avoid printing useless logs on console when power management is working M +7 -0 src/CMakeLists.txt M +6 -4 src/powermanagementinterface.cpp https://invent.kde.org/multimedia/elisa/commit/c2b3d0d312ac20c0aa1a4e7a34a765484c420cc3 |
SUMMARY Poking around at the code, in src/powermanagementinterface.cpp, in the function PowerManagementInterface::setPreventSleep, I see checks for management the inhibition state for both Plasma and Gnome are always called. On my system, that only has Plasma, this leads to spam on the console whenever music is played, specifically: PowerManagementInterface::inhibitDBusCallFinishedGnomeWorkspace QDBusError("org.freedesktop.DBus.Error.ServiceUnknown", "The name org.gnome.SessionManager was not provided by any .service files") STEPS TO REPRODUCE 1. Have a Linux distro with either Plasma or Gnome installed (not both?) 2. Run Elisa 3. Play a file/music archive OBSERVED RESULT PowerManagementInterface::inhibitDBusCallFinishedGnomeWorkspace QDBusError("org.freedesktop.DBus.Error.ServiceUnknown", "The name org.gnome.SessionManager was not provided by any .service files") is printed in the console. EXPECTED RESULT No error messages displayed due to non-existent D-Bus service on a computer without said service installed. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Gentoo, Plasma (available in About System) KDE Plasma Version: 5.18.5 KDE Frameworks Version: 5.70.0 Qt Version: 5.14.2 ADDITIONAL INFORMATION There are a couple ways to fix this-- one is to remove the qDebug statement, or somehow hide it (I'm unfamiliar with verbosity levels in Qt/KDE). Another is to detect the existence of services in PowerManagementInterface initialization, and only call inhibitor functions of the services found.