使用集顯做顯示,使用獨顯做機器學習,那么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
會出來有一個窗口,里面每張顯卡的名字下都會有熱量控制的選項,里可以調風扇,注意,手動調了之后風扇就不再自適應了,長期滿負荷轉對顯卡來說有灰塵堆積的風險,建議在大負荷工作結束后關閉手動風扇。