Bug 503156

Summary: qemu VNC :: xterm inside VM shows garbled text
Product: [Fedora] Fedora Reporter: Stefan Assmann <sassmann>
Component: qemuAssignee: Glauber Costa <gcosta>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: high    
Version: 11CC: berrange, crobinso, dwmw2, gcosta, hbrock, itamar, jonathan.underwood, markmc, mikey, mk, patmans, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.10.6-9.fc11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-11-04 12:11:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 480594    
Attachments:
Description Flags
garbled-xterm.png
none
Windows XP guest with grabled screen none

Description Stefan Assmann 2009-05-29 10:30:34 UTC
Description of problem:
after for example catting a large file inside an xterm there are text artifacts remaining inside the xterm window. Scrolling up and down the xterm makes things even worse.

Not sure if it's related to window scaling, please reassign appropriately if not a virt-manager bug.

Screenshot attached

Version-Release number of selected component (if applicable):
virt-manager-0.7.0-5.fc11.i586

How reproducible:
always

Steps to Reproduce:
1. start VM
2. open xterm inside VM
3. cat large file (/var/log/messages) and scroll to make things worse
  
Actual results:
text appears garbled

Expected results:
text appears normal without artifacts

Additional info:

Comment 1 Stefan Assmann 2009-05-29 10:31:13 UTC
Created attachment 345887 [details]
garbled-xterm.png

Comment 2 Mark McLoughlin 2009-06-04 17:09:33 UTC
Yeah, I can reproduce this, even with vncviewer - doesn't seem reproducible outside of KVM, though

Moving to qemu

Comment 3 Bug Zapper 2009-06-09 16:46:18 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 4 Mark McLoughlin 2009-06-23 16:04:26 UTC
bug #507626 is probably a dup of this

Comment 5 Jonathan Underwood 2009-07-10 14:51:51 UTC
Similar bug report for Ubuntu:

https://bugs.launchpad.net/qemu/+bug/397212

Comment 6 Mark McLoughlin 2009-07-20 08:42:27 UTC
Glauber posted a patch here:

http://lists.gnu.org/archive/html/qemu-devel/2009-07/msg01498.html

Comment 7 Mark McLoughlin 2009-07-20 08:43:13 UTC
*** Bug 507626 has been marked as a duplicate of this bug. ***

Comment 8 Jonathan Underwood 2009-07-22 15:38:43 UTC
Glauber, do you plan to push updated builds with this patch for F-11? I don't see this patch incorporated on any of the recent koji builds..?

Comment 9 Glauber Costa 2009-07-22 18:24:28 UTC
The patched was NACKed upstream by Gerd. He believes there is a better way to solve it. As such, I indent to wait for the real fix, or write it myself it Gerd takes too long

Comment 10 Jonathan Underwood 2009-07-28 00:27:02 UTC
Gerd has posted an updated patch here:

http://lists.gnu.org/archive/html/qemu-devel/2009-07/msg02107.html

my test machine is down presently, so haven't had chance to test it yet.

Comment 11 Jonathan Underwood 2009-07-28 11:27:58 UTC
Have been playing with this a bit, and unfortunately applying the patch in comment #10 against 0.10.5 requires picking up a fair amount of the recent vnc logic changes (vnc.c and vnc.h) - not sure how you'd recommend proceeding here? One option would be to pull vnc.[c,h] from the current HEAD and add the patch, I suppose.. not sure what else might break.

Comment 12 Mark McLoughlin 2009-08-07 14:47:18 UTC
So, the upstream commit is:

  http://git.savannah.gnu.org/cgit/qemu.git/commit/?id=3e28c9adf4

and it depends on the fix for bug #501131 which we also want back-ported

