启用Ubuntu的间接渲染Indirect Render(Test on Ubuntu 18.04)

℡╲_俬逩灬. 提交于 2020-03-04 19:52:10

安全起见,正式发布的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

 

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!