[Arch Linux] glxinfo crashes with 361.28-5 on a NVS 5400M card.

Full Title: “[Arch Linux] glxgears crashes with ‘BadValue’ and ‘X_GLXCreateNewContext’ using nvidia version 361.28-5 with a NVS 5400M card.”

Here is what happens when I run glxinfo:

$ glxinfo
name of display: :0
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  154 (GLX)
  Minor opcode of failed request:  24 (X_GLXCreateNewContext)
  Value in failed request:  0x0
  Serial number of failed request:  45
  Current serial number in output stream:  46

I’m running Arch Linux, up-to-date, on a Thinkpad T530 with a NVS 5400M card:

$ lspci | grep -i nvidia
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GF108M [NVS 5400M] [10de:0def] (rev a1) (prog-if 00 [VGA controller])
	Subsystem: Lenovo Device [17aa:21f6]
	Flags: bus master, fast devsel, latency 0, IRQ 31
	Memory at f2000000 (32-bit, non-prefetchable) 
	Memory at e0000000 (64-bit, prefetchable) 
	Memory at f0000000 (64-bit, prefetchable) 
	I/O ports at 5000 
	[virtual] Expansion ROM at f3080000 [disabled] 
	Capabilities: <access denied>
	Kernel driver in use: nvidia
	Kernel modules: nouveau, nvidia

I’m using the latest drivers (361.28-4):

$ sudo pacman -Ss nvidia | grep installed
extra/libvdpau 1.1.1-2 [installed]
extra/nvidia-dkms 361.28-4 [installed]
extra/nvidia-libgl 361.28-5 [installed]
extra/nvidia-settings 361.28-1 [installed]
extra/nvidia-utils 361.28-5 [installed]
extra/opencl-nvidia 361.28-5 [installed]
community/cuda 7.5.18-1 [installed]
multilib/lib32-libvdpau 1.1.1-2 [installed]
multilib/lib32-nvidia-libgl 361.28-4 [installed]
multilib/lib32-nvidia-utils 361.28-4 [installed]

Interesting lines in dmesg:

[   29.467110] NVRM: Your system is not currently configured to drive a VGA console
[   29.467114] NVRM: on the primary VGA device. The NVIDIA Linux graphics driver
[   29.467116] NVRM: requires the use of a text-mode VGA console. Use of other console
[   29.467118] NVRM: drivers including, but not limited to, vesafb, may result in
[   29.467119] NVRM: corruption and stability problems, and is not supported.
[   29.617228] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  361.28  Wed Feb  3 15:15:17 PST 2016
[   29.617925] nvidia-modeset: Allocated GPU:0 (GPU-1696bcb5-95f6-5158-f98e-fb076c2aa9fd) @ PCI:0000:01:00.0

No errors in Xorg.0.log.

I tried compiling glxinfo from source so that I can debug with gdb. I’ve discovered that the error is called on this line in glxinfo.c when glXCreateNewContext() is called.

nvidia-bug-report.log.gz (71.8 KB)