nvidia-settings复杂问题

nvidia-settings复杂问题

我刚刚安装了 Ubuntu 16.04,并且只在 ssh 中使用它。我板上有多个 nvidia gpu。

这就是我安装驱动程序的方式(在谷歌上找到信息):

--------------------------驱动程序安装--------------------------

准备:

sudo dpkg --add-architecture i386
sudo apt update
sudo apt install build-essential libc6:i386

禁用默认的 Nouveau NVIDIA 驱动程序

sudo bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
sudo bash -c "echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf"

 更新内核 initramfs

sudo update-initramfs -u
sudo reboot

下载了最新的驱动程序https://www.geforce.com/drivers

sudo sh NVIDIA-Linux-x86_64-440.83.run
sudo reboot

之后检查

sudo lspci -vnn | grep -i VGA -A 18

08:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP102 [GeForce GTX 1080 Ti] [10de:1b06] (rev a1) (prog-if 00 [VGA controller])
        Subsystem: ZOTAC International (MCO) Ltd. Device [19da:1471]
        Flags: bus master, fast devsel, latency 0, IRQ 140
        Memory at d4000000 (32-bit, non-prefetchable) [size=16M]
        Memory at 2f60000000 (64-bit, prefetchable) [size=256M]
        Memory at 2f70000000 (64-bit, prefetchable) [size=32M]
        I/O ports at 9000 [size=128]
        [virtual] Expansion ROM at d5000000 [disabled] [size=512K]
        Capabilities: [60] Power Management version 3
        Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Capabilities: [78] Express Legacy Endpoint, MSI 00
        Capabilities: [100] Virtual Channel
        Capabilities: [250] Latency Tolerance Reporting
        Capabilities: [128] Power Budgeting <?>
        Capabilities: [420] Advanced Error Reporting
        Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
        Kernel driver in use: nvidia
        Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia

...

--------------------------结束驱动程序安装--------------------------

此后,gpu 和驱动程序配合良好。但是

 nvidia-settings
** (nvidia-settings:2285): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-G3kXDTdi54: Connection refused
ERROR: Unable to load info from any available system

第一个警告在以下帮助下得到解决导出 NO_AT_BRIDGE=1

关于错误:无法从任何可用系统加载信息,我发现我需要

sudo prime-select nvidia

Info: the current GL alternatives in use are: ['mesa', None]
Info: the current EGL alternatives in use are: ['mesa-egl', None]
Error: the installed packages do not support PRIME
Error: nvidia mode can't be enabled

现在我不知道如何解决这一切......

答案1

在 SSH 中使用 nvidia-settings 您应该使用:(例如设置风扇)

DISPLAY=:0 XAUTHORITY=/var/run/lightdm/root/:0 nvidia-settings -a [gpu:0]/GPUFanControlState=1

DISPLAY=:0 XAUTHORITY=/var/run/lightdm/root/:0 nvidia-settings -a [fan:0]/GPUTargetFanSpeed=75

相关内容