- Package:
- spice-vdagent
- Source:
- spice-vdagent
- Description:
- Spice agent for Linux
- Submitter:
- Jun Nogata
- Date:
- 2023-06-25 05:01:56 UTC
- Severity:
- normal
Dear Maintainer, I installed Debian bookworm and KDE desktop in a virt-manager virtual machine. Then I installed spice-vdagent, but the screen size does not change when I resize the window. When I run spice-vdagent from the terminal, the screen size changes to fit the window. I put spice-vdagent.desktop in ~/.config/autostart/ but it does not run.
Hello I don't have a KDE machine at the moment to test this. But I need some more clarity. After installing spice-vdagent, have you tried logging out the user and logged in again. Can you check the spice-vdagent(d).service are running.
Hello. I believe this issue is same as https://bugs.debian.org/1033092 So I am Ccing 1033092@bugs.debian.org. [[Work around mentioned at the bottom of the mail]] Please refer https://www.debian.org/Bugs/Reporting for future bug reporting. For this one, just reply to this mail and it will be archived at https://bugs.debian.org/1033092. I was able to reproduce this issue and will look into it. For now can you try the workaround mentioned here. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1033092#5 ie, run `spice-vdagent` command from your terminal.
Just upgraded from bullseye to bookworm and encountered this, host is on bullseye guest was on bullseye but is now on bookworm, unlike the original reporter adding a spice-vdagent.desktop file does work, the contents are: [Desktop Entry] Exec=/usr/bin/spice-vdagent Icon=dialog-scripts Name=spice-vdagent Path= Type=Application X-KDE-AutostartScript=true Without the desktop file at login spice-vdagent.service and spice-vdagentd.service are both not running. Manually starting them with sudo systemctl start spice-vdagent.service and systemctl start spice-vdagent --user doesn't seem to help the services start but screen resizing doesn't work. Please let me know if you need me to debug further.
There's a workaround posted on the forums https://forums.debian.net/viewtopic.php?p=774201#p774201 >https://github.com/systemd/systemd/issues/18791 >tl;dr: copy /etc/xdg/autostart/spice-vdagent.desktop to ~/.config/autostart/ then comment out the "X-GNOME-Autostart-Phase" line.
More on this, the autostart works but it only works for increasing in size, if I decrease it doesn't. I have found another workaround here https://superuser.com/questions/1183834/no-auto-resize-with-spice-and-virt-manager which involves adding a script to watch for display events and trigger xrandr #!/bin/sh sleep 2 xrandr --output "$(xrandr | awk '/ connected/{print $1; exit; }')" --auto xev -root -event randr | \ grep --line-buffered 'subtype XRROutputChangeNotifyEvent' | \ while read foo ; do \ xrandr --output "$(xrandr | awk '/ connected/{print $1; exit; }')" --auto done Below is the debug log for spice-vdagent when the script isn't in use. spice-vdagent[1776]: Root size of screen 0 changed to 1920x1080 send 1 spice-vdagent[1776]: display: failed to call GetCurrentState from mutter over DBUS spice-vdagent[1776]: error message: Cannot invoke method; proxy is for the well-known name org.gnome.Mutter.DisplayConfig without an owner, and proxy was constructed with the G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag spice-vdagent[1776]: Unable to find a display id for output index 2) spice-vdagent[1776]: Unable to find a display id for output index 3) spice-vdagent[1776]: Sending guest screen resolutions to vdagentd: spice-vdagent[1776]: display_id=0 - 1920x1080+0+0 spice-vdagent[1776]: display_id=1 - 0x0+0+0 spice-vdagent[1776]: 0x563e06c189e0 sent guest xorg resolution, arg1: 1920, arg2: 1080, size 40 spice-vdagent[1776]: display: failed to call GetCurrentState from mutter over DBUS spice-vdagent[1776]: error message: Cannot invoke method; proxy is for the well-known name org.gnome.Mutter.DisplayConfig without an owner, and proxy was constructed with the G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag spice-vdagent[1776]: Unable to find a display id for output index 2) spice-vdagent[1776]: Unable to find a display id for output index 3) spice-vdagent[1776]: Sending guest screen resolutions to vdagentd: spice-vdagent[1776]: display_id=0 - 1920x1080+0+0 spice-vdagent[1776]: display_id=1 - 0x0+0+0 spice-vdagent[1776]: 0x563e06c189e0 sent guest xorg resolution, arg1: 1920, arg2: 1080, size 40