Bug 414281

Summary: kcolorchooser always show color from first display on multi-monitor system
Product: [Applications] kcolorchooser Reporter: Victor Prudniy <vityas_official>
Component: generalAssignee: Hugo Parente Lima <hugo.pl>
Status: CONFIRMED ---    
Severity: normal CC: bizyaev, butirsky, frederick888, justin.zobel, kde, nate
Priority: NOR Keywords: multiscreen
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: video demonstration

Description Victor Prudniy 2019-11-19 06:14:33 UTC
Created attachment 124004 [details]
video demonstration

SUMMARY
After recent plasma upgrate kcolorchooser show colors from first display on same coordinates even if cursor placed somewhere on a second display. Please see attached video for demonstration.

SOFTWARE/OS VERSIONS
Kcolorchooser version: 19.08.3
KDE Plasma Version: 5.17.3
KDE Frameworks Version: 5.64.0
Qt Version: 5.13.2
System: Arch linux, 2 lg ultra hd displays
Comment 1 Victor Prudniy 2019-11-19 06:20:06 UTC
Update: it's not colors from first display, it's just random colors presented on screen.
Comment 2 Frederick Zhang 2019-12-02 09:09:53 UTC
I can confirm this behaviour on my setup as well. KColorChooser works all fine on my leftmost display but the results seem to be random on others.

System: Arch Linux
Driver: Nvidia proprietary 440.36-2
Display layout:
┌----------------┐┌--------------------------┐┌------------------┐
| 1920x1080 DP-0 ||                          || 1920x1080 HDMI-0 |
└----------------┘|      3840x2160 DP-3      |└------------------┘
                  |                          |
                  └--------------------------┘
xrandr:
xrandr --fb 11520x2160 \
        --output DP-0   --auto           --scale 2.0 --dpi 256 --panning 3840x2160+0+0    --pos 0x0    \
        --output DP-3   --auto --primary --scale 1.0 --dpi 163 --panning 3840x2160+3840+0 --pos 3840x0 \
        --output HDMI-0 --auto           --scale 2.0 --dpi 205 --panning 3840x2160+7680+0 --pos 7680x0
Comment 3 Frederick Zhang 2019-12-03 05:23:34 UTC
I noticed that again this is somehow related to global scale and using:

QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_SCALE_FACTOR=0.5 kcolorchooser

...resolves the issue (of 'cos you get super small UI on HiDPI displays tho, and the QT_SCALE_FACTOR needs to be adjusted based on your global scale setting).

This reminds me another issue (bug 413577) I reported, where it could also be 'resolved' by disabling scaling for affected apps. I guess these problems may have the same root of cause but unfortunately I'm not familiar with the Qt stack at all.
Comment 4 Frederick Zhang 2019-12-03 13:07:31 UTC
Btw the Colour Picker widget has the same issue.

1. Added to desktop: Works normally
2. Run 'QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_SCALE_FACTOR=0.5 plasmawindowed org.kde.plasma.colorpicker': Works normally
3. Launch Colour Picker from KRunner or run 'plasmawindowed org.kde.plasma.colorpicker': Same problem as kcolorchooser reported here
Comment 5 Justin Zobel 2020-11-24 06:28:20 UTC
Thanks for the reports and investigations.

As it has been 10 months since the report on this can any of the affected please test and confirm if this issue is still occurring or if this bug report can be marked as resolved? I've set the bug status to "needsinfo" pending your response, please change back to "reported" or "resolved" when you respond, thanks.
Comment 6 Victor Prudniy 2020-11-24 09:59:45 UTC
KColorChooser Version 20.08.3
still occurring
Comment 7 Frederick Zhang 2020-11-24 10:46:57 UTC
can also confirm on Arch. btw apart from the env vars I mentioned above, QT_SCREEN_SCALE_FACTORS='' can also be used as a workaround.
Comment 8 Justin Zobel 2020-11-24 23:43:34 UTC
Thanks for the updates. I'm setting this as confirmed as it affects multiple users .
Comment 9 Ilya Bizyaev 2021-01-17 15:02:30 UTC
AFAIU the problem is that QColorDialog always selects colors from the “primary screen”:
https://code.woboq.org/qt5/qtbase/src/widgets/dialogs/qcolordialog.cpp.html#1574
Comment 10 Nate Graham 2025-09-10 06:53:49 UTC
*** Bug 469267 has been marked as a duplicate of this bug. ***
Comment 11 Nate Graham 2025-09-10 06:54:32 UTC
Could be an issue with the base QColorDialog Qt component itself, if this is still happening with the Qt 6 version. I don't have a multi-screen setup handy right now to test it, though.