Bug 278894 - Flash 11 Beta has choppy, slow full screen in KWin but not Metacity or Compiz.
Summary: Flash 11 Beta has choppy, slow full screen in KWin but not Metacity or Compiz.
Status: RESOLVED DOWNSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-30 23:27 UTC by Zak
Modified: 2014-08-24 20:29 UTC (History)
2 users (show)

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


Attachments
Graphics card information (139.29 KB, image/png)
2011-07-31 21:40 UTC, Zak
Details
kwinrc from old kde config (2.77 KB, text/plain)
2014-08-09 09:46 UTC, Sylvain Paré
Details
kwinrc from new kde config (246 bytes, text/plain)
2014-08-09 09:47 UTC, Sylvain Paré
Details
output of "qdbus org.kde.kwin /KWin supportInformation" (2.74 KB, text/plain)
2014-08-24 11:33 UTC, Sylvain Paré
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zak 2011-07-30 23:27:37 UTC
Version:           unspecified (using KDE 4.7.0) 
OS:                Linux

Flash player 11 Beta, available here: http://labs.adobe.com/technologies/flashplatformruntimes/flashplayer11/ , has very slow, choppy full screen in KWin. Metacity and Compiz, however, do not cause the same slowness. Additionally, it is very difficult to exit full screen in KWin. The ESC key has to be hit many times. I am not sure if this is a KWin or Kubuntu problem, but I'm thinking KWin for now. I haven't got another distro to test on. 

Reproducible: Always

Steps to Reproduce:
1. Find a flash video
2. Full screen it.
3. Observe slowness and choppy playback. 

Actual Results:  
Video is choppy and slow. Additionally, it is very had to get out of full screen.

Expected Results:  
Video should play smoothly and it should only require one press of ESC to exit full screen.

I'm running 64bit, if that adds any useful info.
Comment 1 Martin Flöser 2011-07-31 06:38:51 UTC
we do not care about the performance of proprieatary beta software. There is nothing we can do about it.
Comment 2 Thomas Lübking 2011-07-31 13:40:41 UTC
Let's assume we'd care about flash:
a) i cannot reproduce this
b) -> you should _at least_ check cpu load distribution under all WMs, mention your GPU & driver, the impact of compositing, whether you unredirect fullscreen windows under KWin and if you're playing the same video in the same browser and which or if it's not a video at all but some animation (and which)

Next would be to check whether this issue is limited to flash or exposes to sane video players (mplayer, vlc) as well and if it's limited to flash, reoport a bug there or just uninstall flash to get rid of 99% of the internet frustration.

I temp. installed that plugin (for curiosity) and there's no difference here (32bit) at all and playing a 320x240 yt flashvideo in FF sucks more CPU in the flashplugin process than in X11 & KWin combined by a facator of >20 ... second in the list is btw. FF. Pressing esc, works as expected (so i guess the event is lost due to the high system load on your side) *shrug*
Comment 3 Zak 2011-07-31 19:25:33 UTC
I'm sorry if I rubbed somebody the wrong way. I'm honestly just trying to figure out why only KWin seems to be having issues. I have tried with both compositing on and off, it makes no difference. Other video players act fine. I'll go report at Flash as well (because we all know Adobe listens...) but they usually send me back here, and you send me there, and the Kubuntu folks send me nowhere. 

