kvm needs to correctly simulate a proper monitor

Bug #237164 reported by StefanPotyra
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
QEMU
Won't Fix
Wishlist
Unassigned
kvm (Ubuntu)
Won't Fix
Wishlist
Unassigned
xorg (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Binary package hint: xorg

With xserver-xor-video-cirrus 1.2.1, there should be no need to require special handling for kvm in dexconf any longer.
See also: bug 193323.

If kvm would properly simulate an attached monitor, we could drop the dexconf quirks. they are currently forcing the driver to use a 1024x768 display where the driver could autodetect the monitor correctly.

Revision history for this message
StefanPotyra (sistpoty) wrote :

Quote from Bryce:
>Possibly with this fix, some portion of the kvm-specific changes to
>dexconf could be dropped.
>
>If anyone is interested in assisting with this, please file a new bug assigned to me, attach a minimal xorg.conf that has been adequately tested. Here are >the current kvm-specific things dexconf is doing:
>a) hardcoding the driver to cirrus
>b) specifying the depth
>c) setting the HorizSync and VertRefresh
>d) specifying the available resolutions
>
>In theory, none of these four things should be necessary, but I suspect
>this bug fix only addresses b and maybe c. Please test if these can be
>removed and if so, file a bug and I can take care of dropping them in
>dexconf. Thanks ahead of time.

Revision history for this message
Reinhard Tartler (siretart) wrote :

considering this is a follow-up bug to #193323, it should certainly be marked as 'confirmed', since it is a genuie issue.

Changed in xorg:
status: New → Confirmed
Revision history for this message
StefanPotyra (sistpoty) wrote :

Since I've compared qemu and kvm sources to find out why kvm works, and qemu doesn't (d'oh *g*), here my results:
a) not too sure if this is addressed with the update, or if this was a problem in the first place.
b) dexconf sets the depth to 24, which now the driver also does if it finds the corresponding cirrus card
c) haven't seen any implementation difference between qemu/kvm, so it should work
d) same as for c).

To make FAUmachine (which however has a different cirrus implementation than qemu) work with the old cirrus driver, the only thing that was needed in the first place was to set the default depth to 24bpp.

However I suggest to keep this bug in the state new, until anyone has in fact tested that kvm works with a plain xorg.conf.

Revision history for this message
Reinhard Tartler (siretart) wrote :

bryce: none of the quirks you are mentioning are actually working in qemu. The relevant part of dexconf that detects kvm is in line 271:

QEMU_KVM=$(grep "QEMU Virtual CPU" /proc/cpuinfo || true)
if [ -n "$QEMU_KVM" ]; then
    DEVICE_DRIVER="cirrus"
fi

Only kvm reports that in /proc/cpuinfo. qemu reports "Pentium II (Katmai)", which is the very reason why the hardy live cd works in kvm but not in qemu.

TBH, I'd suggest to just strip the kvm quircks out of dexconf in intrepid right now, and see if a daily livecd comes up. I'm pretty confident that it does so.

Revision history for this message
Bryce Harrington (bryce) wrote :

Okay, I've stripped those all out of dexconf and repackaged xorg accordingly. Could you please test and verify it works ok?

http://people.ubuntu.com/~bryce/Testing/xorg/

Changed in xorg:
assignee: nobody → bryceharrington
importance: Undecided → Medium
status: Confirmed → Triaged
Revision history for this message
StefanPotyra (sistpoty) wrote :

as asked on irc: can you provide a .deb for x11-common there as well? (iirc dexconf is in there... at least it's not in the .debs you put up there ;))

Revision history for this message
StefanPotyra (sistpoty) wrote :

Just tested kvm with the hardy cd, installing xserver-xorg-video-cirrus from intrepid, and then x11-common and rerunning dexconf.
gdm comes up, however it uses a smaller resolution by default then.

I'll attach xorg.conf (as supplied by the dexconf run), and Xorg.0.log (from the start with the new driver/new xorg.log) in a minute.

Revision history for this message
StefanPotyra (sistpoty) wrote :
Revision history for this message
StefanPotyra (sistpoty) wrote :
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

what's the status of this? The kvm environment (still) doesn't seem to autoconfigure too well, that's why the Modes and HorizSync/VertRefresh are hardcoded.

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

I just tested this, and Gnome comes up just fine without xorg.conf, however, the screen resolution is a sad little 800x600 without xorg.conf. It's 1024x768 with xorg.conf.

:-Dustin

Revision history for this message
Bryce Harrington (bryce) wrote :

kirkland confirmed that kvm still does not work properly without these quirks, so they cannot be dropped at this time. Feel free to reopen the xorg task if this situation changes, but moving the issue to kvm for now.

Changed in xorg:
status: Triaged → Invalid
Revision history for this message
StefanPotyra (sistpoty) wrote :

Hi,

to fix the kvm issue, kvm needs to simulate a monitor attached to the cirrus card, together with an EDID eeprom delivering the correct data for monitor modes. The simulated cirrus card shoul provide this via register sr8. A sample implementation can be found at www.faumachine.org (cvs checkout, see node-pc/simulator/chip_cirrus_gd5446.c -- based on qemu -- and lib/sig_i2c_bus.c and finally node-pc/monitor.c for the EDID contents) for details how to do it.

Feel free to ask if anything is unclear.

Cheers,
     Stefan.

description: updated
Changed in kvm:
status: New → Triaged
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Hey Stefan-

There was actually some discussion upstream among KVM and Xorg developers. I think they determined that this was a 'won't fix' situation, but I need to check that. Let me track that down...

:-Dustin

Changed in kvm:
importance: Undecided → Wishlist
Changed in qemu:
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Bryce Harrington (bryce) wrote :

As a workaround, the driver itself can force the resolution to a certain degree. This is covered in bug #349331

Changed in xorg (Ubuntu):
assignee: Bryce Harrington (bryceharrington) → nobody
Changed in kvm (Ubuntu):
status: Triaged → Won't Fix
Revision history for this message
Michal Suchanek (hramrach) wrote :

Isn't the issue here that the emulated card has too low video memory forcing 800x600 when the driver selects the default 24bpp depth?

This is an issue with some very old real hardware too.

I guess X could account for that but due to its architecture every driver would likely have a separate check for this condition (S3, cirrus, and any other driver that could be possibly used with such low-mem card).

Revision history for this message
Thomas Huth (th-huth) wrote :

Since cirrus is not the prefered graphics card in QEMU anymore, and there hasn't been any update to this within the last four years, I think nobody will take care of this ticket anymore, so setting the status to "Won't fix" now.

Changed in qemu:
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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