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 704402 - remote-display: if llvmpipe was detected, disable animations
remote-display: if llvmpipe was detected, disable animations
Status: RESOLVED FIXED
Product: gnome-session
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Session Maintainers
Session Maintainers
Depends on: 694692
Blocks:
 
 
Reported: 2013-07-17 15:55 UTC by Frederic Crozat
Modified: 2014-09-29 13:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
remote-display: if llvmpipe was detected, disable animations (2.63 KB, patch)
2013-07-17 15:55 UTC, Frederic Crozat
accepted-commit_now Details | Review
check-accelerated: check for llvmpipe (4.28 KB, patch)
2013-07-17 15:57 UTC, Frederic Crozat
needs-work Details | Review
remote-display: if llvmpipe was detected, disable animations (2.63 KB, patch)
2013-07-18 12:12 UTC, Frederic Crozat
committed Details | Review
check-accelerated: move exit code for helper to separate header (4.96 KB, patch)
2013-07-24 14:13 UTC, Frederic Crozat
committed Details | Review
check-accelerated: fix indentation (1.26 KB, patch)
2013-07-24 14:13 UTC, Frederic Crozat
committed Details | Review
check-accelerated: check for llvmpipe (4.50 KB, patch)
2013-07-24 14:13 UTC, Frederic Crozat
committed Details | Review

Description Frederic Crozat 2013-07-17 15:55:49 UTC
Automatically disable animation if llvmpipe is detected. This rely on another patch for gnome-session acceleration detection helper
Comment 1 Frederic Crozat 2013-07-17 15:55:51 UTC
Created attachment 249411 [details] [review]
remote-display: if llvmpipe was detected, disable animations

If _GNOME_IS_SOFTWARE_RENDERING X Atom is detected on root window,
disable animations.
Comment 2 Frederic Crozat 2013-07-17 15:57:36 UTC
Created attachment 249412 [details] [review]
check-accelerated: check for llvmpipe

Check if running under llvmpipe and set Atom
_GNOME_IS_SOFTWARE_RENDERING to 1 in that case.
Comment 3 Bastien Nocera 2013-07-18 12:02:00 UTC
Review of attachment 249412 [details] [review]:

::: tools/gnome-session-check-accelerated-helper.c
@@ +278,3 @@
         if (_is_gl_renderer_blacklisted (renderer))
                 goto out;
+        has_llvmpipe = renderer && strcasestr (renderer, "llvmpipe");

has_llvmpipe is already assigned a default value, so I'd use:
if (renderer && strcasestr (renderer, "llvmpipe"))
  has_llvmpipe = TRUE;
which is more readable.

