This mail is about building LFS for a desktop in a qemu guest.

 TL;DR : xf86-video-modesetting should replace the cirrus driver.

 I think that we were going to archive the cirrus driver, but then
reinstated or kept it because it was used by qemu ?

 While trying to improve my Xorg setups in qemu I found the
xf86-video-modesetting driver.  It seems this is NOT part of the
katamari for 7.7 - it came out after that.  A useful link explaining
it is at
https://www.kraxel.org/blog/2014/10/qemu-using-cirrus-considered-harmful/

 Basically, the modesetting lets you use a KMS kernel in qemu.
Meanwhile, the default qemu vga driver has become 'std'.

 Below are my notes on my experiences with the different drivers,
a brief comment on using xrandr (ideally that could go in the wiki,
but I'm not sure if anyone would ever find it on the
Xorg7Applications page, at least without some prompting ?), and
comments on using console framebuffers in qemu.

1. the Xorg drivers

 N.B. for all of these, evdev provides the mouse.  I tried vmmouse,
but that is ignored.

1.1 The old 'cirrus' driver.

 Does not work if KMS is enabled (i.e. X falls back to next working
driver).
 Fedora no longer ship this, but used to have a patch at
http://pkgs.fedoraproject.org/cgit/xorg-x11-drv-cirrus.git/plain/cirrus-1.2.0-qemu.patch
(not tested).
 Max resolution is 1024x768

 This used to be the default qemu driver but those days are over.

 If for some reason you want to use this, use -vga cirrus in qemu
and ensure that KMS is not enabled.

1.2 The vmware driver

 For me, this comes up as 1024x768 if the FB and VMWGFX options (see
below) are enabled, and apparently supports modes much larger than
my 1600x1200 monitor, but it comes up as 800x600 without those
options.  It certainly works at 1280x960 with those options.  When
Xorg starts, some pixels are red or green for a second or two.

 The CONFIG_DRM_VMWGFX option appears to produce slightly higher fps
in qemu (they are not tied to the screen refresh in qemu).

 Use -vga vmware in qemu if you use this.

1.3 The vesa driver

 I cannot recommend this.  It works, but with an oddity which I
first saw on distro kernels - it was only last night that I realised
the vesa driver was the cause.  For me, it apparently decides that
the Virtual size is 1280x768. I would have said it was using a 1024
width but maybe it is 1280.  What is certain, and unpleasant, is that
initially the bottom of the desktop (where I have my panel on my
normal wm) is not visible, but when I mouse down there it is all
present and the top of the screen disappears instead.

 Use any vga setting in qemu if you have to use this.

1.4 The modesetting driver

 This requires CONFIG_FB and CONFIG_DRM_BOCHS.  Using
CONFIG_DRM_CIRRUS_QEMU is recommended, although it appears to work
(with lower fps in glxgears, so higher cpu usage) without that.

 For me it defaults to 1024x768 and provides modes up to 1600x1200
and 1680x1050 - I did not try either of those on my 1600x1200 screen,
but 1280x960 is very usable.

 Use -vga std (which is the default) in qemu.

2. Changing the mode with xrandr

 My research found all sorts of examples which involved adding a
modeline (from those which were already present!).  That approach
did not work for me because xrandr gave up processing my input at
the +hsync or -hsync term: it was expecting another number.  In any
case, that approach appears to be both unnecessarily complicated
(the details for an existing mode are not required), and incomplete
(the --output switch appears to be required when using the mode).

 I have no particular interest in adding a new mode, only in trying
one which Xorg already knows about.  I eventually found
http://pkg-xorg.alioth.debian.org/howto/use-xrandr.html - the
"Changing the mode" part.  Run xrandr to see which output(s) are
available (in qemu I only have one), and what modes.  For different
drivers I have seen names of default, VGA-0, Virtual-0.

 For the modesetting driver I have put the following line in my
~/.xinitrc:
xrandr --output Virtual-0 --mode 1280x960

3. framebuffers in the tty (if enabled)

 In my initial use of -vga vmware I discovered that the kernel
did not boot to a framebuffer unless I passed vga=790 for 1024x768
(that causes grub to sulk, but it is perfectly valid).  I was unable
to use 792 which I happen to use on one real machine because of lack
of (default) video memory - for what I was doing, 790 is not a
problem.  The qemu cirrus driver also needs this with -vga cirrus to
get a console framebuffer.

 With -vga std a 1024x768 framebuffer comes up automatically if
the FB config settings are used.  It can be forced to be smaller,
e.g. with video=800x600 in the boot args, but unlike on a real
machine that does not make the character cell any larger.  I think
I need a 10 by something font (tried lat0-10 but that is an 8x10
font and totally unreadable!).

ĸen
-- 
Nanny Ogg usually went to bed early. After all, she was an old lady.
Sometimes she went to bed as early as 6 a.m.
-- 
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to