Amdgpu driver issues after upgrade

I’m experiencing amdgpu issues when trying to run startx. This used to work fine and happened after updating my nixpkgs pin.

I have my configuration set as per the wiki. I also tried by including "radeonsi" in video drivers:

      videoDrivers = [ "amdgpu" "radeonsi" ];

Any idea what might be going wrong here? Happy to provide further information if needed.

Here’s xorg log:

[  1406.469]
X.Org X Server 1.20.12
X Protocol Version 11, Revision 0
[  1406.483] Build Operating System: Nix
[  1406.487] Current Operating System: Linux ryzen3950 5.13.4 #1-NixOS SMP Tue Jul 20 14:00:42 UTC 2021 x86_64
[  1406.488] Kernel command line: initrd=\efi\nixos\kdda3z2w4jsa3kck7xildb73ayd3zyn1-initrd-linux-5.13.4-initrd.efi init=/nix/store/nz6ngz269i0mskb8sqah0kn3i3kddl44-nixos-system-ryzen3950-21.11.20210725.3ea51d0/init fbcon=rotate:3 loglevel=4
[  1406.502] Build Date: 08 July 2021  07:22:56PM
[  1406.507]
[  1406.512] Current version of pixman: 0.38.4
[  1406.522] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[  1406.522] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  1406.541] (==) Log file: "/var/log/Xorg.0.log", Time: Sun Jul 25 19:25:05 2021
[  1406.546] (++) Using config file: "/nix/store/h38lawz1w3ppdskg94x8izpvywgv42xc-xserver.conf"
[  1406.551] (==) Using config directory: "/etc/X11/xorg.conf.d"
[  1406.556] (==) Using system config directory "/nix/store/hl7p4gxnjnwfh0c4csp4y1wfdprg0a68-xorg-server-1.20.12/share/X11/xorg.conf.d"
[  1406.561] (==) ServerLayout "Layout[all]"
[  1406.565] (**) |-->Screen "Screen-amdgpu[0]" (0)
[  1406.570] (**) |   |-->Monitor "<default monitor>"
[  1406.575] (**) |   |-->Device "Device-amdgpu[0]"
[  1406.584] (==) No monitor specified for screen "Screen-amdgpu[0]".
	Using a default monitor configuration.
[  1406.584] (**) Option "DontZap" "off"
[  1406.589] (**) Option "AllowMouseOpenFail" "on"
[  1406.599] (==) Automatically adding devices
[  1406.603] (==) Automatically enabling devices
[  1406.608] (==) Automatically adding GPU devices
[  1406.613] (==) Max clients allowed: 256, resource mask: 0x1fffff
[  1406.643] (**) FontPath set to:
	/nix/store/8g9gq1dqcxpznsqcz5pvzxrql3y2l386-font-misc-misc-1.1.2/lib/X11/fonts/misc,
	/nix/store/4ilvq4av99rn2prm1x32mxvky6wvh5r7-font-cursor-misc-1.0.3/lib/X11/fonts/misc,
	/nix/store/a6jnpnma7iwwj81m6siqk5rny4sdpk9y-unifont-13.0.05/share/fonts,
	/nix/store/2cjpybgjf5s4ydm9crw5jdpxc5c5bc7p-font-adobe-100dpi-1.0.3/lib/X11/fonts/100dpi,
	/nix/store/ykdzrl3zji1i1gdb3qgfkf3h6h9kwyz6-font-adobe-75dpi-1.0.3/lib/X11/fonts/75dpi
[  1406.669] (**) ModulePath set to "/nix/store/58an2zz0vid28ha9q8k40vx6zl9nx2m0-xf86-video-amdgpu-19.1.0/lib/xorg/modules/drivers,/nix/store/hl7p4gxnjnwfh0c4csp4y1wfdprg0a68-xorg-server-1.20.12/lib/xorg/modules,/nix/store/hl7p4gxnjnwfh0c4csp4y1wfdprg0a68-xorg-server-1.20.12/lib/xorg/modules/drivers,/nix/store/hl7p4gxnjnwfh0c4csp4y1wfdprg0a68-xorg-server-1.20.12/lib/xorg/modules/extensions,/nix/store/dz0mmz6s7c66n3jfi2pww3zs05xw4zq8-xf86-input-evdev-2.10.6/lib/xorg/modules/input,/nix/store/yimqcc55acwq32mibjzzs23m8ry02jkl-xf86-input-libinput-1.1.0/lib/xorg/modules/input"
[  1406.680] (II) The server relies on udev to provide the list of input devices.
	If no devices become available, reconfigure udev or disable AutoAddDevices.
[  1406.685] (II) Loader magic: 0x62cd40
[  1406.691] (II) Module ABI versions:
[  1406.696] 	X.Org ANSI C Emulation: 0.4
[  1406.702] 	X.Org Video Driver: 24.1
[  1406.707] 	X.Org XInput driver : 24.1
[  1406.713] 	X.Org Server Extension : 10.0
[  1406.724] (++) using VT number 1

