Bug 184233 - Display flickers when compositing is enabled on Dual Monitor system
Summary: Display flickers when compositing is enabled on Dual Monitor system
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-13 16:54 UTC by David Lonie
Modified: 2011-01-22 15:41 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
My xorg (6.47 KB, text/plain)
2009-02-13 16:56 UTC, David Lonie
Details
xorg.log (18.51 KB, text/plain)
2009-03-07 20:51 UTC, kujub
Details
Messages from kwin (2.43 KB, text/plain)
2009-03-08 12:56 UTC, kujub
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Lonie 2009-02-13 16:54:33 UTC
Version:            (using KDE 4.2.0)
Compiler:          GCC 4.1.2 
OS:                Linux
Installed from:    Gentoo Packages

Using a dual monitor setup on KDE 4.2 with a nVidia GeForce GO card, the right hand monitor will flicker momentarily in strips whenever a notification, menu, dialog, etc appears. Even when a menu (or etc) pops up on the left monitor, the right monitor flickers for a bit while the widget is being drawn. 

This also occurs when using any of the desktop effects that take over the screen -- cube, zoom out, scale and cover selection, etc.

I've eliminated hardware problems as the cause -- If I change my Xorg to swap the left and right monitors, the flicker changes to always appear on the right monitor.

The flicker looks like the screen is being torn -- there are jagged, parallel, diagonal lines across the screen with black in between them.

Disabling compositing makes the problem go away.

I recall (years ago) that beryl would do this too, but then one day it just stopped after an update. So there is SOME way to fix it, I just wish I knew when that fix occurred so I could track it down. :)
Comment 1 David Lonie 2009-02-13 16:56:01 UTC
Created attachment 31271 [details]
My xorg

Let me know if there are any other logs/configs/etc you'd like to see.
Comment 2 lucas 2009-02-13 16:59:41 UTC
What happens when you deactivate "Use VSync" in System Settings -> Desktop -> Advanced?
Comment 3 David Lonie 2009-02-13 17:41:32 UTC
The problem persists with VSync is disabled. I just tried changing the other settings in the dialog, but the only one that "fixed" it was switching to the XRender engine, which is horribly slow.
Comment 4 kujub 2009-03-07 20:50:30 UTC
I can confirm flicker problems here when using kwin with compositing enabled.
It appears on both screens here.
When using a single screen xorg.conf with twinview disabled the problem disappears (1280x1024 depth 24).
When using a single screen xorg.conf with twinview disabled but with Virtual 1920 1024 in SubSection "display" the problem appears again (!)
When switching to Xfwm 4.6.0 ( xfwm4 --replace & ) with compositor enabled via xfce4-settings-manager the problem disappears.
When killing plasma ( kquitapp plasme ) the problem disappears too.

Steps to repoduce this with high chances:
- set up xorg.conf with nvidia driver and some wide virtual screen resolution or twinview.
- enable kwin desktop effects using OpenGL
- open about ten lange application windows
- klick on some application menu to pull it down
- move mouse back and forth across the menu bar to switch between pull down menus frequently
- if no problem occours, activate some other window, and try again

ArchLinux 686
kdebase-workspace 4.2.1-2
qt 4.4.3-5
xorg-server 1.5.3-4
nvidia 180.29-3
Comment 5 kujub 2009-03-07 20:51:20 UTC
Created attachment 31884 [details]
xorg.log
Comment 6 kujub 2009-03-07 21:00:09 UTC
Just in case:
mesa 7.2-1
Comment 7 kujub 2009-03-08 12:50:57 UTC
(In reply to comment #4)
> When killing plasma ( kquitapp plasme ) the problem disappears too.
Hmm, in a Xfce4 session when using kwin instead of xfmw4 it happens too.
So plasma can't be the reason for this.
Comment 8 kujub 2009-03-08 12:56:14 UTC
Created attachment 31905 [details]
Messages from kwin
Comment 9 kujub 2009-03-10 18:19:07 UTC
Ups !? Now i clicked on button Defaults in systemsettings section Display and restored all settings manually as before and the problem seems gone.
Comment 10 kujub 2009-03-10 18:48:00 UTC
Restored the previous kwinrc from backup to track it down further.
Result: With pull down menus it happens only when effect Scale In is enabled.
Weird, since this effect does not affect menus anyway.
Comment 11 lucas 2009-03-11 04:34:07 UTC
If this problem is the same as the one I experience (Flickering on both screens) it usually fixes itself if you change a setting. To have it reoccur you must restart KWin from the terminal with `kwin --replace &`.
Comment 12 kujub 2009-03-11 10:11:25 UTC
(In reply to comment #11)
`kwin --replace &` makes no difference here, but with 'Scale In' disabled it still seems to happen rarely with tooltips and sometimes with menus when clicked first time after unminimizing a window.
Comment 13 Martin Flöser 2009-09-15 18:32:49 UTC
could this be a duplicate of bug #177495?
Comment 14 crptdngl71 2010-09-17 11:26:07 UTC
@ Comment #13: I don't think that this is a duplicate.

The flickering described here is related to dualscreen setting (twinview) rather than to a window being maximized.

I can confirm the flickering here.
I have a dual screen setup.
Left screen: external monitor @1680x1050, right screen is internal notebook screen @1280x800.

Twinview setting @2960x1050.

All settings done as root via nvidia-settings gui tool. I have had no previous Xorg.conf and created one from scratch using the NVIDIA settings tool.

The flickering appears on the right (notebook) screen only. It flickers if I use desktop effects such as woggly windows ("wabernde Fenster"). The flickering also appears during the initial display of the desktop after booting the notebook.

I have played with the vsync settings etc. and have noticed that sometimes I get less flickering or even none, but it reappears. It does not happen with all effects but with some. Compositing is enabled as is GLX.

I have to use the binary NVIDIA driver (latest version).

My graphic card is an onboard NVIDIA GeForce 6100 card.

The flickering:
It looks like a black area with horizontal lines blended into/over the desktop background, like a shadowing effect. It covers about half of the notebook screen.

HTH.
Comment 15 dbohling 2010-10-20 00:33:05 UTC
I've been experiencing the exact same flickering issues as you. Twinview on geforce go 6150, xorg 1.9 , nvidia-drivers 256.53. Disabling "Allow Flipping" under X Screen 0 > OpenGL Settings within the nvidia-settings application fixed the issue for me.
Comment 16 crptdngl71 2010-10-21 16:26:02 UTC
I can confirm that setting "AllowFlipping" to "false" in the xorg.conf file solves flickering issue. Now desktop effects work without flickering.
Comment 17 Martin Flöser 2011-01-22 12:47:54 UTC
given comments #15 and #16 this is not a kwin issue, but either a configuration issue or a driver issue. Most likely driver.
Comment 18 Thomas Lübking 2011-01-22 15:41:13 UTC
just for records:
sounds like the nvidia drivers don't like flipping (the flicker is apprently related to glXSwapBuffers) with a multiscreen setup.
if we've only swapping with GLES and later on maybe all GL, kwin should implicitly disable flipping (runtime driver parameter) on multiscreen detection.