Bug 105871

Summary: Discolored KDE panels after updating to Mesa 18.0 on Intel broadwell
Product: Mesa Reporter: kamalahmad
Component: OtherAssignee: mesa-dev
Status: RESOLVED DUPLICATE QA Contact: mesa-dev
Severity: normal    
Priority: medium CC: alexey.min, lemody, sergio.callegari, tasev.stefanoska
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: GLXINFO output

Description kamalahmad 2018-04-03 22:58:58 UTC
Created attachment 138561 [details]
GLXINFO output

After updating to mesa 18.0, panels in KDE Plasma 5 are discolored no matter which desktop theme is used. As far as I'm aware the same issue does not happen on mesa 17, but using either the git version of mesa or the one in the padoka stable PPA causes this.


Screenshots: 

Mesa 17 Breeze: https://i.imgur.com/yLd0zqX.jpg
Mesa 18 Same theme as above: https://i.imgur.com/Wnr8bOC.jpg

Mesa 17 Breeze Dark: https://i.imgur.com/hMz2wFw.jpg
Mesa 18: https://i.imgur.com/HqnWlT8.jpg

The KDE version is 5.12.4. I will be testing to see if the same issue occurs on the wayland session once I get it set up
Comment 1 Tapani Pälli 2018-04-04 03:26:27 UTC
Please include also Xorg version. This seems very much like bug #103699.
Comment 2 kamalahmad 2018-04-04 05:32:44 UTC
My apologies for not including X.org version. The x.org version is 1.19.5
name of display:    :0
version number:    11.0
vendor string:    The X.Org Foundation
vendor release number:    11905000
X.Org version: 1.19.5
Comment 3 sergio.callegari 2018-04-04 10:46:20 UTC
Seeing exactly the same on kubuntu 17.10 with the padoka ppa (bringing mesa 18.0.0) and the kde ppa on a haswell laptop.

Many gray items now are much darker.
Comment 4 sergio.callegari 2018-04-04 10:50:01 UTC
Disabling compositing, all colors go back to normal. The issue seems to be realated to translucent elements.
Comment 5 sergio.callegari 2018-04-04 11:45:01 UTC
In my case:

KDE Frameworks 5.44.0
Qt 5.9.1 (built against 5.9.1)
KDE Plasma 5.12.4
kernel 4.13.0-38-generic (ubuntu)
Xorg 1.19.5
libdrm 2.4.91 + git
mesa Version: 18.0.0
intel driver 2.99.917 + git @ 2017/03/09 (used with DRI3 and sna)

Integrated Graphics Chipset: Intel(R) Iris(TM) Pro Graphics 5200 that is haswell mobile Crystal Well Integrated Graphics Controller (rev 08).
Comment 6 Tapani Pälli 2018-04-04 13:54:51 UTC
Pretty sure this is the same bug, I'm not sure if the Xorg patch is in place since 32bit visual seems to be srgb capable (see 's'), it shouldn't be like this with the patch:

--- 8< ---
0x086 32 tc  0  32  0 r  y .   8  8  8  8 .  s  0 24  8  0  0  0  0  0 0 None
Comment 7 Tapani Pälli 2018-04-04 14:06:34 UTC
I see the patch in "server-1.19-branch" but it looks like there has not been a release which would include the fix :/ Release 1.19.7 will have it.
Comment 8 sergio.callegari 2018-04-04 14:11:25 UTC
I do not know if the following information is relevant, but in doubt I am providing it:

I was the original reporter of https://bugs.freedesktop.org/show_bug.cgi?id=103699. The issue with the firefox menus has been fixed for a while on my system and even with mesa 18, I get the firefox menus fine.

It is unclear to me if the issue is with something that should not happen with the opengl visuals or with something that happens but is then mismanaged by kwin. To assure that the kwin developers are aware of the issue, I have cross posted on their bug repo as https://bugs.kde.org/show_bug.cgi?id=392716
Comment 9 sergio.callegari 2018-04-04 14:17:54 UTC
A quick question... the patch being mentioned is related to the part of xorg that usually gets packaged as xserver-xorg-core, right? Not to the individual video drivers such as those packaged in xserver-xorg-video-intel, correct?

I am asking because ubuntu has various PPAs providing updated graphic stacks, but all of them appear to be currently shipping the updated video-xxx packages but no updated core package for xorg.
Comment 10 Tasev 2018-04-04 17:17:16 UTC
Hi,
Same bug here after upgrading today to mesa 18.0 on both Broadwell and Skylake mobile.

mesa 18.0.0 from padoka PPA stable
X.Org version: 1.19.5
KDE Neon
KDE Frameworks 5.44.0
Qt 5.10
KDE Plasma 5.12.4
kernel 4.13.0-38-generic (ubuntu) (tested also with 4.15 and 4.16)
intel driver 2.99.917 + git

