Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1033092: spice-vdagent: Can't resize window in KDE

683 views
Skip to first unread message

Jun Nogata

unread,
Mar 17, 2023, 4:10:05 AM3/17/23
to
Package: spice-vdagent
Version: 0.22.1-3+b1
Severity: important
X-Debbugs-Cc: nogajun...@gmail.com

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.


-- System Information:
Debian Release: bookworm/sid
APT prefers testing-security
APT policy: (500, 'testing-security'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-6-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages spice-vdagent depends on:
ii init-system-helpers 1.65.2
ii libasound2 1.2.8-1+b1
ii libc6 2.36-8
ii libdbus-1-3 1.14.6-1
ii libdrm2 2.4.114-1
ii libglib2.0-0 2.74.6-1
ii libgtk-3-0 3.24.37-2
ii libpciaccess0 0.17-2
ii libsystemd0 252.6-1
ii libx11-6 2:1.8.4-2
ii libxinerama1 2:1.1.4-3
ii libxrandr2 2:1.5.2-2+b1

spice-vdagent recommends no packages.

spice-vdagent suggests no packages.

-- no debconf information

Abhijith PA

unread,
Mar 17, 2023, 1:30:04 PM3/17/23
to
Hello

On 17/03/23 05:05 PM, Jun Nogata wrote:
> Package: spice-vdagent
> Version: 0.22.1-3+b1
> Severity: important
> X-Debbugs-Cc: nogajun...@gmail.com
>
> 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 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.


--abhijith

Abhijith PA

unread,
Jun 12, 2023, 6:50:05 AM6/12/23
to
Hello.

I believe this issue is same as https://bugs.debian.org/1033092

So I am Ccing 103...@bugs.debian.org.

[[Work around mentioned at the bottom of the mail]]

On 11/06/23 11:20 PM, JC Bandini wrote:
> Hi,
>
> I (noob) am not sure how to report a bug against a debian package so I send
> it to you.
>
> Summary: spice-vdagent not working with bookworm + KDE
>
> * Steps:
>
> 1) Create a new KVM domain based on debian-12.0.0-amd64-netinst.iso using
> the simplest installation options and select KDE as the DE
>
> 2) Reboot then install the spice vdagent: sudo apt install spice-vdagent
>
> * Results:
>
> 1) Get error "spice-vdagentd.service is a disabled or a static unit not
> running, not starting it"
>
> 2) sudo systemctl status spice-vdagentd.service  reports errors "Error
> getting active session: no data available"
>
> 3) Using virt-viewer, resizing the window does not resize the guest.
>
> 4) Copy-and-paste from host to guest does not work
>
> Logout or reboot the guest does not help.
>
> * Expected results: no error reported and resizing viewer does resize the
> guest (of course after selecting the right option in the virt viewer) and
> copy-and-paste from host to guest works.
>
> Notice that with bullseye+KDE guests (exact same KVM host, etc),
> spice-vdagent works like a charm for me (it was one of the deciding factors
> for me to drop VBox)
>
> As you can gather from the above, I don't really know what I am doing but
> feel free to contact me if I can help with more info. Thanks!

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.

--abhijith

Rowan Wookey

unread,
Jun 16, 2023, 4:30:03 PM6/16/23
to
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.

Rowan Wookey

unread,
Jun 19, 2023, 3:10:04 PM6/19/23
to
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.

Rowan Wookey

unread,
Jun 22, 2023, 4:20:05 PM6/22/23
to
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
0 new messages