@@ +447,3 @@
+        if (has_llvmpipe) {
+                _print_error ("llvmpipe detected.");
+                ret = 2;

The ret needs to be defined as a constant in a shared header, I don't like magic numbers.

::: tools/gnome-session-check-accelerated.c
@@ +168,3 @@
                 g_clear_error (&error);
         } else {
+                is_accelerated = (WEXITSTATUS(estatus) == 0) || (WEXITSTATUS(estatus) == 2);

Can you make the WEXITSTATUS() changes separately?

@@ +182,3 @@
 
+        if (is_software_rendering) {
+            XChangeProperty (GDK_DISPLAY_XDISPLAY (display),

Indentation.
Comment 4 Bastien Nocera 2013-07-18 12:02:48 UTC
Review of attachment 249411 [details] [review]:

Looks good otherwise, pending the gnome-session patch.

::: plugins/remote-display/gsd-remote-display-manager.c
@@ +219,3 @@
 	}
 
+	/* disable animation if running under llvmpipe */

animations.
Comment 5 Bastien Nocera 2013-07-18 12:03:31 UTC
Reassigning to gnome-session to get reviews done there, as the gnome-settings-daemon part is complete.
Comment 6 Frederic Crozat 2013-07-18 12:12:40 UTC
Created attachment 249495 [details] [review]
remote-display: if llvmpipe was detected, disable animations

If _GNOME_IS_SOFTWARE_RENDERING X Atom is detected on root window,
disable animations.
Comment 7 Frederic Crozat 2013-07-18 12:13:38 UTC
Comment on attachment 249495 [details] [review]
remote-display: if llvmpipe was detected, disable animations

fixed comment. Will wait until gnome-session patch is accepted before landing
Comment 8 Ray Strode [halfline] 2013-07-18 13:20:12 UTC
so, one issue is....  we definitely want animations if a user is using a local guest (say in boxes)
Comment 9 Frederic Crozat 2013-07-18 14:20:57 UTC
(In reply to comment #8)
> so, one issue is....  we definitely want animations if a user is using a local
> guest (say in boxes)

why ? On physical hardware as well as on some VM with llvmpipe only, my tests shows GNOME 3 is barely usable with animations...
Comment 10 Ray Strode [halfline] 2013-07-18 14:34:58 UTC
hmm, well on my machine animations are pretty fluid when running with software rendering.  I guess, maybe, the defining characteristic isn't really "uses software rendering" but is "can keep a good framerate" ?

Reviewers tend to use virtual machines when writing reviews, so we really should try to make the stock experience in a virtual machine as close to the non-virtual machine experience as possible.

Though, maybe this kind of patch is fine and the real fix is something like this:

http://airlied.livejournal.com/77553.html
Comment 11 Frederic Crozat 2013-07-24 14:13:26 UTC
Created attachment 250044 [details] [review]
check-accelerated: move exit code for helper to separate header
Comment 12 Frederic Crozat 2013-07-24 14:13:34 UTC
Created attachment 250045 [details] [review]
check-accelerated: fix indentation
Comment 13 Frederic Crozat 2013-07-24 14:13:42 UTC
Created attachment 250046 [details] [review]
check-accelerated: check for llvmpipe

Check if running under llvmpipe and set Atom
_GNOME_IS_SOFTWARE_RENDERING to 1 in that case.
Comment 14 Ray Strode [halfline] 2013-08-20 14:38:45 UTC
Attachment 250044 [details] pushed as 74c0294 - check-accelerated: move exit code for helper to separate header
Attachment 250045 [details] pushed as 2b5a5b9 - check-accelerated: fix indentation
Attachment 250046 [details] pushed as 529956f - check-accelerated: check for llvmpipe
Comment 15 Frederic Crozat 2013-09-02 17:07:40 UTC
Comment on attachment 249495 [details] [review]
remote-display: if llvmpipe was detected, disable animations

Attachment 249495 [details] pushed as 14db162 - remote-display: if llvmpipe was detected, disable animations
Comment 16 Michael Shigorin 2014-09-29 12:15:20 UTC
Well, 3.14.0 is no more testable in virtualbox+nxclient.
I think it's yet another regression.
Comment 17 Bastien Nocera 2014-09-29 12:19:07 UTC
(In reply to comment #16)
> Well, 3.14.0 is no more testable in virtualbox+nxclient.
> I think it's yet another regression.

I don't think it's relevant to this bug.
Comment 18 Michael Shigorin 2014-09-29 12:48:43 UTC
The last line of ~/.xsession-errors:0 upon "oh no" reads like this:

gnome-session-is-accelerated: llvmpipe detected.
Comment 19 Bastien Nocera 2014-09-29 12:51:51 UTC
(In reply to comment #18)
> The last line of ~/.xsession-errors:0 upon "oh no" reads like this:
> 
> gnome-session-is-accelerated: llvmpipe detected.

So? Unless you have a crash report that's directly relevant to this patch, it's unlikely that this patch is causing this.
Comment 20 Michael Shigorin 2014-09-29 13:19:14 UTC
How do I obtain that if the session bails out "as intended" instead of chugging on through software renderer as it used to do for a few preceding releases?

Note that I'm not a GNOME user for multiple reasons but just someone who builds and releases en.altlinux.org/regular bunch of LiveCDs with various DEs, and gnome3 one that gets built this Wednesday will bring GNOME 3.14 to the users but those lacking accelerated rendering won't be able to have a look at it.

Our packager gave me the link to this bugreport so I chose to at least provide feedback about another corner case that might be found "inappropriate" or whatever.  It is up to you guys.  Good luck, anyways :)