Ubuntu

text corruption in terminals (xterm, urxvt) and emacs

Reported by James Hunt on 2011-09-28
218
This bug affects 44 people
Affects Status Importance Assigned to Milestone
Compiz
Undecided
Unassigned
Compiz Core
Undecided
Unassigned
compiz (Ubuntu)
Undecided
Unassigned
nvidia-graphics-drivers (Ubuntu)
Undecided
Unassigned

Bug Description

Using tmux with urxvt results in frequent screen corruption.

I am running tmux as "tmux -2" to enable 256 colour mode and my .tmux.conf contains:

set-option -g default-terminal "screen-256color"

... to enable 256 colours for apps running inside tmux. When corruption occurs, neither clearing the screen with "clear" or "tput clear" helps. What does seem to help is switching to another tmux window and back to the problematic one.

This configuration used to work fine in natty.
---
.proc.driver.nvidia.gpus.0: Error: [Errno 21] Is a directory: '/proc/driver/nvidia/gpus/0'
.proc.driver.nvidia.registry: Binary: ""
.proc.driver.nvidia.version:
 NVRM version: NVIDIA UNIX x86 Kernel Module 280.13 Wed Jul 27 16:55:43 PDT 2011
 GCC version: gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)
.tmp.unity.support.test.0:

ApportVersion: 1.23-0ubuntu4
Architecture: i386
CompizPlugins: [core,bailer,detection,composite,opengl,decor,mousepoll,vpswitch,regex,animation,snap,expo,move,compiztoolbox,place,grid,imgpng,gnomecompat,wall,ezoom,workarounds,resize,fade,unitymtgrabhandles,scale,session,unityshell]
CompositorRunning: compiz
DistUpgraded: Log time: 2011-09-25 10:58:52.659181
DistroCodename: oneiric
DistroRelease: Ubuntu 11.10
DistroVariant: ubuntu
GraphicsCard:
 nVidia Corporation GT218 [NVS 3100M] [10de:0a6c] (rev a2) (prog-if 00 [VGA controller])
   Subsystem: Lenovo ThinkPad T410 [17aa:2142]
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release i386 (20101007)
JockeyStatus:
 xorg:nvidia_current - NVIDIA accelerated graphics driver (Proprietary, Enabled, In use)
 xorg:nvidia_current_updates - NVIDIA accelerated graphics driver (post-release updates) (Proprietary, Disabled, Not in use)
