[334] Parts of the UI randomly flicker when moving the mouse

Bug #1288747 reported by Jaime Marques on 2014-03-06
414
This bug affects 85 people
Affects Status Importance Assigned to Milestone
Compiz
High
Christopher Townsend
compiz (Ubuntu)
High
Christopher Townsend

Bug Description

Nvidia 334.21 makes the UI jearky, googled and found this on Nvidia forums:

"This looks like a problem caused by the system compositor not properly waiting for X rendering to finish before performing OpenGL rendering in response. The GL_EXT_x11_sync_object extension was designed to solve this problem, but it looks like cogl (the back-end library used by GNOME's compositor) doesn't use it yet. "

more details:
https://devtalk.nvidia.com/default/topic/690704/linux/-334-16-parts-of-the-ui-randomly-flicker-when-moving-the-mouse/post/4128101/#4128101
---
.proc.driver.nvidia.gpus.0: Error: [Errno 21] É uma directoria: u'/proc/driver/nvidia/gpus/0'
.proc.driver.nvidia.registry: Binary: ""
.proc.driver.nvidia.version:
 NVRM version: NVIDIA UNIX x86_64 Kernel Module 331.38 Wed Jan 8 19:32:30 PST 2014
 GCC version: gcc version 4.8.2 (Ubuntu 4.8.2-16ubuntu6)
.tmp.unity.support.test.0:

