Bug 354574 - Rendering issues on some windows
Summary: Rendering issues on some windows
Status: RESOLVED NOT A BUG
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.4.2
Platform: Ubuntu Linux
: NOR grave
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-29 18:23 UTC by Franco Pellegrini
Modified: 2015-11-19 18:59 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Rendering issues (409.67 KB, image/png)
2015-10-29 18:24 UTC, Franco Pellegrini
Details
Openbox also has the issue (101.75 KB, image/png)
2015-11-18 20:58 UTC, Franco Pellegrini
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Franco Pellegrini 2015-10-29 18:23:53 UTC
After upgrading to Kubuntu 15.10 I started noticing issues on some applications.

I don't know exactly how to describe it, nor which component is really the one bugged, so I chose kwin.

This *might be* related to the use of an external monitor, or to suspend/resume. Hard to tell because it starts happening after some time.

The only way to fix it is to reboot the computer.

I'm attaching a screenshot to try to illustrate what's going on. On the left side, is KDialog, that shows up when hitting Ctrl + O in Chromium (the "Open" dialog for Kate, doesn't do this...)
On the right side of the screenshot, you can see Skype (I have blurred the names which are barely readable, but the rest is just how it is being rendered, with names showing up in front of others).

After a cold restart, everything works just right. But after a while, it starts behaving like this...

Reproducible: Sometimes
Comment 1 Franco Pellegrini 2015-10-29 18:24:24 UTC
Created attachment 95213 [details]
Rendering issues
Comment 2 Thomas Lübking 2015-10-29 18:44:33 UTC
please see whether restarting the compositor (SHIFT+Alt+F12, twice) "fixes" it, whether it also occurs while the compositor is deactivated and in any case attach the output of "qdbus org.kde.KWin /KWin supportInformation" (with compositing enabled)
Comment 3 Ahmad Essam 2015-11-17 20:13:20 UTC
I confirm this problem is happened always. It's annoying and occurs in different apps like KDialog and KColorChooser, ...etc

I have tried (SHIFT+Alt+F12, twice) but it doesn't solve it!
Comment 4 Thomas Lübking 2015-11-17 20:17:11 UTC
> ... whether it also occurs while the compositor is deactivated and in any case attach the output 
> of "qdbus org.kde.KWin /KWin supportInformation" (with compositing enabled)

Looking at the screenshot, this however looks like an issue reported on the forum and is not related to the compositor or KDE at all, but caused by OpenJDK and usually lasts until the Java client is closed (or the session restarted at least) - does that match your situation?
Comment 5 Ahmad Essam 2015-11-17 20:23:28 UTC
Closing/restarting java apps seems to solve the problem.
Comment 6 Thomas Lübking 2015-11-17 20:28:02 UTC
It's apparently not a problem with oracles JDK.
I don't know what java does or how it screws font rendering (notably in Qt5 clients which afaiu use a local rasterizer), but it's not a KWin bug at all.
Comment 7 Franco Pellegrini 2015-11-18 19:18:08 UTC
Well, I was using PyCharm when having these issues... wen't back to kate for performance issues (:P) and now, I no longer see them, so it does sound like Java is somehow messing with it.
However, some points:

1) This was not happening in KDE 4
2) AFAIK this does not happen with other window managers
3) This seems to only happen in non-kde applications (Chrome, Skype, etc), and does not happen in Kate, Konsole, etc...


I agree this is not a *bug in kwin* but is there a way this could be addressed so it doesn't happen?
Comment 8 Thomas Lübking 2015-11-18 20:03:23 UTC
(In reply to Franco Pellegrini from comment #7)
> 2) AFAIK this does not happen with other window managers

You mean if you install and run "openbox --replace &", this does *not* happen?

(Otherwise it's probably related to the desktop environment, because Chrome should use the gtk file dialogs in gnome/xcfe/... and afair Qt used a different rendering mechnism with the gtk+ integration)

> 3) This seems to only happen in non-kde applications (Chrome, Skype, etc),
> and does not happen in Kate, Konsole, etc...

