Bug 46458 - Guest screen is corrupted after host screen locked
Summary: Guest screen is corrupted after host screen locked
Status: RESOLVED WONTFIX
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: 8.0
Hardware: x86 (IA32) Linux (All)
: high major
Assignee: Jakob Bornecrantz
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-22 06:24 UTC by Viktor Ostashevskyi
Modified: 2012-04-05 06:15 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Xorg screen, xatracker enable driver is used; before host screen lock (30.92 KB, image/png)
2012-02-24 00:48 UTC, Viktor Ostashevskyi
Details
02: Switch from Xorg to VT; before host screen lock (24.20 KB, image/png)
2012-02-24 00:50 UTC, Viktor Ostashevskyi
Details
03: VT after host screen-lock. (647.32 KB, image/png)
2012-02-24 00:51 UTC, Viktor Ostashevskyi
Details

Description Viktor Ostashevskyi 2012-02-22 06:24:59 UTC
I'm running Gentoo Linux under VMware Player 4.0.2 build-591240 on Windows XP.

Guest is running:

kernel 3.2.5 (provides vmwgfx 2.3.0.0)
mesa-8.0 (build with gallium and xatracker enabled)
xf86-video-vmware from today git (so I got xatracker-based driver)
xorg-server-1.11.4

Everything works perfectly and I'm able to get accelerated OpenGL.

However, if I lock host screen (Win+L) and unlock it, I got guest screen corrupted and unusable.

I've checked following situations:

1) vmwgfx kenel module loaded, Xorg isn't started - works fine
2) vmwgfx kenel module loaded with enable_fbdev, Xorg isn't started - works fine
3) vmwgfx kenel module loaded, Xorg is working and is on screen - FAIL
4) vmwgfx kenel module loaded, Xorg is working and VT on screen - FAIL
5) vmwgfx kenel module loaded with enable_fbdev, Xorg is working and is on screen - FAIL
6) vmwgfx kenel module loaded with enable_fbdev, Xorg is working and VT on screen - FAIL

So for me look like something isn't reinitialized correctly in xorg driver after host screen is unlocked.

Only possible way to fix screen corruption is to shutdown/kill X server. VT is redrawn correctly in few seconds.

I'll be glad to provide any other information/backtraces/debug outputs if needed.
Comment 1 Jakob Bornecrantz 2012-02-22 17:35:08 UTC
This is a known bug and is in the host. The problem is that the host discards the guest screen contents when the window is hidden, and has no way to tell the guest to redraw it.

There is one thing that is a bit weird, the fact that it works "enable_fbdev" (2), are you sure that fbcon is running? Is the guest window size 800x600 or is the VGA mode as seen in (1)?

Cheers, Jakob.
Comment 2 Viktor Ostashevskyi 2012-02-22 23:46:47 UTC
From what you're saying looks like there is no way to fix this. Is it possible to add some kind of workaround? For example, switching to/from VT should force full screen redraw.

In my company I must lock screen when I leave my workplace; this issue makes 3D-acceleration unusable for me.
Comment 3 Viktor Ostashevskyi 2012-02-22 23:55:13 UTC
I've just retested case 2 (vmwgfx kenel module loaded with enable_fbdev, Xorg isn't started - works fine).

I confirm that fbcon is loaded, and console is switched to graphics mode:

Console: switching to colour frame buffer device 100x37


And yes, host screen locking doesn't cause any problems.
Comment 4 Jakob Bornecrantz 2012-02-23 06:08:15 UTC
Thanks for retesting (2), its a bit odd tho as it should be broken as well.

Does cases (3-6) work if 3D is disabled, or is it always broken (just need to test one case 5).

One workaround is VT switching the guest from and back to the Xorg session, that should redraw the screen. On linux hosts you need escape the switch sequence with ctrl+alt+space (release only space) then press f1 and then do the same but pressing f7 instead of f1. Might be needed on WinXp hosts not sure.

I hope that helps. Unfortunately host bugs take a lot longer to get to out. I'll try and at least revisit this bug when I have time to spend on it and see if anything can be done, leaving it open for now.

Cheers, Jakob.
Comment 5 Viktor Ostashevskyi 2012-02-23 06:26:21 UTC
Jakob,

Cases 3-6 are always broken.

Switching to VT and back to Xorg doesn't help; this is main problem.

Moreover, VT is also corrupted (even in VGA mode).

I found only two ways to restore guest screen:

