我想我使用的是 radeon 而不是 amdgpu?我该如何改变?

Era*_*615 10 radeon amd-graphics 17.04 amdgpu

所以我在 17.04 上,我知道 amdgpu-pro 在 4.10 内核上不可用。但我很好奇我在跑什么,所以我用

lspci -k | grep -EA3 'VGA|3D|Display' 
Run Code Online (Sandbox Code Playgroud)

它返回了

01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Hawaii XT / Grenada XT [Radeon R9 290X/390X]
Subsystem: ASUSTeK Computer Inc. R9 290X DirectCU II OC
Kernel driver in use: radeon
Kernel modules: radeon, amdgpu
Run Code Online (Sandbox Code Playgroud)

那么这是否意味着我有 amdgpu 但正在使用 radeon?我似乎无法找到有关如何在驱动程序之间切换的信息。我的其他相关问题是有没有人知道 oibaf 作为替代方案,或者有人可以告诉我是否值得努力回退内核?我主要将它用作游戏装备,而我从 radeon 中获得了糟糕的兼容性。我宁愿不必回到 16.10 仅仅因为 amd 似乎不爱我们 linux 用户。

Emi*_*lio 10

这样做的新方法不涉及将任何模块列入黑名单。你只需要向内核发送两个参数:

对于加勒比群岛 GPU

radeon.cik_support=0 amdgpu.cik_support=1
Run Code Online (Sandbox Code Playgroud)

对于海岛 GPU

radeon.si_support=0 amdgpu.si_support=1
Run Code Online (Sandbox Code Playgroud)

我个人喜欢将其添加为默认值,因此我编辑/etc/default/grub,然后将内核参数添加到GRUB_CMDLINE_LINUX_DEFAULT,如下所示:

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="radeon.cik_support=0 amdgpu.cik_support=1 radeon.si_support=0 amdgpu.si_support=1"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
Run Code Online (Sandbox Code Playgroud)

请记住运行update-grub并重新启动系统以使更改生效。

我可以确认这适用于自 17.10 以来运行 Ubuntu 的 390 倍。还尝试了 18.04、18.10、19.04、19.10、20.04,因为我在它们发布时一直在使用它。(我相信你也可以在 17.04 做同样的事情)

或者,如果要启用新的动态电源管理显示代码实验支持,还需要添加以下几行

amdgpu.dc=1
amdgpu.dpm=1
Run Code Online (Sandbox Code Playgroud)

有关 DC 代码的更多信息,请查看此链接:https : //wiki.archlinux.org/index.php/AMDGPU#AMD_DC

根据我个人使用 390x 卡的经验,DC 代码不稳定,我不得不禁用它以获得稳定的内核。最近几个月我没有重新尝试启用它,所以我不知道 DC 中的这个错误是否已修复。


Era*_*615 1

将其列入黑名单就达到了目的。我现在正在运行 AMDGPU,至少在专业版推出之前是这样。我将列出这些步骤作为答案,以防其他人来寻找答案。

内核模块中内置的黑名单是在启动时完成的,因此 grub 会完成这项工作。编辑

/ect/default/grub
Run Code Online (Sandbox Code Playgroud)

使用您选择的编辑器并添加

modprobe.blacklist=radeon
Run Code Online (Sandbox Code Playgroud)

进入 GRUB_CMDLINE_LINUX_DEFAULT 旁边可能已经存在的任何东西,例如安静的飞溅。然后,保存更改并更新 grub。

sudo update-grub2
Run Code Online (Sandbox Code Playgroud)

重新启动,您应该使用 AMDGPU 而不是 radeon。我应该强调确保您的卡兼容,否则将您的 gfx 模块列入黑名单可能会导致问题。