nvidia offload under GNU/Linux

opensuse Tumbleweed更新523.25驱动之后独显直连模式又双叒叕调不了背光了,多方尝试无果,最后还是得Hybrid Graphics

Lenovo, fix your $#!7

但至少我还有suse-prime.jpg

1
sudo prime-select boot offload

万幸中的不幸是

1
2
$ cnf prime-run
 prime-run: 命令未找到  

不幸中的万幸是

1
2
3
4
5
6
7
8
9
# cat > /usr/bin/prime-run << EOF
#!/bin/bash
export __NV_PRIME_RENDER_OFFLOAD=1
export __GLX_VENDOR_LIBRARY_NAME=nvidia
export __VK_LAYER_NV_optimus=NVIDIA_only
export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json
exec "\$@"
EOF
# chmod +x /usr/bin/prime-run

fsck NVIDIA