For info, no problem on ivybridge and ironlake mobile with the same config.
Comment 11 Tapani Pälli 2018-04-04 18:03:30 UTC
(In reply to sergio.callegari from comment #9)
> A quick question... the patch being mentioned is related to the part of xorg
> that usually gets packaged as xserver-xorg-core, right? Not to the
> individual video drivers such as those packaged in xserver-xorg-video-intel,
> correct?
> 
> I am asking because ubuntu has various PPAs providing updated graphic
> stacks, but all of them appear to be currently shipping the updated
> video-xxx packages but no updated core package for xorg.

Yes, it would be the xore package. The change is not in individual driver but the server glx code.
Comment 12 sergio.callegari 2018-04-05 07:37:45 UTC
Tapani Pälli's suggestion that the bug was the same as in the other case was 100% correct!

Having been notified about this thread, Paulo Dias has very quickly put up on his padoka stable ppa an xserver-xorg-core package for ubuntu artful including the patch mentioned in this thread. With this the issue is gone.
Comment 13 sergio.callegari 2018-04-05 07:48:08 UTC
As an alternate/complement solution to the patched xserver-xorg-core on the Padoka ppa, for those using kde plasma, there is now also a patch to kwin to fix the visuals selection.

https://phabricator.kde.org/D11758

Unfortunately, for shortage of time, I am unable to test that too right now. However, I wonder if someone reading here may be able to do so.
Comment 14 Tapani Pälli 2018-04-05 07:57:03 UTC
(In reply to sergio.callegari from comment #13)
> As an alternate/complement solution to the patched xserver-xorg-core on the
> Padoka ppa, for those using kde plasma, there is now also a patch to kwin to
> fix the visuals selection.
> 
> https://phabricator.kde.org/D11758
> 
> Unfortunately, for shortage of time, I am unable to test that too right now.
> However, I wonder if someone reading here may be able to do so.

It seems that patch tackles separate issue related to 10bpc visuals, these are currently disabled for Intel (since caused issues) and enabled for gallium drivers.
Comment 15 kamalahmad 2018-04-06 09:39:09 UTC
The issue does appear to be fixed with the xserver update in the padoka ppa
Comment 16 Tasev 2018-04-06 10:17:57 UTC
(In reply to sergio.callegari from comment #13)
> As an alternate/complement solution to the patched xserver-xorg-core on the
> Padoka ppa, for those using kde plasma, there is now also a patch to kwin to
> fix the visuals selection.
> 
> https://phabricator.kde.org/D11758
> 
> Unfortunately, for shortage of time, I am unable to test that too right now.
> However, I wonder if someone reading here may be able to do so.

I tried that patch, without succes,he doesn't fix this bug.
Comment 17 Tapani Pälli 2018-04-06 10:33:45 UTC
Resolving as a duplicate, thanks for testing.

*** This bug has been marked as a duplicate of bug 103699 ***
Comment 18 Alexey Min 2018-04-06 12:58:43 UTC
(In reply to Tasev from comment #16)
> (In reply to sergio.callegari from comment #13)
> > As an alternate/complement solution to the patched xserver-xorg-core on the
> > Padoka ppa, for those using kde plasma, there is now also a patch to kwin to
> > fix the visuals selection.
> > 
> > https://phabricator.kde.org/D11758
> 
> I tried that patch, without succes,he doesn't fix this bug.

This is understandable, because I only fixed kwin_wayland session with that, and I only have amd hardware to test with.

If you can point me to which config attribute kwin should/should not be using to avoid this, we can at least try to fix kwin_x11 too.
Comment 19 Tasev 2018-04-06 14:41:35 UTC
(In reply to Alexey Min from comment #18)
> (In reply to Tasev from comment #16)
> > (In reply to sergio.callegari from comment #13)
> > > As an alternate/complement solution to the patched xserver-xorg-core on the
> > > Padoka ppa, for those using kde plasma, there is now also a patch to kwin to
> > > fix the visuals selection.
> > > 
> > > https://phabricator.kde.org/D11758
> > 
> > I tried that patch, without succes,he doesn't fix this bug.
> 
> This is understandable, because I only fixed kwin_wayland session with that,
> and I only have amd hardware to test with.
> 
> If you can point me to which config attribute kwin should/should not be
> using to avoid this, we can at least try to fix kwin_x11 too.

I'am just a average user, i can test a patch but i cannot help more
than that.
Comment 20 Tapani Pälli 2018-04-06 16:15:06 UTC
(In reply to Alexey Min from comment #18)
> (In reply to Tasev from comment #16)
> > (In reply to sergio.callegari from comment #13)
> > > As an alternate/complement solution to the patched xserver-xorg-core on the
> > > Padoka ppa, for those using kde plasma, there is now also a patch to kwin to
> > > fix the visuals selection.
> > > 
> > > https://phabricator.kde.org/D11758
> > 
> > I tried that patch, without succes,he doesn't fix this bug.
> 
> This is understandable, because I only fixed kwin_wayland session with that,
> and I only have amd hardware to test with.
> 
> If you can point me to which config attribute kwin should/should not be
> using to avoid this, we can at least try to fix kwin_x11 too.

Problem is that kwin_x11 cannot easily avoid this because there is only one 32bit visual exposed and without the patch mentioned in bug #103699 it always has sRGB capability which makes things go bad. It is likely that somewhere we are missing a sRGB->linear conversion in that case. With that patch for Xorg I wanted to restore previous behaviour back.
Comment 21 Alexey Min 2018-04-06 20:01:19 UTC
(In reply to Tapani Pälli from comment #20)
> Problem is that kwin_x11 cannot easily avoid this because there is only one
> 32bit visual exposed and without the patch mentioned in bug #103699 it
> always has sRGB capability which makes things go bad. It is likely that
> somewhere we are missing a sRGB->linear conversion in that case. With that
> patch for Xorg I wanted to restore previous behaviour back.

Thank you for clarification, that's what I suspected after reading various bug reports and mail list archives today. Well, hope it will be fixed then :)

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.