MachineType: LENOVO 2516CTO
NonfreeKernelModules: nvidia
Package: unity 4.24.0-0ubuntu2b1
PackageArchitecture: i386
PlymouthDebug: Error: [Errno 13] Permission denied: '/var/log/plymouth-debug.log'
ProcEnviron:
 PATH=(custom, user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.0.0-12-generic-pae root=UUID=7ad192e9-7b26-49d1-8e1c-fefc7dc495cb ro acpi_sleep=nonvs quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic-pae 3.0.4
Tags: oneiric running-unity ubuntu compiz-0.9 oneiric running-unity oneiric running-unity oneiric running-unity ubuntu compiz-0.9
Uname: Linux 3.0.0-12-generic-pae i686
UpgradeStatus: Upgraded to oneiric on 2011-09-25 (43 days ago)
UserGroups: adm admin cdrom dialout libvirtd lpadmin plugdev sambashare sbuild
dmi.bios.date: 08/27/2010
dmi.bios.vendor: LENOVO
dmi.bios.version: 6IET72WW (1.32 )
dmi.board.name: 2516CTO
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvr6IET72WW(1.32):bd08/27/2010:svnLENOVO:pn2516CTO:pvrThinkPadT410:rvnLENOVO:rn2516CTO:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 2516CTO
dmi.product.version: ThinkPad T410
dmi.sys.vendor: LENOVO
version.compiz: compiz 1:0.9.6+bzr20110929-0ubuntu5
version.libdrm2: libdrm2 2.4.26-1ubuntu1
version.libgl1-mesa-dri: libgl1-mesa-dri 7.11-0ubuntu3
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 7.11-0ubuntu3
version.nvidia-graphics-drivers: nvidia-graphics-drivers N/A
version.xserver-xorg: xserver-xorg 1:7.6+7ubuntu7
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.6.0-1ubuntu13
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:6.14.99~git20110811.g93fc084-0ubuntu1
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.15.901-1ubuntu2
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:0.0.16+git20110411+8378443-1

James Hunt (jamesodhunt) wrote :

Problem is similar to the now fixed Debian bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=550701

James Hunt (jamesodhunt) wrote :

Another oddity I've noticed is that when reading man pages, highlighted text (for example text you search for ( '/' + <search term>) no longer displays as inverse video - it shows in italic. This is rather cool, but very difficult to see as it doesn't stand out as much as inverse video.

A temporary work-around for the corruption problem for me was to change my .tmux.conf to set:

  set-option -g default-terminal "xterm"

James Hunt (jamesodhunt) wrote :

Correction - setting TERM=xterm only works *most* of the time.

James Hunt (jamesodhunt) wrote :

I'm starting to wonder if this is actually a unity issue as I've just seen similar corruption with emacs23 running graphically.

Changed in tmux (Ubuntu):
importance: Undecided → Medium
James Hunt (jamesodhunt) wrote :

I've tried the latest version of tmux in debian, but this suffers from the same problem when running as "tmux -2" and setting TERM=xterm via 'set-option -g default-terminal "xterm"'.

I've also now seen the problem with a plain urxvt terminal *and* a plain xterm (both with TERM=xterm) suggesting the problem is with the terminfo database.

James Hunt (jamesodhunt) wrote :

The plot thickens... I just noticed that when I see the problem, clicking the terminals title bar and moving the terminal restores the images. Hence, it can't be terminfo. Finger is now pointing at X11/compiz/unity.

I'm running Unity 3D with the propriatary nvidia drivers (yeah, I know... :-) :

$ lspci | grep -i nvidia
01:00.0 VGA compatible controller: nVidia Corporation GT218 [NVS 3100M] (rev a2)
01:00.1 Audio device: nVidia Corporation High Definition Audio Controller (rev a1)
$ dpkg -l | grep nvidia
ii nvidia-common 1:0.2.35 Find obsolete NVIDIA drivers
ii nvidia-current 280.13-0ubuntu5 NVIDIA binary Xorg driver, kernel module and VDPAU library
ii nvidia-settings 280.13-0ubuntu2 Tool of configuring the NVIDIA graphics driver
$

James Hunt (jamesodhunt) on 2011-10-03
affects: ncurses (Ubuntu) → unity (Ubuntu)

For non-interactive commands, I've noticed that ensuring the commands produce an extra newline *appears* to make the problem go away. So, "ls -alt" may result in corruption, but "ls -alt;echo" won't.

summary: - screen corruption using tmux and urxvt
+ terminal and emacs screen corruption
James Hunt (jamesodhunt) on 2011-10-04
summary: - terminal and emacs screen corruption
+ text corruption in terminals (xterm, urxvt) and emacs
James Hunt (jamesodhunt) wrote :

Wondering if this is an X11 problem?

James Hunt (jamesodhunt) wrote :

I've been running metacity for a few hours now and have not seen the problem yet. This does suggest unity might be involved in this bug.

James Hunt (jamesodhunt) wrote :

Right - I am not 90% convinced this is a unity bug. As soon as I switched back to Unity 3d, the problem returns.

James Hunt (jamesodhunt) on 2011-10-12
affects: tmux (Ubuntu) → ubuntu
James Hunt (jamesodhunt) wrote :

This project is no longer relevant.

affects: ubuntu → tmux (Ubuntu)
Changed in tmux (Ubuntu):
status: New → Invalid
James Hunt (jamesodhunt) wrote :

To be clear this bug does not affect tmux IMHO, but seemingly you cannot remove a project in LP once you've added it.

James Hunt (jamesodhunt) wrote :

This problem also affects the default ubuntu terminal - gnome-terminal.

Changed in xorg (Ubuntu):
status: New → Invalid
James Hunt (jamesodhunt) on 2011-10-17
affects: tmux (Ubuntu) → ubuntu
James Hunt (jamesodhunt) wrote :

Tested with metacity ("metacity --replace") configured as the compositing manager ("gconf-editor /apps/metacity/general" and checking compositing_manager).

In a plain gnome-terminal, I'm still seeing the problem when recalling command-line history ("ctrl+r" and start typing). The corruption however disappears when the window size is changed, for example when maximising it.

Neil J. Patel (njpatel) wrote :

This seems like a damage event issue (as it's also affecting metacity composited, not just compiz). It might be a bug in X if it's affecting more than one app?

James Hunt (jamesodhunt) wrote :

Just seen the problem in gvim too.

Changed in xorg (Ubuntu):
status: Invalid → New
assignee: nobody → Ubuntu-X (ubuntu-x-swat)
tags: added: regression-release
Barry Warsaw (barry) wrote :

Never seen this running Emacs on Unity 2D on ATI hardware.

Bryce Harrington (bryce) on 2011-10-28
Changed in xorg (Ubuntu):
assignee: Ubuntu-X (ubuntu-x-swat) → nobody
Bryce Harrington (bryce) wrote :

When you file bugs against xorg, please always include your kernel and X logs, photo examples, and other relevant information. The command:

  apport-collect 861268

should help gather this information. The photos you'll need to take manually (generally X corruption at the driver level doesn't show up in screenshots.) Since you're using the nvidia driver, that seems a more likely culprit than X itself; nvidia replaces pretty much all of X's rendering stack with its own stuff.

affects: xorg (Ubuntu) → nvidia-graphics-drivers (Ubuntu)
Changed in nvidia-graphics-drivers (Ubuntu):
status: New → Incomplete
James Hunt (jamesodhunt) wrote :

After switching to the Nouveau drivers, I am *still* seeing the problem (in irssi with tmux + urxvt).

James Hunt (jamesodhunt) wrote :
James Hunt (jamesodhunt) wrote :

To make the corruption disappear, all I did was click the window maximize button twice, forcing an X redraw.

Notice that in the corrupted image, there is a strange, aside from the obviously missing text both above *and* below the cursor position, there is an odd artifact showing just to the right of the centre of that window.

If anyone could offer an explanation / fix, I'd much appreciate it :)

James Hunt (jamesodhunt) wrote :

Note that the images in #20 and #21 were with the proprietary nvidia driver.

apport information

tags: added: apport-collected compiz-0.9 oneiric running-unity 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

apport information

apport information

apport information

apport information

apport information

James Hunt (jamesodhunt) on 2011-11-08
Changed in ubuntu:
status: Invalid → New
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu:
status: New → Confirmed
Changed in unity (Ubuntu):
status: New → Confirmed
Mark Wickham (mark-wickham) wrote :

I've seen this problem in Kubuntu with xterms in kde4 just doing ls in a fairly full directory (25 lines of ls output in 4 columns). I'm using Noveau drivers too. My xterm background is white.

Sometimes the text in the top few rows is just gone, and the lost area appears to be a rectangular block below the previous prompt. Sometimes some lower bit of the last missing row is still there.

If I scroll again, the lines are fixed, or if I select the area, the correct text appears and remains visible after the selection goes away.

I did not see this issue on natty.

John Ferlito (johnf-inodes) wrote :

LP#890903 looks like the same issue.

James Hunt (jamesodhunt) wrote :

Switching to "Unity 2D" (*) seems to solve the problem for me. Can anyone else comment on their experiences?

(*) - To switch to Unity 2D, click the "gear" icon by your name on the lightdm display manager and select "Unity 2D". If there is no entry for "Unity 2D":

1) Login
2) Open a terminal
3) Type, "sudo apt-get install unity-2d"
4) Logout

