Install GPU on ArchLinux
前言, 之前比较坑的是, 在安装了nvidia 跟 nvidia-utils 之后, 重启就莫名其妙的黑屏了, 别慌, 这是xorg与nvidia驱动之间的冲突, 或者是配置问题, 先卸载原来与nvidia相关的package, reboot , 现在你就再一次进入到图形化的世界里面了.
Add nouveau to blacklist
去除一些与nvidia冲突的组建, 添加到黑名单里面
sudo vim /etc/modprobe.d/nouveau_blacklist.conf
blacklist nouveau
more blacklist
reference from https://askubuntu.com/questions/481414/install-nvidia-driver-instead-nouveauhttps://askubuntu.com/questions/481414/install-nvidia-driver-instead-nouveau
blacklist nouveau
blacklist lbm-nouveau
options nouveau modeset=0
alias nouveau off
alias lbm-nouveau off
Remove xorg.conf or configure in xorg.conf.d
去除原来的nvidia的设置
cd /etc/X11/
rm xorg.conf
Install Nvidia and bumblebee
Install Dependecy First
必须先安装这个依赖
yaourt -S mesa
yaourt -S xf86-input-mouse
yaourt -S xf86-input-evdev
yaourt -S xf86-input-keyboard
Install Nvidia and bumblebee
yaourt -S nvidia bumblebee
另外我好像也安装了 nvidia-settings
, nvidia-config
啥的.
将自己添加到bumblebee用户组
这里scorpion是我的用户名
sudo usermod -a -G bumblebee scorpion
启用bumbleed
sudo systemctl enable bumblebeed
Error
[ERROR]Cannot access secondary GPU - error: Could not load GPU driver
[ERROR]Aborting because fallback start is disabled.
解决方案 配置bumblebee.conf
https://ubuntuforums.org/showthread.php?t=2043971
重启 配置bios
Run as Root update nvidia config and restart kdm
su
nvidia-xconfig
# restart kde
systemctl restart sddm
Check The Status Of GPU
nvidia-smi
output
Fri May 26 20:50:43 2017
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 381.22 Driver Version: 381.22 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce 820M Off | 0000:04:00.0 N/A | N/A |
| N/A 50C P0 N/A / N/A | 0MiB / 1985MiB | N/A Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 Not Supported |
+-----------------------------------------------------------------------------+
Check the version of GPU and more info
Path
/proc/driver/nvidia/gpus/0000:04:00.0
cat < information
Model: GeForce 820M
IRQ: 52
GPU UUID: GPU-????????-????-????-????-????????????
Video BIOS: ??.??.??.??.??
Bus Type: PCIe
DMA Size: 40 bits
DMA Mask: 0xffffffffff
Bus Location: 0000:04:00.0
Device Minor: 0
Install Cuda Cuddn
深度学习的时候用得到
终于配好了,哈哈
Reference
https://fedoraproject.org/wiki/Bumblebee
https://wiki.archlinux.org/index.php/bumblebee#Installing_Bumblebee_with_Intel.2FNVIDIA
https://evilshit.wordpress.com/2013/10/14/how-to-install-bumblebee-on-arch-linux/#ch2