了解 glxinfo 错误

了解 glxinfo 错误

我的环境是 Ubuntu 18.04,无头服务器。

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.3 LTS
Release:    18.04
Codename:   bionic

如果我通过以下方式连接ssh

glxinfo
Error: unable to open display

echo $DISPLAY prints nothing.

如果我通过以下方式连接ssh -Y

glxinfo
name of display: localhost:10.0
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  149 (GLX)
  Minor opcode of failed request:  24 (X_GLXCreateNewContext)
  Value in failed request:  0x0
  Serial number of failed request:  19
  Current serial number in output stream:  20

echo $DISPLAY
localhost:10.0

在这两种情况下:

ps aux | grep X

root      1044  0.0  0.0  70412  4368 ?        S    янв29   0:00 sudo X :9 -config /root/run_x/dummy-1920x1080.conf
root      1061  0.0  0.0 1716624 50392 ?       Sl   янв29   0:01 /usr/lib/xorg/Xorg :9 -config /root/run_x/dummy-1920x1080.conf
root     25639  0.0  0.0 276668 46856 tty7     Ssl+ янв29   0:00 /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch

ldd /usr/bin/glxinfo

    linux-vdso.so.1 (0x00007ffea151f000)
    libGL.so.1 => /usr/lib/x86_64-linux-gnu/libGL.so.1 (0x00007f3bb7ee4000)
    libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f3bb7bac000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f3bb77bb000)
    libGLX.so.0 => /usr/lib/x86_64-linux-gnu/libGLX.so.0 (0x00007f3bb758a000)
    libGLdispatch.so.0 => /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007f3bb72d4000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f3bb70b5000)
    libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f3bb6e8d000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f3bb6c89000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f3bb837f000)
    libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f3bb6a85000)
    libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f3bb687f000)
    libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f3bb666a000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f3bb6462000)

这个错误是什么X Error of failed request: BadValue (integer parameter out of range for operation)意思?

答案1

请指定要连接的可用显示器的“名称”,在上面的例子中为:9,并在运行 glxinfo 命令之前定义它,例如:DISPLAY=:9 /usr/bin/glxinfo -v -B

相关内容