Didier Roche (didrocks) on 2011-11-22
Changed in unity:
status: New → Confirmed
Gary Bishop (gb-cs) wrote :

I see this same problem on with Oneiric on a Dell e6500 laptop with nVidia Quadro NVS 160M1 graphics. I had no problems in Natty. It goes away with Unity 2D. It renders terminal and emacs almost unusable.

douglasr (douglas-reith) wrote :

My dev setup:
nvidia drivers
ubuntu 11.10 64bit
xterm
vim

I've tried two possible solutions mentioned here:
http://lists.clug.org.za/pipermail/clug-tech/2011-June/045329.html

Which are:
CCSM -> Workarounds -> Fix screen updated in XGL with fglrx
CCSM -> Workarounds -> Force synchronization between X and GLX

But these didn't work for me.

I do find that if I turn off syntax colors in vim the problem seems to go away (or at least the probability of it occurring is so low I haven't yet seen it).

alt-tab then escape is a way to redraw the xterm screen as well.

I can't seem to turn on unity-2d as in James' instructions. unity-2d is installed but not option in the gears menu (I haven't hunted for an alternate way to turn it on as yet).

It'd be great if someone has another workaround that doesn't involve turning off syntax highlighting.

Adding another image attachment example with areas that are lost highlighted in case more evidence helps...

Thanks.

douglasr (douglas-reith) wrote :

> "I do find that if I turn off syntax colors in vim the problem seems to go away"

Sorry, scratch that, I'm getting the problem a bit at the moment with syntax highlighting off.

Toby Murray (tobycmurray) wrote :

I also see this problem with Unity. However, I have yet to see it manifest with unity-2d. Using the 'nvidia' Xorg driver in both cases.

Kelly Doran (rakiner) wrote :

I have also been having this bug. I have tried quite a few things to narrow it down but I could not find anything too definitive.

Basically, to reproduce it, I just go into a big php file and search for a string that will cause vim to jump around the file a lot. Every once in a while, when it should be redrawing the screen (I think...) is when this bug occurs and there will be text corruption. I have reproduced this in both xterm and gnome-terminal, so I don't think it is a problem with any specific terminal.

Also, the actual corruption that occurs is different with each terminal. In gnome-terminal it will just show the same text as before the search jumped around the file, but the cursor and half the character after it will be changed to what should be displayed. Moving the cursor up and down will fix stuff line by line. Xterm on the other hand will jump to the correct location and redraw most of the screen, however chunks of text will simply be completely missing (see attachment).

I did a few tests with xterm to try to further pin down what was causing it to fail and I think the main problem was the font. I tried using the default xterm font and color scheme and everything seemed to work fine. After changing the color scheme to the gnome-terminal scheme that ships with ubuntu, it was also running fine. However once I changed the font to Ubuntu Mono, size 13, the text corruption started. So either I was just getting really lucky or the errors were extremely rare using the normal font, or the change in font is somehow related to this bug.

And finally, I am able to completely get rid of this bug by switching from unity to unity 2d. I am using 11.10 with pretty much all default settings and the default nvidia driver. Hope this helps, please let me know if you guys need any more info!

Bruno Haible (bruno-clisp) wrote :

Comment #53 is also reproducible for me, on openSUSE 12.1 with KDE 4 and an ATI Radeon card and driver.
Run xterm, "ls -l" of a large directory, scroll back a couple of times, and you see
some lines missing.

The workaround:
KDE control center -> Desktop effects -> Advanced -> Compositing type.
Set the value to Xrender instead of OpenGL.
The setting is stored in $HOME/.kde4/share/config/kwinrc.

douglasr (douglas-reith) wrote :

For me, to switch to Unity-2D (as there is no option in the gears icon when logged in):
* log out
* gear icon: change session to Unity-2d
* log in

And if you need to configure Unity-2d:
http://marianochavero.wordpress.com/2011/10/14/unity-2d-settings-ui-for-ubuntu-11-10-oneiric-ocelot/

I'm seeing something that sounds similar to this (I think), but I'm not using Unity at all. Using Xorg, xdm and fvwm and periodically I get black and white blocks of corruption all over the screen. Forcing a redraw fixes *most* of the blocks, but not all.

It *seems* that if the system is busy with I/O that makes the problem more likely to show up. It almost looks like Is there an overlap of data buffers with the framebuffer!

Bryce Harrington (bryce) on 2012-02-04
Changed in nvidia-graphics-drivers (Ubuntu):
status: Incomplete → Confirmed
Tim (tim-launchpad-o) wrote :

I reported #894083 but I think it's a duplicate of this.

I find turning off compiz, or setting 'compiz>general>force full screen redraws' works around this issue, but they're neither ideal.

'Fix screen updates in XGL with fglrx' significantly reduces the frequency with which I experience this, but doesn't resolve it.

Tim (tim-launchpad-o) wrote :

Also, if it's in the nvidea driver then it's also in radeon: I have radeon, and I'm seeing it.

Shouldn't this bug have compiz listed as an affected project?

James Hunt (jamesodhunt) wrote :

I tried switching back to unity 3D this morning and haven't seen the problem whilst using vim, gvim, urxvt and Emacs (all with "Ubuntu Mono" font) extensively. I am running an up-to-date 12.04 system.

Package details:

$ dpkg -l|egrep "^ii *(nvidia|\<unity-|libunity|ttf-ubuntu-font-family)"|sort|awk '{printf "%s : %s\n", $2, $3}'
libunity-2d-private0 : 5.4.0-0ubuntu1
libunity9 : 5.4.0-0ubuntu1
libunity-core-5.0-5 : 5.4.0-0ubuntu2
libunity-misc4 : 4.0.4-0ubuntu2
nvidia-common : 1:0.2.39
nvidia-current : 295.20-0ubuntu1
nvidia-settings : 295.20-0ubuntu1
ttf-ubuntu-font-family : 0.80-0ubuntu1+console
unity-2d : 5.4.0-0ubuntu1
unity-2d-panel : 5.4.0-0ubuntu1
unity-2d-shell : 5.4.0-0ubuntu1
unity-2d-spread : 5.4.0-0ubuntu1
unity-asset-pool : 0.8.23-0ubuntu1
unity-common : 5.4.0-0ubuntu2
unity-greeter : 0.2.4-0ubuntu1
unity-lens-applications : 5.4.0-0ubuntu2
unity-lens-files : 5.4.0-0ubuntu1
unity-lens-music : 5.4.0-0ubuntu1
unity-lens-video : 0.3-0ubuntu1
unity-scope-musicstores : 5.4.0-0ubuntu1
unity-scope-video-remote : 0.3-0ubuntu1
unity-services : 5.4.0-0ubuntu2

I've had this problem for months. I'm not using Unity, though it is installed.

chris@chris-m1730 ~$ dpkg -l|egrep "^ii *(nvidia|\<unity-|libunity|ttf-ubuntu-font-family)"|sort|awk '{printf "%s : %s\n", $2, $3}'
libunity-2d-private0 : 5.10.0-0ubuntu1
libunity4 : 3.8.4-0ubuntu2
libunity9 : 5.10.0-0ubuntu1
libunity-core-5.0-5 : 5.10.0-0ubuntu2
libunity-misc0 : 0.2.1-0ubuntu2
libunity-misc4 : 4.0.4-0ubuntu2
nvidia-common : 1:0.2.44
nvidia-current : 295.40-0ubuntu1+xedgers~precise1
nvidia-settings : 295.33-0ubuntu1
nvidia-settings-updates : 295.33-0ubuntu1
ttf-ubuntu-font-family : 0.80-0ubuntu2
unity-2d : 5.10.0-0ubuntu1
unity-2d-common : 5.10.0-0ubuntu1
unity-2d-launcher : 5.10.0-0ubuntu1
unity-2d-panel : 5.10.0-0ubuntu1
unity-2d-places : 5.10.0-0ubuntu1
unity-2d-shell : 5.10.0-0ubuntu1
unity-2d-spread : 5.10.0-0ubuntu1
unity-asset-pool : 0.8.23-0ubuntu1
unity-common : 5.10.0-0ubuntu2
unity-greeter : 0.2.7-0ubuntu2
unity-lens-applications : 5.10.0-0ubuntu1
unity-lens-files : 5.10.0-0ubuntu1
unity-lens-music : 5.10.0-0ubuntu1
unity-lens-video : 0.3.5-0ubuntu1
unity-place-applications : 5.10.0-0ubuntu1
unity-place-files : 5.10.0-0ubuntu1
unity-scope-musicstores : 5.10.0-0ubuntu1
unity-scope-video-remote : 0.3.5-0ubuntu2
unity-services : 5.10.0-0ubuntu2

Juha Aatrokoski (jha-kurp) wrote :

I have this bug on Gentoo, running xterm under compiz, Radeon card with gallium drivers. Before hardware upgrade the system had nVidia card with nVidia's proprietary drivers, software otherwise the same, and it did not have this bug.

When I have time I plan to try upgrading to Gentoo's unstable versions of mesa etc. to see if they will fix the bug, but for now I use the workaround of (re)starting compiz with the "--indirect-rendering" option, which seems to get rid of the symptoms. Other people here might want to test if it works for them also.

When this gets really bad and it's impossible to use Emacs, I've found that ALT-F2 (to pull up the "Please enter a command:" prompt), type r (to restart gnome-shell) fixes the problem temporarily.

affects: unity → compiz
affects: unity (Ubuntu) → compiz (Ubuntu)
affects: compiz → compiz-core
no longer affects: ubuntu
Changed in compiz:
status: New → Confirmed
Ryan Tandy (rtandy) wrote :

I'm experiencing this issue (or something _very_ similar) in urxvt under gnome-shell with nvidia-current 302.17-0ubuntu1~precise~xup2, whereas I never noticed it when I was using Unity. I don't have compositing or transparency enabled in urxvt. I don't recall seeing this issue with gnome-terminal; I'm going to switch to that for a few days and see whether it happens.

Ryan Tandy (rtandy) wrote :

That didn't take long. Less than half an hour and I've already had the same thing in gnome-terminal.

Krister (thekswenson) wrote :

I continue to see this issue in gnome-terminal even when using unity 2d.
I'm using the nvidia-current 295.40-0ubuntu1.1 driver.

Ryan Tandy (rtandy) wrote :

Please ignore my comments above; my issue is actually #888666. Apologies for the noise.

Steve Isaacson (stevei) wrote :

This bug makes using a command-line shell from an xterm window extremely annoying. So annoying that I'm considering switching distributions.

Steve Isaacson (stevei) wrote :

The attached screen shot shows two views of the same window. The one in the foreground shows the problems.

How to duplicate the problem.

1. Click on XTERM on the menu bar to open a new xterm window
2. Hold down the Enter key for 20 lines or so. That's what you see: the prompt disappears and the vertical white 'line' appears
3. Click out of the window to another window and the window is redrawn correctly (i.e., the prompts re-appear).

The problem (i.e., display corruption) occurs at various other times as well and comes close to rendering the program unusable.

Note: to capture the screen shot of the problem I used the "Take Screenshot" program and set the "Grab after a delay" setting to 10 seconds, clicked in the window, then held the Enter key down for a few seconds.

Hans Nieser (hnsr) wrote :

I'm afraid switching distributions might not help since this is happening on Gentoo as well. The corruption is less pervasive in gnome-terminal, and that's what I've been using for now, but it happens in a number of other applications (like gvim) as well (but in many others it doesn't). I am sort of managing by forcing a redraw by just scrolling the terminal or the text buffer in gvim a bit when it happens, but it's still pretty annoying. Sadly it's been well over a year since this bug appeared so I'm not holding my breath for this to get fixed

Juha Aatrokoski (jha-kurp) wrote :

Just this Friday I got around to testing compiz 0.9.8.6 on Gentoo (mesa upgrades did not help), and it fixes this bug for me. Unfortunately 0.9.8 on Gentoo has issues with several plugins not working correctly (e.g. place windows not working at all, all windows open at top left corner), so I'll have to revert to 0.8.8 as it works correctly with the indirect rendering option (which 0.9.8 no longer appears to have).

BTW, this is what I use after login to check whether the bug has gone away. I have xterm with white background and visual bell, and a fast(ish) key repeat rate. I open xterm and hold a key to produce ~20 characters. then I hold the left key to go to the start of the line and the visual bell flashes the background black a couple of times. Then I hold the right key to go to the end of the line, and it is on this return trip that the block cursor leaves black boxes on some of the characters.

Øyvind Stegard (oyvinst) wrote :

Perhaps what I'm seeing in bug 1077639 is a duplicate of this bug ? Text rendering issues have been present for me in both Ubuntu 12.04 and now in Ubuntu 12.10 using nvidia drivers. Emacs is the worst affected of all applications I use regularly. There are also some occasional glitches in gnome-terminal. Video demonstrating problem here: http://www.youtube.com/watch?v=VWh4kEecVsQ

Chris Gray (cg-graysage) wrote :

This bug was affecting me as well. Bruno Haible's workaround (switch Compositing to XRender) seems to have worked for me. I was seeing the effect in simple "ls -a" (which doesn't scroll) in xterm, as well as in emacs running in an xterm.