ApportVersion: 2.13.3-0ubuntu1
Architecture: amd64
CompizPlugins: No value set for `/apps/compiz-1/general/screen0/options/active_plugins'
CompositorRunning: compiz
CompositorUnredirectDriverBlacklist: '(nouveau|Intel).*Mesa 8.0'
CompositorUnredirectFSW: true
CurrentDesktop: Unity
DistUpgraded: Fresh install
DistroCodename: trusty
DistroRelease: Ubuntu 14.04
DistroVariant: ubuntu
DkmsStatus:
 bbswitch, 0.7, 3.13.0-16-generic, x86_64: installedError! Could not locate dkms.conf file.
 File: does not exist.

 nvidia-331-updates, 331.38, 3.13.0-16-generic, x86_64: installed
GraphicsCard:
 NVIDIA Corporation GF106 [GeForce GTS 450] [10de:0dc4] (rev a1) (prog-if 00 [VGA controller])
   Subsystem: Gigabyte Technology Co., Ltd Device [1458:34fe]
InstallationDate: Installed on 2014-03-03 (4 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Alpha amd64 (20140224)
MachineType: System manufacturer System Product Name
NonfreeKernelModules: nvidia
Package: compiz 1:0.9.11+14.04.20140305-0ubuntu1
PackageArchitecture: all
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.13.0-16-generic root=UUID=d2c3632d-4280-4961-91c8-0b7d3fe95be1 ro quiet splash
ProcVersionSignature: Ubuntu 3.13.0-16.36-generic 3.13.5
Tags: trusty trusty possible-manual-nvidia-install ubuntu single-occurrence reproducible compiz-0.9
Uname: Linux 3.13.0-16-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
_MarkForUpload: True
dmi.bios.date: 06/17/2010
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 0620
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: P5QL-ASUS-SE
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: Rev X.0x
dmi.chassis.asset.tag: Asset-1234567890
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr0620:bd06/17/2010:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKComputerINC.:rnP5QL-ASUS-SE:rvrRevX.0x:cvnChassisManufacture:ct3:cvrChassisVersion:
dmi.product.name: System Product Name
dmi.product.version: System Version
dmi.sys.vendor: System manufacturer
version.compiz: compiz 1:0.9.11+14.04.20140305-0ubuntu1
version.ia32-libs: ia32-libs N/A
version.libdrm2: libdrm2 2.4.52-1
version.libgl1-mesa-dri: libgl1-mesa-dri 10.1.0~rc3-0ubuntu3
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 10.1.0~rc3-0ubuntu3
version.nvidia-graphics-drivers: nvidia-graphics-drivers N/A
version.xserver-xorg-core: xserver-xorg-core 2:1.15.0-1ubuntu6
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.8.2-1ubuntu2
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:7.3.0-1ubuntu3
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.910-0ubuntu1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.10-1ubuntu2
xserver.bootTime: Fri Mar 7 10:50:58 2014
xserver.logfile: /var/log/Xorg.0.log
xserver.version: 2:1.15.0-1ubuntu6

Jaime Marques (jimmy93) on 2014-03-06
no longer affects: nvidia-graphics-drivers-331 (Ubuntu)
Jaime Marques (jimmy93) on 2014-03-06
description: updated
Aaron Plattner (aplattner) wrote :

drago01 implied that the problem is actually in clutter's use of the buffer_age extension. He didn't specify exactly which change he was talking about, but I assume it's this one: https://github.com/GNOME/clutter/commit/6665f47d66a871b6e1a5f4200282f42da043a0e8

Jaime Marques (jimmy93) wrote :

how can i apply this patch?
i had to downgrade my drivers since i couldnt deal with the bug.

Christopher Townsend (townsend) wrote :

The patch Aaron is referring to is for Clutter. We need to figure out how to fix Compiz for this. I just began to look at this, but I'm not very familiar with the code, so I'm not sure if I will get it right. I also don't have any Nvidia hardware to test this on, so I may ask you to help out in testing, if you are so willing:)

Thanks!

Changed in compiz:
importance: Undecided → High
Changed in compiz (Ubuntu):
importance: Undecided → High
Changed in compiz:
assignee: nobody → Christopher Townsend (townsend)
Changed in compiz (Ubuntu):
assignee: nobody → Christopher Townsend (townsend)
Changed in compiz:
status: New → Confirmed
Changed in compiz (Ubuntu):
status: New → Confirmed
Aaron Plattner (aplattner) wrote :

The original report was against GNOME 3, which doesn't use Compiz. Jamie, are you using Compiz, or gnome-shell?

Christopher Townsend (townsend) wrote :

Hmm, Aaron brings up a good point. I'm not sure if Compiz is really affected by this because the original bug report only links to a bug regarding clutter, not Compiz. I also have no way to try to reproduce the issue. I'm going to mark this incomplete until I can get better info.

Changed in compiz:
status: Confirmed → Incomplete
Changed in compiz (Ubuntu):
status: Confirmed → Incomplete
Christopher Townsend (townsend) wrote :

Jaime, please do an "apport-collect 1288747" from the command line so I can see more information about your system.

Alex Baines (abaines) wrote :

I can confirm this problem with compiz 0.9.7.12 and nvidia 334.21 on Ubuntu 12.04 64bit. It seems compiz doesn't handle damage events properly with this driver - parts of windows are not updated when they should be, leaving them rendered in an inconsistent state. Seems to affect any gtk application.

I couldn't do apport-collect 1288747 since I'm not the reporter, but I have attached the result of "apport-bug compiz".

Aaron Plattner (aplattner) wrote :

I'll wait for Jamie to chime in since he reported the bug, but Alex, your problem sounds like #269904.

apport information

tags: added: apport-collected compiz-0.9 possible-manual-nvidia-install reproducible single-occurrence trusty ubuntu
description: updated

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

Jaime Marques (jimmy93) wrote :

done, thanks for looking into this :)
and sure im willing to test any patch if you provide instructions.

Alex Baines (abaines) wrote :

It does sound similar yes, but 334.21 is the first driver that I have experienced this issue with, which coincides with the issue posted on nvidia devtalk also first appearing with this driver.

#269904 dates back way before 334.21, but I will try the sync_object patch posted there and see if it makes a difference.

Alex Baines (abaines) wrote :

Ok, the sync_object patch posted in bug #269904 [0] has solved the issue I was having as far as I can tell, thanks.

[0]: https://bugs.launchpad.net/compiz/+bug/269904/+attachment/3970253/+files/add_x_to_gl_sync_0.9.7.12.patch

Jaime Marques (jimmy93) wrote :

this is still marked as incomplete?
did i miss something or it just hasnt passed enough time for someone to verify the info?

Jaime,

Thanks for uploading the requested info. I'll begin to look over this on Monday.

Changed in compiz:
status: Incomplete → Triaged
Changed in compiz (Ubuntu):
status: Incomplete → Triaged
Jaime Marques (jimmy93) wrote :

cool, let me know if anymore info or testing is needed Will keep a close eye on this.
And again thanks :)

1 comments hidden view all 147 comments
Jaime Marques (jimmy93) wrote :

I've done more testing and i noticed that using 331.38 drivers if i resize windows with the new live resizing if i go slowly the window blinks dark and if you go really slow and stop when it blinks black, you can get the window to stay black...
with this i assume this bug has been there for awhile but the new driver just made it worst.

i dont know if this info is helfull but i thought i should report it anyway :)

Neil Rodgers (neilr1971) wrote :

I'm adding myself as affected, bug #269904 sounds similar to what I'm seeing but I've never experienced any problems till 334.16 and 334.21. I notice it the most with Firefox but thats probably because 90% of the time thats whats I'm using. Pages don't redraw completely and the boxes around the bookmark toolbar buttons seems to stick as I mouse over them. Downgrading the driver to any previous version solves the issue. I'm using Unity with Ubuntu 13.10

67 comments hidden view all 147 comments
ahmet yıldırım (y-ahmet) wrote :

I am using ubuntu 14.04 with installed driver nvidia 340.24 for Quadro 1000M graphic card. Unfortunately, I have the same problem. I have another pc which is the same OS 14.04 and driver 331.79 for Quadro FX880M but it does not have the same problem.

I am using ubuntu 14.04 (amd64) at Clevo P151HM: i7-2670QM + GF116M [GeForce GT 560M].

My results:
* nvidia driver 331.38 + native compiz 0.9.11 = no bug
* nvidia driver 340.24 + native compiz + high performance mode + no flip = no bug
* nvidia driver 340.24 + native compiz + adaptive mode + flipping = bug presents
* nvidia driver 340.24 + patched compiz = no bug + tons of messages in log "Sync object is not ready -- were events handled properly?" (1-2 message every second), sometimes hangs

I download compiz source (from ubuntu), apply the patch,
then add following code in method PrivateGLScreen::prepareDrawing ():

  if (currentSync) {
        if (!currentSync->isReady()) {
            for (std::vector<XToGLSync*>::size_type i = xToGLSyncs.size()/2; i>0; i--) {
                updateXToGLSyncs(); /* try to check next sync */
                if (!currentSync) { break; } /* method updateXToGLSync may disable syncs */
                if (currentSync->isReady()) { break; }
            }
        }
    }

just before check:

    if (currentSync)
    {
        if (!currentSync->isReady())

As a result - no bug, no messages in log, no hangs, uptime 1day (during this time: live switching to dual-monitor mode and back, several cycles of suspend/resume, work with power supply and from battery.... it seems all is ok).

ps. Sorry for my bad english

Jaime Marques (jimmy93) wrote :

A new driver has been released so i decided to test it (NV 343],

fresh install no patch = bugged & unusable.
ppa added = outdated, cant install.

Christopher could you please update the ppa so it works with 14.10 please?
Also this bug needs to be tagged critical or something, the drivers on the archives are OLD and when gaming you generaly want recent drivers, this becomes a problem to everyone wanting to game on ubuntu, they can use the drives or the will break the desktop and they cant use the old drivers in the archive because they have bug or are slow.

If the CLA is stoping the patch on getting into compiz why not drop CLA on compiz anyway??
its not like compiz will be on the new tech like unity8 and will moust likely die after unity8 becomes standart.

Hi Jaime,

Did you mean update the 14.04 Compiz as the 14.10 version seems to be updated? At any rate, I've updated both the Utopic and Trusty versions to have the latest Compiz code base and I also added the code Viktor posted above. If that causes issues for some, then I'll revert that code and re-upload.

Jaime Marques (jimmy93) wrote :

Christopher i meant 14.10, somewhy when i added the ppa before this updated it wanted to remove compiz core and unity...
its fixed now with this update, memory usage seems stable at around 60mb and flickering is gone but i did notice something strange when i minimize a window the memory goes up for 1mb, i killed/restarted compiz and i can reproduce this everytime when closing system monitor not sure if its related with the patch.

Thanks for updating the ppa so fast it was really annoying me :)

Johan Ferner (johan-ferner) wrote :

Installed 340.24 from xorg-edgers on 14.04. Started firefox and google search home screen flickered like mad. Installed the compiz patch and flickering stopped. So far the patch is perfect. Will monitor memory consumption after a full working day.
Thanks for the patch!

I did a fresh install of 14.04 get it tweaked the way I liked it and after I installed Nvidia drivers 340.24 my Firefox tabs were jerky and the pages looking funky. Even my VM GUIs were acting wonky. I've only had the patch installed for several minutes but already I can see the difference. Thank you for working on this so diligently.

Ubuntu 14.10
Nvidia-340.24
GeForce GTX 560 Ti

Jaime Marques (jimmy93) wrote :

@Christopher could you please update the ppa?
compiz updated and broke it.. again...

Thanks!

gurqn (gurqn-home) wrote :

For prevent applying further periodic updates you can use pin feature until it merged to main compiz as;

sudo gedit /etc/apt/preferences.d/townsend-nvidia-fix

#copy paste

Package: *
Pin: release o=LP-PPA-townsend-compiz-nvidia-refresh-test
Pin-Priority: 600

@ Christopher

Just wished to say thank you, gtx750ti and unity butter smooth now. Flicker, ui problems, randomly jumping to buttom or top while scrolling etc.. all gone , at least for me.

When your ppa would be merged to main compiz tree ? :-)

Well, it's been 6 days since I installed the patch and now I'm getting window resizing and window moving issues intermittently. I have checked CompizConfig and all Window Management Settings are checked. I reinstalled the patch but no change. Is there any benefit to installing the Nvidia driver 343.13?

gurqn (gurqn-home) wrote :

Tested on utopic ? i'm on utopic with latest 340 series.

Walter ZAMBOTTI (zambotti) wrote :

Ubuntu 14.04
nVidia 340.32
nVidia GT 330M

apt-cache policy compiz
compiz:
  Installed: 1:0.9.11.2+14.04.20140714-0ubuntu1
  Candidate: 1:0.9.11.2+14.04.20140714-0ubuntu1
  Version table:
 *** 1:0.9.11.2+14.04.20140714-0ubuntu1 0
        500 http://au.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     1:0.9.11+14.04.20140409-0ubuntu1 0
        500 http://au.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

I'm not sure if this version of compiz has the PPA but the flicker and freeze in games renders them unusable.

Where can I grab the compiz patch from?

Jaime Marques (jimmy93) wrote :

@Walter
sudo add-apt-repository ppa:townsend/compiz-nvidia-refresh-test
sudo apt-get update
sudo apt-get dist-upgrade

Walter ZAMBOTTI (zambotti) wrote :

@Jamie

Thanks

@<everyone>

Installed the PPA but this did not make any difference for me, still jittery, choppy and freezes.

apt-cache policy compiz
compiz:
  Installed: 1:0.9.11.2+14.04.20140714-0ubuntu1ppa2
  Candidate: 1:0.9.11.2+14.04.20140714-0ubuntu1ppa2
  Version table:
 *** 1:0.9.11.2+14.04.20140714-0ubuntu1ppa2 0
        500 http://ppa.launchpad.net/townsend/compiz-nvidia-refresh-test/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status
     1:0.9.11.2+14.04.20140714-0ubuntu1 0
        500 http://au.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
     1:0.9.11+14.04.20140409-0ubuntu1 0
        500 http://au.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

regards

Walter

Alexander (aheihachi) wrote :

@Jamie, any news on this regarding merging this patch in to official compiz release?

Alexander (aheihachi) wrote :

@Jamie, it is safe to use

ppa-purge ppa:townsend/compiz-nvidia-refresh-test

In case if i won't use that patch anymore?

Jaime Marques (jimmy93) wrote :

@Alexander
Hi m8 i did not create the patch christopher did, i would not have a clue where to being to make it :P
About the merging i have the same question it seems like something that should be done already...
stupid legal issues... ;S

about the ppa-purge im assuming it should work just fine, im unable to test it myself but if it does not work im sure someone more skilled then me will help you :)

Stephen M. Webb (bregma) wrote :

@Alexander

Yes, the ppa-purge command will do the right thing and restore the latest Compiz from the Ubuntu archive.

Also, the patch is still being held up by legal considerations.

Alexander (aheihachi) wrote :

@Jaime, @Stephen, thanks guys.

Do you experience this bug as well https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/1072206 ? I have it with any driver version, so annoying, can't enjoy window animation because i am using Super+W all the time.

Jaime Marques (jimmy93) wrote :

@Alexander

Yup, i belive theres a bug report on the nvidia official forums also.
im not sure if it is a driver or compiz bug since it only happends using the nvidia blob.

Andrés Manglano (manglasape) wrote :

Well, I have been experimenting this and after adding the ppa for testing it seems to improve the things a lot. Good job Christopher!

Stephen Turley (turley714) wrote :

compiz patch fixed the issue for me!

Ubuntu 14.04
Nvidia GTX 770 340.32

Thanks!

braikar (braikar) wrote :

I have the same flicker problem, (linux mint 17 + mate 64bits, so based on ubuntu 14.04) with a gtx750ti 340.32 driver with compiz Compiz 0.9.11.2 from the ubuntu 14.04 standard packages but I didn't install any patch.

For me what seems to do the trick, was enabling:
Utility > Workarounds > Fix screen ypdates in XGL with fglrx
& Utility > Workarounds > Force synchronization between X and GLX (which is said to be good for nvidia cards!)

I installed the patch and I see it adds a General > OpenGL > X11 Sync objects! So I was on the right track it seems ;) Anyway, thank you very much for the PPA, the patch seems to fix the flickering for good.

geggo (geggo85) wrote :

I can confirm this bug with all (official Ubuntu + xorg-edgers PPA) Nvidia drivers on Ubuntu 14.04
(current 343.22 in use with GeForce GTX 570 ).

In my case there was only one solution that was really working so far by experimenting without patch:
nvidia-settings
-Disabling the Allow Flipping option
-set Image Settings to High Performance
-set PowerMizer Settings to Prefer Maximum Performance

I also installed the patch and testing it at the moment. It seems that 95% of flickering issues are solved even if I cant say that for sure after my short experience ( some hours ).

Thank You very much for your great work Christopher!

Sir Sword (fartsword) wrote :

Is there any chance of this patch getting officially released for 14.04, considering 14.04 is supposed to be the stable release that people can standardize on? For many people this bug makes 14.04 at best annoying, or at worst unusable. I think it would be difficult to recommend 14.04 to a friend or a business and then have to turn around and explain to them the strange screen flickering bug.

Kajetan (kajetan-krischan) wrote :

@Sir Sword: This problem only occurs when installing the latest nvidia drivers - when the "Additional Drivers" utility is used you'll get the driver version 331.38 (as far as I know). Unless very recent Nvidia cards are in use version 331.38 should work very well. (However, it would definitely be useful if that patch would be released, but extensive testing might still be needed (I have to admit that I'm just guessing, I'm nowhere near being a developer...))

Jaime Marques (jimmy93) wrote :

@Christopher,
Could you sync the ppa plz?
Its making me wanna punch it again :P

(UB 14.10)

Wiktor: Nizio (zap-4) wrote :

It affects me on HD 4000, Ubuntu 14.10 with latest updates. Is there a workaround I could use? Does #130, #120 or #109 apply?

I am experiencing this situation virtually every time when VirtualBox works in full screen mode on the RIGHT monitor. (Dual monitor setup).

I have used Christopher's solution from #62, but it didn't fix it for me.

Kaspar Tint (kaspar-tint) wrote :

Any ETA when this will be merged to current?

Silviu C. (silviucc) wrote :

Is anyone using the 340.46 driver? If so, do you still see the probelm manifest?

I wonder if the bug (Bug #1283979 ) I reported could be related to this...

Pedro Lopes (paol) wrote :

@silviucc:
Yes and yes to your questions.

I've looked at bug #1283979, and I have never experienced that problem, nor have I seen others mention it in this bug. I don't think they are related.

Joshua R. Poulson (jrp) wrote :

I can consistently reproduce this problem with the nvidia-340 (last one I tested was 340.46) driver on my Thinkpad W510. I have to go back to the nvidia-331 driver to get around it.

Joshua R. Poulson (jrp) wrote :

Ok, after installing the patched compiz from the PPA I have not seen the terminal windows freak out anymore. +1 for the compiz patch!

Joshua R. Poulson (jrp) wrote :

On Trusty, today's compiz update in trusty-updates 1:0.9.11.3+14.04.20141104-0ubuntu1 superseded the fixed compiz in Chris Townsend's special fix PPA 1:0.9.11.2+14.04.20140714-0ubuntu1ppa2 and the flickering is back on the Lenovo Thinkpad W510 running nvidia-340 drivers.

Joshua R. Poulson (jrp) wrote :

And today, Chris has updated that PPA. I'm running 1:0.9.11.3+14.04.20141104-0ubuntu1ppa1 and the flickering has gone. This seems pretty definitive. Is there a chance that upstream (which I know is a loaded discussion when it comes to compiz) will accept it?

Being an upstream maintainer of Compiz, I would absolutely love to accept the patch. However, somehow Compiz falls under the CLA and we are still trying to get Nvidia (who provided the patch) to agree to it. Trust me when I say there have been ongoing discussions to get this in. We are dealing with glacial process of legalities *sigh*

Well, we finally have an agreement in place with Nvidia for get their patch into Compiz trunk. Since this bug is really caused by what's in bug #269904, I'm going to dup this bug to that one. I'll comment in that bug as necessary.

Szilárd Páll (sin-pecado) wrote :

I'm using 346.47 and I get this all the ~@$#%^ time, so do a number of my colleagues in the office all using Trusty. It's getting really irritating and as the fix has been out for a year I wonder if this is going to be fixed anytime soon?

Szilárd Páll (sin-pecado) wrote :

Sorry folks, browsing through the 144 comments on this page I did not realize that compiz 1:0.9.11.3+14.04.20150313-0ubuntu1 should in theory have a fix for this bug. I'm still having issues, especially LibreOffice menus don't refresh or start flickering, but sometimes it's the Unity dash that flickers until I press super and other times the issue gets triggered while dragging a window from one space to the other while in 'show workspaces' mode. Should I file a new report?

Hi Szilárd Páll,

Yes, please file a new bug using 'ubuntu-bug compiz'. I'll keep an eye out for the new bug and we can go from there.

Displaying first 40 and last 40 comments. View all 147 comments or add a comment.