When running glxinfo I get the error: X Error of failed request: GLXBadContext
Using the source code from mesa-demos-8.4.0 I find the error occurs because of a call to glxCreateNewContext(). The system has a problem, but it is not clear to me how to fix it.
I get the following outputs from various other commands:
$ inxi -Gx
Graphics: Device-1: Advanced Micro Devices [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590]
vendor: XFX Pine driver: amdgpu v: 5.9.10.20.50 bus ID: 01:00.0
Display: wayland server: X.Org 1.20.9 driver: amdgpu resolution: 2560x1440~60Hz
OpenGL: renderer: N/A v: N/A direct render: N/A
$ dpkg --list | grep -i "glx"
ii libgl1-amdgpu-mesa-glx:amd64 1:20.2.4-1234664 amd64 free implementation of the OpenGL API -- GLX runtime
ii libgl1-amdgpu-mesa-glx:i386 1:20.2.4-1234664 i386 free implementation of the OpenGL API -- GLX runtime
ii libglx-dev:amd64 1.3.2-1~ubuntu0.20.04.1 amd64 Vendor neutral GL dispatch library -- GLX development files
ii libglx-mesa0:amd64 20.2.6-0ubuntu0.20.04.1 amd64 free implementation of the OpenGL API -- GLX vendor library
ii libglx-mesa0:i386 20.2.6-0ubuntu0.20.04.1 i386 free implementation of the OpenGL API -- GLX vendor library
ii libglx0:amd64 1.3.2-1~ubuntu0.20.04.1 amd64 Vendor neutral GL dispatch library -- GLX support
ii libglx0:i386 1.3.2-1~ubuntu0.20.04.1 i386 Vendor neutral GL dispatch library -- GLX support
ii libxcb-glx0:amd64 1.14-2 amd64 X C Binding, glx extension
ii libxcb-glx0:i386 1.14-2 i386 X C Binding, glx extension
I think a bit needs to be flipped so the opengl renderer is connected to the drivers, but I have no clue how to do that. Everything looks like it should work, but obviously something is not happy. I would appreciate any ideas on how to debug this and get the system up and running so I can real work done.
$ xrandr
Screen 0: minimum 16 x 16, current 2560 x 1440, maximum 32767 x 32767
XWAYLAND2 connected 2560x1440+0+0 (normal left inverted right x axis y axis) 550mm x 310mm
2560x1440 59.91*+
$ xrandr --listproviders
Providers: number : 0
strace dumps a ton of crap, and it looks like it is mostly successful in finding the files it is looking for. The last file it finds just fine, then dies (I assume at the glxCreateNewContext point):
That was interesting. I disabled Wayland, and did sudo service gdm3 restart and the system logged me out and put up a login screen. As soon as I started typing, the screen went to a terminal with a blinking underline cursor, and took no further input. I ssh-ed in from another computer, put Wayland back, and the graphics are fine.
I did find a hint in /var/log/syslog to look in a different place (/var/lib/gdm3…) where there are Xorg.j.log files. The last one was j == 3 which had this in it:
[ 73980.733] (II) AMDGPU: Driver for AMD Radeon:
All GPUs supported by the amdgpu kernel driver
[ 73980.733] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 73980.733] (II) FBDEV: driver for framebuffer: fbdev
[ 73980.733] (II) VESA: driver for VESA chipsets: vesa
[ 73980.733] (WW) xf86OpenConsole: VT_ACTIVATE failed: Operation not permitted
[ 73980.733] (EE)
Fatal server error:
[ 73980.733] (EE) xf86OpenConsole: Switching VT failed
[ 73980.733] (EE)
[ 73980.733] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[ 73980.733] (EE) Please also check the log file at "/var/lib/gdm3/.local/share/xorg/Xorg.3.log" for additional information.
[ 73980.733] (EE)
[ 73980.733] (WW) xf86CloseConsole: KDSETMODE failed: Operation not permitted
[ 73980.733] (WW) xf86CloseConsole: VT_SETMODE failed: Operation not permitted
[ 73980.733] (WW) xf86CloseConsole: VT_ACTIVATE failed: Operation not permitted
[ 73980.783] (EE) Server terminated with error (1). Closing log file.
There are lots of warnings that there are no sections in xorg.conf, but a default should have worked.
It would be nice if the error is common, but it looks like Xorg does not get as far as Wayland. I don’t really care so long as I can do accelerated 3D graphics, but I guess the question is what set of errors is easier to deal with and correct?
You are not kidding a lot of people have the problem. There do not seem to be any solutions. Partly because each case is different.
So let me start with a shovel and try to open up the rabbit hole. How do the drivers and opengl API actually connect? In my case, the output from inxi says the drivers and hardware know each other, but the opengl is not connected. That’s consistent with the call to glxCreateNewContext() failing - there is a hook from the API to the driver missing. How is that connection established?
I have a lot of questions, but too much other stuff to do to figure them out. My fundamental problem is that everything is interesting, and it would be fun to figure out the details here. I have to use .bashrc to force the bit clear on login - so yeah, where is it set to begin with? The boot and login processes are long and complicated and it could be in any of a dozen places. At any rate, all is happy when things actually work and I can do 3d graphics at a reasonable speed using all this amazingly powerful hardware. Thanks for giving clues and asking questions, very much appreciated.