1) Restart Xorg (unacceptable :)
2) Suspend/resume virtual machine - takes too much time.

That is why I'm thinking that current xatracker-based xf86-video-vmware should have some workaround like forced full screen redraw on enterVT/leaveVT.
Comment 6 Jakob Bornecrantz 2012-02-23 06:45:42 UTC
(In reply to comment #5)
> Jakob,
> 
> Cases 3-6 are always broken.
> 
> Switching to VT and back to Xorg doesn't help; this is main problem.
> 
> Moreover, VT is also corrupted (even in VGA mode).

VGA mode being broken sounds very bad, can you post a screenshot?

If you interact with the VT does it eventually get better (VGA or fbdev)?

> 
> I found only two ways to restore guest screen:
> 
> 1) Restart Xorg (unacceptable :)
> 2) Suspend/resume virtual machine - takes too much time.

Understandable.

> 
> That is why I'm thinking that current xatracker-based xf86-video-vmware should
> have some workaround like forced full screen redraw on enterVT/leaveVT.

It should do this already if not it that should be fixed. Btw are you running a 3D compositor (like compiz, gnome-shell, kwin)?

Cheers, Jakob.
Comment 7 Viktor Ostashevskyi 2012-02-23 11:54:25 UTC
(In reply to comment #6)

> > Cases 3-6 are always broken.
> > 
> > Switching to VT and back to Xorg doesn't help; this is main problem.
> > 
> > Moreover, VT is also corrupted (even in VGA mode).
> 
> VGA mode being broken sounds very bad, can you post a screenshot?

Sure, I will do that tomorrow

> If you interact with the VT does it eventually get better (VGA or fbdev)?

Unfortunately no, I've tried everything :(

> > That is why I'm thinking that current xatracker-based xf86-video-vmware should
> > have some workaround like forced full screen redraw on enterVT/leaveVT.
> 
> It should do this already if not it that should be fixed. Btw are you running a
> 3D compositor (like compiz, gnome-shell, kwin)?

I've tried both ways: either I start KDE4.8 session or just twm and xterm - always same problem.
Comment 8 Viktor Ostashevskyi 2012-02-24 00:48:53 UTC
Created attachment 57577 [details]
Xorg screen, xatracker enable driver is used; before host screen lock
Comment 9 Viktor Ostashevskyi 2012-02-24 00:50:12 UTC
Created attachment 57578 [details]
02: Switch from Xorg to VT; before host screen lock
Comment 10 Viktor Ostashevskyi 2012-02-24 00:51:27 UTC
Created attachment 57579 [details]
03: VT after host screen-lock.

Image you see is my host wallpaper
Comment 11 Viktor Ostashevskyi 2012-02-29 02:32:30 UTC
Retested with Mesa-8.0.1: nothing changed.
Comment 12 Viktor Ostashevskyi 2012-03-16 05:09:58 UTC
Retested with xf86-video-vmware-1.12.0.1 - problem still occurs.

I've also tried to see how things will go with xf86-video-modesetting, but it looks like vmwgfx kernel drm module doesn't support some features needed.
Comment 13 Viktor Ostashevskyi 2012-04-05 01:54:02 UTC
Retested with xf86-video-vmware-1.12.0.2, Mesa-8.0.2 and kernel-3.2.12: problem still present
Comment 14 Jakob Bornecrantz 2012-04-05 05:35:07 UTC
This looks like it is a host issue unfortunately, when you suspend and resume a WinXp host all of the 3D contexts goes away for Workstation. Applications are suposed to re-upload all the assets. We can't do that, since that would involve either doing the same on the guest and adding support to all guest applications to re-upload or hold a copy of all the assets in memory.

The one thing I don't know is if WinXp does this on screen-lock, as I can't test that but I'm guessing it does, if it doesn't this a bug within workstation and that could be fixed.

Later Windows doesn't have this limitation, but I'm guessing your employer only allows WinXp.

Cheers, Jakob.
Comment 15 Viktor Ostashevskyi 2012-04-05 05:56:23 UTC
Yeah, now I see :( Looks like this issue can't be resolved.

I've found more or less deep explanation of what's going on here:

http://www.virtualdub.org/blog/pivot/entry.php?id=269

Probably, you can change status to resolved/won't fix
Comment 16 Jakob Bornecrantz 2012-04-05 06:15:43 UTC
Thanks for the link,

Sorry this couldn't be fixed. :-/


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.