[Spice-devel] Ultra Wide resolution

Uri Lublin uril at redhat.com
Mon Jun 12 09:11:08 UTC 2017


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