After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 680195 - Disable animations when on slow VNC or spice
Disable animations when on slow VNC or spice
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: plugins
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on: 655746 690337
Blocks:
 
 
Reported: 2012-07-18 18:41 UTC by Bastien Nocera
Modified: 2014-10-25 11:29 UTC
See Also:
GNOME target: 3.8
GNOME version: ---


Attachments
remote-display: Add plugin to disable animations on slow links (18.24 KB, patch)
2012-12-17 11:29 UTC, Bastien Nocera
committed Details | Review
remote-display: Monitor Vino's Connected status (6.95 KB, patch)
2013-01-26 13:50 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2012-07-18 18:41:30 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.
Comment 1 Matthias Clasen 2012-10-03 15:51:10 UTC
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.
Comment 2 Matthias Clasen 2012-10-04 12:55:54 UTC
Filed bug 685452 for the shell part now.
Comment 3 Matthias Clasen 2012-10-12 11:52:39 UTC
And bug 686021 for fixing spinners
Comment 4 Bastien Nocera 2012-12-17 11:29:41 UTC
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 5 Bastien Nocera 2012-12-17 11:30:04 UTC
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
Comment 6 Bastien Nocera 2012-12-17 13:32:01 UTC
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.
Comment 7 Ray Strode [halfline] 2012-12-18 16:39:32 UTC
<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
Comment 8 Bastien Nocera 2013-01-26 00:46:48 UTC
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.
Comment 9 Bastien Nocera 2013-01-26 13:50:15 UTC
Created attachment 234472 [details] [review]
remote-display: Monitor Vino's Connected status
Comment 10 Bastien Nocera 2013-01-26 14:27:18 UTC
Committed to master with a fix in a debug message.

Attachment 234472 [details] pushed as 0d7d427 - remote-display: Monitor Vino's Connected status
Comment 11 Zeeshan Ali 2013-03-08 17:35:30 UTC
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.
Comment 12 Zeeshan Ali 2013-03-08 17:51:49 UTC
Filed a bug on SPICE regarding local-only spice: https://bugs.freedesktop.org/show_bug.cgi?id=62033
Comment 13 Marc-Andre Lureau 2014-10-24 16:47:05 UTC
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..
Comment 14 Bastien Nocera 2014-10-25 11:29:03 UTC
(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 :)