Bug 365678 - Massive flicker and repaint problems with Neon 5.7 on remote X
Summary: Massive flicker and repaint problems with Neon 5.7 on remote X
Status: RESOLVED WORKSFORME
Alias: None
Product: neon
Classification: KDE Neon
Component: Packages User Edition (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: Neon Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-14 15:16 UTC by Jan-Marek Glogowski
Modified: 2022-11-25 05:22 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
KWin support information (5.00 KB, text/plain)
2016-07-20 16:31 UTC, Jan-Marek Glogowski
Details
Linux kernel log (dmesg) (191.80 KB, text/plain)
2016-07-20 16:34 UTC, Jan-Marek Glogowski
Details
Flickering / broken desktop from ksnapshot (915.30 KB, image/png)
2016-07-20 16:50 UTC, Jan-Marek Glogowski
Details
xsession-errors from my working session (115.07 KB, text/plain)
2016-07-20 17:05 UTC, Jan-Marek Glogowski
Details
Even more broken snapshot (1.07 MB, image/png)
2016-07-31 18:52 UTC, Jan-Marek Glogowski
Details
xsession errors from a flickering desktop (544.65 KB, text/plain)
2016-07-31 18:56 UTC, Jan-Marek Glogowski
Details
xsession-errors with extended error messages via QT_MESSAGE_PATTERN (3.06 KB, text/plain)
2016-08-03 07:44 UTC, Jan-Marek Glogowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan-Marek Glogowski 2016-07-14 15:16:45 UTC
When starting LibreOffice AKA LO with KDE4 backend on a remote server, there is a high chance LO starts and gets stuck with refresh problems (no refresh at all) on startup. I can always deadlock refresh of LO by opening any dialog of LO. It's a little better with the Gtk+2 backend, where the application starts, but can still be deadlocked with opening a dialog, easiest done with the complex extension manager.

To make it worse the whole screen basically breaks. On any mouse movement parts of the screen flickers and is repainted wrong. At this point you can just hope to switch to the konsole and Ctrl+C LO, which restores the screen. Luckly the window switcher (Alt + Tab) let you identify the konsole, even if the image of the window is completely broken, but it still resembles the konsole.

As I need this connection for my LO development, I just switched to WindowMaker - no more problems.

I found #363500, but this looks much less severe.

Reproducible: Always

Steps to Reproduce:
1. ssh -X
2. start LibreOffice preferably with KDE4 backend


Actual Results:  
Whole screen is a mess, any interaction flickers.



Expected Results:  
Remote X "just works".
Comment 1 Martin Flöser 2016-07-15 13:33:41 UTC
Harald made me aware of this bug. A few questions:
* does that happen with compositing enabled/disabled?
* can you provide the output of "qdbus org.kde.KWin /KWin supportInformation" when the problem happens?
* is this happening on all systems, or maybe only with a specific type of hardware (e.g. Intel driver broken on Xorg level, something in that direction).
Comment 2 Martin Flöser 2016-07-15 13:34:41 UTC
Might it be that LO needs glx and that's disabled in Xorg now?
Comment 3 Martin Flöser 2016-07-15 13:35:20 UTC
any interesting output in /var/log/Xorg.0.log when it happens?
Comment 4 Jan-Marek Glogowski 2016-07-20 16:31:11 UTC
Created attachment 100204 [details]
KWin support information
Comment 5 Jan-Marek Glogowski 2016-07-20 16:34:25 UTC
Created attachment 100205 [details]
Linux kernel log (dmesg)
Comment 6 Jan-Marek Glogowski 2016-07-20 16:50:43 UTC
Created attachment 100206 [details]
Flickering / broken desktop from ksnapshot

This time the effect was even more extreme. Last time I had to do some interaction, like moving the mouse, to get the flickering (the desktop is nevertheless always broken in a way). This time I didn't even had to move the mouse and it was constantly flickering, albeit slower compared to the mouse movement.
Comment 7 Jan-Marek Glogowski 2016-07-20 17:05:46 UTC
Created attachment 100208 [details]
xsession-errors from my working session

It's not from the broken session, but still has a lot of troublesome looking messages, like:

QXcbConnection: XCB error: 9 (BadDrawable), sequence: 64271, resource id: 0, major code: 14 (GetGeometry), minor code: 0
Comment 8 Jan-Marek Glogowski 2016-07-20 17:10:42 UTC
Sorry that I didn't reply earlier. I tried to reproduce the problem, but failed until today (well I didn't try to actively reproduce it, but continued my LibreOffice (LO) development with Plasma 2 WM).

