使用集显做显示,使用独显做机器学习,那么xorg.conf如何配置?
如果配不好,那么会卡在欢迎登录界面,据说也会限制风扇调速的功能。
既然GPT时代了,那么我们就用AI加速一下,直接lspci | grep -i vga
得到类似下面的东西,
04:00.0 VGA compatible controller: ASPEED Technology, Inc. ASPEED Graphics Family (rev 41)
3b:00.0 VGA compatible controller: NVIDIA Corporation Device 2230 (rev a1)
86:00.0 VGA compatible controller: NVIDIA Corporation Device 2230 (rev a1)
af:00.0 VGA compatible controller: NVIDIA Corporation Device 2230 (rev a1)
d8:00.0 VGA compatible controller: NVIDIA Corporation Device 2230 (rev a1)
其中第一条是集显,其他的都是独立显卡。
将上述信息丢给AI,并跟他说要生成xorg.conf,其中用集显做显示,哇啦,结果如下:
Section "ServerLayout"Identifier "Layout0"Screen 0 "Screen0"Screen 1 "Screen1" RightOf "Screen0"Screen 2 "Screen2" RightOf "Screen1"Screen 3 "Screen3" RightOf "Screen2"Screen 4 "Screen4" RightOf "Screen3"
EndSectionSection "Device"Identifier "ASPEED Graphics"Driver "ast" # Assuming the ASPEED driver is 'ast'BusID "PCI:4:0:0"
EndSectionSection "Device"Identifier "NVIDIA GPU 1"Driver "nvidia"BusID "PCI:59:0:0"Screen 1
EndSectionSection "Device"Identifier "NVIDIA GPU 2"Driver "nvidia"BusID "PCI:134:0:0"Screen 2
EndSectionSection "Device"Identifier "NVIDIA GPU 3"Driver "nvidia"BusID "PCI:175:0:0"Screen 3
EndSectionSection "Device"Identifier "NVIDIA GPU 4"Driver "nvidia"BusID "PCI:216:0:0"Screen 4
EndSectionSection "Screen"Identifier "Screen0"Device "ASPEED Graphics"
EndSectionSection "Screen"Identifier "Screen1"Device "NVIDIA GPU 1"
EndSectionSection "Screen"Identifier "Screen2"Device "NVIDIA GPU 2"
EndSectionSection "Screen"Identifier "Screen3"Device "NVIDIA GPU 3"
EndSectionSection "Screen"Identifier "Screen4"Device "NVIDIA GPU 4"
EndSection
基本就可以了,sudo nano /etc/X11/xorg.conf
把上面的内容复制进去。最后重启。
然后至于调风扇,尝试了很多办法,因为四张显卡满负荷运作散热压力太大了,所以想自定义一个风扇速度曲线,以避免热量堆积。但是尝试了很多方法,结论就是在终端通过命令行基本很难,好在最后找到一个替代方案,GUI界面可以。
就是说按照上述xorg配置文件生效后,在图形界面,打开一个终端,然后运行nvidia-settings
会出来有一个窗口,里面每张显卡的名字下都会有热量控制的选项,里可以调风扇,注意,手动调了之后风扇就不再自适应了,长期满负荷转对显卡来说有灰尘堆积的风险,建议在大负荷工作结束后关闭手动风扇。