[  1406.725] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_31
[  1406.725] (II) xfree86: Adding drm device (/dev/dri/card0)
[  1406.725] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 13 paused 0
[  1406.728] (--) PCI:*(13@0:0:0) 1002:731f:1458:2313 rev 193, Mem @ 0xe0000000/268435456, 0xf0000000/2097152, 0xfcb00000/524288, I/O @ 0x0000f000/256, BIOS @ 0x????????/131072
[  1406.728] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[  1406.728] (II) "glx" will be loaded by default.
[  1406.728] (II) LoadModule: "glx"
[  1406.728] (II) Loading /nix/store/hl7p4gxnjnwfh0c4csp4y1wfdprg0a68-xorg-server-1.20.12/lib/xorg/modules/extensions/libglx.so
[  1406.729] (II) Module glx: vendor="X.Org Foundation"
[  1406.729] 	compiled for 1.20.12, module version = 1.0.0
[  1406.729] 	ABI class: X.Org Server Extension, version 10.0
[  1406.729] (II) LoadModule: "amdgpu"
[  1406.729] (II) Loading /nix/store/58an2zz0vid28ha9q8k40vx6zl9nx2m0-xf86-video-amdgpu-19.1.0/lib/xorg/modules/drivers/amdgpu_drv.so
[  1406.729] (II) Module amdgpu: vendor="X.Org Foundation"
[  1406.729] 	compiled for 1.20.12, module version = 19.1.0
[  1406.729] 	Module class: X.Org Video Driver
[  1406.729] 	ABI class: X.Org Video Driver, version 24.1
[  1406.729] (II) AMDGPU: Driver for AMD Radeon:
	All GPUs supported by the amdgpu kernel driver
