Bug 431994 - per display ddcutil brightness control with -DHAVE_DDCUTIL
Summary: per display ddcutil brightness control with -DHAVE_DDCUTIL
Status: RESOLVED FIXED
Alias: None
Product: Powerdevil
Classification: Plasma
Component: general (show other bugs)
Version: 5.20.5
Platform: Gentoo Packages Linux
: NOR wishlist
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 471408 486412 (view as bug list)
Depends on:
Blocks: 481927
  Show dependency treegraph
 
Reported: 2021-01-23 15:17 UTC by Nowa Ammerlaan
Modified: 2024-08-24 01:00 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.2.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nowa Ammerlaan 2021-01-23 15:17:36 UTC
SUMMARY

I'm having some problems with the brightness control of my displays. And I'm pretty sure the reason is that one of my displays supports DDC communication and one does not. After some testing and reading I discovered that the brightness control seems to control all monitors at once, and since one of the displays does not support DDC communication the brightness control fails completely.

One display is a Wacom One drawing tablet which I need for (online) teaching. This particular display does not have any buttons or anything to control the brightness, the only way to control this is using ddcutil. It would be awesome if we could have brightness control on a per display basis, which would solve my issue and let me control the brightness of this display without having to use the terminal.

STEPS TO REPRODUCE
1. install ddcutil
2. Compile powerdevil with -DHAVE_DDCUTIL
3. reboot

OBSERVED RESULT

No brightness slider in the plasma Battery and Brightness applet

EXPECTED RESULT

A brightness slider for each display that supports DDC communication. (and obviously no slider for displays that do not.)

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.10.9
(available in About System)
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2
Comment 1 Nowa Ammerlaan 2021-01-25 16:36:37 UTC
Tried this on another device (a laptop), it works but if an external monitor is connected it is no longer possible to control the brightness of the internal laptop screen. Which is slightly annoying, because now I can control the brightness of either the laptop screen or the external screen but not both.
Comment 2 hockeymikey 2022-01-27 19:51:06 UTC
(In reply to Andrew Ammerlaan from comment #1)
> Tried this on another device (a laptop), it works but if an external monitor
> is connected it is no longer possible to control the brightness of the
> internal laptop screen. Which is slightly annoying, because now I can
> control the brightness of either the laptop screen or the external screen
> but not both.

I have this exact same issue. Per monitor support would be cool, but just being able to control both of them at all would be a good start (maybe a separate issue too?) Is this issue that it sees the DDC device and thus tries to control them all via DDC instead of keeping track of on a per device basis?
Comment 3 hockeymikey 2022-01-27 20:00:32 UTC
Created https://bugs.kde.org/show_bug.cgi?id=449263 for the laptop issue. I would edit my previous comment to reflect, but seems I can't.
Comment 4 Nicolas Fella 2023-06-24 10:23:45 UTC
*** Bug 471408 has been marked as a duplicate of this bug. ***
Comment 5 Natalie Clarius 2024-05-01 21:10:43 UTC
*** Bug 486412 has been marked as a duplicate of this bug. ***
Comment 6 Bug Janitor Service 2024-05-20 17:02:46 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/powerdevil/-/merge_requests/361
Comment 7 Jakob Petsovits 2024-08-23 19:39:55 UTC
Git commit 88aa87f7e6c291de02e6a585a04ccb0ebfcfd006 by Jakob Petsovits.
Committed on 23/08/2024 at 19:36.
Pushed by jpetso into branch 'master'.

applets/brightness: Per-display brightness controls

This uses the new per-display D-Bus API from PowerDevil.

Following this change, the applet does not use the old
BrightnessControl D-Bus interface anymore, only the new
ScreenBrightnessControl interface. A new ScreenBrightnessDisplayModel
class is added to allow the use of QML Repeater objects in the UI.

For scrolling on the icon, the applet does not need to know or
specify which displays are changed, this responsibility now lies with
the daemon and its AdjustBrightnessRatio/AdjustBrightnessSteps methods.

Autotests are adapted accordingly, including changes by Fushan Wen.
Note that reported brightness for the mocked backlight display will
be lower by 1 in the new API, because minimum brightness of 1
(default for internal displays) is subtracted from the underlying
brightness value. Hence we now test for values from 0 to 254.
Related: bug 481927, bug 353032, bug 487812

M  +15   -7    applets/brightness/package/contents/ui/BrightnessItem.qml
M  +0    -1    applets/brightness/package/contents/ui/CompactRepresentation.qml
M  +65   -40   applets/brightness/package/contents/ui/PopupDialog.qml
M  +44   -18   applets/brightness/package/contents/ui/main.qml
M  +1    -0    applets/brightness/plugin/CMakeLists.txt
M  +158  -53   applets/brightness/plugin/screenbrightnesscontrol.cpp
M  +39   -13   applets/brightness/plugin/screenbrightnesscontrol.h
A  +103  -0    applets/brightness/plugin/screenbrightnessdisplaymodel.cpp     [License: GPL(v2.0+)]
A  +49   -0    applets/brightness/plugin/screenbrightnessdisplaymodel.h     [License: GPL(v2.0+)]
M  +13   -4    autotests/applets/brightnesstest.py

https://invent.kde.org/plasma/powerdevil/-/commit/88aa87f7e6c291de02e6a585a04ccb0ebfcfd006
Comment 8 Jakob Petsovits 2024-08-23 19:40:02 UTC
Git commit 0bfc76473105819c66ce0240a9cf9406739c0202 by Jakob Petsovits.
Committed on 23/08/2024 at 19:36.
Pushed by jpetso into branch 'master'.

daemon: Introduce per-display ScreenBrightnessControl D-Bus API

In addition to a new ScreenBrightnessControl action to expose the
eponymous D-Bus API, this commit also adds the necessary plumbing
to relay display label, the is-internal boolean, as well as client
source name/context through ScreenBrightnessController.
Related: bug 353032

M  +14   -6    daemon/actions/bundled/CMakeLists.txt
M  +19   -4    daemon/actions/bundled/brightnesscontrol.cpp
M  +4    -1    daemon/actions/bundled/brightnesscontrol.h
A  +205  -0    daemon/actions/bundled/org.kde.Solid.PowerManagement.Actions.ScreenBrightnessControl.xml
A  +106  -0    daemon/actions/bundled/powerdevilscreenbrightnesscontrolaction.json
A  +199  -0    daemon/actions/bundled/screenbrightnesscontrol.cpp     [License: GPL(v2.0+)]
A  +92   -0    daemon/actions/bundled/screenbrightnesscontrol.h     [License: GPL(v2.0+)]
M  +44   -11   daemon/controllers/screenbrightnesscontroller.cpp
M  +37   -10   daemon/controllers/screenbrightnesscontroller.h

https://invent.kde.org/plasma/powerdevil/-/commit/0bfc76473105819c66ce0240a9cf9406739c0202