問題描述
在使用ubuntu系統(tǒng)作為煉丹平臺(tái)時(shí),/usr/lib/xorg/xorg桌面會(huì)占用過多gpu顯存,使cuda能夠使用的gpu顯存減少一大部分。
解決思路
該問題點(diǎn)主要是由于系統(tǒng)默認(rèn)使用獨(dú)立顯卡,可以通過修改xorg的顯卡使用來讓xorg切換到集成顯卡。
方法如下:
1、編輯如下文件,如果沒有則手動(dòng)添加
sudo vi /etc/X11/xorg.conf
2、插入以下內(nèi)容,其中BusId為自己的集成顯卡id,可以通過 lspci | grep VGA查看
Section "Device"
Identifier "intel"
Driver "intel"
BusId "PCI:0:2:0"
EndSection
Section "Screen"
Identifier "intel"
Device "intel"
EndSection
3、重啟后用nvidia-smi查看顯卡占用