Version: unspecified (using KDE 4.5.1) OS: Linux I'm not sure if this is a bug for firefox, kde, kubuntu, or adobe flash player but every time I go on an online video site like youtube I see a lot of tearing. And when I say a lot of tearing I mean tearing when their is barely any motion at all. I know that my video driver isn't the problem because when I switch to fullscreen any tearing that their might be is barely noticeable. Also I haven't noticed the problem while in gnome. Reproducible: Didn't try Steps to Reproduce: Watch an online video while in kde with firefox Actual Results: Tearing while watching videos regardless of the amount of motion Expected Results: smooth video playback
Does the tearing go away if you disable compositing (Alt+Shift+F12)?
I've just tried it. And their still is some tearing but it's a lot less noticeable, The remaining tearing may just be the fault of my video card. Thank you for the fix, the video's on youtube are much more smooth now. I looked up compositing to find out what it was that I disabled and according to wikipedia, compositing is the combining of visual elements from separate sources into single images. So does this mean I have shut off compositing for all of kde or just firefox. And does this mean that my video card isn't high end enough to handle compositing, or are many people having this problem? If I've shut it down for all of kde how do I enable it again?
Compositing is "what makes shadows and translucent windows" - so the suspense in global. The shortcut is a toggle, so pressing it again will re-activate it. do you use (see "advanced" tab in "kcmshell4 kwincompositing") - opengl or xrender compositing, - direct or indirect rendering, - vsync? what kind of gpu do you use? also please start "kwin --replace &" from a textshell (konsole) and watch/post the output (to ensure kwin doesn't have to override some settings)
Compositing type is set to OpenGL. Under OpenGL options Use Vsync is clicked, I don't see anything that says if it's direct or indirect rendering, but when typed "glxinfo | grep direct" into my terminal I got direct rendering: Yes GL_EXT_direct_state_access, GL_EXT_draw_range_elements, GL_EXT_fog_coord, So I guess that means it's direct rendering. I have an nvidia gpu, the exact gpu is a GeForce 6150SE nForce 430. It's a low end onboard gpu. "kwin --replace &" output this [1] 1954 linux@linux:~$ kwin(1954) Kephal::DesktopWidgetScreens::DesktopWidgetScreens: foo kwin(1954) KWin::Extensions::init: Extensions: shape: 0x "11" composite: 0x "4" render: 0x "b" fixes: 0x "40" kwin(1954) KWin::CompositingPrefs::detect: glx version is 1 . 4 kwin(1954) KWin::CompositingPrefs::detectDriverAndVersion: GL vendor is "NVIDIA Corporation" kwin(1954) KWin::CompositingPrefs::detectDriverAndVersion: GL renderer is "GeForce 6150SE nForce 430/PCI/SSE2/3DNOW!" kwin(1954) KWin::CompositingPrefs::detectDriverAndVersion: GL version is "2.1.2 NVIDIA 260.19.12" kwin(1954) KWin::CompositingPrefs::detectDriverAndVersion: Detected driver "nvidia" , version "260.19.12" kwin(1954) KDecorationPlugins::loadPlugin: kwin : path "/usr/lib/kde4/kwin3_oxygen.so" for "kwin3_oxygen" kwin(1954) KWin::Extensions::init: Extensions: shape: 0x "11" composite: 0x "4" render: 0x "b" fixes: 0x "40" kwin(1954) KWin::Extensions::init: Extensions: shape: 0x "11" composite: 0x "4" render: 0x "b" fixes: 0x "40" kwin(1954) KWin::Workspace::setupCompositing: Initializing OpenGL compositing kwin(1954) KWin::SceneOpenGL::initBufferConfigs: Drawable visual (depth 24 ): 0x "59" kwin(1954) KWin::SceneOpenGL::initBufferConfigs: Drawable visual (depth 32 ): 0x "80" kwin(1954) KWin::SceneOpenGL::initBuffer: Buffer visual (depth 24 ): 0x "57" kwin(1954) KWin::SceneOpenGL::SceneOpenGL: DB: true , TFP: true , SHM: false , Direct: true kwin(1954) KWin::Workspace::setupCompositing: Refresh rate 50 Hz kwin(1954) KWin::EffectsHandlerImpl::loadEffect: Trying to load "kwin4_effect_slidingpopups" kwin(1954) KWin::EffectsHandlerImpl::loadEffect: Trying to load "kwin4_effect_blur" kwin(1954) KWin::EffectsHandlerImpl::loadEffect: Trying to load "kwin4_effect_fade" kwin(1954) KWin::EffectsHandlerImpl::loadEffect: Trying to load "kwin4_effect_desktopgrid" kwin(1954) KWin::EffectsHandlerImpl::loadEffect: Trying to load "kwin4_effect_shadow" kwin(1954) KWin::EffectsHandlerImpl::loadEffect: Trying to load "kwin4_effect_slide" kwin(1954) KWin::EffectsHandlerImpl::loadEffect: Trying to load "kwin4_effect_presentwindows" kwin(1954) KWin::EffectsHandlerImpl::loadEffect: Trying to load "kwin4_effect_login" kwin(1954) KWin::EffectsHandlerImpl::loadEffect: Trying to load "kwin4_effect_boxswitch" kwin(1954) KWin::EffectsHandlerImpl::loadEffect: Trying to load "kwin4_effect_cube" kwin(1954) KWin::EffectsHandlerImpl::loadEffect: Trying to load "kwin4_effect_taskbarthumbnail" kwin(1954) KWin::EffectsHandlerImpl::loadEffect: Trying to load "kwin4_effect_logout" kwin(1954) KWin::EffectsHandlerImpl::loadEffect: Trying to load "kwin4_effect_translucency" kwin(1954) KWin::EffectsHandlerImpl::loadEffect: Trying to load "kwin4_effect_highlightwindow" kwin(1954) KWin::EffectsHandlerImpl::loadEffect: Trying to load "kwin4_effect_zoom" kwin(1954) KWin::EffectsHandlerImpl::loadEffect: Trying to load "kwin4_effect_dialogparent" kwin(1954) KWin::EffectsHandlerImpl::loadEffect: Trying to load "kwin4_effect_minimizeanimation" kwin(1954) KWin::EffectsHandlerImpl::loadEffect: Trying to load "kwin4_effect_coverswitch" Bus::open: Can not get ibus-daemon's address. IBusInputContext::createInputContext: no connection to ibus-daemon kwin(1954) KWin::Client::readUserTimeMapTimestamp: User timestamp, ASN: 50051 kwin(1954) KWin::Client::readUserTimeMapTimestamp: User timestamp, final: 'ID: 31463386 ;WMCLASS: "plasma" : "plasma" ;Caption: "plasma-desktop" ' : 50051 kwin(1954) KWin::Workspace::allowClientActivation: Activation: No client active, allowing kwin(1954) KWin::Workspace::updateClientArea: screens: 1 desktops: 2 kwin(1954) KWin::Workspace::updateClientArea: Done. kwin(1954) KWin::Client::readUserTimeMapTimestamp: User timestamp, ASN: 1062767 kwin(1954) KWin::Client::readUserTimeMapTimestamp: User timestamp, final: 'ID: 23068783 ;WMCLASS: "firefox" : "navigator" ;Caption: "Bug 255160 - Tearing on videos while not in fullscreen - Mozilla Firefox" ' : 1062767 kwin(1954) KWin::Workspace::allowClientActivation: Activation: No client active, allowing kwin(1954) KWin::Workspace::updateClientArea: screens: 1 desktops: 2 kwin(1954) KWin::Workspace::updateClientArea: Done. kwin(1954) KWin::Workspace::createTile: Now tiling "Bug 255160 - Tearing on videos while not in fullscreen - Mozilla Firefox" kwin(1954) KWin::Client::readUserTimeMapTimestamp: User timestamp, ASN: 1079588 kwin(1954) KWin::Client::readUserTimeMapTimestamp: User timestamp, final: 'ID: 56623132 ;WMCLASS: "konsole" : "konsole" ;Caption: "linux : kcmshell4" ' : 1079588 kwin(1954) KWin::Workspace::allowClientActivation: Activation: No client active, allowing kwin(1954) KWin::Workspace::updateClientArea: screens: 1 desktops: 2 kwin(1954) KWin::Workspace::updateClientArea: Done. kwin(1954) KWin::Workspace::createTile: Now tiling "linux : kcmshell4" kwin(1954) KWin::Client::readUserTimeMapTimestamp: User timestamp, ASN: 1074631 kwin(1954) KWin::Client::readUserTimeMapTimestamp: User timestamp, final: 'ID: 31463366 ;WMCLASS: "plasma" : "plasma" ;Caption: "plasma-desktop" ' : 1074631 kwin(1954) KWin::Workspace::allowClientActivation: Activation: No client active, allowing kwin(1954) KWin::Workspace::updateClientArea: screens: 1 desktops: 2 kwin(1954) KWin::Workspace::updateClientArea: Done. kwin(1954) KWin::Workspace::updateClientArea: screens: 1 desktops: 2 kwin(1954) KWin::Workspace::updateClientArea: Done. kwin(1954) KWin::Client::readUserTimeMapTimestamp: User timestamp, ASN: 1074631 kwin(1954) KWin::Client::readUserTimeMapTimestamp: User timestamp, final: 'ID: 31463409 ;WMCLASS: "plasma-desktop" : "plasma-desktop" ;Caption: "plasma-desktop" ' : 1074631 kwin(1954) KWin::Workspace::allowClientActivation: Activation, compared: 'ID: 31463409 ;WMCLASS: "plasma-desktop" : "plasma-desktop" ;Caption: "plasma-desktop" ' : 1079854 : 1079854 : true kwin(1954) KWin::Workspace::updateClientArea: screens: 1 desktops: 2 kwin(1954) KWin::Workspace::updateClientArea: Done. kwin(1954) KWin::SceneOpenGL::selfCheckFinish: OpenGL compositing self-check passed. And also I have setup the method listed on the second post of this thread on the ubuntu forum http://ubuntuforums.org/archive/index.php/t-1061650.html
- "kwin(1954) KWin::SceneOpenGL::SceneOpenGL: DB: true , TFP: true , SHM: false , Direct: true" - i assume you /do/ have a 50Hz display? (is it better w/ _any_ vsync'ing?) - my personal experience is to pick either client side (kwin sync) or driver syncing, not both (but there've been contradicting reports) - compiz settings in ccsm have no impact on kwin at all as for flash: the xv adaptor syncing shouldn't help you too much (afaik the player still does not make use of it) :-(
My display is 75 hz in windows, but in it's set to 50 and it won't let me set it higher than 51. I set it to 75 with compiz, but now you have informed me that it has no effect on kwin. Is their any way I can set the refresh rate higher. I have sync to vblank enabled under nvidia x server settings. I don't know how to set up client side (kwin sync) that your talking about but I would like try it see if it will help. (In reply to comment #5) > - "kwin(1954) KWin::SceneOpenGL::SceneOpenGL: DB: true , TFP: true , SHM: false > , > Direct: true" > - i assume you /do/ have a 50Hz display? (is it better w/ _any_ vsync'ing?) > - my personal experience is to pick either client side (kwin sync) or driver > syncing, not both (but there've been contradicting reports) > - compiz settings in ccsm have no impact on kwin at all > > as for flash: > the xv adaptor syncing shouldn't help you too much (afaik the player still does > not make use of it) :-(
a) to query your _real_ refresh rate for nvidia GPUs use "nvidia-settings -q RefreshRate" - "nvidia + xrandr = bullsh... wrong" b) client vsync (kwin) is probably active and controlled in the "advanced" tab of "kcmshell4 kwincompositing", but it won't help since your display is likely @75Hz and kwin thinks it's 50Hz because the nvidia driver reports nonsense through xrandr :-( -> open ~/.kde/share/config/kwinrc, search for the [Compositing] section and add an entry "RefreshRate=75", then restart "kwin --replace &" (maybe "qdbus org.kde.kwin /Kwin reconfigure" is enough...)
Thank you, I've done what you what you said except for for "qdbus org.kde.kwin /Kwin reconfigure" because I got an error that said Error: org.freedesktop.DBus.Error.UnknownObject No such object path '/Kwin' I don't think I can completely get rid of the tearing and also I think that I should just turn off compositing when watching online videos compositing because obviously my graphics card can't handle both at the same time.
> because I got an error that said ... because i'm the ultimate typo king would have been "/KWin", sorry. However it would also not have been sufficient, so nothing lost =) > I don't think I can completely get rid of the tearing but the situation was actually improved, yesno? (you could try a slight lower value - did some testing and the "fps" plugin always counts slight above the set RefreshRate - that may just be a flaw in the fps counter, though) > because obviously my graphics card can't handle both at the same time. Did you check your cpu load when playing flashs? The texture_from_pixmap conversion takes some and flash... well yes - it's still flash, meaning it takes a lot more than any other player :-( I rather do not think that /this/ is about the GPU so much. -- i dared to change the bug into a wish to workaround this issue
Well I haven't noticed much of a difference at all. I opened system monitor to check out my cpu load while watching a 480p video on youtube. It was between the 40's to 60's with compositing off and it was between the high 50's and the 70's with compositing on. It may be the cpu, I know that when doing something like just going through the items in the kmenu with compositing on it uses allot more of my cpu than it does with it off. I tried switching to the firefox 4 beta because I heard that it supports hardware acceleration. I tested it with the ie fish tank demo and from that I did see a slightly higher fps, but I still had to turn off compositing when watching videos not in fullscreen. I ended up just switch back because it wasn't a big improvement and their was this annoying bug on some sites when I switched a video to fullscreen and then switched it back the video would would freeze while the audio still played, and the only way I could unfreeze the video was by refreshing the page. That bug was really annoying because firefox has another bug that when ever I turn the volume up or down with my keyboard I would be taken out of fullscreen. I'll probably switch back when it's no longer a beta. Unless you know something that will greatly improve performance I think it might be the best thing to set compositing to be off by default. Because it uses less of my cpu and the reason why I switched from windows to linux is because I wanted on OS that was less demanding on my hardware. How do I set compositing to be off by default?
(In reply to comment #10) > Well I haven't noticed much of a difference at all. So the tearing remains? With all video or just flash? > It may be the cpu, I know that when doing something when the cpu isn't on the limit, it's rather not it. also the overhead seems minor. > like just going through the items in the kmenu with compositing on it uses > allot more of my cpu than it does with it off. turn off oxygen animations for popup menus. they stress your GPU actually more than the compositing :-( > I tried switching to the firefox 4 beta because I heard that it supports not for your GPU at all (it's not vdpau capable) and esp. not in the case of flash videos - that's not a FF thing. > demanding on my hardware. How do I set compositing to be off by default? to turn off compositing completely run "kcmshell4 kwincompositing" and disable compositing ;-) You may also try the xrender backend in the advanced tab, since it does not have the texture_from_pixmap conversion overhead - but it might feel slower on effects, since the xrender implementation in the nvidia driver is (yet) not up to the GL one (but already pretty good here) - it dosn't provide all effects, but you can have shadows, translucency, exposé & spaces. Aside all this, and actually the only thing i'm interested in atm: does hardcoding the framerate (and deactivating vsync in nvidia-settings!) remove or at least diminish tearing (explicitly leaving aside flash videos)?
I have yet to notice tearing in vlc, even with compositing on, I have yet to try hd video on it though. I posted this bug because of flash video, but now I do notice a little bit of tearing on things like moving and resizing windows and scrolling in firefox but that doesn't bother me cause it's small and not really noticible. I noticed how when I minimize and maximize windows when their is more than one it doesn't seem as smooth it feels more choppy. I haven't deactivated the vsync but I haven't seen much of a difference with or without it enabled. I tried disabling oxygen animations and the tearing in flash still remained the only thing seemed effect it at all was turning off compositing. I might turn off compositing completely or I might just toggle it on and off, because I do like compositing and I feel like I'm missing something without it.
Well revision 1201396, commited by Thomas Luebking solves this, but there is a bug in the code and I believe it because of Locale settings. In trunk/KDE/kdebase/workspace/kwin/options.cpp , line 68: rate = reply.split(' ').first().split(',').first().toUInt( &ok ); The coma is fine for European metric locales where nvidia-settings reports 59,94Hz for example. However for English/American locales, nvidia-settings would report the RefreshRate as 59.94 i.e. with a dot as decimal separator. This commit is great btw! Thank you KWin devs.
sorry, i do _always_ fail on localisation ;-) patched: Revision 1201490
That was super fast!!! Thanks Thomas!
is this one fixed now with the latest changes for refresh rate detection?
description: yes we've now xvidmode calculation, (present) nvidia-settings as fallback and manula editing as failsafe. however the OP is about tearing what's a problem of vsync'ing kwin vsync'ing may not be ideal (still a pending patch in RR) but should work and then it becomes matter of the driver whetther gl_waitvideosync works and the videoplayer does not commit half frames. pot. remaining approach would to always invoke glSwapBuffers ...
closing fixed since detection works (and nvidia also now supports randr...) and there's a pending "tearing with nvidia bug"