Created attachment 128947 [details] Screenshot demonstrating the issue I turned on depth 30 with amdgpu on Xorg. Everything works correctly, except Spectacle screen captures have incorrect colors, as shown in the attachment. SOFTWARE/OS VERSIONS Linux kernel: 5.6.15-arch1-1 KDE Plasma Version: 5.18.5 KDE Frameworks Version: 5.70.0-1 Qt Version: 5.15.0-1
You can configure this mode as follows: Section "Device" Identifier "AMD" Driver "amdgpu" Option "VariableRefresh" "true" EndSection Section "Screen" Identifier "default" DefaultDepth 30 EndSection
It seems that the Red and Blue color channels in the screenshot are swapped. You can do the following in GIMP to see the correct colors: 1. Go to Colors -> Components -> Channel Mixer 2. Set Red in Red channel to 0 3. Set Blue in Red channel to 1 4. Set Red in Blue channel to 1 5. Set Blue in Blue channel to 0
Can you turn on 10-bit without using amdgpu (i.e if you only have a 10-bit screen but an Intel GPU)? If so I can test and investigate.
(In reply to Nate Graham from comment #3) > Can you turn on 10-bit without using amdgpu (i.e if you only have a 10-bit > screen but an Intel GPU)? If so I can test and investigate. Add this to /etc/X11/xorg.conf/d/20-defaultdepth.conf: Section "Screen" Identifier "default" DefaultDepth 30 EndSection On Fedora 32, this led to a black screen until I disabled compositing in kwin with Alt + Shift + F12 (might not be the default). After this, window decorations were all purple. I might need an updated versions of mesa or libdri, ymmv.
The GNOME3 X11 session works just fine in 30bpp, so it might be a bug in kwin. Anyway, I tested Spectacle under GNOME3 in 30bpp, and it still captures wrong colors. I tried gnome-screenshot, and it works fine.
Proposed fix here: https://invent.kde.org/graphics/spectacle/-/merge_requests/10/diffs
Can confirm this is still an issue. I agree with Bernie that it should either be wrong on both or right on both, we shouldn't have different behavior for 24 bpc and 30 bpc.
Git commit e6d64481699c5bfac8d552455c0ffc2a8ac68f4f by Nate Graham, on behalf of Bernie Innocenti. Committed on 15/10/2021 at 20:40. Pushed by ngraham into branch 'master'. Fix capturing from depth 30 screens (10bpc) The color order was incorrect, or rather, not matching the screen created by the amdgpu DDX driver. There's probably a better and more portable way to create a compatible QImage for an XCB image, but I don't know what it is. At least now the color order for 30bpp matches 24bpp, so on a given platform it should be either always correct or always wrong. M +1 -1 src/Platforms/PlatformXcb.cpp https://invent.kde.org/graphics/spectacle/commit/e6d64481699c5bfac8d552455c0ffc2a8ac68f4f