Problems getting SPICE/qxl to work under Ubuntu

szafran

Renowned Member
Aug 31, 2012
45
0
71
Hi,

I have PVE running the Ubuntu Server v16.04.2. I've installed desktop on it for some testing. After installing desktop I've installed:

xserver-xorg-video-qxl
spice-vdagent

after reboot I do see that the vdagent works (mouse moves fine between the guest and the viewing OS - tried viewing on Ubuntu and Windows) but I can't do anything with graphics. The resolution that qas set before installing the qxl driver stayed. There is no monitor listed in the system settings (so I can't change anything). There was an Unknown monitor there before qxl driver installation.

Can anyone help me set this up so that the variable resolution etc. works ?

Best regards
Marcin
 
Which desktop did you install inside Ubuntu Server? (Gnome, Mate, Kubuntu, Lubuntu, ...)
 
Gnome - I've used:
apt install --no-install-recommends ubuntu-desktop
and then:
apt install gnome-session-flashback
because I don't like Unity.
 
I got it working with Unity and also Gnome, but i installed the full package (via tasksel).

Just to note, Gnome and Unity are not totally VM friendly, try mate or lubuntu.
 
Just seen something weird.
After the guest OS booted the first thing I did is to open the screen settings. Ans there it was - Unknown monitor with the abillity to change the resolution.
But all that dissapeared right after I've tried resizing the Remote Viewers window (so right when it was supposed to change the guest resolution).
 
@tom just tried a clean Ubuntu Server 16.04.2 install and installed ubuntu-desktop - can't even change the resolution. Then I've installed by hand xserver-xspice. Still no monitor detected and can't change the resolution (also automatic res change doesn't work either).

BTW you do know that I had the display working, but the res change didn't work ? (just realised that you wrote only about getting the display working)
 
if you use the spice client, the resolution is automatically resized.
 
That's what I was writing about... Unity works, old desktop works (ie. displays properly), spice drivers installed, spice client active. But resolution change doesn't work etc.
I've tried renaming spiceqxl.xorg.conf to xorg.conf in X11 config dir but that gave me a black screen.
 
I am bit lost as it works always on my boxes, I just have to install the "spice-vdagent" inside the Debian/Ubuntu guests.
 
I have tested 4 distros (Fedora, CentOS, Manjaro, Ubuntu) so far and only Fedora worked out of the box. Fedora worked nicely in the beginning but after I did an upgrade the display started to flicker. The resizing issue was somehow solved with this command on the guest:

Code:
$ xrandr --output Virtual-0 --auto

It will resize the window at the right resolution. Unfortunately you have to run it every time you want to resize.
 
I have tested 4 distros (Fedora, CentOS, Manjaro, Ubuntu) so far and only Fedora worked out of the box. Fedora worked nicely in the beginning but after I did an upgrade the display started to flicker. The resizing issue was somehow solved with this command on the guest:

Code:
$ xrandr --output Virtual-0 --auto

It will resize the window at the right resolution. Unfortunately you have to run it every time you want to resize.

Same here, but this
Code:
xrandr --output Virtual-0 --auto
hangs my desktop (and still doesn't resize the desktop - I do mean resize, eg change the resolution, not scale with window, which worked allways)
 
If you install either way a desktop environment why did you choose the server version? I would try directly with Ubuntu Desktop or another distro with Desktop Environment. Maybe there is some package you are missing.

Have you checked the /var/log/spice-vdagent.log?
 
Because I need Server, and 2 (maybe 3) things from Desktop.
No such log file here. But that's ok - I gave up on this. I can use the res that's set to get things done.
No more time to fiddle with this.
 
Just add sth work under ubuntu 16. no testing on other version. FYI.
  1. Turn off Xserver used
    sudo init 3

  2. Remove xserver-xorg-core
    sudo apt-get remove xserver-xorg-core -y

  3. Install the driver or so
    sudo apt-get install spice-vdagent gdm xserver-xorg-video-qxl-hwe-16.04

  4. Create the xorg.conf we needed
    sudo X -configure
    sudo cp ./xorg.conf.new /etc/X11/xorg.conf

  5. Get X Back
    sudo apt-get install xserver-xorg-core xserver-input-all -y

  6. Make sure spice-vdagent start automatically
    sudo systemctl enable spice-vdagentd
    sudo systemctl start spice-vdagentd

  7. Time to cross your fingers
    sudo init 5
 
In Proxmox KVM, I am doing everything properly, have spice-vdagent installed in VM Ubuntu 20.04 LTS Desktop (gnome), but still the system won't see in display settings any extra monitor, and clicking display 2 in remote-viewer doesn't do anything.

I've seen that people have had this problem with different Ubuntu versions (ranging probably to even 16.04 LTS already then), and I have encountered that this might be problem with HWE kernel, so perhaps reinstalling to GA kernel can fix the problem:

https://stafwag.github.io/blog/blog...resolution-on-a-kvm-virtual-machine-with-qxl/

https://askubuntu.com/a/1011440/702332

I haven't tried that but I will give it a shot some day in the future.

I also reported the case here and in other places:
https://forum.proxmox.com/threads/spice-dual-monitor-from-windows-7-guest.52296/
 
In Proxmox KVM, I am doing everything properly, have spice-vdagent installed in VM Ubuntu 20.04 LTS Desktop (gnome), but still the system won't see in display settings any extra monitor, and clicking display 2 in remote-viewer doesn't do anything.

I've seen that people have had this problem with different Ubuntu versions (ranging probably to even 16.04 LTS already then), and I have encountered that this might be problem with HWE kernel, so perhaps reinstalling to GA kernel can fix the problem:

https://stafwag.github.io/blog/blog...resolution-on-a-kvm-virtual-machine-with-qxl/

https://askubuntu.com/a/1011440/702332

I haven't tried that but I will give it a shot some day in the future.

I also reported the case here and in other places:
https://forum.proxmox.com/threads/spice-dual-monitor-from-windows-7-guest.52296/
Just putting this one here since I had the exact same problem as you. Found working answer working for me
https://askubuntu.com/questions/997...guest?newreg=2e6827acc6474cbb8d65601fdb7a3a55
"""
@Tomeg, I had the same problem as yourself selecting the second display, using Proxmox Virtual Environment 6.4-8, Ubuntu Guest with display configured as SPICE Dual Monitor (qxl) and using virt-viewer (latest as of posting).
Note: It was originally working, then stopped working after disabling it and powering the guest off.
This worked for me:
  1. Ran xrandr from the shell on the Ubuntu 20.4 guest, this showed me that the Virtual-2 to Virtual-4 displays were disconnected.
  2. Then ran the following to enable the Virtual-2 display and the second display appeared (automatically enabled within virt-viewer):
xrandr --addmode Virtual-2 1920x1080
xrandr --output Virtual-2 --mode 1920x1080 --right-of Virtual-1

Additional Note: If I now disable the second display from within virt-viewer and power the guest off, I have to follow the same process to get it working again.
Hope this helps..
"""
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!