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 731173 - Add new commandline option to allow bypass hardware acceleration check
Add new commandline option to allow bypass hardware acceleration check
Status: RESOLVED FIXED
Product: gnome-session
Classification: Core
Component: gnome-session
git master
Other Linux
: Normal normal
: ---
Assigned To: Session Maintainers
Session Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-06-03 19:19 UTC by Alberts Muktupāvels
Modified: 2016-05-31 18:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add new commandline option to allow bypass hardware acceleration check (3.18 KB, patch)
2014-06-03 19:19 UTC, Alberts Muktupāvels
none Details | Review
Add new commandline option - disable-acceleration-check (1.61 KB, patch)
2014-06-03 20:18 UTC, Alberts Muktupāvels
none Details | Review
screenshot.png (37.16 KB, image/png)
2014-07-20 21:00 UTC, Christopher M. Penalver
  Details
Add new commandline option - disable-acceleration-check - v3 (4.84 KB, patch)
2014-11-09 16:12 UTC, Mike DePaulo
committed Details | Review

Description Alberts Muktupāvels 2014-06-03 19:19:37 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
Comment 1 Alberts Muktupāvels 2014-06-03 20:18:26 UTC
Created attachment 277829 [details] [review]
Add new commandline option - disable-acceleration-check

Simpler patch
Comment 2 Ray Strode [halfline] 2014-06-04 14:12:17 UTC
it falls back to using software acceleration if hardware acceleration isn't available.  In what scenarios are software acceleration failing?
Comment 3 Alberts Muktupāvels 2014-06-09 19:00:17 UTC
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?
Comment 4 Alkis Georgopoulos 2014-06-18 07:24:00 UTC
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"?
Comment 5 Alkis Georgopoulos 2014-06-24 19:58:56 UTC
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).
Comment 6 Christopher M. Penalver 2014-07-20 20:59:07 UTC
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)
Comment 7 Christopher M. Penalver 2014-07-20 21:00:02 UTC
Created attachment 281268 [details]
screenshot.png
Comment 8 Mike DePaulo 2014-11-09 16:12:39 UTC
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.
Comment 9 Ray Strode [halfline] 2014-11-24 01:24:25 UTC
Review of attachment 290278 [details] [review]:

ok, sure.
Comment 10 Alberts Muktupāvels 2014-11-24 12:21:49 UTC
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.
Comment 11 Mirco Bauer 2016-05-31 18:26:08 UTC
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 :'(