[  1406.729] (**) AMDGPU(0): Depth 24, (--) framebuffer bpp 32
[  1406.729] (II) AMDGPU(0): Pixel depth = 24 bits stored in 4 bytes (32 bpp pixmaps)
[  1406.729] (==) AMDGPU(0): Default visual is TrueColor
[  1406.729] (==) AMDGPU(0): RGB weight 888
[  1406.729] (II) AMDGPU(0): Using 8 bits per RGB (8 bit DAC)
[  1406.729] (--) AMDGPU(0): Chipset: "AMD Radeon RX 5700 XT" (ChipID = 0x731f)
[  1406.729] (II) Loading sub module "fb"
[  1406.729] (II) LoadModule: "fb"
[  1406.729] (II) Loading /nix/store/hl7p4gxnjnwfh0c4csp4y1wfdprg0a68-xorg-server-1.20.12/lib/xorg/modules/libfb.so
[  1406.729] (II) Module fb: vendor="X.Org Foundation"
[  1406.729] 	compiled for 1.20.12, module version = 1.0.0
[  1406.729] 	ABI class: X.Org ANSI C Emulation, version 0.4
[  1406.730] (II) Loading sub module "dri2"
[  1406.730] (II) LoadModule: "dri2"
[  1406.730] (II) Module "dri2" already built-in
[  1406.766] (II) Loading sub module "glamoregl"
[  1406.766] (II) LoadModule: "glamoregl"
[  1406.767] (II) Loading /nix/store/hl7p4gxnjnwfh0c4csp4y1wfdprg0a68-xorg-server-1.20.12/lib/xorg/modules/libglamoregl.so
[  1406.768] (II) Module glamoregl: vendor="X.Org Foundation"
[  1406.768] 	compiled for 1.20.12, module version = 1.0.1
[  1406.768] 	ABI class: X.Org ANSI C Emulation, version 0.4
[  1406.770] (EE) AMDGPU(0): eglInitialize() failed
[  1406.770] (EE) AMDGPU(0): glamor detected, failed to initialize EGL.
[  1406.770] (WW) AMDGPU(0): amdgpu_glamor_pre_init returned FALSE, using ShadowFB
[  1406.770] (II) Loading sub module "shadow"
[  1406.770] (II) LoadModule: "shadow"
[  1406.770] (II) Loading /nix/store/hl7p4gxnjnwfh0c4csp4y1wfdprg0a68-xorg-server-1.20.12/lib/xorg/modules/libshadow.so
[  1406.770] (II) Module shadow: vendor="X.Org Foundation"
[  1406.770] 	compiled for 1.20.12, module version = 1.1.0
[  1406.770] 	ABI class: X.Org ANSI C Emulation, version 0.4
[  1406.770] (II) AMDGPU(0): KMS Pageflipping: enabled
[  1406.772] (II) AMDGPU(0): Output DisplayPort-0 has no monitor section
[  1406.774] (II) AMDGPU(0): Output DisplayPort-1 has no monitor section
[  1406.774] (II) AMDGPU(0): Output DisplayPort-2 has no monitor section
[  1406.774] (II) AMDGPU(0): Output HDMI-A-0 has no monitor section
[  1406.808] (II) AMDGPU(0): EDID for output DisplayPort-0
[  1406.808] (II) AMDGPU(0): Manufacturer: GSM  Model: 5b09  Serial#: 515045
[  1406.808] (II) AMDGPU(0): Year: 2018  Week: 5
[  1406.808] (II) AMDGPU(0): EDID Version: 1.4
[  1406.808] (II) AMDGPU(0): Digital Display Input
[  1406.808] (II) AMDGPU(0): 10 bits per channel
[  1406.808] (II) AMDGPU(0): Digital interface is DisplayPort
[  1406.808] (II) AMDGPU(0): Max Image Size [cm]: horiz.: 60  vert.: 34
[  1406.808] (II) AMDGPU(0): Gamma: 2.20
[  1406.808] (II) AMDGPU(0): DPMS capabilities: StandBy
[  1406.808] (II) AMDGPU(0): Supported color encodings: RGB 4:4:4 YCrCb 4:4:4 YCrCb 4:2:2
[  1406.808] (II) AMDGPU(0): Default color space is primary color space
[  1406.808] (II) AMDGPU(0): First detailed timing is preferred mode
[  1406.808] (II) AMDGPU(0): Preferred mode is native pixel format and refresh rate
[  1406.808] (II) AMDGPU(0): redX: 0.652 redY: 0.335   greenX: 0.305 greenY: 0.637
[  1406.808] (II) AMDGPU(0): blueX: 0.148 blueY: 0.062   whiteX: 0.313 whiteY: 0.329
[  1406.808] (II) AMDGPU(0): Supported established timings:
[  1406.808] (II) AMDGPU(0): 640x480@60Hz
[  1406.808] (II) AMDGPU(0): 800x600@60Hz
[  1406.808] (II) AMDGPU(0): 1024x768@60Hz
[  1406.808] (II) AMDGPU(0): Manufacturer's mask: 0
[  1406.808] (II) AMDGPU(0): Supported standard timings:
[  1406.808] (II) AMDGPU(0): #0: hsize: 1152  vsize 864  refresh: 60  vid: 16497
[  1406.808] (II) AMDGPU(0): #1: hsize: 1280  vsize 1024  refresh: 60  vid: 32897
[  1406.808] (II) AMDGPU(0): #2: hsize: 1280  vsize 720  refresh: 60  vid: 49281
[  1406.808] (II) AMDGPU(0): #3: hsize: 1600  vsize 900  refresh: 60  vid: 49321
[  1406.808] (II) AMDGPU(0): #4: hsize: 1920  vsize 1080  refresh: 60  vid: 49361
[  1406.808] (II) AMDGPU(0): #5: hsize: 1280  vsize 800  refresh: 60  vid: 129
[  1406.808] (II) AMDGPU(0): Supported detailed timing:
[  1406.808] (II) AMDGPU(0): clock: 533.2 MHz   Image Size:  600 x 340 mm
[  1406.808] (II) AMDGPU(0): h_active: 3840  h_sync: 3888  h_sync_end 3920 h_blank_end 4000 h_border: 0
[  1406.808] (II) AMDGPU(0): v_active: 2160  v_sync: 2214  v_sync_end 2219 v_blanking: 2222 v_border: 0
[  1406.808] (II) AMDGPU(0): Supported detailed timing:
[  1406.808] (II) AMDGPU(0): clock: 266.6 MHz   Image Size:  600 x 340 mm
[  1406.808] (II) AMDGPU(0): h_active: 3840  h_sync: 3848  h_sync_end 3992 h_blank_end 4000 h_border: 0
[  1406.808] (II) AMDGPU(0): v_active: 2160  v_sync: 2214  v_sync_end 2219 v_blanking: 2222 v_border: 0
[  1406.808] (II) AMDGPU(0): Ranges: V min: 56 V max: 61 Hz, H min: 30 H max: 135 kHz, PixClock max 565 MHz
[  1406.808] (II) AMDGPU(0): Monitor name: LG Ultra HD
[  1406.809] (II) AMDGPU(0): Supported detailed timing:
[  1406.809] (II) AMDGPU(0): clock: 148.5 MHz   Image Size:  600 x 340 mm
[  1406.809] (II) AMDGPU(0): h_active: 1920  h_sync: 2008  h_sync_end 2052 h_blank_end 2200 h_border: 0
[  1406.809] (II) AMDGPU(0): v_active: 1080  v_sync: 1084  v_sync_end 1089 v_blanking: 1125 v_border: 0
[  1406.809] (II) AMDGPU(0): Supported detailed timing:
[  1406.809] (II) AMDGPU(0): clock: 241.5 MHz   Image Size:  600 x 340 mm
[  1406.809] (II) AMDGPU(0): h_active: 2560  h_sync: 2608  h_sync_end 2640 h_blank_end 2720 h_border: 0
[  1406.809] (II) AMDGPU(0): v_active: 1440  v_sync: 1443  v_sync_end 1448 v_blanking: 1481 v_border: 0
[  1406.809] (II) AMDGPU(0): Number of EDID sections to follow: 1
[  1406.809] (II) AMDGPU(0): EDID (in hex):
[  1406.809] (II) AMDGPU(0): 	00ffffffffffff001e6d095be5db0700
[  1406.809] (II) AMDGPU(0): 	051c0104b53c22789e3035a7554ea326
[  1406.809] (II) AMDGPU(0): 	0f50542108007140818081c0a9c0d1c0
[  1406.809] (II) AMDGPU(0): 	8100010101014dd000a0f0703e803020
[  1406.809] (II) AMDGPU(0): 	650c58542100001a286800a0f0703e80
[  1406.809] (II) AMDGPU(0): 	0890650c58542100001a000000fd0038
[  1406.809] (II) AMDGPU(0): 	3d1e8738000a202020202020000000fc
[  1406.809] (II) AMDGPU(0): 	004c4720556c7472612048440a2001d3
[  1406.809] (II) AMDGPU(0): 	02031171449004030123090707830100
[  1406.809] (II) AMDGPU(0): 	00023a801871382d40582c4500585421
[  1406.809] (II) AMDGPU(0): 	00001e565e00a0a0a029503020350058
[  1406.809] (II) AMDGPU(0): 	542100001a0000000000000000000000
[  1406.809] (II) AMDGPU(0): 	00000000000000000000000000000000
[  1406.809] (II) AMDGPU(0): 	00000000000000000000000000000000
[  1406.809] (II) AMDGPU(0): 	00000000000000000000000000000000
[  1406.809] (II) AMDGPU(0): 	000000000000000000000000000000c8
[  1406.809] (II) AMDGPU(0): Printing probed modes for output DisplayPort-0
[  1406.809] (II) AMDGPU(0): Modeline "3840x2160"x60.0  533.25  3840 3888 3920 4000  2160 2214 2219 2222 +hsync -vsync (133.3 kHz UeP)
[  1406.809] (II) AMDGPU(0): Modeline "3840x2160"x30.0  266.64  3840 3848 3992 4000  2160 2214 2219 2222 +hsync -vsync (66.7 kHz e)
[  1406.809] (II) AMDGPU(0): Modeline "2560x1440"x60.0  241.50  2560 2608 2640 2720  1440 1443 1448 1481 +hsync -vsync (88.8 kHz e)
[  1406.809] (II) AMDGPU(0): Modeline "1920x1200"x60.0  533.25  1920 3888 3920 4000  1200 2214 2219 2222 +hsync -vsync (133.3 kHz e)
[  1406.809] (II) AMDGPU(0): Modeline "1920x1080"x60.0  148.50  1920 2008 2052 2200  1080 1084 1089 1125 +hsync +vsync (67.5 kHz e)
[  1406.809] (II) AMDGPU(0): Modeline "1920x1080"x59.9  148.35  1920 2008 2052 2200  1080 1084 1089 1125 +hsync +vsync (67.4 kHz e)
[  1406.809] (II) AMDGPU(0): Modeline "1600x1200"x60.0  533.25  1600 3888 3920 4000  1200 2214 2219 2222 +hsync -vsync (133.3 kHz e)
[  1406.809] (II) AMDGPU(0): Modeline "1680x1050"x60.0  533.25  1680 3888 3920 4000  1050 2214 2219 2222 +hsync -vsync (133.3 kHz e)
[  1406.809] (II) AMDGPU(0): Modeline "1600x900"x60.0  108.00  1600 1624 1704 1800  900 901 904 1000 +hsync +vsync (60.0 kHz e)
[  1406.809] (II) AMDGPU(0): Modeline "1280x1024"x60.0  108.00  1280 1328 1440 1688  1024 1025 1028 1066 +hsync +vsync (64.0 kHz e)
[  1406.809] (II) AMDGPU(0): Modeline "1440x900"x60.0  533.25  1440 3888 3920 4000  900 2214 2219 2222 +hsync -vsync (133.3 kHz e)
[  1406.809] (II) AMDGPU(0): Modeline "1280x800"x59.8   83.50  1280 1352 1480 1680  800 803 809 831 -hsync +vsync (49.7 kHz e)
[  1406.809] (II) AMDGPU(0): Modeline "1280x720"x60.0   74.25  1280 1390 1430 1650  720 725 730 750 +hsync +vsync (45.0 kHz e)
[  1406.809] (II) AMDGPU(0): Modeline "1280x720"x59.9   74.18  1280 1390 1430 1650  720 725 730 750 +hsync +vsync (45.0 kHz e)
[  1406.809] (II) AMDGPU(0): Modeline "1024x768"x60.0   65.00  1024 1048 1184 1344  768 771 777 806 -hsync -vsync (48.4 kHz e)
[  1406.809] (II) AMDGPU(0): Modeline "800x600"x60.3   40.00  800 840 968 1056  600 601 605 628 +hsync +vsync (37.9 kHz e)
[  1406.809] (II) AMDGPU(0): Modeline "720x480"x60.0   27.03  720 736 798 858  480 489 495 525 -hsync -vsync (31.5 kHz e)
[  1406.809] (II) AMDGPU(0): Modeline "720x480"x59.9   27.00  720 736 798 858  480 489 495 525 -hsync -vsync (31.5 kHz e)
[  1406.809] (II) AMDGPU(0): Modeline "640x480"x60.0   25.20  640 656 752 800  480 490 492 525 -hsync -vsync (31.5 kHz e)
[  1406.809] (II) AMDGPU(0): Modeline "640x480"x59.9   25.18  640 656 752 800  480 490 492 525 -hsync -vsync (31.5 kHz e)
[  1406.811] (II) AMDGPU(0): EDID for output DisplayPort-1
[  1406.811] (II) AMDGPU(0): Manufacturer: GSM  Model: 5b09  Serial#: 318563
[  1406.811] (II) AMDGPU(0): Year: 2018  Week: 11
[  1406.811] (II) AMDGPU(0): EDID Version: 1.4
[  1406.811] (II) AMDGPU(0): Digital Display Input
[  1406.811] (II) AMDGPU(0): 10 bits per channel
[  1406.811] (II) AMDGPU(0): Digital interface is DisplayPort
[  1406.811] (II) AMDGPU(0): Max Image Size [cm]: horiz.: 60  vert.: 34
[  1406.811] (II) AMDGPU(0): Gamma: 2.20
[  1406.811] (II) AMDGPU(0): DPMS capabilities: StandBy
[  1406.811] (II) AMDGPU(0): Supported color encodings: RGB 4:4:4 YCrCb 4:4:4 YCrCb 4:2:2
[  1406.811] (II) AMDGPU(0): Default color space is primary color space
[  1406.811] (II) AMDGPU(0): First detailed timing is preferred mode
[  1406.811] (II) AMDGPU(0): Preferred mode is native pixel format and refresh rate
[  1406.811] (II) AMDGPU(0): redX: 0.652 redY: 0.335   greenX: 0.305 greenY: 0.637
[  1406.811] (II) AMDGPU(0): blueX: 0.148 blueY: 0.062   whiteX: 0.313 whiteY: 0.329
[  1406.811] (II) AMDGPU(0): Supported established timings:
[  1406.811] (II) AMDGPU(0): 640x480@60Hz
[  1406.811] (II) AMDGPU(0): 800x600@60Hz
[  1406.811] (II) AMDGPU(0): 1024x768@60Hz
[  1406.811] (II) AMDGPU(0): Manufacturer's mask: 0
[  1406.811] (II) AMDGPU(0): Supported standard timings:
[  1406.811] (II) AMDGPU(0): #0: hsize: 1152  vsize 864  refresh: 60  vid: 16497
[  1406.811] (II) AMDGPU(0): #1: hsize: 1280  vsize 1024  refresh: 60  vid: 32897
[  1406.811] (II) AMDGPU(0): #2: hsize: 1280  vsize 720  refresh: 60  vid: 49281
[  1406.811] (II) AMDGPU(0): #3: hsize: 1600  vsize 900  refresh: 60  vid: 49321
[  1406.811] (II) AMDGPU(0): #4: hsize: 1920  vsize 1080  refresh: 60  vid: 49361
[  1406.811] (II) AMDGPU(0): #5: hsize: 1280  vsize 800  refresh: 60  vid: 129
[  1406.811] (II) AMDGPU(0): Supported detailed timing:
[  1406.811] (II) AMDGPU(0): clock: 533.2 MHz   Image Size:  600 x 340 mm
[  1406.811] (II) AMDGPU(0): h_active: 3840  h_sync: 3888  h_sync_end 3920 h_blank_end 4000 h_border: 0
[  1406.811] (II) AMDGPU(0): v_active: 2160  v_sync: 2214  v_sync_end 2219 v_blanking: 2222 v_border: 0
[  1406.811] (II) AMDGPU(0): Supported detailed timing:
[  1406.811] (II) AMDGPU(0): clock: 266.6 MHz   Image Size:  600 x 340 mm
[  1406.811] (II) AMDGPU(0): h_active: 3840  h_sync: 3848  h_sync_end 3992 h_blank_end 4000 h_border: 0
[  1406.811] (II) AMDGPU(0): v_active: 2160  v_sync: 2214  v_sync_end 2219 v_blanking: 2222 v_border: 0
[  1406.811] (II) AMDGPU(0): Ranges: V min: 56 V max: 61 Hz, H min: 30 H max: 135 kHz, PixClock max 565 MHz
[  1406.811] (II) AMDGPU(0): Monitor name: LG Ultra HD
[  1406.811] (II) AMDGPU(0): Supported detailed timing:
[  1406.811] (II) AMDGPU(0): clock: 148.5 MHz   Image Size:  600 x 340 mm
[  1406.811] (II) AMDGPU(0): h_active: 1920  h_sync: 2008  h_sync_end 2052 h_blank_end 2200 h_border: 0
[  1406.811] (II) AMDGPU(0): v_active: 1080  v_sync: 1084  v_sync_end 1089 v_blanking: 1125 v_border: 0
[  1406.811] (II) AMDGPU(0): Supported detailed timing:
[  1406.811] (II) AMDGPU(0): clock: 241.5 MHz   Image Size:  600 x 340 mm
[  1406.811] (II) AMDGPU(0): h_active: 2560  h_sync: 2608  h_sync_end 2640 h_blank_end 2720 h_border: 0
[  1406.811] (II) AMDGPU(0): v_active: 1440  v_sync: 1443  v_sync_end 1448 v_blanking: 1481 v_border: 0
[  1406.811] (II) AMDGPU(0): Number of EDID sections to follow: 1
[  1406.811] (II) AMDGPU(0): EDID (in hex):
[  1406.811] (II) AMDGPU(0): 	00ffffffffffff001e6d095b63dc0400
[  1406.811] (II) AMDGPU(0): 	0b1c0104b53c22789e3035a7554ea326
[  1406.811] (II) AMDGPU(0): 	0f50542108007140818081c0a9c0d1c0
[  1406.811] (II) AMDGPU(0): 	8100010101014dd000a0f0703e803020
[  1406.811] (II) AMDGPU(0): 	650c58542100001a286800a0f0703e80
[  1406.811] (II) AMDGPU(0): 	0890650c58542100001a000000fd0038
[  1406.811] (II) AMDGPU(0): 	3d1e8738000a202020202020000000fc
[  1406.811] (II) AMDGPU(0): 	004c4720556c7472612048440a200151
[  1406.811] (II) AMDGPU(0): 	02031171449004030123090707830100
[  1406.811] (II) AMDGPU(0): 	00023a801871382d40582c4500585421
[  1406.811] (II) AMDGPU(0): 	00001e565e00a0a0a029503020350058
[  1406.811] (II) AMDGPU(0): 	542100001a0000000000000000000000
[  1406.811] (II) AMDGPU(0): 	00000000000000000000000000000000
[  1406.811] (II) AMDGPU(0): 	00000000000000000000000000000000
[  1406.811] (II) AMDGPU(0): 	00000000000000000000000000000000
[  1406.811] (II) AMDGPU(0): 	000000000000000000000000000000c8
[  1406.811] (II) AMDGPU(0): Printing probed modes for output DisplayPort-1
[  1406.811] (II) AMDGPU(0): Modeline "3840x2160"x60.0  533.25  3840 3888 3920 4000  2160 2214 2219 2222 +hsync -vsync (133.3 kHz UeP)
[  1406.811] (II) AMDGPU(0): Modeline "3840x2160"x30.0  266.64  3840 3848 3992 4000  2160 2214 2219 2222 +hsync -vsync (66.7 kHz e)
[  1406.811] (II) AMDGPU(0): Modeline "2560x1440"x60.0  241.50  2560 2608 2640 2720  1440 1443 1448 1481 +hsync -vsync (88.8 kHz e)
[  1406.811] (II) AMDGPU(0): Modeline "1920x1200"x60.0  533.25  1920 3888 3920 4000  1200 2214 2219 2222 +hsync -vsync (133.3 kHz e)
[  1406.811] (II) AMDGPU(0): Modeline "1920x1080"x60.0  148.50  1920 2008 2052 2200  1080 1084 1089 1125 +hsync +vsync (67.5 kHz e)
[  1406.811] (II) AMDGPU(0): Modeline "1920x1080"x59.9  148.35  1920 2008 2052 2200  1080 1084 1089 1125 +hsync +vsync (67.4 kHz e)
[  1406.811] (II) AMDGPU(0): Modeline "1600x1200"x60.0  533.25  1600 3888 3920 4000  1200 2214 2219 2222 +hsync -vsync (133.3 kHz e)
[  1406.811] (II) AMDGPU(0): Modeline "1680x1050"x60.0  533.25  1680 3888 3920 4000  1050 2214 2219 2222 +hsync -vsync (133.3 kHz e)
[  1406.811] (II) AMDGPU(0): Modeline "1600x900"x60.0  108.00  1600 1624 1704 1800  900 901 904 1000 +hsync +vsync (60.0 kHz e)
[  1406.811] (II) AMDGPU(0): Modeline "1280x1024"x60.0  108.00  1280 1328 1440 1688  1024 1025 1028 1066 +hsync +vsync (64.0 kHz e)
[  1406.811] (II) AMDGPU(0): Modeline "1440x900"x60.0  533.25  1440 3888 3920 4000  900 2214 2219 2222 +hsync -vsync (133.3 kHz e)
[  1406.811] (II) AMDGPU(0): Modeline "1280x800"x59.8   83.50  1280 1352 1480 1680  800 803 809 831 -hsync +vsync (49.7 kHz e)
[  1406.811] (II) AMDGPU(0): Modeline "1280x720"x60.0   74.25  1280 1390 1430 1650  720 725 730 750 +hsync +vsync (45.0 kHz e)
[  1406.811] (II) AMDGPU(0): Modeline "1280x720"x59.9   74.18  1280 1390 1430 1650  720 725 730 750 +hsync +vsync (45.0 kHz e)
[  1406.811] (II) AMDGPU(0): Modeline "1024x768"x60.0   65.00  1024 1048 1184 1344  768 771 777 806 -hsync -vsync (48.4 kHz e)
[  1406.811] (II) AMDGPU(0): Modeline "800x600"x60.3   40.00  800 840 968 1056  600 601 605 628 +hsync +vsync (37.9 kHz e)
[  1406.811] (II) AMDGPU(0): Modeline "720x480"x60.0   27.03  720 736 798 858  480 489 495 525 -hsync -vsync (31.5 kHz e)
[  1406.811] (II) AMDGPU(0): Modeline "720x480"x59.9   27.00  720 736 798 858  480 489 495 525 -hsync -vsync (31.5 kHz e)
[  1406.811] (II) AMDGPU(0): Modeline "640x480"x60.0   25.20  640 656 752 800  480 490 492 525 -hsync -vsync (31.5 kHz e)
[  1406.811] (II) AMDGPU(0): Modeline "640x480"x59.9   25.18  640 656 752 800  480 490 492 525 -hsync -vsync (31.5 kHz e)
[  1406.811] (II) AMDGPU(0): EDID for output DisplayPort-2
[  1406.811] (II) AMDGPU(0): EDID for output HDMI-A-0
[  1406.811] (II) AMDGPU(0): Output DisplayPort-0 connected
[  1406.811] (II) AMDGPU(0): Output DisplayPort-1 connected
[  1406.811] (II) AMDGPU(0): Output DisplayPort-2 disconnected
[  1406.811] (II) AMDGPU(0): Output HDMI-A-0 disconnected
[  1406.811] (II) AMDGPU(0): Using user preference for initial modes
[  1406.811] (II) AMDGPU(0): Output DisplayPort-0 using initial mode 3840x2160 +0+0
[  1406.811] (II) AMDGPU(0): Output DisplayPort-1 using initial mode 3840x2160 +0+0
[  1406.811] (II) AMDGPU(0): mem size init: gart size :1fe5bb000 vram size: s:1fbd42000 visible:fdf6000
[  1406.811] (++) AMDGPU(0): DPI set to (192, 192)
[  1406.811] (==) AMDGPU(0): Using gamma correction (1.0, 1.0, 1.0)
[  1406.811] (II) Loading sub module "ramdac"
[  1406.811] (II) LoadModule: "ramdac"
[  1406.811] (II) Module "ramdac" already built-in
[  1406.812] (II) AMDGPU(0): Front buffer pitch: 15360 bytes
[  1406.812] (==) AMDGPU(0): DRI3 disabled
[  1406.812] (==) AMDGPU(0): Backing store enabled
[  1406.812] (WW) AMDGPU(0): Direct rendering disabled
[  1406.812] (II) AMDGPU(0): 2D and 3D acceleration disabled
[  1406.812] (==) AMDGPU(0): DPMS enabled
[  1406.812] (==) AMDGPU(0): Silken mouse enabled
[  1406.840] (II) Initializing extension Generic Event Extension
[  1406.840] (II) Initializing extension SHAPE
[  1406.840] (II) Initializing extension MIT-SHM
[  1406.840] (II) Initializing extension XInputExtension
[  1406.841] (II) Initializing extension XTEST
[  1406.841] (II) Initializing extension BIG-REQUESTS
[  1406.841] (II) Initializing extension SYNC
[  1406.841] (II) Initializing extension XKEYBOARD
[  1406.841] (II) Initializing extension XC-MISC
[  1406.841] (II) Initializing extension SECURITY
[  1406.841] (II) Initializing extension XFIXES
[  1406.841] (II) Initializing extension RENDER
[  1406.841] (II) Initializing extension RANDR
[  1406.841] (II) Initializing extension COMPOSITE
[  1406.841] (II) Initializing extension DAMAGE
[  1406.841] (II) Initializing extension MIT-SCREEN-SAVER
[  1406.841] (II) Initializing extension DOUBLE-BUFFER
[  1406.841] (II) Initializing extension RECORD
[  1406.842] (II) Initializing extension DPMS
[  1406.842] (II) Initializing extension Present
[  1406.842] (II) Initializing extension DRI3
[  1406.842] (II) Initializing extension X-Resource
[  1406.842] (II) Initializing extension XVideo
[  1406.842] (II) Initializing extension XVideo-MotionCompensation
[  1406.842] (II) Initializing extension GLX
[  1406.842] (II) AIGLX: Screen 0 is not DRI2 capable
[  1406.844] (II) IGLX: Loaded and initialized swrast
[  1406.844] (II) GLX: Initialized DRISWRAST GL provider for screen 0
[  1406.844] (II) Initializing extension XFree86-VidModeExtension
[  1406.844] (II) Initializing extension XFree86-DGA
[  1406.844] (II) Initializing extension XFree86-DRI
[  1406.844] (II) Initializing extension DRI2
[  1406.844] (II) AMDGPU(0): Setting screen physical size to 508 x 285
[  1406.861] (EE)
[  1406.861] (EE) Backtrace:
[  1406.861] (EE) 0: /nix/store/hl7p4gxnjnwfh0c4csp4y1wfdprg0a68-xorg-server-1.20.12/bin/X (OsSigHandler+0x25) [0x5a32f5]
[  1406.862] (EE) 1: /nix/store/j5p0j1w27aqdzncpw73k95byvhh5prw2-glibc-2.33-47/lib/libpthread.so.0 (funlockfile+0x50) [0x7f661cc17ef0]
[  1406.862] (EE) 2: /nix/store/j5p0j1w27aqdzncpw73k95byvhh5prw2-glibc-2.33-47/lib/libc.so.6 (gsignal+0xca) [0x7f661ca7bbaa]
[  1406.862] (EE) 3: /nix/store/j5p0j1w27aqdzncpw73k95byvhh5prw2-glibc-2.33-47/lib/libc.so.6 (abort+0xff) [0x7f661ca66523]
[  1406.863] (EE) 4: /nix/store/j5p0j1w27aqdzncpw73k95byvhh5prw2-glibc-2.33-47/lib/libc.so.6 (__assert_fail_base.cold.0+0xf) [0x7f661ca6641f]
[  1406.863] (EE) 5: /nix/store/j5p0j1w27aqdzncpw73k95byvhh5prw2-glibc-2.33-47/lib/libc.so.6 (__assert_fail+0x42) [0x7f661ca745f2]
[  1406.863] (EE) 6: /nix/store/58an2zz0vid28ha9q8k40vx6zl9nx2m0-xf86-video-amdgpu-19.1.0/lib/xorg/modules/drivers/amdgpu_drv.so (dixGetPrivateAddr.part.0+0x23) [0x7f661c310fc3]
[  1406.863] (EE) 7: /nix/store/58an2zz0vid28ha9q8k40vx6zl9nx2m0-xf86-video-amdgpu-19.1.0/lib/xorg/modules/drivers/amdgpu_drv.so (amdgpu_pixmap_get_handle+0x19a) [0x7f661c31132a]
[  1406.863] (EE) 8: /nix/store/58an2zz0vid28ha9q8k40vx6zl9nx2m0-xf86-video-amdgpu-19.1.0/lib/xorg/modules/drivers/amdgpu_drv.so (amdgpu_pixmap_get_fb+0xdd) [0x7f661c31d3fd]
[  1406.864] (EE) 9: /nix/store/58an2zz0vid28ha9q8k40vx6zl9nx2m0-xf86-video-amdgpu-19.1.0/lib/xorg/modules/drivers/amdgpu_drv.so (drmmode_set_mode_major+0x71a) [0x7f661c31f55a]
[  1406.864] (EE) 10: /nix/store/58an2zz0vid28ha9q8k40vx6zl9nx2m0-xf86-video-amdgpu-19.1.0/lib/xorg/modules/drivers/amdgpu_drv.so (drmmode_set_desired_modes+0xfa) [0x7f661c3211fa]
[  1406.864] (EE) 11: /nix/store/hl7p4gxnjnwfh0c4csp4y1wfdprg0a68-xorg-server-1.20.12/bin/X (MapWindow+0x23c) [0x46eb2c]
[  1406.864] (EE) 12: /nix/store/hl7p4gxnjnwfh0c4csp4y1wfdprg0a68-xorg-server-1.20.12/bin/X (dix_main+0x315) [0x4460e5]
[  1406.864] (EE) 13: /nix/store/j5p0j1w27aqdzncpw73k95byvhh5prw2-glibc-2.33-47/lib/libc.so.6 (__libc_start_main+0xd0) [0x7f661ca67780]
[  1406.864] (EE) 14: /nix/store/hl7p4gxnjnwfh0c4csp4y1wfdprg0a68-xorg-server-1.20.12/bin/X (_start+0x2a) [0x42f8aa]
[  1406.864] (EE)
[  1406.864] (EE)
Fatal server error:
[  1406.864] (EE) Caught signal 6 (Aborted). Server aborting
[  1406.864] (EE)
[  1406.864] (EE)
Please consult the The X.Org Foundation support
	 at http://wiki.x.org
 for help.
