Help for patching pve-qemu

esp3r

Member
Jun 6, 2020
6
1
8
41
Hello Everyone:

I'm using proxmox latest release, i've create a w10 VM with intel gvt-g vga (mediated device), my goal is to have a headless game machine for casual gaming on this little box. I want to patch qemu pve according this reference:

https://adamgradzki.com/2020/04/06/faster-virtual-machines-linux/#fix-qemu-graphics-refresh-rate

I couldn't find any reference to the GUI_REFRESH_INTERVAL_DEFAULT param (to change from 30 to 16) and also any console.h file over pve-qemu repository, so I'm stuck there.

Code:
git://git.proxmox.com/git/pve-qemu.git


The general context, I'm getting really low /"laggy" experience on desktop and gaming when i use parsec app for remote access to the vm. (this doesn't happen when running over the same hardware but non virtualized).

I've found that using other tools like steam remote play doesn't have this issue, but this is limited to steam games and it's really tricky jump from steam stream to desktop, thinking in this method as a workarround.

Ther other strange behabiour, i'm seeing "double mouse pointer", also laggy on console, and parsec too. (doen't happen on steam remote play) , i've tried switching "Use tablet for pointer" without success, also installed latest guest agent tools.

Any hint would be helpfull.

Thanks!
 
Hi,

pve-qemu is the packaging code and it has the "real" QEMU checked in as a git submodule. You can clone everything at one with:
git clone --recursive git://git.proxmox.com/git/pve-qemu.git

You could actually just edit the submodules console.h and then build from the pve-qemu directory.

A sorta complete how-to would be
Bash:
# install basic build dependencies and debian build helpers
apt install devscripts build-essential
# clone repo recursive (just delete the old directory previously)
git clone --recursive git://git.proxmox.com/git/pve-qemu.git
cd pve-qemu
# install all build dependencies of the pve-qemu package
mk-build-deps --install debian/control

# edit GUI_REFRESH_INTERVAL_DEFAULT you can also use vim or another editor of your choice
nano qemu/include/ui/console.h

# build and install package (can need a few minutes up to half an hour depending on resources)
make dinstall
 
Thanks Thomas, I failed at last step, on the `make dinstall`:

Code:
  CC      crypto/pbkdf.o
  CC      crypto/pbkdf-nettle.o
In file included from /root/pve-qemu/pve-qemu-kvm-5.0.0/include/qemu/timer.h:4,
                 from /root/pve-qemu/pve-qemu-kvm-5.0.0/include/qemu/timed-average.h:29,
                 from /root/pve-qemu/pve-qemu-kvm-5.0.0/include/block/accounting.h:28,
                 from /root/pve-qemu/pve-qemu-kvm-5.0.0/include/block/block_int.h:27,
                 from block/file-posix.c:30:
/usr/include/linux/swab.h: In function ‘__swab’:
  CC      crypto/ivgen.o
/root/pve-qemu/pve-qemu-kvm-5.0.0/include/qemu/bitops.h:20:34: error: "sizeof" is not defined, evaluates to 0 [-Werror=undef]
 #define BITS_PER_LONG           (sizeof (unsigned long) * BITS_PER_BYTE)
                                  ^~~~~~
/root/pve-qemu/pve-qemu-kvm-5.0.0/include/qemu/bitops.h:20:41: error: missing binary operator before token "("
 #define BITS_PER_LONG           (sizeof (unsigned long) * BITS_PER_BYTE)
                                         ^
  CC      crypto/ivgen-essiv.o
  CC      crypto/ivgen-plain.o
  CC      crypto/ivgen-plain64.o
  CC      crypto/afsplit.o
  CC      crypto/xts.o
  CC      crypto/block.o
  CC      crypto/block-qcow.o
  CC      crypto/block-luks.o
  CC      io/channel.o
  CC      io/channel-buffer.o
cc1: all warnings being treated as errors
  CC      io/channel-command.o
  CC      io/channel-file.o
make[2]: *** [/root/pve-qemu/pve-qemu-kvm-5.0.0/rules.mak:69: block/file-posix.o] Error 1
make[2]: *** Waiting for unfinished jobs....
  CC      io/channel-socket.o
make[2]: Leaving directory '/root/pve-qemu/pve-qemu-kvm-5.0.0'
make[1]: *** [debian/rules:80: build-stamp] Error 2
make[1]: Leaving directory '/root/pve-qemu/pve-qemu-kvm-5.0.0'
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
make: *** [Makefile:33: pve-qemu-kvm_5.0.0-4_amd64.deb] Error 2
root@labpc:~/pve-qemu#

I'm searching for similar errors on the forum at this time.

Regards.
Claudio
 

Attachments

/root/pve-qemu/pve-qemu-kvm-5.0.0/include/qemu/bitops.h:20:34: error: "sizeof" is not defined, evaluates to 0 [-Werror=undef] #define BITS_PER_LONG (sizeof (unsigned long) * BITS_PER_BYTE) ^~~~~~ /root/pve-qemu/pve-qemu-kvm-5.0.0/include/qemu/bitops.h:20:41: error: missing binary operator before token "(" #define BITS_PER_LONG (sizeof (unsigned long) * BITS_PER_BYTE)

Ah yeah, a "regression" of a development package we saw also, best way is to use our new replacement package (we used the Debian one here, but we have a much newer Linux Kernel - normally no problem but a recent update introduced this)

Bash:
apt update
apt install pve-kernel-libc-dev

It will complain that it removes "linux-libc-dev", that's ok this package replaces that exactly just matching our shipped kernel.
 
Ah yeah, a "regression" of a development package we saw also, best way is to use our new replacement package (we used the Debian one here, but we have a much newer Linux Kernel - normally no problem but a recent update introduced this)

Bash:
apt update
apt install pve-kernel-libc-dev

It will complain that it removes "linux-libc-dev", that's ok this package replaces that exactly just matching our shipped kernel.

Thanks!, i didn't noticed any change using parsec client, but then y tested the conection using spice client and it did the trick. Iguess the improvement is related to that kind of connection.

After that, I tested passing the full intel gpu as passthrough to the vm and lag goes away, double mouse keep the same but not a problem for me, games run smooth now.
 
  • Like
Reactions: t.lamprecht

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!