LIBGL_ALWAYS_SOFTWARE=1 renderer used instead of Intel on Xorg sessions because of unity leftover file /etc/X11/Xsession.d/50_check_unity_support

Bug #1755097 reported by shankao
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
mesa (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

3D acceleration is not working at the moment in Xorg because the LLVMpipe renderer is used. Instead, the correct Intel driver is used when trying Wayland sessions.

shankao@schwifty:~$ glxinfo | grep -i opengl
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: llvmpipe (LLVM 5.0, 256 bits)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 18.0.0-rc4
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 18.0.0-rc4
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 18.0.0-rc4
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
OpenGL ES profile extensions:
shankao@schwifty:~$

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: libegl-mesa0 18.0.0~rc4-1ubuntu3
ProcVersionSignature: Ubuntu 4.15.0-10.11-generic 4.15.3
Uname: Linux 4.15.0-10-generic x86_64
ApportVersion: 2.20.8-0ubuntu10
Architecture: amd64
CompizPlugins: No value set for `/apps/compiz-1/general/screen0/options/active_plugins'
CompositorRunning: None
CurrentDesktop: ubuntu:GNOME
Date: Mon Mar 12 15:06:16 2018
DistUpgraded: 2018-01-09 22:07:50,078 DEBUG Running PostInstallScript: './xorg_fix_proprietary.py'
DistroCodename: bionic
DistroVariant: ubuntu
DkmsStatus: virtualbox, 5.2.8, 4.15.0-10-generic, x86_64: installed
EcryptfsInUse: Yes
ExtraDebuggingInterest: Yes, if not too technical
GraphicsCard:
 Intel Corporation UHD Graphics 620 [8086:5917] (rev 07) (prog-if 00 [VGA controller])
   Subsystem: Acer Incorporated [ALI] UHD Graphics 620 [1025:118c]
InstallationDate: Installed on 2018-01-09 (61 days ago)
InstallationMedia: Ubuntu 16.04.2 LTS "Xenial Xerus" - Release amd64 (20170215.2)
MachineType: Acer Swift SF314-52
ProcEnviron:
 LANGUAGE=en_SG:en
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_SG.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.15.0-10-generic root=UUID=e60d0a36-2013-48c7-bf91-fd01764bae3b ro quiet splash vt.handoff=1
SourcePackage: mesa
UpgradeStatus: Upgraded to bionic on 2018-01-09 (61 days ago)
dmi.bios.date: 07/18/2017
dmi.bios.vendor: Insyde Corp.
dmi.bios.version: V1.06
dmi.board.asset.tag: Type2 - Board Asset Tag
dmi.board.name: Suntory_KL
dmi.board.vendor: KBL
dmi.board.version: V1.06
dmi.chassis.type: 10
dmi.chassis.vendor: Acer
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnInsydeCorp.:bvrV1.06:bd07/18/2017:svnAcer:pnSwiftSF314-52:pvrV1.06:rvnKBL:rnSuntory_KL:rvrV1.06:cvnAcer:ct10:cvrChassisVersion:
dmi.product.family: Swift 3
dmi.product.name: Swift SF314-52
dmi.product.version: V1.06
dmi.sys.vendor: Acer
version.compiz: compiz 1:0.9.13.1+18.04.20180302-0ubuntu1
version.libdrm2: libdrm2 2.4.90-1
version.libgl1-mesa-dri: libgl1-mesa-dri 18.0.0~rc4-1ubuntu3
version.libgl1-mesa-glx: libgl1-mesa-glx 18.0.0~rc4-1ubuntu3
version.xserver-xorg-core: xserver-xorg-core 2:1.19.6-1ubuntu2
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev N/A
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:7.10.0-1
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.917+git20171229-1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.15-2

Revision history for this message
shankao (shankao) wrote :
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

run:

apt-cache policy libgl1 libegl1

Changed in mesa (Ubuntu):
status: New → Incomplete
Revision history for this message
shankao (shankao) wrote :

$ apt-cache policy libgl1 libegl1
libgl1:
  Installed: 1.0.0-2ubuntu2
  Candidate: 1.0.0-2ubuntu2
  Version table:
 *** 1.0.0-2ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status
libegl1:
  Installed: 1.0.0-2ubuntu2
  Candidate: 1.0.0-2ubuntu2
  Version table:
 *** 1.0.0-2ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status

Changed in mesa (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

wrong package, sorry:

apt-cache policy libegl-mesa0 libglx-mesa0

Revision history for this message
shankao (shankao) wrote :

$ apt-cache policy libegl-mesa0 libglx-mesa0
libegl-mesa0:
  Installed: 18.0.0~rc4-1ubuntu3
  Candidate: 18.0.0~rc4-1ubuntu3
  Version table:
 *** 18.0.0~rc4-1ubuntu3 500
        500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status
libglx-mesa0:
  Installed: 18.0.0~rc4-1ubuntu3
  Candidate: 18.0.0~rc4-1ubuntu3
  Version table:
 *** 18.0.0~rc4-1ubuntu3 500
        500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
shankao (shankao) wrote :

Shouldn't this info be included in the original report that ubuntu-bug creates? It would remove the step of asking it later in the bug report

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

it should but isn't yet

I don't see anything being wrong in the logs, X loads glamoregl just fine

Revision history for this message
shankao (shankao) wrote :

Ok. Is there any other command to run or logs that I can add to spot the problem of it using llvmpipe?

Revision history for this message
Maxime DOYEN (mdoyen) wrote :

$ apt-cache policy libegl-mesa0 libglx-mesa0

libegl-mesa0:
  Installed: 18.0.0~rc5-1ubuntu1
  Candidate: 18.0.0~rc5-1ubuntu1
  Version table:
 *** 18.0.0~rc5-1ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status
libglx-mesa0:
  Installed: 18.0.0~rc5-1ubuntu1
  Candidate: 18.0.0~rc5-1ubuntu1
  Version table:
 *** 18.0.0~rc5-1ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
shankao (shankao) wrote :

So, after investigating this problem, I finally saw the cause: under X.org, the environment variable LIBGL_ALWAYS_SOFTWARE is set to 1 *always*. Without it, it uses the intel driver as usual:

$ LIBGL_ALWAYS_SOFTWARE=0 glxinfo | grep -i opengl
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) UHD Graphics 620 (Kabylake GT2)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.0.0-rc5
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 18.0.0-rc5
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 18.0.0-rc5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

This is probably because I have an old unity file that's running when my session starts (/etc/X11/Xsession.d/50_check_unity_support) with these contents:

# This file is sourced by Xsession(5), not executed.
# If the hardware does not pass unity_support_test, fall back to LLVMpipe
# which does.

if [ "x$DESKTOP_SESSION" = "xubuntu" ]; then
    /usr/lib/nux/unity_support_test || export LIBGL_ALWAYS_SOFTWARE=1
fi

And given that the file /usr/lib/nux/unity_support_test doesn't exist anymore, it always exports the variable.

I think that there is still a bug here, and some possible fixes:

a) Remove the offending file when unity is removed
b) Fix the condition to check if unity_support_test exists
c) Be sure that ubuntu-bug reports the status of the flag for mesa bugs
d) Make that glxinfo prominently warns that the current env forces it to run in software mode

Revision history for this message
shankao (shankao) wrote :

For the record:

$ dpkg -S /etc/X11/Xsession.d/50_check_unity_support
nux-tools: /etc/X11/Xsession.d/50_check_unity_support

$ apt rdepends --installed unity
unity
Reverse Depends:
  Breaks: ubuntu-session (<< 7.5.0+17.10.20170619)

Revision history for this message
shankao (shankao) wrote :

I solved the problem for my with "apt purge nux-tools"

summary: - LLVMpipe renderer used instead of Intel on Xorg sessions
+ LLVMpipe renderer used instead of Intel on Xorg sessions because of
+ unity leftover file /etc/X11/Xsession.d/50_check_unity_support
summary: - LLVMpipe renderer used instead of Intel on Xorg sessions because of
- unity leftover file /etc/X11/Xsession.d/50_check_unity_support
+ LIBGL_ALWAYS_SOFTWARE=1 renderer used instead of Intel on Xorg sessions
+ because of unity leftover file
+ /etc/X11/Xsession.d/50_check_unity_support
Revision history for this message
Emiliano (retorquere) wrote :

I've purged nux-tools, and /etc/X11/Xsession.d/50_check_unity_support is gone, but after a reboot, I still get

$ glxinfo | grep renderer
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer,
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer,
Extended renderer info (GLX_MESA_query_renderer):
OpenGL renderer string: llvmpipe (LLVM 6.0, 256 bits)

$ LIBGL_ALWAYS_SOFTWARE=0 glxinfo | grep -i opengl
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: llvmpipe (LLVM 6.0, 256 bits)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 18.0.0-rc5
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 18.0.0-rc5
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 18.0.0-rc5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
OpenGL ES profile extensions:

Revision history for this message
Emiliano (retorquere) wrote :

(on wayland I do get the intel drivers, but wayland has other problems)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.