[  1406.864] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[  1406.864] (EE)
[  1406.902] (EE) Server terminated with error (1). Closing log file.

I’m using wayland and not X, so not sure if this applies, but I had a recent issue (a week or so ago), where KDE stopped launching.

In my case it was due to me passing invalid options to the amdgpu kernel module, which in the past seemed to have simply been ignored, but now caused the module not to load and thus the machines not switching to graphical mode.

I don’t know what’s going on, but generally I think the modesetting driver is recommended over others like amdgpu. Since recent unstable that should also happen if you don’t set videoDrivers: nixos/x11: default to the modesetting driver by K900 · Pull Request #218437 · NixOS/nixpkgs · GitHub

Apologies for the confusion. I didn’t realise that you were talking about X-drivers.

My comment on bad arguments was concerning the kernel module amdgpu and not the X driver by the same name.

Thanks for that suggestion. Unfortunately, I seem to be having trouble disabling the amdgpu driver and enabling modesetting. I changed videoDrivers to ["modesetting"], but lsmod | grep amdgpu still shows the amdgpu driver being loaded. I tried blacklisting it with blacklistedKernelModules and sure enough it no longer loads but neither does modesetting (according to lsmod), and sudo modprobe modesetting complains about the module not being found. And startx still fails.

modesetting driver for X is for all vendors and will still use amdgpu kernel driver (or whichever is appropriate for your GPU)

Ok, thanks. Unfortunately, then just changing videoDrivers to modesetting but not blacklisting amdgpu, still fails to launch X.

Still having trouble with this. One thing I noticed that’s a bit odd is that it’s using glibc 2.33. I would expect it to be a much later version than that - I think 2.37.

You can get into trouble if your opengl-using application is from a significantly different nixpkgs version than your NixOS (and thus /run/opengl-driver). That’s most likely what you did to get the mismatch.

1 Like

Thanks so much for the pointer @vcunat. I finally got it working. I’d forgotten that I’d been messing around with my xserver invocation and xorg.conf file a while back and had them configured outside my declarative nixos configurations. This was pulling in an old version of X and had old dependencies, like the glibc I mentioned above. Anyway, once I got rid of that my system works just fine.

1 Like