(Note the vnc copyrect patch isn't applied to the stable-0.11 branch for F-12 yet, either)

What I'd really like to see is both of these fixes back-ported to the stable-0.10 branch and sent upstream to qemu-devel

Comment 13 Mark McLoughlin 2009-09-07 17:36:19 UTC
This should be in the 0.10.7 release shortly:

  http://git.savannah.gnu.org/cgit/qemu.git/commit/?h=stable-0.10&id=74ccfe8b7e

Comment 14 Mark McLoughlin 2009-09-11 11:16:56 UTC
Will push this to updates-testing soon:

* Fri Sep 11 2009 Mark McLoughlin <markmc> - 2:0.10.6-5
- Fix vnc segfault on disconnect (#501131)
- Fix vnc screen corruption with e.g. xterm (#503156)
- Rebase vnc sasl patches on top of these two vnc fixes

Comment 15 Fedora Update System 2009-09-14 07:27:28 UTC
qemu-0.10.6-5.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/qemu-0.10.6-5.fc11

Comment 16 Jonathan Underwood 2009-09-14 11:11:01 UTC
Created attachment 360920 [details]
Windows XP guest with grabled screen

Comment 17 Jonathan Underwood 2009-09-14 11:11:47 UTC
As the image attached in Comment #16 shows, this update doesn't fix the problem for me. This is using:

# rpm -qa | grep qemu
qemu-system-x86-0.10.6-5.fc11.x86_64
qemu-img-0.10.6-5.fc11.x86_64
qemu-common-0.10.6-5.fc11.x86_64

Comment 18 Mark McLoughlin 2009-09-14 11:50:41 UTC
Thanks for testing Jonathan

Comment 19 Jonathan Underwood 2009-09-15 17:38:43 UTC
No problem. Alas, if anything, the screen tearing has gotten worse with this version, rather than better - previously resizing the window in the guest triggered a redraw which would clean up the garbage (at least until scrolled again), but now that trick no longer works.

Comment 20 Mogens Kjaer 2009-09-24 07:50:45 UTC
Why on earth was version 2:qemu-0.10.6-5.fc11.x86_64 released
with this "bugfix" that has made the graphics looks worse?

Comment 21 Jonathan Underwood 2009-09-24 09:15:36 UTC
Good question in Comment #20. Surely that's a mistake Mark?

Comment 22 Mark McLoughlin 2009-10-01 09:20:59 UTC
Sorry about that, guys

This 'fix' will be in 0.10.7, so I'm inclined to leave it in for the moment and try and get it fixed

If we don't get progress, I'll revert it soon

Comment 23 Jonathan Underwood 2009-10-01 11:04:15 UTC
Is it worth pushing a build of the 0.10.7 rc to updates-testing?

Comment 24 Patrick Mansfield 2009-10-09 21:59:50 UTC
Anything new on this bug?

It's been open for 5 months now.

It's realllllyyy annoying, it makes Windows even harder to use :-(

Comment 25 Mark McLoughlin 2009-10-16 13:21:14 UTC
*** Bug 528939 has been marked as a duplicate of this bug. ***

Comment 26 Jonathan Underwood 2009-10-21 16:23:55 UTC
What would the implications of pushing qemu 0.11 to FC11 be - would that work with libvirt and friends? If so, any chance of doing such a push?

Comment 27 Mark McLoughlin 2009-10-21 16:31:18 UTC
We don't have any immediate plans to update qemu in Fedora 11 to 0.11. See:

  http://www.redhat.com/archives/fedora-virt/2009-April/msg00008.html

Honestly, it should be a lot easier to fix this bug than deal with the fallout from the inevitable regressions that would be caused by a re-base. It's just a question of someone finding the time to debug it.

Comment 28 Patrick Mansfield 2009-10-21 16:50:46 UTC
(In reply to comment #27)
> We don't have any immediate plans to update qemu in Fedora 11 to 0.11. See:
> 
>   http://www.redhat.com/archives/fedora-virt/2009-April/msg00008.html
> 
> Honestly, it should be a lot easier to fix this bug than deal with the fallout
> from the inevitable regressions that would be caused by a re-base. It's just a
> question of someone finding the time to debug it.  

Bah ...

Is there some way to workaround this bug?

Is there another way to connect to the output other than VNC?

I've been using virt-manager.

Comment 29 Jonathan Underwood 2009-10-21 20:23:27 UTC
Patrick - you could presumably run a VNC server inside your guest and connect to that, rather than the QEMU vnc client.

The problem with backporting a fix is that there's been a lot of code churn with the vnc related stuff in qemu, so to actually fix it would require some knowledge of the vnc stuff, rather than mechanical adding and removing of commits (I know, as I tried that sometime ago). The people with that knowledge are too busy pushing forward than looking back at old releases (understandably - it's more interesting).

Comment 30 Fedora Update System 2009-10-23 13:24:33 UTC
qemu-0.10.6-9.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/qemu-0.10.6-9.fc11

Comment 31 Mark McLoughlin 2009-10-23 13:28:11 UTC
Patrick and Jonathan: okay, let's try and hit this bad boy with our big stick

I'm pretty sure it's a problem with qemu's implementation of the CopyRect extension, so I've just disabled that extension in qemu-0.10.6-9.fc11 - that should fix the problem

AFAIK, CopyRect works fine in qemu-0.11.0 in Fedora 12

Could you confirm that qemu-0.10.6-9.fc11 fixes the issue? (comment here and bump the karma in bodhi if so)

Thanks!

* Fri Oct 23 2009 Mark McLoughlin <markmc> - 2:0.10.6-9
- Disable the vnc CopyRect encoding since it's still broken (#503156)

Comment 32 Jonathan Underwood 2009-10-23 14:41:33 UTC
Mark: qemu-0.10.6-9.fc11 does indeed fix the issue for me. Thanks very much for taking the time to look at this.

Comment 33 Patrick Mansfield 2009-10-23 17:05:56 UTC
(In reply to comment #32)
> Mark: qemu-0.10.6-9.fc11 does indeed fix the issue for me. Thanks very much for
> taking the time to look at this.  

Me too, thanks!

I commented on the web page (showed up as anonymous), but how do I bump bodhi karma?

Comment 34 Fedora Update System 2009-10-27 06:40:46 UTC
qemu-0.10.6-9.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update qemu'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-10754

Comment 35 Fedora Update System 2009-11-04 12:11:38 UTC
qemu-0.10.6-9.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.