My system load is low until I full screen the video. Again, it puzzles me why only KWin seems to mind me doing this. It could be some strange interaction with my video card (ATI, I should have realized, isn't the nicest to Linux), my CPU and the other over 9000 things that go on. 

Again, I *do* apologize if this caused anybody to feel inconvenienced or interrupted anything important.

Thank you for all your help.
Comment 4 Thomas Lübking 2011-07-31 20:51:47 UTC
It's not about rubbing - flash rubbs people. Users don't.
And you don't "disturb" by bug reports either.
The problem here was (and actually still is) completely insufficient provided information.

We now know it's only flash fullscreen video playback and it's NOT about compositing.

Remains important questions:
a) _where_ is the cpu load? (and is there at all) check "ksysguard" or just "top" - "the system becomes slow" is just a useless statement, sorry.
b) is it really related to the window manager (kwin) or the desktop environment, ie. is running "metacity --replace &" under a KDE session really sufficient to resolve this?
c) prepare to install sth. called "sysprof" once we should know there is extraordinary high CPU load and where.
Comment 5 Zak 2011-07-31 21:40:40 UTC
Created attachment 62401 [details]
Graphics card information
Comment 6 Zak 2011-07-31 21:42:26 UTC
Well I made a new account with nothing imported from the old one, and it seems to be working there.... (Although the first time I made a new account it didn't....) Could there be, then, a conflicting config file, such as kwinrc, or some Flash config file, or even something else that is causing a problem? In fact, I'd be willing to simply move all my essential documents and drop everything else from the old account, but that's a lot files I'd rather not....

Ksysguard points to something called along the lines of "plugin container" that causes such high CPU loads (it depends on the browser because Konqueror calls its plugin container one thing, and Firefox calls it something else and so on...) 

Yes, running "metacity --replace" solves it. So does using the System Settings "Default Window Manager" selection.  Also, here's a screen shot of my video card information, if it helps:

(I dunno if it will.... I'm a Civil Engineering major, not a CS major. :P Also, if I did take a stab at, from what I see, maybe it *is* a config file?) 

Thanks again.
Comment 7 Thomas Lübking 2011-07-31 22:12:35 UTC
(In reply to comment #6)
> Well I made a new account with nothing imported from the old one, and it seems
> to be working there....
just move kwinrc of your old account out of the way and check whether that's actually it
~/.kde/share/config/kwinrc -> kwinrc.flasherror
If this actually changes things, feel free to post it here as well as the one of your fresh account.

> Ksysguard points to something called along the lines of "plugin container" that
> causes such high CPU loads
well, yes - that's flash.
it runs in a special process, mostly because it tends to crash :P
--> no special load on "kwin" compared to eg. "metacity"?

> Yes, running "metacity --replace" solves it. So does using the System Settings
> "Default Window Manager" selection.  Also, here's a screen shot of my video
> card information, if it helps:
since it's not about the compositor, i wouldn't know where the GPU + KWin + Flash relation would be.
Comment 8 Zak 2011-08-01 00:56:03 UTC
No special load on KWin when compared to Metacity, however, X suddenly jumps in CPU usage, from about 1 percent to 16 percent. (16 percent of 4 cores that is). 

I will try moving the config file from the new account to the old. Here's the old kwinrc:

[$Version]
update_info=kwin_focus2.upd:kwin_focus2,kwin3_plugin.upd:kde3.2,kwin_on_off.upd:kwin_on_off,kwin_focus1.upd:kwin_focus1,kwin.upd:kde3.0r1,kwin.upd:kde3.2Xinerama,kwin_remove_effects.upd:kwin4.7_effects

[Compositing]
AnimationSpeed=3
Backend=OpenGL
CheckIsSafe=true
DisableChecks=false
Enabled=true
GLDirect=true
GLMode=TFP
GLTextureFilter=2
GLVSync=true
HiddenPreviews=5
OpenGLIsUnsafe=false
UnredirectFullscreen=true
XRenderSmoothScale=false

[Desktops]
Name_1=
Name_2=
Name_3=
Name_4=
Number=4

[Effect-BoxSwitch]
TabBox=false

[Effect-Cube]
BorderActivate=9
BorderActivateCylinder=9
BorderActivateSphere=9

[Effect-DesktopGrid]
BorderActivate=3

[Effect-FlipSwitch]
BorderActivate=9
BorderActivateAll=9
TabBox=false

[Effect-PresentWindows]
BorderActivate=9
BorderActivateAll=7
TabBox=false

[ElectricBorders]
Bottom=None
BottomLeft=None
BottomRight=None
Left=None
Right=None
Top=None
TopLeft=None
TopRight=None

[MouseBindings]
CommandActiveTitlebar1=Raise
CommandActiveTitlebar2=Start window tab drag
CommandActiveTitlebar3=Operations menu
CommandAll1=Move
CommandAll2=Toggle raise and lower
CommandAll3=Resize
CommandAllKey=Alt
CommandAllWheel=Nothing
CommandInactiveTitlebar1=Activate and raise
CommandInactiveTitlebar2=Start window tab drag
CommandInactiveTitlebar3=Operations menu
CommandTitlebarWheel=Shade/Unshade
CommandWindow1=Activate, raise and pass click
CommandWindow2=Activate and pass click
CommandWindow3=Activate and pass click
CommandWindowWheel=Scroll

[Plugins]
kwin4_effect_beclockEnabled=false
kwin4_effect_bedroppedEnabled=false
kwin4_effect_befadedEnabled=false
kwin4_effect_bemeasuredEnabled=false
kwin4_effect_bereflectedEnabled=false
kwin4_effect_blurEnabled=true
kwin4_effect_boxswitchEnabled=true
kwin4_effect_coverswitchEnabled=true
kwin4_effect_cubeEnabled=true
kwin4_effect_cubeslideEnabled=true
kwin4_effect_dashboardEnabled=true
kwin4_effect_desktopgridEnabled=true
kwin4_effect_dialogparentEnabled=true
kwin4_effect_diminactiveEnabled=true
kwin4_effect_dimscreenEnabled=true
kwin4_effect_explosionEnabled=false
kwin4_effect_fadeEnabled=true
kwin4_effect_fadedesktopEnabled=false
kwin4_effect_fallapartEnabled=false
kwin4_effect_flipswitchEnabled=false
kwin4_effect_glideEnabled=false
kwin4_effect_highlightwindowEnabled=true
kwin4_effect_invertEnabled=false
kwin4_effect_loginEnabled=true
kwin4_effect_logoutEnabled=true
kwin4_effect_lookingglassEnabled=false
kwin4_effect_magiclampEnabled=false
kwin4_effect_magnifierEnabled=false
kwin4_effect_minimizeanimationEnabled=true
kwin4_effect_mousemarkEnabled=true
kwin4_effect_presentwindowsEnabled=true
kwin4_effect_resizeEnabled=false
kwin4_effect_scaleinEnabled=false
kwin4_effect_screenshotEnabled=true
kwin4_effect_sheetEnabled=false
kwin4_effect_showfpsEnabled=false
kwin4_effect_showpaintEnabled=false
kwin4_effect_slideEnabled=false
kwin4_effect_slidebackEnabled=true
kwin4_effect_slidingpopupsEnabled=true
kwin4_effect_snaphelperEnabled=false
kwin4_effect_startupfeedbackEnabled=true
kwin4_effect_taskbarthumbnailEnabled=true
kwin4_effect_thumbnailasideEnabled=false
kwin4_effect_trackmouseEnabled=false
kwin4_effect_translucencyEnabled=true
kwin4_effect_windowgeometryEnabled=false
kwin4_effect_wobblywindowsEnabled=true
kwin4_effect_zoomEnabled=true

[PopupInfo]
PopupHideDelay=1000
ShowPopup=false
TextOnly=false

[Style]
BorderSize=1
ButtonsOnLeft=MS
ButtonsOnRight=IAX
CustomButtonPositions=true
PluginLib=kwin3_oxygen
ShowToolTips=true

[TabBox]
ListMode=0
ShowTabBox=true

[Windows]
AutogroupInForeground=true
AutogroupSimilarWindows=false
ElectricBorderCooldown=350
ElectricBorderDelay=150
ElectricBorderMaximize=true
ElectricBorderTiling=true
ElectricBorders=0
HideUtilityWindowsForInactive=true
IgnoreFocusStealingClasses=kio_uiserver
InactiveTabsSkipTaskbar=false
MaximizeButtonLeftClickCommand=Maximize
MaximizeButtonMiddleClickCommand=Maximize (vertical only)
MaximizeButtonRightClickCommand=Maximize (horizontal only)
Placement=Smart
RollOverDesktops=true
ShadeHover=false
ShadeHoverInterval=250
TilingDefaultLayout=0
TilingOn=false
TilingRaisePolicy=0
TitlebarDoubleClickCommand=Maximize

And here's the new account's kwinrc:
[$Version]
update_info=kwin_remove_effects.upd:kwin4.7_effects,kwin_focus2.upd:kwin_focus2,kwin3_plugin.upd:kde3.2,kwin_on_off.upd:kwin_on_off,kwin_focus1.upd:kwin_focus1,kwin.upd:kde3.0r1,kwin.upd:kde3.2Xinerama

[Compositing]
AnimationSpeed=3
Backend=OpenGL
DisableChecks=false
Enabled=true
GLDirect=true
GLLegacy=false
GLTextureFilter=2
GLVSync=true
HiddenPreviews=5
OpenGLIsUnsafe=false
UnredirectFullscreen=true
XRenderSmoothScale=false

[Desktops]
Name_1=
Name_2=

[Effect-BoxSwitch]
TabBox=false

[Effect-FlipSwitch]
TabBox=false

[Effect-PresentWindows]
TabBox=false

[Plugins]
kwin4_effect_beclockEnabled=false
kwin4_effect_bedroppedEnabled=false
kwin4_effect_befadedEnabled=false
kwin4_effect_bemeasuredEnabled=false
kwin4_effect_bereflectedEnabled=false
kwin4_effect_blurEnabled=true
kwin4_effect_boxswitchEnabled=true
kwin4_effect_coverswitchEnabled=true
kwin4_effect_cubeEnabled=true
kwin4_effect_cubeslideEnabled=false
kwin4_effect_dashboardEnabled=true
kwin4_effect_desktopgridEnabled=true
kwin4_effect_dialogparentEnabled=true
kwin4_effect_diminactiveEnabled=false
kwin4_effect_dimscreenEnabled=false
kwin4_effect_explosionEnabled=false
kwin4_effect_fadeEnabled=true
kwin4_effect_fadedesktopEnabled=false
kwin4_effect_fallapartEnabled=false
kwin4_effect_flipswitchEnabled=false
kwin4_effect_glideEnabled=false
kwin4_effect_highlightwindowEnabled=true
kwin4_effect_invertEnabled=false
kwin4_effect_loginEnabled=true
kwin4_effect_logoutEnabled=true
kwin4_effect_lookingglassEnabled=false
kwin4_effect_magiclampEnabled=false
kwin4_effect_magnifierEnabled=false
kwin4_effect_minimizeanimationEnabled=true
kwin4_effect_mousemarkEnabled=false
kwin4_effect_outlineEnabled=true
kwin4_effect_presentwindowsEnabled=true
kwin4_effect_resizeEnabled=false
kwin4_effect_scaleinEnabled=false
kwin4_effect_screenshotEnabled=true
kwin4_effect_sheetEnabled=false
kwin4_effect_showfpsEnabled=false
kwin4_effect_showpaintEnabled=false
kwin4_effect_slideEnabled=true
kwin4_effect_slidebackEnabled=false
kwin4_effect_slidingpopupsEnabled=true
kwin4_effect_snaphelperEnabled=false
kwin4_effect_startupfeedbackEnabled=true
kwin4_effect_taskbarthumbnailEnabled=true
kwin4_effect_thumbnailasideEnabled=false
kwin4_effect_trackmouseEnabled=false
kwin4_effect_translucencyEnabled=true
kwin4_effect_windowgeometryEnabled=false
kwin4_effect_wobblywindowsEnabled=false
kwin4_effect_zoomEnabled=true

[TabBox]
ListMode=0
ShowTabBox=true

[Windows]
IgnoreFocusStealingClasses=kio_uiserver

But swapping that file doesn't change anything.... Also, neither does replacing the Flash config files. ... So what's so different about that other account? It's not a sudo-ers account is all I can think of.

Thanks again.
Comment 9 Zak 2011-08-01 01:05:48 UTC
However, this did give me the idea of renaming the whole .kde folder to .kde-old. After logging out and in again (with Ctrl+Alt-Backspace because suddenly everything started complaining) Flash works fine (and my login is faster...). So, whatever it is, it lingers not in kwinrc but some other config (konfig :p) file or something else in the .kde folder.
Comment 10 Thomas Lübking 2011-08-01 18:43:31 UTC
> No special load on KWin when compared to Metacity, however, X suddenly jumps in
> CPU usage, from about 1 percent to 16 percent. (16 percent of 4 cores that is).

This happens _only_ with kwin, but not with any other WM? (high X11 load by flash is common. Probably just too stupid to use xv...)

Well, i then wish you much luck & fun bisecting ;-P
I'd try the configuration of whatever window decoration / widget style you use first.
Comment 11 Zak 2011-08-02 04:25:51 UTC
Correct only KWin. And only when desktop effects are DISABLED.  I'm not in Linux right now, but when I do get back to it I'll try and figure out why this strange combination of factors causes the performance I get.
Comment 12 Sylvain Paré 2014-08-09 09:26:19 UTC
Hi Zak
I have exacly the same issue as you since my upgrade from Kubuntu 13.10 to 14.04 (so kde 4.13.2 here).
Ans I also noticed that moving .kde away to force to create new kde config did solved the issue.
So did you find which file(s) is to blame ?
Thank you.
PS: is it possible to change this bug's status
Comment 13 Thomas Lübking 2014-08-09 09:29:13 UTC
.kde/share/config/kwinrc

Please upload both (good and bad one)
Comment 14 Sylvain Paré 2014-08-09 09:46:45 UTC
Created attachment 88178 [details]
kwinrc from old kde config
Comment 15 Sylvain Paré 2014-08-09 09:47:10 UTC
Created attachment 88179 [details]
kwinrc from new kde config
Comment 16 Sylvain Paré 2014-08-09 09:49:58 UTC
just 2 comments :
in my old kde config I also have those files next to kwinrc :
kwin.eventsrc
kwin_rules_dialogrc
kwinrulesrc
which are not in the new kde config

in fact new config does not fix every thing. It only fix the issue when compositing is activated. If not activated video full screen is still flickering.
Comment 17 Thomas Lübking 2014-08-09 09:54:02 UTC
Thanks, as the new config is still empty, please also attach the output of

   qdbus org.kde.kwin /KWin supportInformation

If you qdbus yells an error, you lack the "qtchooser" package.

For the records, the old config unredirected fullscreen windows, ie. KWin compositing explicitly had no impact on those choppy flash windows.
I suppose either the driver or flash or the video sink used by flash was "confused" by the unredirection.

Also notice that unredirection was long time disabled by default upstream (crashes the intel driver), but some distros (*cough* ubuntu *cough*) patched it to enabled by default.

You might want to check whether this setting ("kcmshell4 kwincompositing", 3rd tab, "suspend compositing for fullscreen windows") breaks it.*

However, let's first see the runtime settings =)

*notice that the feature is currently forcefully disabled for intel chips.
Comment 18 Thomas Lübking 2014-08-09 09:55:00 UTC
(In reply to Sylvain Paré from comment #16)

> in fact new config does not fix every thing. It only fix the issue when
> compositing is activated. If not activated video full screen is still
> flickering.

Without compositing, what you see is between the client (flash) and the X11 server (and the used driver) exclusively.
Not KWin setting will ever change anything about that behavior.
Comment 19 Zak 2014-08-09 17:27:39 UTC
Sorry I moved on to Fedora quite some time ago, and a new computer. Whatever advice I give now is probably not related. But, I just keep compositing on all the time, and flash runs fine. In fact compositing makes everything run smooth, so kudos to the team for that. The only time I find better performance with the option: "disable for fullscreen windows" is useful is for certain games in Wine.

Sorry I can't be of more help. Also flash is mostly replaced by html5 for my uses, too :/
Comment 20 Sylvain Paré 2014-08-24 11:32:35 UTC
Hi Thomas, sorry for the delay I was quite a bit busy.
Attached kwin settings.
Comment 21 Sylvain Paré 2014-08-24 11:33:16 UTC
Created attachment 88393 [details]
output of "qdbus org.kde.kwin /KWin supportInformation"
Comment 22 Sylvain Paré 2014-08-24 12:06:44 UTC
checked or not "suspend compositing for fullscreen windows" does not change anything.
Sum' up :
Playing flash video (not html5 ones)
                      compositing
                   |   on  |  off |
window mode        |   ok  |  ok  |
fullscreen mode    |  ~ok  |  KO  | "suspend compositing for fullscreen windows"
fullscreen mode    |  ~ok  |  KO  | 

~ok : means working without flickering until I interact with any buttons (play/pause/timeline) then I have to leave fullscreen mode and then restore it.

So it is a bit weird. It means that when compositing is on but disabled in fullscreen by the option then there is no flickering. Whereas not compositing at all make the video flicker.
Comment 23 Thomas Lübking 2014-08-24 20:29:10 UTC
Unfortunately you ran the supportInformation w/o compositing active, so I don't know what GPU you use (in dout run "glxinfo"), but it seems an issue with the overlay or adobes usage of it (where it's bypassed while the window is redirected, adobe pot. just checks for the presence of a compositor and not whether the window is actually redirected)

The invocation can be configured for Flash, see
https://wiki.archlinux.org/index.php/browser_plugins#Configuration
and some GPU drivers allow config of the overlay mode as well.