Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#53078 - bad xorg-server / nvidia-libgl interaction causes loading of wrong GLX module

Attached to Project: Arch Linux
Opened by Ric (invik) - Friday, 24 February 2017, 22:20 GMT
Last edited by Jan de Groot (JGC) - Saturday, 25 February 2017, 12:17 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Updates to packages xorg-server and nvidia published after 16/02/2017 cause loading of wrong GLX module when starting X server. This was detected when trying to start kodi-standalone service at boot by means of systemd kodi.service file provided by kodi-standalone-service.

By using ALA to restore system package versions available on 16/02/2017, correct functionality was restored. By selectively upgrading packages to current versions, problems were traced to upgrading of xorg-server & xorg-server-common:

At 16/02/2017, package versions were (appropriate kernel version is required for the nvidia module):
xorg-server 1.19-2
xorg-server-common 1.19-2
nvidia 375.26-2
nvidia-utils 375.26-6
nvidia-libgl 375.26-6
linux 4.9.8-1
linux-headers 4.9.8-1

By upgrading nvidia packages to version 1.19-5 (which requires kernel 4.9.11-1) , and/or xorg-server to version 378.13-2, X server gets broken, by loading the wrong GLX module.

First sign of trouble can be detected close to the start of the Xorg.0.log file:

[ 31.070] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 11 paused 1
[ 31.070] (EE) Error systemd-logind returned paused fd for drm node

After that, it can be seen that the nvidia config file "nvidia-drm-outputclass.conf" is ignored, and ModulePath is not correctly set to load the nvidia module. Instead, default GLX module libglx.so in /usr/lib/xorg/modules/extensions/, provided by xorg, is loaded. As this file is not appropriate for the nvidia card, more errors can be seen in the Xorg.0.log:

[ 31.351] (EE) NVIDIA(0): Failed to initialize the GLX module; please check in your X
[ 31.351] (EE) NVIDIA(0): log file that the GLX module has been loaded in your X
[ 31.351] (EE) NVIDIA(0): server, and that the module is the NVIDIA GLX module. If
[ 31.351] (EE) NVIDIA(0): you continue to encounter problems, Please try
[ 31.351] (EE) NVIDIA(0): reinstalling the NVIDIA driver.

And soon after,

[ 32.280] (II) AIGLX: Screen 0 is not DRI2 capable
[ 32.280] (EE) AIGLX: reverting to software rendering
[ 32.544] (EE) AIGLX error: dlopen of /usr/lib/xorg/modules/dri/swrast_dri.so failed (/usr/lib/xorg/modules/dri/swrast_dri.so: undefined symbol: _glapi_tls_Dispatch)
[ 32.544] (EE) GLX: could not load software renderer
[ 32.544] (II) GLX: no usable GL providers found for screen 0

all of which results in a black screen, and kodi generating a crashlog file each few seconds.

As soon as mentioned packages are downgraded to 16/02 versions, problems disappears and kodi-standalone starts normally.

Some more information available in forum thread https://bbs.archlinux.org/viewtopic.php?pid=1693540.
This task depends upon

Closed by  Jan de Groot (JGC)
Saturday, 25 February 2017, 12:17 GMT
Reason for closing:  Not a bug
Additional comments about closing:  User configuration error.
Comment by Jan de Groot (JGC) - Saturday, 25 February 2017, 02:09 GMT
Please post full logs.
Comment by Ric (invik) - Saturday, 25 February 2017, 07:38 GMT
Attached serveral files:

working_Xorg.0.log: X log with working packages (linux 4.9.8, xorg-server 1.19-2, nvidia 375.26).
broken_Xorg.0.log: X log after updating (linux 4.9.11, xorg-server 1.19-5, nvidia 378.13).
kodi_crashlog: self explanatory. Several of these are created.

Comment by Jan de Groot (JGC) - Saturday, 25 February 2017, 09:26 GMT
The cause of your problem is logind pausing the drm device because vt7 is not active at the moment X is starting.

If you start X on vt1 or run X as root you won't have this issue.
Comment by Ric (invik) - Saturday, 25 February 2017, 09:38 GMT
I guess so: as I mention in the forum thread, changing or removing the default "vt7" parameter in the service file solves the issue.

But still, prior to these updates, every combination of nvidia and xorg were able to overcome this with default configurations, and successfully start an X session from inactive vt's. This changes with the update. In my case, it is only a matter of starting kodi in standalone mode, but I guess other people might be experiencing similar issues when starting display managers (I think I saw some threads in the forum about problems with display managers that might be related to this).
Comment by Jan de Groot (JGC) - Saturday, 25 February 2017, 12:16 GMT
I guess you specify nvidia as driver with manual configuration. To fix your issue also add the modulepath option to your configuration like we have done for autodetection.

The logs indicate a problem with X on vt7, both in the working and non working setup.

Loading...