I'm running Kubuntu 12.04, fully uptodate.

3.2.0-37-generic
AMD FX-8150
using onboard graphics (Radeon), but not the proprietary AMD driver (it has a glitch with respect to xrandr)

Don't really know what other info might be needed. My thanks to Bruno, however!

Margarita Manterola (marga-9) wrote :

This problem is reproducible with programs that link against libtinfo (from ncurses), like gnome-terminal, xterm or gvim, but it is not reproducible with programs that don't, like konsole.

It's assigned here to compiz, probably because changing some compiz settings makes it sometimes go away, or because it's been reported that newer versions of compiz fix this issue. However, I can reproduce it in cinnamon, and it's been reported to be reproducible in KDE, so it's likely not really compiz's fault.

My guess is that it is an issue in the interaction of ncurses with an OpenGL composite window manager (be it compiz, mutter, or whatever KDE uses).

I can reproduce with nvidia cards, and people have been reproducing it with radeon cards, so it also looks like it's not a specific xdriver issue.

Robert Iannucci (robbie-9) wrote :

I can also confirm that I see this on ubuntu precise w/ cinnamon (non-2D) (so, I think compiz is a red herring).

The effect is especially pronounced when scrolling in vim in gnome-terminal.

LMK if there's any other debugging info I can provide.

