安全起见,正式发布的Ubuntu Desktop OS默认关闭了GLX的Indirect Render,即本机的x server只接受本机的x client request(直接渲染Direct Render)。
修改以下几项配置,可以启用Indirect Render。
1. /usr/share/gdm/gdm.schemas
<schema>
<key>security/DisallowTCP</key>
<signature>b</signature>
<default>false</default>
</schema>
2. /etc/X11/xinit/xserverrc
#!/bin/sh
#exec /usr/bin/X -nolisten tcp +iglx "$@"
exec /usr/bin/X -listen tcp +iglx "$@"
3. /etc/X11/xorg.conf
Section "ServerFlags"
Option "AllowIndirectGLX" "on"
Option "IndirectGLX" "on"
EndSection
4. /usr/share/lightdm/lightdm.conf.d/50-xserver-command.conf
[Seat:*]
# Dump core
xserver-command=X -core +iglx
验证方法:glxinfo -i
确认direct rendering: No
$ glxinfo -i
name of display: :0
display: :0 screen: 0
direct rendering: No (-i specified)
server glx vendor string: NVIDIA Corporation
server glx version string: 1.4
来源:CSDN
作者:BeALinuxGraphicCoder
链接:https://blog.csdn.net/weixin_42263483/article/details/104657356