您尚未登录。

#1 2021-05-19 08:21:20

wanliwx
会员
注册时间: 2021-05-19
帖子: 4

使用nvidia-prime报错,X Error of failed request

双显卡使用nvidia-prime方案,用prime-run命令时报错。

prime-run glxinfo

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

sudo pacman -Q | grep nvidia

lib32-nvidia-utils 465.31-1
lib32-opencl-nvidia 465.31-1
nvidia-dkms 465.31-1
nvidia-prime 1.0-4
nvidia-settings 465.27-1
nvidia-utils 465.31-1
opencl-nvidia 465.31-1

nvidia-smi

Wed May 19 08:18:58 2021       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 465.31       Driver Version: 465.31       CUDA Version: 11.3     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   37C    P8    N/A /  N/A |      0MiB /  2002MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

最近编辑记录 wanliwx (2021-05-19 08:38:25)

离线

#2 2021-05-19 11:38:49

SuperkeyV
会员
注册时间: 2021-02-27
帖子: 1

Re: 使用nvidia-prime报错,X Error of failed request

你是用的什么图形接口,X11还是Wayland?

根据我目前知道的,wayland下使用x11的程序性能会偏低些,偶尔也会出现上面的情况

离线

#3 2021-05-19 13:55:59

wanliwx
会员
注册时间: 2021-05-19
帖子: 4

Re: 使用nvidia-prime报错,X Error of failed request

使用的x11

离线

#4 2021-05-19 16:45:19

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,961
个人网站

Re: 使用nvidia-prime报错,X Error of failed request

看起来是 nvidia 内核模块加载过慢,Xorg 先运行起来了。

在线

#5 2021-05-19 17:41:23

wanliwx
会员
注册时间: 2021-05-19
帖子: 4

Re: 使用nvidia-prime报错,X Error of failed request

那如何让nvidia内核模块先加载?

离线

#6 2021-05-19 18:11:36

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,961
个人网站

Re: 使用nvidia-prime报错,X Error of failed request

有多种方法。比如启动 xorg 前 sleep 几秒。比如把 nvidia 模块打到 initramfs 里去。比如把 nvidia 写到 /etc/modules-load.d 下然后给你的登录器加上 After=systemd-modules-load.service。

在线

#7 2021-05-19 19:53:05

wanliwx
会员
注册时间: 2021-05-19
帖子: 4

Re: 使用nvidia-prime报错,X Error of failed request

我在 /etc/mkinitcpio.conf 文件中写入了 nvidia nvidia_modeset nvidia_drm

MODULES=(nvidia nvidia_modeset nvidia_drm)

然后执行了

mkinitcpio -P

重启之后运行 prime-run glxinfo | grep "OpenGL renderer" 还是报同样的错误

X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  152 (GLX)
  Minor opcode of failed request:  24 (X_GLXCreateNewContext)
  Value in failed request:  0x0
  Serial number of failed request:  50
  Current serial number in output stream:  51

离线

#8 2021-05-19 23:24:09

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,961
个人网站

Re: 使用nvidia-prime报错,X Error of failed request

咦,有人报告说这么干有用的啊。

在线

页脚