GNOME Bugzilla – Bug 731173
Add new commandline option to allow bypass hardware acceleration check
Last modified: 2016-05-31 18:26:08 UTC
Created attachment 277825 [details] [review] Add new commandline option to allow bypass hardware acceleration check Please add new commandline option to allow sessions bypass hardware acceleration check. For example GNOME Flashback session should work without hardware acceleration too. There are many users who are trying to launch Flashback session on hardware without acceleration: https://bugs.launchpad.net/ubuntu/+source/gnome-session/+bug/1251281
Created attachment 277829 [details] [review] Add new commandline option - disable-acceleration-check Simpler patch
it falls back to using software acceleration if hardware acceleration isn't available. In what scenarios are software acceleration failing?
I don't know. You can try ask for more info in ubuntu bug. There is 72 affected people and two duplicate bugs. So I just created patch to allow bypass that acceleration check. Second patch is very simple and allows in easy way tell gnome-session to continue to run even acceleration check did fail. If gnome-session itself does not require acceleration than is there any other reason to not add this patch?
I think the problem is this: 1) Suppose gnome-session-check-accelerated runs under some environment where GL doesn't work. 2) gnome-session-check-accelerated-helper sets _GNOME_SESSION_ACCELERATED=0 in the root window, to speed up subsequent checks using caching. 3) gnome-session/main.c sets LIBGL_ALWAYS_SOFTWARE=1 and calls gnome-session-check-accelerated again. 4) gnome-session-check-accelerated-helper reads the cached value of "0" from the _GNOME_SESSION_ACCELERATED property. So step (4) above erroneously reports "No software rendering available" to main.c. And, I think a quick solution would be to clear _GNOME_SESSION_ACCELERATED between those two lines in main.c: if (g_getenv ("LIBGL_ALWAYS_SOFTWARE") == NULL) { g_setenv ("LIBGL_ALWAYS_SOFTWARE", "1", TRUE); As a side note though, I think the idea of using a statically named X property to cache the GL result is flawed, because e.g. `ssh -X` runs on the same root display yet it shouldn't use the same GL result. Maybe at least use "_GNOME_SESSION_ACCELERATED_$DISPLAY" instead of plain "_GNOME_SESSION_ACCELERATED"?
Apart from the problem that I described above, there's a second issue in the helper: in e.g. x2go the composite extension isn't available, and even when the software renderer works fine, sessions like gnome-fallback with metacity, which do work fine without composite, refuse to start because the helper returns HELPER_NO_ACCEL instead of e.g. HELPER_SOFTWARE_RENDERING. One method to bypass that could be that when calling gnome-session-check-accelerated, each session should state if it requires composite to run or not (maybe in a parameter like --require-composite).
Confirmed as per downstream: 1) lsb_release -rd Description: Ubuntu 14.04 LTS Release: 14.04 2) apt-cache policy gnome-session gnome-session: Installed: 3.9.90-0ubuntu12 Candidate: 3.9.90-0ubuntu12 Version table: *** 3.9.90-0ubuntu12 0 500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages 100 /var/lib/dpkg/status apt-cache policy gnome-session-fallback gnome-session-fallback: Installed: 1:3.8.0-1ubuntu12.1 Candidate: 1:3.8.0-1ubuntu12.1 Version table: *** 1:3.8.0-1ubuntu12.1 0 500 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/universe amd64 Packages 100 /var/lib/dpkg/status 1:3.8.0-1ubuntu11 0 500 http://us.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages apt-cache policy xrdp xrdp: Installed: 0.6.0-1 Candidate: 0.6.0-1 Version table: *** 0.6.0-1 0 500 http://us.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages 100 /var/lib/dpkg/status apt-cache policy remmina remmina: Installed: 1.0.0-4ubuntu3 Candidate: 1.0.0-4ubuntu3 Version table: *** 1.0.0-4ubuntu3 0 500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages 100 /var/lib/dpkg/status apt-cache policy vinagre vinagre: Installed: 3.10.2-0ubuntu1 Candidate: 3.10.2-0ubuntu1 Version table: *** 3.10.2-0ubuntu1 0 500 http://us.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages 100 /var/lib/dpkg/status 3) What is expected to happen is when one installs xrdp on the host and attempts to use remmina or vinagre on a Ubuntu 14.04 client to RDP in, it works. 4) What happens instead is it shows a gray static screen as per attached screenshot. This would appear an issue with gnome-session as per client log: cat .xsession-errors.old Script for ibus started at run_im. Script for auto started at run_im. Script for default started at run_im. init: indicator-application main process ended, respawning init: indicator-application main process ended, respawning init: indicator-application respawning too fast, stopped Xsession: X session started for at Sun Jul 20 15:25:59 CDT 2014 X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 109 (X_ChangeHosts) Value in failed request: 0x5 Serial number of failed request: 6 Current serial number in output stream: 8 localuser:moniker being added to access control list X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 109 (X_ChangeHosts) Value in failed request: 0x5 Serial number of failed request: 6 Current serial number in output stream: 8 Script for ibus started at run_im. Script for auto started at run_im. Script for default started at run_im. Script for ibus started at run_im. Script for auto started at run_im. Script for default started at run_im. gnome-session-is-accelerated: No composite extension. gnome-session-check-accelerated: Helper exited with code 256 gnome-session-is-accelerated: No composite extension. gnome-session-check-accelerated: Helper exited with code 256 ** (process:2565): WARNING **: software acceleration check failed: Child process exited with code 1 ** (x-session-manager:2565): CRITICAL **: We failed, but the fail whale is dead. Sorry.... The following is not a WORKAROUND, create /etc/xorg.conf : Section "Device" Identifier "Intel Graphics" Driver "Intel" Option "DRI" "False" EndSection ProblemType: Bug DistroRelease: Ubuntu 14.04 Package: gnome-session 3.9.90-0ubuntu12 ProcVersionSignature: Ubuntu 3.13.0-32.57-generic 3.13.11.4 Uname: Linux 3.13.0-32-generic x86_64 ApportVersion: 2.14.1-0ubuntu3.2 Architecture: amd64 CurrentDesktop: Unity Date: Sun Jul 20 15:35:23 2014 InstallationDate: Installed on 2014-06-22 (28 days ago) InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140417) PackageArchitecture: all SourcePackage: gnome-session UpgradeStatus: No upgrade log present (probably fresh install)
Created attachment 281268 [details] screenshot.png
Created attachment 290278 [details] [review] Add new commandline option - disable-acceleration-check - v3 I've updated the patch so that it disables the acceleration check instead of running it and ignoring the result. Tested with gnome's master branch (3.15.x) under jhbuild on Fedora 21. I was able to run GNOME Flashback (Metacity) under X2Go. I am open to the idea of changing the wording. The patch disables both the hardware acceleration check and the software acceleration check.
Review of attachment 290278 [details] [review]: ok, sure.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
This issue is a showstopper for using GNOME3 inside any VM as composite is usually not available in such environments. Now I have to use LXDE at work till I make a backport of this feature the Debian (jessie) package we use :'(