Bug 772614

Summary: screen goes black after resuming from S3
Product: Red Hat Enterprise Linux 6 Reporter: Luiz Capitulino <lcapitulino>
Component: qemu-kvmAssignee: Gleb Natapov <gleb>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2CC: acathrow, bsarathy, juzhang, knoel, mkenneth, tburke, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-17 10:40:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
seabios patch
none
run vga rom on resume none

Description Luiz Capitulino 2012-01-09 12:32:20 UTC
Description of problem:

QEMU screen goes black after resuming from S3. Tested with SDL and vnc, happens with both.

I'm _assuming_ the guest has resumed from S3 because I can talk with the guest agent running inside it and typing commands like "halt -p" work.

I know S3 is not currently supported, but there are talks about enabling it and if we do enable it this bug has to be fixed. Otherwise we can just close it as WONTFIX.

Version-Release number of selected component (if applicable):
Tested from sources (head: c8ec9854c597). Corresponds to qemu-kvm-0.12.1.2-2.213.el6. The bug probably exists in all qemu versions though.

How reproducible:


Steps to Reproduce:
1. Run qemu:

 # sudo ./qemu -drive file=disks/test-ide.img,if=ide -enable-kvm -m 1G -monitor stdio -cpu qemu64

 Note that I'm using a minimal command-line and am not using virtio. This is to avoid possible bugs in other subsystems.

2. When the guest boots, try to suspend

 # pm-suspend

  
Actual results:

The screen is black.

Expected results:

The screen contains the guest terminal.

Additional info:

At the time of this writing, the guest resumes instantly from suspend (step 2). This can be confirmed by typing "halt -p" after 2. The guest will powerdown (confirming it has resumed).

Comment 2 Luiz Capitulino 2012-01-09 13:00:52 UTC
Bug 771946 might be related to this.

Comment 3 Gleb Natapov 2012-01-17 10:40:01 UTC
(In reply to comment #2)
> Bug 771946 might be related to this.

If you can talk to a guest then it is not 771946. Either way it is a guest bug. If this is WindowsXP then it is knows bug. Install qxl.

Comment 4 Luiz Capitulino 2012-01-17 10:49:00 UTC
The guest is Linux. As we probably we don't care about S3 in 6.3, I don't mind closing this. But the bug does exist.

Comment 5 Gleb Natapov 2012-01-17 10:52:09 UTC
(In reply to comment #4)
> The guest is Linux. As we probably we don't care about S3 in 6.3, I don't mind
> closing this. But the bug does exist.

No doubt it does. In Linux.

Comment 6 Gleb Natapov 2012-01-17 11:15:33 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > The guest is Linux. As we probably we don't care about S3 in 6.3, I don't mind
> > closing this. But the bug does exist.
> 
> No doubt it does. In Linux.

BTW what Linux is this? Does it run X at the time of suspend? And if it does does switching to console before S3 helps?

Comment 7 Luiz Capitulino 2012-01-17 11:53:06 UTC
F16, X is not installed.

Comment 8 Gleb Natapov 2012-01-17 12:57:40 UTC
(In reply to comment #7)
> F16, X is not installed.

How easily can you reproduce this? We have one nasty hack for WindowsXP to make it allow S3 with cirrus that may cause this kind of issues. If you can easily reproduce I can remove the hack and give you bios.bin to test.

Comment 9 Luiz Capitulino 2012-01-17 13:15:46 UTC
It's trivial for me to reproduce, I get it 100% of times. Send me the bios and I'll test it.

Comment 10 Luiz Capitulino 2012-01-17 13:17:02 UTC
A patch against seabios.git also works for me, btw.

Comment 11 Gleb Natapov 2012-01-17 13:24:09 UTC
Created attachment 555772 [details]
seabios patch

Attached

Comment 12 Luiz Capitulino 2012-01-17 13:39:32 UTC
I still can reproduce it with that patch applied.

Comment 13 Gleb Natapov 2012-01-17 14:00:13 UTC
(In reply to comment #12)
> I still can reproduce it with that patch applied.

Use seabios from rhel6. Looks like upstream is broken.

Comment 14 Gleb Natapov 2012-01-17 14:07:51 UTC
Created attachment 555789 [details]
run vga rom on resume

or uses this patch with upstream seabios

Comment 15 Luiz Capitulino 2012-01-17 14:58:36 UTC
(In reply to comment #14)
> Created attachment 555789 [details]
> run vga rom on resume
> 
> or uses this patch with upstream seabios

Yes! That patch fixes it for me for qemu/seabios upstream. I see some vga bios's initialization messages for one or two seconds though (not serious, but I think it's not desired). Also note that the patch from comment 13 is not required.

I've just tested qemu/seabios in rhel 6.3 and they don't seem to have that issue. Sorry for that, I should have been clear before opening the BZ.

You're going to submit your fix upstream, right?

Thanks Gleb!

Comment 16 Gleb Natapov 2012-01-17 15:12:55 UTC
(In reply to comment #15)
> You're going to submit your fix upstream, right?
That is not proper fix. I am going to complain about commit that broke qemu in upstream :)