Changes between Version 8 and Version 9 of qemu


Ignore:
Timestamp:
09/21/2021 09:21:20 PM (4 weeks ago)
Author:
ken@…
Comment:

Update Xorg guest details, removing the old cirrus driver and adding CONFIG_DRM_VGEM.

Legend:

Unmodified
Added
Removed
Modified
  • qemu

    v8 v9  
    1010== Xorg drivers if using qemu to build an LFS desktop guest ==
    1111
    12 For a guest BLFS system, as of late 2014 there are three choices for the graphics driver:
    13 
    14 === 1. the old cirrus driver, which is in BLFS ===
    15 
    16 This is old, but still available. It is incompatible with KMS (Kernel Mode Setting). If you need to use it, pass '-vga cirrus' on the command line. The maximum resolution is 1024x768. If you use this and wish to use a framebuffer outside of Xorg, pass 'vga=790' on the grub commandline.
    17 
    18 === 2. the vmware driver, which is also in BLFS ===
    19 
    20 For me, this comes up as 1024x768 if the CONFIG_FB and CONFIG_DRM_VMWGFX kernel options are set, or 800x600 if they are not. It supports a large maximum resolution (bigger than my screen). Works ok, but the window gets some coloured pixels when it first starts (ok after a second or two). Again, it needs 'vga=790' if you want a framebuffer outside of Xorg. Invoke qemu with '-vga vmware'.
    21 
    22 === 3. the modesetting driver ===
    23 
    24 This is a recent development and is not yet in BLFS. The functionality has apparently been merged into the xorg server for the 1.17 version. Meanwhile, xf86-video-modesetting-0.9.0 is available alongside the other drivers, and works fine.
    25 It '''requires''' CONFIG_FB, CONFIG_DRM_BOCHS, and should also use CONFIG_DRM_CIRRUS_QEMU in your kernel config. For me this defaults to 1024x768 and offers modes up to 1600x1200 or 1680x1050.  The framebuffer (1024x768 pixels) will come up without needing to be specified (yea! penguin(s)!).  Invoke qemu either without specifying the vga (because this is the default), or by specifying '-vga std'.
    26 
    27 If the 1024x768 framebuffer console is too small to read, enable the 12x22 font in the kernel, you can optionally use the LatGrkCyr-12x22 font in /etc/sysconfig/console provided you are running a UTF-8 system.  On a regular machine, you could specify a smaller screen with e.g. video=800x600 or whatever on the kernel commandline, and everything would be scaled up. But in qemu that just gives you a smaller window until Xorg is active.
    28 
    29 === the vga driver ===
    30 
    31 Only mentioned so I can say "Use a better driver!" This is Xorg's last-gasp attempt to provide a driver. It works, but for me it appears to provide a 1280x768 window into a 1280x960 screen (or something like that - the log mentioned 1280, I thought it was more like 1024). So, it starts with the top part of the screen, but shows the bottom when you move the mouse down.
     12For a plain guest BLFS x86 or x86_64 system running Xorg without spice there are two choices for the graphics driver:
     13
     14=== 1. the modesetting driver ===
     15
     16This is now part of Xorg-server, provided you enabled libepoxy.
     17
     18It '''requires''' CONFIG_FB, CONFIG_DRM_BOCHS, and you should also use CONFIG_DRM_VGEM in your kernel config to speed up video output (e.g. when listing files). For me this defaults to a 1024x768 framebuffer, but offers modes which will depend on your machine. Although you can force this with '-vga std' that is now the default.
     19
     20If the 1024x768 framebuffer console is too small to read, enable the 12x22 font in the kernel, you can optionally use the LatGrkCyr-12x22 font in /etc/sysconfig/console provided you are running a UTF-8 system.
     21
     22=== 2. the vmware driver, which is in BLFS ===
     23
     24This is only really relevant if you are using vmware. When last reviewed (2014!), this came up as 1024x768 if the CONFIG_FB and CONFIG_DRM_VMWGFX kernel options were set, or 800x600 if they were not. It supported a large maximum resolution (bigger than my screen). I have no recent experience of this.
    3225
    3326== other notes on setting up Xorg in a guest ==
    3427
    35 For the mouse, use the evdev driver.
    36 
    37 To get other screen sizes, use xrandr. To see which modes are supported you should run 'xrandr' and make a note of both the modes (sizes) and the output (in qemu, there is only one output, but its name varies with different drivers).
     28To get other screen sizes, use xrandr. To see which modes are supported you should run 'xrandr' and make a note of both the modes (sizes) and the output (in qemu.
    3829You can then invoke xrandr with a line like the following (for the modesetting driver), and if you like it you can add it to the .xinitrc.
    3930
    4031{{{
    41 xrandr --output Virtual-0 --mode 1280x960
     32xrandr -s 1280x960
    4233}}}
    4334