Screen redrawing problems with the “nvidia” driver and Compiz

Just in case you were experiencing, like me, some very annoying problems with your NVIDIA graphic card while using Compiz, here you have a very useful option to put inside the “Device” section in your /etc/X11/xorg.org file:

Option         "UseCompositeWrapper" "true"

After activating this option (available for nvidia drivers >= 169.xx) I found that the problems redrawing windows I was suffering, specially when scrolling (very annoying, for instance, when chatting through pidging), just dissapeared. And it was indeed a very annoying problem, since it used to happen very often and in almost any window (although not in Emacs ;-)) in my system, in a way so any information on it just got screwed up so it was completely unreadable… and the only “manual” workaround I had found so far was just to re-scroll the window or select the text I was trying to read, which seemed not to be a very good idea.

Needed to say that I started to see this odd behavior since I “downgraded” my Ubuntu 8.10 down to 8.04 last week (because of some very specific needs), and this strange problem never happened when using Intrepid, so if you’re now using that version perhaps you can just throw this post away to the trash, because then it would not useful at all for you.

But just in case, here you are my two cents, and to make them even more useful, here you are the full configuration of my “Device” section in /etc/X11/xorg.conf, which allows me to use a fully accelerated desktop with no problems at all:

Section "Device"
    Identifier     "Videocard0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "Quadro NVS 140M"
    Option         "AllowGLXWithComposite" "true"
    Option         "UseCompositeWrapper" "true"
    Option         "XAANoOffscreenPixmaps"
    Option         "NoLogo" "true"
    Option         "backingstore" "true"
    Option         "TripleBuffer" "true"
    Option         "AddARGBGLXVisuals"  "true"
EndSection

Hope this will be useful for you as well :-).

Update: If you’re still suffering these problems even after adding these lines to xorg.conf, you could try to install the nvidia driver through Envy. These steps worked for me (at the end, the annoying problem appeared again, although not so often than before):

  1. Uninstall any other driver you had installed before (through the ubuntu “restricted drivers” manager, or the .run script downloaded from nvidia.com).
  2. Install Envy: apt-get install envyng-core
  3. Shutdown X and install the nvidia driver from a tty terminal: envyng -t

After following these steps, and the simple instructions on screen, by ubuntu hardy perfectly booted up with the nvidia driver v173.14, which seems not to present the same problem.

Let’s see if these new advice helps you too :-)

10 thoughts on “Screen redrawing problems with the “nvidia” driver and Compiz

  1. shS

    Thank you mario!
    I have NVIDIA Quadro NVS 140M and was struggling with this problem for a while now and your solutions seems to be working (so far no glitches).

    Thank you again.

  2. mario

    > Thank you mario!
    > I have NVIDIA Quadro NVS 140M and was struggling with this
    > problem for a while now and your solutions seems to be
    > working (so far no glitches).
    >
    > Thank you again.

    You’re welcome. By the way, it is quite rewarding to see how a post is really helpful for someone else, so thank you too for let me know about it.

    :-)

  3. shS

    Nope. It seems I still have this problem, but it appears more seldom. CTRL-ALT-F1 and coming back to X solves the problem temporarily.

  4. mario

    Hmmm.. perhaps your problem is different than mine then, since I’ve not experienced it again since that.

    Anyway, all what I know about this nvidia setting is that it’s a temporary workaround for a bigger problem in the driver itself. Let’s hope that newer versions fix the problem (and I think they do, as I had not that problem when I had Ubuntu Intrepid installed)

  5. J.A.

    Thanks!!

    I’m suffering from this bug since months ago. Hope your fix will be solve the problem.

  6. mario

    shS: see my last update about using envy to get the v173 driver easily installed in your system if you’re still experiencing the same problem.

    It worked for me (lately the same problem began to annoy me again)

  7. shS

    mario: I’m running Gentoo, but you say that 173.14 fixes the problem?

    What version particularly? I have .09, .12, .15 and .16 on portage.

  8. mario

    I’m so sorry to tell you, sHs, that no solution tried so far seemed to finally have got rid of the problem completely, as it seems it’s something related to the nvidia driver and compiz, not easy to fix though.

    So, giving up using compiz will fix it but, if you don’t want to do it so, the only thing you can do is a combination of these tips and trying to use the latest “good” driver from nvidia, which so far are versions 173 and 177 (version 180 does not fall into the “good ones” as it get’s more trouble even than the glitches).

    Another thing that also “helps-but-don’t-completely-fix” is to manually manipulate the /usr/bin/compiz shell script to use what they called ‘indirect rendering’. That is, to change the line:

    # No indirect by default
    INDIRECT=”no”

    … into:

    # No indirect by default
    INDIRECT=”yes”

    … in /usr/bin/compiz.

    Hope this helps you somehow while we don’t find the definitive solution :P

  9. marleo

    I’ve only noticed this problem in Firefox (and gecko-based browsers) so far. Going to about:config, changing mousewheel.withnokey.sysnumlines to false and changing mousewheel.withnokey.numlines to a value of 10 or more seems to fix it. Looks like, if enough of the screen changes, it will redraw it properly.

Comments are closed.