The freezeing of LO seem to happen, when I use our LO extension, which is build with Java 7, but LO uses the Java 6 VM. This is independent of the flickering.

Now today it happened again. I was able to take a screenshot and got the dmesg, which showed a lot of errors from the radeon driver, as the Linux console worked fine:

line 1300:
[26610.825302] radeon 0000:01:00.0: r600_check_texture_resource:1566 tex pitch (792, 0x40, 1) invalid
[26610.825349] [drm:radeon_cs_ioctl [radeon]] *ERROR* Invalid command stream !
...
line 2484
[26898.242109] radeon 0000:01:00.0: r600_check_texture_resource:1566 tex pitch (792, 0x40, 1) invalid
[26898.242152] [drm:radeon_cs_ioctl [radeon]] *ERROR* Invalid command stream !

It might be a coincidence, but this probably started after I installed todays Neon + Ubuntu updates. Don't know if this happened last time too. Lot of packages changed from: 4:5.7.1-0neon+16.04+* => 4:5.7.2-0neon+16.04+*

Still for me the flickering never happened with Neon 5.6, which I used before.

I forgot to copy the old .xsesion-errors and Xorg.0.log, so these are gone now :-(

This also happened because of an other problem: I often have to login twice, otherwise primary and secondary screen are inverted. Workaround is just to logout and then login again. It's annoying, that it also moves the desktop icons between the screens, but I'll open a 2nd bug, as it doesn't seem related.

I'll update the bug with .xsession-errors and Xorg.0.log, if it happens again.
Comment 9 Martin Flöser 2016-07-20 17:18:11 UTC
oh my the looks horrible. What surprises me most is that you are able to snapshot it with ksnapshot. Quite often such problems won't show in that case.

What's interesting is the kernel log giving us radeon errors. Which makes me wonder: do you also get this with compositing disabled (Alt+Shift+f12)? And on (if you have access to) other hardware?
Comment 10 Jan-Marek Glogowski 2016-07-31 18:52:03 UTC
Created attachment 100400 [details]
Even more broken snapshot
Comment 11 Jan-Marek Glogowski 2016-07-31 18:56:38 UTC
Created attachment 100401 [details]
xsession errors from a flickering desktop
Comment 12 Jan-Marek Glogowski 2016-07-31 19:09:44 UTC
I had some more of these problems, but it's still not reproducible. My feeling is it's always at the end of the day, which might suggest leaking resources in the radeon driver. I don't really know, how to debug this.

As you can see in the xsession-errors log, it contains a lot of 

> radeon: The kernel rejected CS, see dmesg for more information.

so the kernel driver rejected the command stream from the Xorg driver, which matches the entries in the dmesg, literally thousand of lines of

[40490.073706] radeon 0000:01:00.0: r600_check_texture_resource:1566 tex pitch (1752, 0x40, 1) invalid
[40490.073763] [drm:radeon_cs_ioctl [radeon]] *ERROR* Invalid command stream !

in a few seconds / a minute. Now an application shouldn't be able to create a broken command stream. This looks more like a problem deeper in the stack. I'm not sure I remembered the right key combo, but any keys I hit didn't change  the settings (I finally created a physical note, so I can active lookup the no-compositor-combo).

I have access to other HW, but that's not my working system. Other people here running KDE5 with Intel HW (on Arch AFAIK) don't have this problem.
Comment 13 Martin Flöser 2016-08-01 07:07:40 UTC
Can you change the Qt debug message pattern to get the application included? I would like to know whether the message with the invalid command stream is from KWin.
Comment 14 Jan-Marek Glogowski 2016-08-01 13:21:42 UTC
So this time I can confirm, that "Alt + Shift + F12" stops the compositing and the flickering.
Guess I hit the wrong key combo last time, or I had a different problem, but xsession-errors and dmesg show almost the same messages:

Today:
[18199.442243] radeon 0000:01:00.0: r600_check_texture_resource:1566 tex pitch (888, 0x40, 1) invalid
[18199.442334] [drm:radeon_cs_ioctl [radeon]] *ERROR* Invalid command stream !

Previous:
[26610.825302] radeon 0000:01:00.0: r600_check_texture_resource:1566 tex pitch (792, 0x40, 1) invalid
[26610.825349] [drm:radeon_cs_ioctl [radeon]] *ERROR* Invalid command stream !

What's the preferred way to set a different QT_MESSAGE_PATTERN? Edit startkde?

Guess the example from the Qt docs is ok for you: QT_MESSAGE_PATTERN="[%{type}] %{appname} (%{file}:%{line}) - %{message}"

This proves my theory about the "late at day" is wrong, as I neither installed new software, nor intensively used the system. Actually this time it happened almost instantly after the first start of LO, when opening a dialog.
Comment 15 Martin Flöser 2016-08-01 14:20:45 UTC
> What's the preferred way to set a different QT_MESSAGE_PATTERN? Edit startkde?

startkde is an option, though maybe overkill. Another possibility is to edit any environment file, e.g. /etc/environment or the local users overwrite.

The example for the pattern looks good.
Comment 16 Jan-Marek Glogowski 2016-08-03 07:44:35 UTC
Created attachment 100430 [details]
xsession-errors with extended error messages via QT_MESSAGE_PATTERN
Comment 17 Jan-Marek Glogowski 2016-08-03 07:52:32 UTC
Not sure if this helps. Searching for CS just shows the old lines, but now the previous lines list (almost) the same amount of warnings:

[warning] plasmashell (unknown:0) - QXcbConnection: XCB error: 2 (BadValue), sequence: 50142, resource id: 119537670, major code: 142 (Unknown), minor code: 3
[warning] kwin (unknown:0) - QXcbConnection: XCB error: 9 (BadDrawable), sequence: 14337, resource id: 0, major code: 14 (GetGeometry), minor code: 0
[warning] kwin (unknown:0) - QXcbConnection: XCB error: 9 (BadDrawable), sequence: 14338, resource id: 0, major code: 14 (GetGeometry), minor code: 0
[warning] kwin (unknown:0) - QXcbConnection: XCB error: 9 (BadDrawable), sequence: 14340, resource id: 0, major code: 14 (GetGeometry), minor code: 0
[warning] kwin (unknown:0) - QXcbConnection: XCB error: 9 (BadDrawable), sequence: 14378, resource id: 0, major code: 14 (GetGeometry), minor code: 0
[warning] kwin (unknown:0) - QXcbConnection: XCB error: 3 (BadWindow), sequence: 17791, resource id: 132120671, major code: 15 (QueryTree), minor code: 0
[warning] kwin (unknown:0) - QXcbConnection: XCB error: 3 (BadWindow), sequence: 17840, resource id: 132120901, major code: 15 (QueryTree), minor code: 0
[warning] kwin (unknown:0) - QXcbConnection: XCB error: 3 (BadWindow), sequence: 17888, resource id: 132263908, major code: 15 (QueryTree), minor code: 0
[warning] kwin (unknown:0) - QXcbConnection: XCB error: 3 (BadWindow), sequence: 18528, resource id: 121634817, major code: 15 (QueryTree), minor code: 0
[warning] kwin (unknown:0) - QXcbConnection: XCB error: 3 (BadWindow), sequence: 20598, resource id: 121637445, major code: 15 (QueryTree), minor code: 0
radeon: The kernel rejected CS, see dmesg for more information.
radeon: The kernel rejected CS, see dmesg for more information.
radeon: The kernel rejected CS, see dmesg for more information.
radeon: The kernel rejected CS, see dmesg for more information.
radeon: The kernel rejected CS, see dmesg for more information.
radeon: The kernel rejected CS, see dmesg for more information.
radeon: The kernel rejected CS, see dmesg for more information.
radeon: The kernel rejected CS, see dmesg for more information.
radeon: The kernel rejected CS, see dmesg for more information.
radeon: The kernel rejected CS, see dmesg for more information.
[warning] plasmashell (file:///usr/lib/x86_64-linux-gnu/qt5/qml/QtQuick/Controls/Button.qml:100) - file:///usr/lib/x86_64-linux-gnu/qt5/qml/QtQuick/Controls/Button.qml:100: TypeError: Cannot read property of null
[warning] plasmashell (file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/ToolTipDelegate.qml:83) - file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/ToolTipDelegate.qml:83: TypeError: Cannot read property 'DesktopEntry' of undefined
[warning] plasmashell (unknown:0) - QXcbConnection: XCB error: 2 (BadValue), sequence: 53586, resource id: 115343366, major code: 142 (Unknown), minor code: 3
radeon: The kernel rejected CS, see dmesg for more information.
radeon: The kernel rejected CS, see dmesg for more information.
Comment 18 supaiku 2016-10-19 16:02:45 UTC
Any news? I'm experiencing it on my laptop as well and see the same output as Jan-Marek Glogowski.
Comment 19 Justin Zobel 2022-10-26 03:07:24 UTC
Thank you for reporting this bug in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 20 Bug Janitor Service 2022-11-10 05:12:07 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 21 Bug Janitor Service 2022-11-25 05:22:23 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!