Xpra-org / xpra

Persistent remote applications for X11; screen sharing for X11, MacOS and MSWindows.
https://xpra.org/
GNU General Public License v2.0
1.97k stars 169 forks source link

spinners can be very expensive with OpenGL #646

Closed totaam closed 10 years ago

totaam commented 10 years ago

Issue migrated from trac ticket # 646

component: client | priority: major | resolution: invalid

2014-08-20 06:27:04: onlyjob created the issue


Today I attached to remote session from workstation with relatively old VGA card "Radeon HD 5770" (fglrx driver). OpenGL was enabled by default. When connection lagged Xpra showed animated spinners over windows -- at this time (while spinners were visible) I couldn't do anything, not even switch between applications or access Xpra menu. As soon as I disabled OpenGL in Xpra spinners no longer bothered me. With OpenGL spinners drawn over four windows crippled GUI to nearly complete halt. I've never noticed this issue on more powerful "Radeon HD 7970" with same driver and OS version. Perhaps under some circumstances Spinners can be very expensive with OpenGL. Is there a way to throttle them, especially when there are many windows? Or maybe disable OpenGL for spinners?

totaam commented 10 years ago

2014-08-20 08:41:36: totaam commented


What you are describing is a driver bug. Repainting a window should not be able to lock your session in this way.

(this ticket is somewhat similar to #353)

r5353 slows things down a bit, but there is no way we can fix buggy drivers.. So I am closing this as notabug, feel free to re-open if this can be reproduced with other, non-buggy, driver + card combinations.

totaam commented 10 years ago

2014-08-20 08:41:46: totaam changed status from new to closed

totaam commented 10 years ago

2014-08-20 08:41:46: totaam changed resolution from * to invalid*

totaam commented 10 years ago

2014-08-20 11:10:58: onlyjob commented


Replying to [comment:1 totaam]:

(this ticket is somewhat similar to #353)

Somewhat similar except that I've never had a problem with high CPU usage. If I'm not mistaken #353 was reported even before Xpra got OpenGL support... This is about high GPU usage...

What you are describing is a driver bug. Repainting a window should not be able to lock your session in this way.

r5353 slows things down a bit, but there is no way we can fix buggy drivers.. So I am closing this as notabug, feel free to re-open if this can be reproduced with other, non-buggy, driver + card combinations.

I'm not convinced that it is a driver bug although it might be a bug. It could be inefficient driver or GPU is just not powerful enough. One spinner do not cripple affected system but multiple spinners do. Let's consider hypothetical (but not uncommon) case when 10 (or more) applications are running in session. How many simultaneous spinners you would consider reasonable to run to utilise nearly 100% GPU while normal OpenGL acceleration of all those windows hardly use 50%?

totaam commented 10 years ago

2014-08-20 11:19:11: totaam commented


Even re-painting at 10fps, painting simple shapes like this, you should be able to paint hundreds of windows without noticing the extra load. Even on an outdated GPU, say a 1990s GPU. Even those were able to paint hundreds of textures per second (and not just plain rectangles).

I've just tested by running the client with 10 windows and:

XPRA_FAKE_BROKEN_CONNECTION=1 xpra attach ...

xpra is at 1% cpu usage, Xorg at about 10% with a compositing manager. The GPU is idle, on its lowest power setting.

totaam commented 10 years ago

2014-08-20 11:49:09: onlyjob commented


Makes perfect sense, thanks. Buggy driver (or card) it is...

totaam commented 9 years ago

2015-04-27 17:37:18: antoine commented


Please see #818#comment:6, I think this is probably fixed by this backport.