Could mean that this rather affects Qt4?
 
> I agree this is not a *bug in kwin* but is there a way this could be
> addressed so it doesn't happen?

OpenJDK: because it does something stupid
xft/freetype/fontconfig: because it's not robust against something stupid
Comment 9 Franco Pellegrini 2015-11-18 20:13:01 UTC
(In reply to Thomas Lübking from comment #8)
> (In reply to Franco Pellegrini from comment #7)
> > 2) AFAIK this does not happen with other window managers
> 
> You mean if you install and run "openbox --replace &", this does *not*
> happen?
> 
> (Otherwise it's probably related to the desktop environment, because Chrome
> should use the gtk file dialogs in gnome/xcfe/... and afair Qt used a
> different rendering mechnism with the gtk+ integration)

Well, I have a friend using PyCharm as well, under Ubuntu 15.10 (using Unity) and he has not seen this kind of behavior. Furthermore, I was not seeing it before upgrading to kubuntu 15.10. This seems to only happen under KDE5.

I will install openbox and when I see this again, will run that command and see what happens.

> 
> > 3) This seems to only happen in non-kde applications (Chrome, Skype, etc),
> > and does not happen in Kate, Konsole, etc...
> 
> Could mean that this rather affects Qt4?

How can I tell?

>  
> > I agree this is not a *bug in kwin* but is there a way this could be
> > addressed so it doesn't happen?
> 
> OpenJDK: because it does something stupid
> xft/freetype/fontconfig: because it's not robust against something stupid

Yeah, my question is, can this be improved to live along retarded software? :)
Comment 10 Thomas Lübking 2015-11-18 20:41:29 UTC
(In reply to Franco Pellegrini from comment #9)

> Well, I have a friend using PyCharm as well, under Ubuntu 15.10 (using
> Unity) and he has not seen this kind of behavior.

That's no srtong indication, because you friend might simply be using a different version or vendor (oracle) of JDK

> Furthermore, I was not seeing it before upgrading to kubuntu 15.10.

I assume that included an OpenJDK update? ;-)

> > Could mean that this rather affects Qt4?
> How can I tell?

ldd `which skype` (uses Qt4 on archlinux, I'm not sure there even is a Qt5 version)
 
> Yeah, my question is, can this be improved to live along retarded software?
Hard to say w/o knowing the bug. If it's like JDK says "oh, nice! a glyph cache. I'm gonne nuke that!" the answer will be rather "no" :-(

Let's first see whether this is related to either the Window Manger (openbox --replace) or the Desktop Environment (you should be able to log into a plain openbox session)

If not, the next best thing would be to file a bug against OpenJDK.

It might be interesting whether changing the Qt4 graphicssystem
   skype -graphicssystem raster
vs.
   skype -graphicssystem native
has any impact (notice that I actually do not know whether esp. skype honors the switch, you might have to fall back to some other Qt4 client to test this)
Comment 11 Franco Pellegrini 2015-11-18 20:58:19 UTC
Created attachment 95589 [details]
Openbox also has the issue

When I started to see the problem, I opened a konsole, and ran openbox --replace &
The problem is still present. On the right you can see an Open dialog for Chromium, and on the left, an open dialog for kate. The one for kate works fine, the one for Chromium not.
Comment 12 Thomas Lübking 2015-11-18 21:19:24 UTC
Smells like Qt4 related, I couldn't reproduce this with openjdk 7.u91_2.6.3 & jedit, tried plain Qt4 client on raster and native graphicssystem.
=> your openjdk version?
Comment 13 Franco Pellegrini 2015-11-18 22:14:17 UTC
openjdk-7-jre_7u85-2.6.1-5_amd64 and pycharm community edition 5.0.1

It doesn't happen *right away*. I keep it opened and use it, and after a while, It randomly starts happening. Couldn't find a concrete way of reproducing it yet.
Comment 14 Thomas Lübking 2015-11-19 18:59:36 UTC
Nope, not reproduced in hours... maybe it's fixed in newer JDKs?