I'm not able to start X with my new AMD Radeon RX 5700 XT GPU and the open source amdgpu driver. The X server is failing to detect the GPU.
I'm running nixpkgs master (d7266d00b29492bc286dd788d04c3dc4f07390cb) with services.xserver.videoDrivers = [ "amdgpu" ]
and boot.kernelPackages = pkgs.linuxPackages_latest
i.e. Linux 5.5.5 and hardware.enableRedistributableFirmware = true
. I have the impression from #68809 that this would "just work" because all of the relevant tweaks have gone upstream in nixpkgs master by now - but obviously I am missing something.
Gist at https://gist.github.com/6acc7d93ee0f99059fc799e31e9bd46c
Feb 22 18:24:39 interlaken xserver-wrapper[1299]: (II) LoadModule: "amdgpu"
Feb 22 18:24:39 interlaken xserver-wrapper[1299]: (II) Loading /nix/store/hcdvxyzi1g1bx84cq46f4kwspmy40288-xf86-video-amdgpu-19.0.1/lib/xorg/modules/drivers/amdgpu_drv.so
Feb 22 18:24:39 interlaken xserver-wrapper[1299]: (II) Module amdgpu: vendor="X.Org Foundation"
Feb 22 18:24:39 interlaken xserver-wrapper[1299]: compiled for 1.20.7, module version = 19.0.1
Feb 22 18:24:39 interlaken xserver-wrapper[1299]: Module class: X.Org Video Driver
Feb 22 18:24:39 interlaken xserver-wrapper[1299]: ABI class: X.Org Video Driver, version 24.1
Feb 22 18:24:39 interlaken xserver-wrapper[1299]: (II) AMDGPU: Driver for AMD Radeon:
Feb 22 18:24:39 interlaken xserver-wrapper[1299]: All GPUs supported by the amdgpu kernel driver
Feb 22 18:24:39 interlaken xserver-wrapper[1299]: (II) AMDGPU(G0): [KMS] Kernel modesetting enabled.
Feb 22 18:24:39 interlaken xserver-wrapper[1299]: (EE) No devices detected.
Feb 22 18:24:39 interlaken xserver-wrapper[1299]: (EE)
Feb 22 18:24:39 interlaken xserver-wrapper[1299]: Fatal server error:
Feb 22 18:24:39 interlaken xserver-wrapper[1299]: (EE) no screens found(EE)
Feb 22 18:24:39 interlaken xserver-wrapper[1299]: (EE)
84:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Device 731f (rev c1) (prog-if 00 [VGA controller])
Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Device 0b36
Flags: bus master, fast devsel, latency 0, IRQ 100, NUMA node 1
Memory at e0000000 (64-bit, prefetchable) [size=256M]
Memory at f0000000 (64-bit, prefetchable) [size=2M]
I/O ports at f000 [size=256]
Memory at fbc00000 (32-bit, non-prefetchable) [size=512K]
Expansion ROM at fbc80000 [disabled] [size=128K]
Capabilities: <access denied>
Kernel driver in use: amdgpu
Kernel modules: amdgpu
Oh, that's quite some "bad luck", after https://github.com/NixOS/nixpkgs/issues/76569
@vcunat Indeed :-) though I knew I was tempting fate by going for a relatively new model but I've been learning a little bit of Blender lately (on a laptop without discrete GPU) and I couldn't resist...
IIRC, you just need mesa + linux>=5.4. removing amdgpu may work
EDIT: nevermind. I'll investigate. I have a 5700XT sitting next to me
I have now tested this on the 20.03 branch (64829beee182dc41321b7c7c4b9a24a1ec6fe4a5) and the result is the same.
@jb55 you seem to know a lot about this stuff, do you have any diagnostic tips?
One thing jumping out at me is the X server amdgpu module saying "no devices detected" even though lspci is reporting that the GPU is being used by the kernel amdgpu driver. So the kernel detects the GPU but the X server doesn't?
@lukego, have you tried setting services.xserver.videoDrivers = []
yet? See if that loads a different driver, which could indicate some weird card detection problem. Another thing you can try is specifying the vesa
driver and see if you get anything to display, in case it's a faulty card.
Another possibility, given your previous trouble with an nvidia card as well, is that the motherboard is at fault here.
@billksun Thanks for taking the time to think about this. I have tried with videoDrivers = []
and that also didn't work.
I'll try to think of a way to eliminate the motherboard as a potential fault. The Nvidia card had initially worked with this board and then mysteriously stopped working at some point -- could also point to a hardware fault, and to that fault being in the board if it affects the Radeon too.
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/getting-plasma5-running/6280/7
cc @lukego
Just wanted to mention that I don't have this issue with 5700xt on the current nixos-unstable
Linux monad 5.5.9 #1-NixOS SMP Thu Mar 12 06:18:49 UTC 2020 x86_64 GNU/Linux
One thing I noticed from your logs: my xserver never loads the amdgpu module, only:
LoadModule: "ati"
LoadModule: "fbdev"
LoadModule: "glamoregl"
LoadModule: "glx"
LoadModule: "modesetting"
LoadModule: "vesa"
LoadModule: "evdev"
LoadModule: "fb"
I have videoDrivers = []
set
display-manager logs: https://jb55.com/s/a0f6324e10da9de3.txt
syslog:
[ 0.000000] Command line: BOOT_IMAGE=(hd0)//root/nixos/@/boot/kernels/rz59bgmbni45fsn4lw15i3kk55zb3ghx-linux-5.5.9-bzImage systemConfig=/nix/store/hjffaz6199hhxnh59xmk3dcb3fbwpd2s-nixos-system-monad-20.09.git.05410d470ed init=/nix/store/hjffaz6199hhxnh59xmk3dcb3fbwpd2s-nixos-system-monad-20.09.git.05410d470ed/init amdgpu.gpu_recovery=1 loglevel=4
[ 0.000000] Kernel command line: BOOT_IMAGE=(hd0)//root/nixos/@/boot/kernels/rz59bgmbni45fsn4lw15i3kk55zb3ghx-linux-5.5.9-bzImage systemConfig=/nix/store/hjffaz6199hhxnh59xmk3dcb3fbwpd2s-nixos-system-monad-20.09.git.05410d470ed init=/nix/store/hjffaz6199hhxnh59xmk3dcb3fbwpd2s-nixos-system-monad-20.09.git.05410d470ed/init amdgpu.gpu_recovery=1 loglevel=4
[ 33.044305] [drm] amdgpu kernel modesetting enabled.
[ 33.044463] amdgpu 0000:26:00.0: vgaarb: deactivate vga console
[ 33.069563] amdgpu 0000:26:00.0: No more image in the PCI ROM
[ 33.069616] amdgpu 0000:26:00.0: VRAM: 8176M 0x0000008000000000 - 0x00000081FEFFFFFF (8176M used)
[ 33.069617] amdgpu 0000:26:00.0: GART: 512M 0x0000000000000000 - 0x000000001FFFFFFF
[ 33.069687] [drm] amdgpu: 8176M of VRAM memory ready
[ 33.069689] [drm] amdgpu: 8176M of GTT memory ready.
[ 33.806276] amdgpu: [powerplay] use vbios provided pptable
[ 33.806355] amdgpu: [powerplay] smu driver if version = 0x00000033, smu fw if version = 0x00000035, smu fw version = 0x002a2f84 (42.47.132)
[ 33.806355] amdgpu: [powerplay] SMU driver if version not matched
[ 33.850474] amdgpu: [powerplay] SMU is initialized successfully!
[ 33.865756] snd_hda_intel 0000:26:00.1: bound 0000:26:00.0 (ops amdgpu_dm_audio_component_bind_ops [amdgpu])
[ 33.940926] fbcon: amdgpudrmfb (fb0) is primary device
[ 34.309868] amdgpu 0000:26:00.0: fb0: amdgpudrmfb frame buffer device
[ 34.317299] amdgpu 0000:26:00.0: ring 0(gfx_0.0.0) uses VM inv eng 4 on hub 0
[ 34.317301] amdgpu 0000:26:00.0: ring 1(comp_1.0.0) uses VM inv eng 5 on hub 0
[ 34.317302] amdgpu 0000:26:00.0: ring 2(comp_1.1.0) uses VM inv eng 6 on hub 0
[ 34.317303] amdgpu 0000:26:00.0: ring 3(comp_1.2.0) uses VM inv eng 7 on hub 0
[ 34.317304] amdgpu 0000:26:00.0: ring 4(comp_1.3.0) uses VM inv eng 8 on hub 0
[ 34.317305] amdgpu 0000:26:00.0: ring 5(comp_1.0.1) uses VM inv eng 9 on hub 0
[ 34.317306] amdgpu 0000:26:00.0: ring 6(comp_1.1.1) uses VM inv eng 10 on hub 0
[ 34.317307] amdgpu 0000:26:00.0: ring 7(comp_1.2.1) uses VM inv eng 11 on hub 0
[ 34.317308] amdgpu 0000:26:00.0: ring 8(comp_1.3.1) uses VM inv eng 12 on hub 0
[ 34.317309] amdgpu 0000:26:00.0: ring 9(kiq_2.1.0) uses VM inv eng 13 on hub 0
[ 34.317310] amdgpu 0000:26:00.0: ring 10(sdma0) uses VM inv eng 14 on hub 0
[ 34.317311] amdgpu 0000:26:00.0: ring 11(sdma1) uses VM inv eng 15 on hub 0
[ 34.317312] amdgpu 0000:26:00.0: ring 12(vcn_dec) uses VM inv eng 4 on hub 1
[ 34.317313] amdgpu 0000:26:00.0: ring 13(vcn_enc0) uses VM inv eng 5 on hub 1
[ 34.317314] amdgpu 0000:26:00.0: ring 14(vcn_enc1) uses VM inv eng 6 on hub 1
[ 34.317315] amdgpu 0000:26:00.0: ring 15(vcn_jpeg) uses VM inv eng 7 on hub 1
[ 34.317445] [drm] Initialized amdgpu 3.36.0 20150101 for 0000:26:00.0 on minor 0
I'm using services.xserver.videoDrivers = [ "amdgpu" ]
for my RX5700XT machine and I have no issues with that. I think this setting is not the cause of this issue. I would try to flash motherboard as a first thing.
I am on nixos-20.03
commit da92e0566d1381184faae4f2c2a69f5ba2a2a08d
.
Linux old-phoenix 5.5.8 #1-NixOS SMP Thu Mar 5 15:45:26 UTC 2020 x86_64 GNU/Linux
And use the following config for my 5700 XT:
{
services.xserver = {
videoDrivers = [ "amdgpu" ];
# https://wiki.parabola.nu/ATI
deviceSection = ''
Option "TearFree" "true"
'';
};
}
I am actually running it on a 10 year old motherboard which should not be able to run it, since the card requires UEFI. Luckily it has this Express Asus Gate feature that is somewhat like UEFI, which can fool the GPU to work properly.
Thanks all. Card works in new motherboard. Assuming the old one is damaged.
Your other motherboard could also require a newer bios. flashing it with the latest also may work
Most helpful comment
Thanks all. Card works in new motherboard. Assuming the old one is damaged.