Alec Warner (antarus) wrote :

Man I hate launchpad.

is this https://bugzilla.gnome.org/show_bug.cgi?id=664858?

-A

no longer affects: ubuntu-gnome
Margarita Manterola (marga-9) wrote :

Hi,

In our team, we've been doing some testing through the plugin that shows compiz redraws. The main result that our testing got was that compiz *is redrawing* the window when the bug occurs. This means that compiz is getting the "redraw" signal correctly, but when it redraws, the buffer still contains the old or partially old content. Doing any change in the environment but not the content, like moving the window affected, triggers another redraw and this time with the right content.

We also found that unaffected programs, like terminator or konsole, do more redraws. So it's possible that the first redraw is corrupted (it flashes way too fast to tell) but then the second one is not corrupted.

Current working hypothesis:
Certain programs (gnome-terminal, gvim, xterm) when being used in a compositing environment send the "please redraw" signal before they have finished drawing to their buffer and so the compositing window manager draws a partially/totally corrupted screen.

We've found that we can reproduce this bug with 1 or 2 monitors, running under several different environments (unity, gnome, cinnamon), in our case always with nVidia cards.

When using Unity, the current workaround is to enable "Force full screen redraws (buffer swap) on repaint" through ccsm. When using cinnamon we've tried the workaround listed in the previous post (CLUTTER_PAINT=disable-clipped-redraws:disable-culling <command>) helps but doesn't solve it 100%.

