Bug 486592 - Display Brightness slider is missing on plasma 6 due to "org.kde.powerdevil.backlighthelper.brightness failed" error on launch
Summary: Display Brightness slider is missing on plasma 6 due to "org.kde.powerdevil.b...
Status: RESOLVED FIXED
Alias: None
Product: Powerdevil
Classification: Plasma
Component: general (show other bugs)
Version: 6.0.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2024-05-04 22:12 UTC by luciros601084
Modified: 2024-05-14 22:50 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
screenshot (25.09 KB, image/png)
2024-05-04 22:12 UTC, luciros601084
Details
Changing SDDM background (111.38 KB, image/png)
2024-05-08 17:49 UTC, luciros601084
Details

Note You need to log in before you can comment on or make changes to this bug.
Description luciros601084 2024-05-04 22:12:17 UTC
Created attachment 169196 [details]
screenshot

***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY
I am using laptop, when I was using plasma 5, display brightness can be controlled using applet (within battery applet). After upgrading to plasma 6, brightness slider is not visible in "Brightness and Night Color applet"

STEPS TO REPRODUCE
1. Use void linux
2. Install plasma 6 (I mean compile and install)
3. open "Brightness and Night color applet"

OBSERVED RESULT
none

EXPECTED RESULT
Show brightness slider

SOFTWARE/OS VERSIONS
Operating System: Void 
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.1.0
Qt Version: 6.6.0
Kernel Version: 6.6.30_1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i5-10300H CPU @ 2.50GHz
Memory: 7.6 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics

ADDITIONAL INFORMATION
`plasmoidviewer --applet org.kde.plasma.brightness`
```
QML debugging is enabled. Only use this in a safe environment.
qml: View QML loaded
kf.plasma.quick: Applet preload policy set to 1
file:///usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/main.qml:196:25: QML FolderViewDropArea (parent or ancestor of QQuickLayoutAttached): Binding loop detected for property "minimumWidth"
Toolbox not loading, toolbox package is either invalid or disabled.
qml: New Containment: ContainmentItem_QML_45(0x5647a8903920, "desktop")
qt.dbus.integration: Could not connect "org.kde.Solid.PowerManagement.PolicyAgent" to inhibitionsChanged(QList<InhibitionInfo>, QStringList)
error connecting to inhibition changes via dbus
```
Comment 1 Nate Graham 2024-05-05 02:50:19 UTC
Is it also missing from the Energy Saving page in System Settings?

Does it come back if you run `systemctl restart --user plasma-powerdevil.service` in a terminal window?
Comment 2 luciros601084 2024-05-05 12:46:59 UTC
(In reply to Nate Graham from comment #1)
> Is it also missing from the Energy Saving page in System Settings?
Yes, it is missing 
Screenshot: https://0x0.st/XXk2.png

> Does it come back if you run `systemctl restart --user
> plasma-powerdevil.service` in a terminal window?

Void Linux uses runit instead of system.
I killed /usr/libexec/org_kde_powerdevil
then started from terminal, but still not appeared
```
% /usr/libexec/org_kde_powerdevil    
org.kde.powerdevil: org.kde.powerdevil.discretegpuhelper.hasdualgpu failed
org.kde.powerdevil: org.kde.powerdevil.chargethresholdhelper.getthreshold failed "The backend does not specify how to authorize"
org.kde.powerdevil: org.kde.powerdevil.backlighthelper.brightness failed
org.kde.powerdevil: Handle button events action could not check for screen configuration
org.kde.powerdevil: org.kde.powerdevil.chargethresholdhelper.getthreshold failed "The backend does not specify how to authorize"
```
Comment 3 Nate Graham 2024-05-06 20:41:29 UTC
> org.kde.powerdevil: org.kde.powerdevil.backlighthelper.brightness failed

Well that certainly seems related!
Comment 4 Jakob Petsovits 2024-05-06 20:55:22 UTC
(In reply to luciros601084 from comment #2)
> (...) "The backend does not specify how to authorize"

So KAuth/PolKit fails to run its helpers. I still don't quite grasp the internals, the only thing I can say is that PowerDevil is using the same setup as other KAuth-powered things in KDE. Do other KAuth actions such as setting date & time (from System Settings / Date & Time) or setting SDDM backgrounds (from System Settings / Colors & Themes / Login Screen (SDDM)) work for you?
Comment 5 luciros601084 2024-05-08 17:49:58 UTC
Created attachment 169325 [details]
Changing SDDM background
Comment 6 luciros601084 2024-05-08 17:51:57 UTC
Comment on attachment 169325 [details]
Changing SDDM background

Yes, changing background of sddm  does not work

error: The backend does not specify how to authorize
Comment 7 Nate Graham 2024-05-08 20:54:34 UTC
Ok, then it seems like KAuth is broken on your system. This might be a local configuration issue, or it might be a distro setup issue. I'd recommend bringing it up with the Void Linux folks as they'll be in the best position to figure out what's going wrong. Thanks!
Comment 8 luciros601084 2024-05-09 17:24:17 UTC
@Nate Graham Thanks for helping, issue was that kauth package had missing optional building dependencies.
Now it is resolved
Comment 9 Nate Graham 2024-05-09 19:55:28 UTC
Out of curiosity, what were the missing dependencies? It sounds like they weren't actually very optional after all! So this would be either an error in our CMake files, or else in Void Linux's packaging.
Comment 10 luciros601084 2024-05-10 04:10:55 UTC
(In reply to Nate Graham from comment #9)
> Out of curiosity, what were the missing dependencies? It sounds like they
> weren't actually very optional after all! So this would be either an error
> in our CMake files, or else in Void Linux's packaging.

kf6-kwindowsystem-devel polkit-qt6-devel were missing
without these package was building with warning

-- No backend for KAuth was explicitly specified: probing system to find the best one available
CMake Warning at src/ConfigureChecks.cmake:22 (find_package):
  By not providing "FindPolkitQt6-1.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "PolkitQt6-1", but CMake did not find one.
Comment 11 Nate Graham 2024-05-14 22:50:09 UTC
Thanks, that's helpful. I've opened https://invent.kde.org/frameworks/kauth/-/issues/4 to discuss whether there's anything we can do about this on our side.

In the meantime, please contact the packagers of your distro and ask them to always include Polkit as a dependency of KAuth. Thanks again!