Bug 436349 - Monitor dropdown can not be enabled
Summary: Monitor dropdown can not be enabled
Status: CONFIRMED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_kgamma (show other bugs)
Version: 5.21.4
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2021-04-29 10:41 UTC by Lorenz Hoffmann
Modified: 2024-03-09 23:25 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
The settings page that I'm talking about (60.22 KB, image/png)
2021-04-30 16:20 UTC, Lorenz Hoffmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lorenz Hoffmann 2021-04-29 10:41:53 UTC
SUMMARY
In the bottom right corner, there is a dropdown for selecting an individual monitor if you use more than one. It should be enabled when the checkbox next to it is enabled. Unfortunately, it doesn't, which makes it impossible to adjust the gamma for an individual monitor.

STEPS TO REPRODUCE
1. Go to Settings -> Monitor -> Gamma
2. Enable the checkbox to adjust screens
3. Try to select a screen

OBSERVED RESULT
Dropdown menu / combobox is disabled and no individual screen can be selected.

EXPECTED RESULT
Dropdow should be enabled to let the user select a screen

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.21.4
(available in About System)
KDE Plasma Version: 5.21.4
KDE Frameworks Version: 5.81.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
-
Comment 1 Nate Graham 2021-04-30 16:10:00 UTC
Can you share a screenshot that shows the problem? I'm having a hard time understanding what exactly is going on. Thanks!
Comment 2 Lorenz Hoffmann 2021-04-30 16:20:42 UTC
Created attachment 138030 [details]
The settings page that I'm talking about
Comment 3 Lorenz Hoffmann 2021-04-30 16:25:13 UTC
I've added a screenshot to the attachments, I hope that's the right place.
This dropdown menu in the bottom right corner should be enabled if more than one screen are connected, used and "sync screens" is turned off.
Comment 4 Nate Graham 2021-04-30 16:46:33 UTC
Ah that thing! I can the bug by simple code inspection. Will fix it at some point soon.
Comment 5 Roman Azami 2022-01-08 21:37:22 UTC
I tried fixing this as it is tagged as a junior job but couldn't, here are my findings though. 

It seems like the problem lies in a function XVidExtWrap::_ScreenCount(). It gets called from KGamma constructor and then the returned count value is used to configure screens combobox in a function KGamma::setupUI(). When configuring combobox, if screen count <=1 checkbox. From my observation XVidExtWrap::_ScreenCount() always returns 1 no matter if I plug\unplug my second monitor thus creating bug in question.

Looking at XVidExtWrap::_ScreenCount() implementation it uses class XF86ConfigPath to get count of screens. In XF86ConfigPath constructor there is defined a list of magic string paths that it tries to access all sorts of configs and fails at all of them (I also checked each path manually on my system and didn't find any of them). As it can't find any configs screen count is 0, but in the end of function it gets set to 1 after !count check. 

Sibling setting category "Display Configuration" somehow has "Device" combobox that correctly identifies current available screens. After looking into it's implementation for awhile I kinda gave up as this issue is too hard for me now.
Comment 6 Roman Azami 2022-01-08 21:40:27 UTC
(In reply to Roman Azami from comment #5)
> I tried fixing this as it is tagged as a junior job but couldn't, here are
> my findings though. 
> 
> It seems like the problem lies in a function XVidExtWrap::_ScreenCount(). It
> gets called from KGamma constructor and then the returned count value is
> used to configure screens combobox in a function KGamma::setupUI(). When
> configuring combobox, if screen count <=1 checkbox. From my observation
> XVidExtWrap::_ScreenCount() always returns 1 no matter if I plug\unplug my
> second monitor thus creating bug in question.
> 
> Looking at XVidExtWrap::_ScreenCount() implementation it uses class
> XF86ConfigPath to get count of screens. In XF86ConfigPath constructor there
> is defined a list of magic string paths that it tries to access all sorts of
> configs and fails at all of them (I also checked each path manually on my
> system and didn't find any of them). As it can't find any configs screen
> count is 0, but in the end of function it gets set to 1 after !count check. 
> 
> Sibling setting category "Display Configuration" somehow has "Device"
> combobox that correctly identifies current available screens. After looking
> into it's implementation for awhile I kinda gave up as this issue is too
> hard for me now.

Cant edit previous comment, little change:  "if screen count <=1 checkbox" to "if screen count <=1 then combobox is disabled
Comment 7 Lorenz Hoffmann 2024-03-09 19:15:21 UTC
I am unable to find that settings page in Plasma 6. If it's removed, this can be closed, I guess.
Comment 8 Nate Graham 2024-03-09 23:25:31 UTC
This KCM is X11-only, and you're probably using the Wayland session now in Plasma 6.