Margarita Manterola (marga-9) wrote :

Small extra piece of info. I haven't been able to reproduce the bug in a freshly installed Ubuntu machine running Unity, although I can reproduce it inside cinnamon. However, I'm currently seeing the bug under Unity (not a freshly installed machine). So I'm thinking that there's some setting that differs from the default installation that causes this. I'm trying to track this setting down.

Margarita Manterola (marga-9) wrote :

After a few more hours chasing this bug, I was able to trigger it under my freshly installed ubuntu running unity by disabling the sync to vblank option in the OpenGL compiz plugin.

In my opinion, that option makes redrawings happen a little bit later (because they have to sync to vblank) and thus it makes it less likely that the bug would trigger. However, it's enabled in my other faulty installation, and I still get the bug, so I strongly believe that whatever introduces delays in the redraws makes the bug less likely but it's not really fixing anything. And there are other issues that might make the bug more likely (which I haven't yet found).

The best reproduction case I've found is to run a weechat session inside a tmux inside an ssh session in gnome-terminal, and scrolling up and down the content of this weechat log. When the setup is in the 'quite likely' state for reproducing the bug, it will happen within 2 or 3 minutes of scrolling up and down. When it's less likely, it can take a while until it happens.

MC Return (mc-return) on 2013-06-28
Changed in compiz:
milestone: none → 0.9.10.0
Chris J Arges (arges) wrote :

This bug is easily reproducible using nvidia-binary drivers (even the latest experimental) on Saucy/Precise; however you need to set your nvidia driver into a low performance state. You can use an xorg.conf with the following:
Section "Device"
    Identifier "Device0"
    Driver "nvidia"
    VendorName "NVIDIA Corporation"
    BoardName "Quadro 600"
    Option "RegistryDwords" "PowerMizerEnable=0x1; PowerMizerDefaultAC=0x3"
EndSection

Then I've been able to reproduce simply by opening xterm, and typing dmesg a few times until I see missing text.

To workaround this issue I can use the following setting in CCSM:
CCSM -> Workarounds -> Force full screen redraws (buffer swap) on repaint [force_swap_bufferss]

I've also tested the latest PPA from ppa:smspillaz/compiz-experimental (compiz 1:0.9.10.2-1-experimental1+bzr3747-201306271732~saucy1) and found that the following experiment still produces corruption, but within a second or two it gets rendered properly.

Paul Smith (psmith-gnu) wrote :

According to comments on the gnome bugzilla this is supposed to be (at least partly?) addressed in Gnome 3.8. has anyone tested this? Ever since I upgraded from Ubuntu 12.04, this has been driving me nuts since I do 90% of my work in xterms and with Emacs.

Paul Smith (psmith-gnu) wrote :

I've given up and switched away. There's been no response from anyone about anything related to this bug in months and it's far too painful for me to deal with any longer. If/when someone posts a fix or workaround or something, I'll try it.

Chris J Arges (arges) wrote :

Hi. I've had good luck with the following workaround.
I am using nvidia-binary drivers on Precise mainly, but have tested on Saucy a bit.

- Install compizconfig-settings-manager.
- Run 'ccsm'.
- Goto Utility->Workarounds->Force full screen redraws (buffer swap) on repaint

MC Return (mc-return) on 2013-07-24
Changed in compiz:
milestone: 0.9.10.0 → 0.9.11.0
DiagonalArg (diagonalarg) wrote :

Same issue: Ubuntu 12.04.03 with the nouveau drivers.

Tim O'Brien (timob) wrote :

I am using Ubuntu 12.04. I regularly see this problem in gnome-terminal and gedit. It's really a pain. And the work around (using workarounds in ccsm) does effect the desktop responsiveness.

This is very likely the same race condition as bug #269904.

Ritesh Khadgaray (khadgaray) wrote :

This seems to have been fixed on saucy/trusty.

I don't see any changes that would have fixed it, but it's quite possible that other changes could adjust the timing such that the bug is harder to reproduce.

I've got a Q600 handy, though, so give me a few minutes to load up Saucy onto my test system and I'll check.

Just tested on 13.10, and I can still reproduce the problem. It's less frequent on my system than it did on 12.04, but it still shows up every so often.

Margarita Manterola (marga-9) wrote :

Bug #269904 contains a patch uploaded by Kyle that I have tested under precise and was unable to reproduce the issues.

I think these two bugs should be merged and the patch applied.

--
Cheers,
Marga

Frans Slothouber (rfsber) wrote :

Just some additional info that might help narrowing down the cause.

I see this same effect on a machine running Arch Linux.

On this machine I use urxvt on top of the i3 window manager. (So not Gnome, KDE or Unity).

It happens when text gets scrolled in the terminal window.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.