GNOME Bugzilla – Bug 680195
Disable animations when on slow VNC or spice
Last modified: 2014-10-25 11:29:03 UTC
The VNC server and/or the spice agent would need to export the fact that their display is being used from a slow location, or just through the network (whatever heuristics they want to use), and gnome-settings-daemon would listen to that to tweak the org.gnome.desktop.interface enable-animations GSetting.
the enable-animations key nicely disables all css animations (and transitions, I guess) in gtk. Unfortunately, it also stops spinners. And it does not do anything for gnome-shell, currently.
Filed bug 685452 for the shell part now.
And bug 686021 for fixing spinners
Created attachment 231712 [details] [review] remote-display: Add plugin to disable animations on slow links Disable animations when on slow VNC or spice remote displays. Currently only monitors if the display can be exported via VNC.
Comment on attachment 231712 [details] [review] remote-display: Add plugin to disable animations on slow links Attachment 231712 [details] pushed as 3e3b99a - remote-display: Add plugin to disable animations on slow links
I couldn't find how to detect (or even set up) Spice being used. It's used through virt, but not exported anywhere within the VM itself.
<halfline> ssp: do you know if there's a way to detect when the display is spice ? <halfline> (to e.g. disable non-critical animations in the shell) <ssp> halfline: There are probably various hacks, but wouldn't it make more sense to look at what the GL implementation is? <ssp> halfline: Ie., if it's llvm, then you disable animations <halfline> well it's not just shell animations that are getting disabled <halfline> toolkit animations too <halfline> basically wondering if there's some easy code to fill into the FIXME: here: http://git.gnome.org/browse/gnome-settings-daemon/commit/?id=3e3b99aef91cc122bea7d41daf7087d8d3d96faf <halfline> here rather: http://git.gnome.org/browse/gnome-settings-daemon/tree/plugins/remote-display/gsd-remote-display-manager.c?id=3e3b99aef91cc122bea7d41daf7087d8d3d96faf#n102 <ssp> halfline: The best way might be to check if the vdagent is running <halfline> oh okay, that sounds pretty good <hadess> ssp, running in the session, or? <hadess> halfline, i couldn't find a way to set it up anywhere either <ssp> hadess: Yeah, running in the session. I'd expect it to be a service, but hansg would know the best way to check for it <ssp> We really should admit failure at some point and have the X server report which driver it is using so that clients can better workaround things that don't work <halfline> looks like there might be a file called /dev/virtio-ports/com.redhat.spice.0 <halfline> looking at the top of http://cgit.freedesktop.org/spice/linux/vd_agent/tree/src/vdagent.c <halfline> the agent seems to use a socket called /var/run/spice-vdagentd/spice-vdagent-sock <halfline> so maybe just stat()ing one of those two files is good enough <mclasen_> halfline: would be good to persist that information in the bug, I guess
With the patch in bug 690337: $ gdbus monitor --session --dest org.gnome.Vino --object-path /org/gnome/vino/screens/0 Monitoring signals on object /org/gnome/vino/screens/0 owned by org.gnome.Vino The name org.gnome.Vino is owned by :1.582 /org/gnome/vino/screens/0: org.freedesktop.DBus.Properties.PropertiesChanged ('org.gnome.VinoScreen', {'Connected': <true>}, @as []) /org/gnome/vino/screens/0: org.freedesktop.DBus.Properties.PropertiesChanged ('org.gnome.VinoScreen', {'Connected': <false>}, @as []) Just need to use that instead of Vino's "enabled" setting.
Created attachment 234472 [details] [review] remote-display: Monitor Vino's Connected status
Committed to master with a fix in a debug message. Attachment 234472 [details] pushed as 0d7d427 - remote-display: Monitor Vino's Connected status
Seems the bug was originally about disabling animations on slow/remote connection but we ended-up disabling them for all SPICE/VNC connections, including local ones. :( Don't know of any better way to detect if spice/vnc connection is local or remote but we really shouldn't be disabling animations for all connections.
Filed a bug on SPICE regarding local-only spice: https://bugs.freedesktop.org/show_bug.cgi?id=62033
It would more future proof if gsd would disable animations when detecting QXL device & swrast/llvm opengl, instead of checking the virtio channel used for other means..
(In reply to comment #13) > It would more future proof if gsd would disable animations when detecting QXL > device & swrast/llvm opengl, instead of checking the virtio channel used for > other means.. Don't comment on closed bugs. And feel free to provide example code of this in a separate bug :)