[Spice-devel] Ultra Wide resolution

guidugli at gmail.com guidugli at gmail.com
Mon Jun 12 21:04:09 UTC 2017


Hi Uri,

I use virt-manager (1.4.1-2) to install and run virtual machines. QEMU
version is 2.7.1-6 (latest fedora 25 stable).

Below you can see the definition of the Win 7 VM I built just to
perform the tests with resolution. I did not added anything other than
the default. 

The "QEMU Guest Agent VSS Provider" and "Spice VDAgent" services are
started but the "QEMU Guest Agent" is not (gives the following error
when I try to start it: Error 1053: The service did not respond to the
start or control request in a timely fashion.". This is the same
behaviour on Win 10.

BTW, not sure if it is a valid test, but I tried to use virt-viewer to
connect to the virtual machine and the results were the same.

Thank you

<domain type='kvm' id='11'>
  <name>win7</name>
  <uuid>fdb21f86-750a-44a3-8015-df4d9e2b5787</uuid>
  <memory unit='KiB'>4194304</memory>
  <currentMemory unit='KiB'>4194304</currentMemory>
  <vcpu placement='static'>2</vcpu>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-i440fx-2.7'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
    </hyperv>
    <vmport state='off'/>
  </features>
  <cpu mode='custom' match='exact'>
    <model fallback='allow'>Haswell-noTSX</model>
  </cpu>
  <clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
    <timer name='hypervclock' present='yes'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <pm>
    <suspend-to-mem enabled='no'/>
    <suspend-to-disk enabled='no'/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <backingStore/>
      <target dev='hda' bus='ide'/>
      <alias name='ide0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0'
unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <backingStore/>
      <target dev='hdb' bus='ide'/>
      <readonly/>
      <alias name='ide0-0-1'/>
      <address type='drive' controller='0' bus='0' target='0'
unit='1'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06'
function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb'/>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06'
function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <alias name='usb'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06'
function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <alias name='usb'/>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06'
function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    </controller>
    <controller type='ide' index='0'>
      <alias name='ide'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01'
function='0x1'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05'
function='0x0'/>
    </controller>
    <interface type='network'>
      <mac address='52:54:00:45:ac:0b'/>
      <source network='default' bridge='virbr0'/>
      <target dev='vnet0'/>
      <model type='rtl8139'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
function='0x0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/0'/>
      <target port='0'/>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/0'>
      <source path='/dev/pts/0'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <channel type='spicevmc'>
      <target type='virtio' name='com.redhat.spice.0'
state='connected'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='tablet' bus='usb'>
      <alias name='input0'/>
      <address type='usb' bus='0' port='1'/>
    </input>
    <input type='mouse' bus='ps2'>
      <alias name='input1'/>
    </input>
    <input type='keyboard' bus='ps2'>
      <alias name='input2'/>
    </input>
    <graphics type='spice' port='5900' autoport='yes'
listen='127.0.0.1'>
      <listen type='address' address='127.0.0.1'/>
      <image compression='off'/>
    </graphics>
    <sound model='ich6'>
      <alias name='sound0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04'
function='0x0'/>
    </sound>
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384'
heads='1' primary='yes'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02'
function='0x0'/>
    </video>
    <redirdev bus='usb' type='spicevmc'>
      <alias name='redir0'/>
      <address type='usb' bus='0' port='2'/>
    </redirdev>
    <redirdev bus='usb' type='spicevmc'>
      <alias name='redir1'/>
      <address type='usb' bus='0' port='3'/>
    </redirdev>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07'
function='0x0'/>
    </memballoon>
  </devices>
  <seclabel type='dynamic' model='selinux' relabel='yes'>
    <label>system_u:system_r:svirt_t:s0:c237,c640</label>
    <imagelabel>system_u:object_r:svirt_image_t:s0:c237,c640</imagelabe
l>
  </seclabel>
  <seclabel type='dynamic' model='dac' relabel='yes'>
    <label>+107:+107</label>
    <imagelabel>+107:+107</imagelabel>
  </seclabel>
</domain>



On Mon, 2017-06-12 at 12:11 +0300, Uri Lublin wrote:
> On 06/10/2017 02:04 AM, guidugli at gmail.com wrote:
> > Hi,
> > 
> > I apologize if this is too basic but I am not very familiar with
> > this
> > topic.
> > 
> > Anyway, I installed a new Fedora 25 guest, updated all packages,
> > and
> > vdagent package was already installed. Rebooted. After login the
> > resolution was still 1024x768. I was on full screen mode. So, I
> > tried
> > to manually set the resolution. The maximum resolution available
> > using
> > gnome display panel was 1920x1200. Tried to use the script below,
> > but
> > got the following error:
> > 
> > $ bash a.sh 2560 1080
> > # setting mode 2560x1080 on output XWAYLAND0
> > + xrandr --newmode 2560x1080 230.00 2560 2720 2992 3424 1080 1083
> > 1093
> > 1120 -hsync +vsync
> > + xrandr --addmode XWAYLAND0 2560x1080
> > + xrandr --output XWAYLAND0 --mode 2560x1080
> > X Error of failed request:  BadValue (integer parameter out of
> > range
> > for operation)
> >    Major opcode of failed request:  139 (RANDR)
> >    Minor opcode of failed request:  7 (RRSetScreenSize)
> >    Value in failed request:  0x0
> >    Serial number of failed request:  21
> >    Current serial number in output stream:  22
> > 
> 
> Yeah, it seems setting Wayland with xrandr does not work well.
> 
> 
> > So, I logged off and tried to log in using X11 instead of Wayland.
> > The
> > resolution was 1024x768 although I was on full screen (no automatic
> > adjustment). But using the script below, I was able to set the
> > resolution to 2560x1080. 
> 
> Yes, that's what we're talking about ;)
> You can also try in this scenario to set fullscreen mode via
> remote-viewer's View->Fullscreen and see if the resolution is set
> to 2560x1080 (as configured on your client machine).
> 
> > Of course, when I rebooted the resolution was
> > again 1024x768. But this is good enough for me on Linux. BTW,
> > although
> > the drivers were installed, the display appeared as "Unknown
> > Display".
> > Not sure how to solve this (did a quick google search with no good
> > result).
> 
> That's OK. We do not currently provide display information.
> 
> 
> > 
> > I was using Windows 10, which was disabling my mouse whenever I
> > started
> > "spice vdagent" service, so I decided to try with Windows 7. So I
> > did a
> > fresh install, I did not apply Win7 patches (it would take a long
> > time
> > to do so). The resolution initially, on full screen, was really low
> > (800x600). Then I installed the latest spice guest tools. The
> > resolution jumped to 1024x768. But, as in Win10, it does not get
> > higher
> > automatically and the OS is unable to understand that 2560x1080 as
> > a
> > valid mode.
> 
> How do you setup the VM ? Virt-mangaer/Ovirt/qemu-kvm-commandline ?
> Is your VM configured with virtio-serial-bus and a port for vdagent ?
> Is spice-vdagent running on your VM ?
> 
> > 
> > I really do not mind having to manually adjust the display
> > resolution,
> > but the resolution must be available to be changed. On all 3
> > installations (Win10, Fedora25, Win7), none had the mode 2560x1080
> > listed as available. On Fedora 25 I was able to set this resolution
> > manually but I cannot do the same on Windows.
> > 
> > I believe that QXL driver "tells" the operating system the modes it
> > supports and I believe there isn't a 2560x1080. But I am not an
> > expert
> > on this, so this is just an educated guess.
> 
> That's correct, however the QXL driver can be told to add modes,
> which is why with the Xorg case it works.
> 
> Uri.
> 
> > On Thu, 2017-06-08 at 10:43 +0200, Gerd Hoffmann wrote:
> > >    Hi,
> > > 
> > > > Why do you need to do it manually? The guest will adjust
> > > > automatically
> > > >    if you use remote-viewer or virt-viewer to connect to it.
> > > 
> > > Well, at least with linux guests you can do it manually if you
> > > prefer,
> > > the qemu kms drivers (not only qxl, but also stdvga and virtio)
> > > accept
> > > pretty much any video mode, you just have to add it to the mode
> > > database with xrandr.
> > > 
> > > ======================== cut here ==========================
> > > #!/bin/sh
> > > 
> > > width="$1"
> > > height="$2"
> > > 
> > > if test "$width" = "" -o "$height" = ""; then
> > >          echo "usage: $0 width height"
> > >          exit 1
> > > fi
> > > 
> > > output=$(xrandr --query | awk '/ connected/ { print $1; exit }')
> > > mode="${width}x${height}"
> > > echo "# setting mode $mode on output $output"
> > > 
> > > if xrandr --query | grep -q -e " $mode "; then
> > >          true # mode already there
> > > else
> > >          modeline=$(cvt $width $height | grep Modeline | cut -d"
> > > "
> > > -f3-)
> > >          (set -x; xrandr --newmode "$mode" $modeline;
> > >                   xrandr --addmode "$output" "$mode")
> > > fi
> > > (set -x; xrandr --output "$output" --mode "$mode")
> > > ======================== cut here ==========================
> > > 
> > > vdagent works very simliar btw, so you can see any modes vdagent
> > > adds
> > > automatically in "xrandr --query" output.
> > > 
> > > Defining modes in xorg.conf works too.
> > > 
> > > cheers,
> > >    Gerd
> 
> 


More information about the Spice-devel mailing list