nouveau linux,Nouveau (简体中文)

翻译状态:本文是 Nouveau 的翻译。上次翻译日期:2016-06-29。如果英文版本有所更改,则您可以帮助同步翻译。

fee21ae006ad66c404e582cb24649334.pngThe translation of this article or section does not reflect the original text.fee21ae006ad66c404e582cb24649334.png

Reason: Not updated since 2016 (Discuss in Talk:Nouveau (简体中文)#)

本文包含安装和配置NVIDIA显卡开源驱动 Nouveau 的内容. 有关官方闭源驱动的信息请查看NVIDIA.

查找硬件的 代号 (Wikipedia 包含更详细的列表), 然后和 功能矩阵 进行比较,缺人支持的功能。

安装

安装 Xorg DDX 驱动进行 2D加速,它还会引入

为x86_64提供32-bit支持, 请从multilib源中安装

要支持 OpenGL,请安装 [断开的链接:replaced by, 使用 multilib 的话,还需要安装 AUR。

加载

Nouveau的内核模块应该在系统启动时就已自动加载,如果没有的话:

确保你的内核参数中没有nomodeset 或者 vga=, 因为Nouveau需要内核模式设置。

另外,确保你没有在 modprobe 配置文件 /etc/modprobe.d/ 或 /usr/lib/modprobe.d/ 中屏蔽 Nouveau。

检查 dmesg 中有没有 opcode 错误,如果有的话,将 nouveau.config=NvBios=PRAMIN 加入 内核参数禁止模块卸载[1]

尽早启动 KMS

Tip: 如果你对这个问题的解决有问题的话,请访问这个页面.

Nouveau 驱动依赖Kernel mode setting (KMS)。当系统启动时,KMS 模块会在其它模块之后启用,所以显示的分辨率发生改变。查看Nouveau KernelModeSetting 页面获取更多细节。

可以设置将 KMS 尽早启动,在 initramfs 加载时就接管功能。

将 nouveau 加入 /etc/mkinitcpio.conf 的 MODULES 数组:

MODULES="... nouveau ..."

如果你使用了一个自定义的EDID文件,你应该像这样把它加入到initramfs 中:

/etc/mkinitcpio.conf

FILES="/lib/firmware/edid/your_edid.bin"

重新生成初始ramdisk映像:

# mkinitcpio -p

如果 Nouneau 出问题了,不得不多次重建 nouveau-drm 进行测试,请不要在 initramfs 中添加nouveau。因为这样会容易忘记重建 initramfs 而使测试更加困难。先使用“延迟启动”,直到系统已经稳定。如果需要自定义固件,使用 initrams 可能会有更多问题(一般不建议)

提示与技巧

保留已安装的Nvidia驱动

如果你想保留已经安装的官方驱动但又想要使用Nouveau驱动,像下面注释掉/etc/modprobe.d/nouveau_blacklist.conf 中的内容

#blacklist nouveau

并通过新建文件/etc/X11/xorg.conf.d/20-nouveau.conf 来告诉Xorg引导Nouveau驱动而不是Nvidia驱动,文件内容如下:

Section "Device"

Identifier "Nvidia card"

Driver "nouveau"

EndSection

Tip: 如果你需要经常性在两种驱动间切换,你可以使用 这些脚本[断开的链接:无效的部分].

如果你已经安装了官方驱动,又想在不重启的情况下测试Nouveau驱动,请确保‘nvidia’模块未被加载:

# rmmod nvidia

然后加载'nouveau' 模块:

# modprobe nouveau

并且通过内核信息确保它已被正常加载:

# dmesg

安装最新的开发包

你可以通过AUR安装最新的git包:

你可以通过AUR安装最新的Mesa(包含最新的DRI驱动)。

你也可以尝试安装像 AUR 这样比较新的内核版本,这可能会带来更好的性能。

要获得Nouveau最新的更新, 你应该使用AUR中的AUR 包,并且编辑PKGBUILD 以使用Nouveau自己的内核库,目前它位于: git://anongit.freedesktop.org/git/nouveau/xf86-video-nouveau.

双输出

Nouveau 支持xrandr拓展和多显示器,教程详见RandR12

这是一个完整的例子 /etc/X11/xorg.conf.d/20-nouveau.conf 用来演示在双输出模式下运行两个显示器。当然,你可能更喜欢像GNOME显示控制中心 (gnome-control-center display)这样的图形化配置工具.

# the right one

Section "Monitor"

Identifier "NEC"

Option "PreferredMode" "1280x1024_60.00"

EndSection

# the left one

Section "Monitor"

Identifier "FUS"

Option "PreferredMode" "1280x1024_60.00"

Option "LeftOf" "NEC"

EndSection

Section "Device"

Identifier "nvidia card"

Driver "nouveau"

Option "Monitor-DVI-I-1" "NEC"

Option "Monitor-DVI-I-2" "FUS"

EndSection

Section "Screen"

Identifier "screen1"

Monitor "NEC"

DefaultDepth 24

SubSection "Display"

Depth 24

Virtual 2560 2048

EndSubSection

Device "nvidia card"

EndSection

Section "ServerLayout"

Identifier "layout1"

Screen "screen1"

EndSection

设置控制台分辨率

使用KMS).

电源管理

GPU缩放依赖于GPU上的各个阶段的准备。kernel 3.18 之后内核包含电源管理功能,如果要玩游戏的话,可以将 nouveau.pstate=1 加入模块参数,启用 pstate,这样会获得更高的频率。

风扇控制

如果硬件支持,可以通过 /sys 控制风扇转速。

$ find /sys -name pwm1_enable

/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/hwmon/hwmon1/pwm1_enable

$ readlink /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/driver

../../../../bus/pci/drivers/nouveau

pwm1_enable 可以设置为 0, 1 或 2,意思是 NONE, MANUAL 和 AUTO 风扇控制。设置为手动时,可以手动设置 pwm1,例如设置为 40 表示 40% 的转速.

警告: 风险自担,不要太热烧了显卡!

可以通过 udev 规则设置:

$ cat /etc/udev/rules.d/50-nouveau-hwmon.rules

ACTION=="add", SUBSYSTEM=="hwmon", DRIVERS=="nouveau", ATTR{pwm1_enable}="2"

参考:

Optimus

要在笔记本上使用 Optimus(使用两个 GPUs),请阅读 bumblebee 和 PRIME

故障排除

添加以下内容到内核命令(如果使用grub启动,在启动菜单下按e)来打开视频调试:

drm.debug=14 log_buf_len=16M

建立详细的Xorg日志:

startx -- -logverbose 9 -verbose 9

查看加载的视频模块的参数和值:

modinfo -p video

禁用 MSI

如果出现模块加载错误或 X 服务器无法启用,请尝试将 nouveau.config=NvMSI=0 加入 内核参数.

Phantom Output Issue

It is possible for the nouveau driver to detect "phantom" outputs. For example, both VGA-1 and LVDS-1 are shown as connected but only LVDS-1 is present.

This causes display problems and a corrupted screen.

The problem can be overcome by disabling the phantom output (VGA-1 in the examples given) on the kernel command line of your boot loader. This can be achieved by appending the following:

video=VGA-1:d

Where d = disable.

The phantom output can also be disabled in X by adding the following to /etc/X11/xorg.conf.d/20-nouveau.conf:

Section "Monitor"

Identifier "VGA-1"

Option "Ignore" "1"

EndSection

Random lockups with kernel error messages

Specific Nvidia chips with Nouveau may give random system lockups and more commonly throw many kernel messages, seen with dmesg. Try adding the nouveau.noaccel=1 kernel parameter. See [2] for more information.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值