Please help problem with amd external gpu, xserver doesn't load

i have a razer core x with rx 5700 xt inside

when i reboot the machine with the egpu connected via thunderbolt port, it doesn’t load xserver, there is no graphical login screen, sddm not running. I can still log in on the console just fine.

And if i plug out the thunderbolt port, xserver starts ok, everything is ok.

I put these in my configuration.nix

 boot = {
    kernelParams = [ "udev.log_level=3" ];
    initrd = {
      kernelModules = [ "amdgpu" ];
    };
  };
  services.xserver = {
    enable = true;
    videoDrivers = [ "amdgpu" ];
  };
  services.hardware.bolt.enable = true;
  hardware = {
    opengl = {
      enable = true;
      package = pkgs.mesa.drivers;
      driSupport = true;
      driSupport32Bit = true;
      package32 = pkgs.pkgsi686Linux.mesa.drivers;
    };
  };

output of lscpi -k recognizes that i have the amd card, with the correct kernel module

06:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT] (rev c1)
	Subsystem: Gigabyte Technology Co., Ltd Radeon RX 5700 XT Gaming OC
	Kernel driver in use: amdgpu
	Kernel modules: amdgpu

Try journalctl --list-boots and read the boot log when it doesn’t properly launch xserver it’ll most likely offer some clues as to why xserver is having trouble.

some log lines that might be useful, full on pastebin

Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (II) AMDGPU(G0): glamor X acceleration enabled on AMD Radeon RX 5700 XT (radeonsi, navi10, LLVM 17.0.6, DRM 3.54, 6.6.22)
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (II) AMDGPU(G0): glamor detected, initialising EGL layer.
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (==) AMDGPU(G0): TearFree property default: auto
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (II) AMDGPU(G0): Output DisplayPort-1-0 has no monitor section
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (II) AMDGPU(G0): Output DisplayPort-1-1 has no monitor section
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (II) AMDGPU(G0): Output DisplayPort-1-2 has no monitor section
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (II) AMDGPU(G0): Output HDMI-A-1-0 has no monitor section
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (II) AMDGPU(G0): EDID for output DisplayPort-1-0
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (II) AMDGPU(G0): EDID for output DisplayPort-1-1
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (II) AMDGPU(G0): EDID for output DisplayPort-1-2
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (II) AMDGPU(G0): EDID for output HDMI-A-1-0
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (II) AMDGPU(G0): mem size init: gart size :3e1804000 vram size: s:1fdcdd000 visible:1fdcdd000
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (==) AMDGPU(G0): DPI set to (96, 96)
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (==) AMDGPU(G0): Using gamma correction (1.0, 1.0, 1.0)
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (II) Loading sub module "ramdac"
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (II) LoadModule: "ramdac"
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (II) Module "ramdac" already built-in
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (II) UnloadModule: "vmware"
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (II) Unloading vmware
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (II) UnloadModule: "vboxvideo"
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (II) Unloading vboxvideo
Mar 27 06:41:58 Windows11 kernel: ieee80211 phy0: Hardware restart was requested
Mar 27 06:41:58 Windows11 kernel: i915 0000:00:02.0: [drm] Selective fetch area calculation failed in pipe A
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (==) modeset(0): Backing store enabled
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (==) modeset(0): Silken mouse enabled
Mar 27 06:41:58 Windows11 kernel: .qemu-system-x8[2121]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set
Mar 27 06:41:58 Windows11 bluetoothd[1507]: Battery Provider Manager created
Mar 27 06:41:58 Windows11 kernel: Bluetooth: MGMT ver 1.22
Mar 27 06:41:58 Windows11 kernel: NET: Registered PF_ALG protocol family
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (II) modeset(0): Initializing kms color map for depth 24, 8 bpc.
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (==) modeset(0): DPMS enabled
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (II) modeset(0): [DRI2] Setup complete
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (II) modeset(0): [DRI2]   DRI driver: iris
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (II) modeset(0): [DRI2]   VDPAU driver: va_gl
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (II) AMDGPU(G0): [DRI2] Setup complete
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (II) AMDGPU(G0): [DRI2]   DRI driver: radeonsi
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (II) AMDGPU(G0): [DRI2]   VDPAU driver: radeonsi
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (II) AMDGPU(G0): Front buffer pitch: 4096 bytes
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (II) AMDGPU(G0): SYNC extension fences enabled
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (II) AMDGPU(G0): Present extension enabled
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (==) AMDGPU(G0): DRI3 enabled
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (==) AMDGPU(G0): Backing store enabled
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (II) AMDGPU(G0): Direct rendering enabled
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (II) AMDGPU(G0): Use GLAMOR acceleration.
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (II) AMDGPU(G0): Acceleration enabled
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (==) AMDGPU(G0): DPMS enabled
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (==) AMDGPU(G0): Silken mouse enabled
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (EE)
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (EE) Backtrace:
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (EE) 0: /nix/store/rh9iw6jw9gbz9v00ryzgx2anmxkyv7zr-xorg-server-21.1.11/bin/X (OsSigHandler+0x29) [0x5b52c9]
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (EE) unw_get_proc_name failed: no unwind info found [-10]
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (EE) 1: /nix/store/ksk3rnb0ljx8gngzk19jlmbjyvac4hw6-glibc-2.38-44/lib/libc.so.6 (?+0x0) [0x7f2faf9b4eb0]
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (EE) 2: /nix/store/rh9iw6jw9gbz9v00ryzgx2anmxkyv7zr-xorg-server-21.1.11/bin/X (InitOutput+0x482) [0x488362]
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (EE) 3: /nix/store/rh9iw6jw9gbz9v00ryzgx2anmxkyv7zr-xorg-server-21.1.11/bin/X (dix_main+0x190) [0x4496a0]
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (EE) 4: /nix/store/ksk3rnb0ljx8gngzk19jlmbjyvac4hw6-glibc-2.38-44/lib/libc.so.6 (__libc_start_call_main+0x7e) [0x7f2faf99f0ce]
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (EE) 5: /nix/store/ksk3rnb0ljx8gngzk19jlmbjyvac4hw6-glibc-2.38-44/lib/libc.so.6 (__libc_start_main+0x89) [0x7f2faf99f189]
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (EE) 6: /nix/store/rh9iw6jw9gbz9v00ryzgx2anmxkyv7zr-xorg-server-21.1.11/bin/X (_start+0x25) [0x432825]
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (EE)
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (EE) Segmentation fault at address 0x51
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (EE)
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: Fatal server error:
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (EE) Caught signal 11 (Segmentation fault). Server aborting
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (EE)
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (EE)
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: Please consult the The X.Org Foundation support
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]:          at http://wiki.x.org
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]:  for help.
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (EE) Please also check the log file at "/dev/null" for additional information.
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (EE)
Mar 27 06:41:58 Windows11 xserver-wrapper[2055]: (EE) Server terminated with error (1). Closing log file.
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: X.Org X Server 1.21.1.11
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: X Protocol Version 11, Revision 0
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: Current Operating System: Linux Windows11 6.6.22 #1-NixOS SMP PREEMPT_DYNAMIC Fri Mar 15 18:25:07 UTC 2024 x86_64
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: Kernel command line: init=/nix/store/j3iw5vg4l179qqp15599bzhh47qz752s-nixos-system-Windows_11-24.05.20240321.0930514/init udev.log_level=3 loglevel=4
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:  
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: Current version of pixman: 0.43.2
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:         Before reporting problems, check http://wiki.x.org
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:         to make sure that you have the latest version.
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: Markers: (--) probed, (**) from config file, (==) default setting,
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:         (++) from command line, (!!) notice, (II) informational,
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:         (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (++) Log file: "/dev/null", Time: Wed Mar 27 06:42:01 2024
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (++) Using config file: "/nix/store/wz1aw6z18z4fblq563qzl0ls42vwywcg-xserver.conf"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (==) Using config directory: "/etc/X11/xorg.conf.d"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (==) Using system config directory "/nix/store/rh9iw6jw9gbz9v00ryzgx2anmxkyv7zr-xorg-server-21.1.11/share/X11/xorg.conf.d"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (==) ServerLayout "Layout[all]"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (**) |-->Screen "Screen-amdgpu[0]" (0)
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (**) |   |-->Monitor "<default monitor>"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (**) |   |-->Device "Device-amdgpu[0]"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (==) No monitor specified for screen "Screen-amdgpu[0]".
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:         Using a default monitor configuration.
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (**) |-->Screen "Screen-vmware[0]" (1)
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (**) |   |-->Monitor "<default monitor>"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (**) |   |-->Device "Device-vmware[0]"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (==) No monitor specified for screen "Screen-vmware[0]".
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:         Using a default monitor configuration.
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (**) |-->Screen "Screen-virtualbox[0]" (2)
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (**) |   |-->Monitor "<default monitor>"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (**) |   |-->Device "Device-virtualbox[0]"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (==) No monitor specified for screen "Screen-virtualbox[0]".
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:         Using a default monitor configuration.
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (**) |-->Screen "Screen-modesetting[0]" (3)
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (**) |   |-->Monitor "<default monitor>"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (**) |   |-->Device "Device-modesetting[0]"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (==) No monitor specified for screen "Screen-modesetting[0]".
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:         Using a default monitor configuration.
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (**) |-->Input Device "VBoxMouse"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (**) Option "DontZap" "on"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (**) Option "AllowMouseOpenFail" "on"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (==) Automatically adding devices
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (==) Automatically enabling devices
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (==) Automatically adding GPU devices
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (==) Automatically binding GPU devices
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (==) Max clients allowed: 256, resource mask: 0x1fffff
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (**) ModulePath set to "/nix/store/ai5aa6yivxmba2s1qzb95anj4mry5gcz-xf86-video-vboxvideo-1.0.0/lib/xorg/modules/drivers,/nix/store/fvy3f8y5bazd3chfvciykq4rywlc7bqw-xf86-video-vmware-13.4.0/lib/xorg/modules/drivers,/nix/store/h9y1zi7ib62zgc5ipsqh69qwzjrv9nds-xf86-video-amdgpu-23.0.0/lib/xorg/modules/drivers,/nix/store/jaif81646dykd6bz3wnafhk8jnz8ydn7-xf86-input-evdev-2.10.6/lib/xorg/modules/input,/nix/store/kzwziwwpb00fvqn7y7ysabw1pz3ckikz-xf86-input-libinput-1.4.0/lib/xorg/modules/input,/nix/store/rh9iw6jw9gbz9v00ryzgx2anmxkyv7zr-xorg-server-21.1.11/lib/xorg/modules,/nix/store/rh9iw6jw9gbz9v00ryzgx2anmxkyv7zr-xorg-server-21.1.11/lib/xorg/modules/drivers,/nix/store/rh9iw6jw9gbz9v00ryzgx2anmxkyv7zr-xorg-server-21.1.11/lib/xorg/modules/extensions,/nix/store/rh9iw6jw9gbz9v00ryzgx2anmxkyv7zr-xorg-server-21.1.11/lib/xorg/modules/input"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) The server relies on udev to provide the list of input devices.
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:         If no devices become available, reconfigure udev or disable AutoAddDevices.
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) Loader magic: 0x63fe40
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) Module ABI versions:
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:         X.Org ANSI C Emulation: 0.4
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:         X.Org Video Driver: 25.2
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:         X.Org XInput driver : 24.4
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:         X.Org Server Extension : 10.0
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (++) using VT number 2
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) xfree86: Adding drm device (/dev/dri/card1)
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) Platform probe for /sys/devices/pci0000:00/0000:00:02.0/drm/card1
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) xfree86: Adding drm device (/dev/dri/card0)
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) Platform probe for /sys/devices/pci0000:00/0000:00:07.0/0000:02:00.0/0000:03:01.0/0000:04:00.0/0000:05:00.0/0000:06:00.0/drm/card0
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (--) PCI:*(0@0:2:0) 8086:46a6:103c:89dd rev 12, Mem @ 0x601c000000/16777216, 0x4000000000/268435456, I/O @ 0x00004000/64, BIOS @ 0x????????/131072
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (--) PCI: (6@0:0:0) 1002:731f:103c:89dd rev 193, Mem @ 0x4200000000/8589934592, 0x4100000000/2097152, 0x52000000/524288, I/O @ 0x00003000/256, BIOS @ 0x????????/131072
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) "glx" will be loaded by default.
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) LoadModule: "glx"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) Loading /nix/store/rh9iw6jw9gbz9v00ryzgx2anmxkyv7zr-xorg-server-21.1.11/lib/xorg/modules/extensions/libglx.so
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) Module glx: vendor="X.Org Foundation"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:         compiled for 1.21.1.11, module version = 1.0.0
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:         ABI class: X.Org Server Extension, version 10.0
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) LoadModule: "amdgpu"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) Loading /nix/store/h9y1zi7ib62zgc5ipsqh69qwzjrv9nds-xf86-video-amdgpu-23.0.0/lib/xorg/modules/drivers/amdgpu_drv.so
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) Module amdgpu: vendor="X.Org Foundation"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:         compiled for 1.21.1.11, module version = 23.0.0
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:         Module class: X.Org Video Driver
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:         ABI class: X.Org Video Driver, version 25.2
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) LoadModule: "vmware"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) Loading /nix/store/fvy3f8y5bazd3chfvciykq4rywlc7bqw-xf86-video-vmware-13.4.0/lib/xorg/modules/drivers/vmware_drv.so
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) Module vmware: vendor="X.Org Foundation"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:         compiled for 1.21.1.11, module version = 13.4.0
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:         Module class: X.Org Video Driver
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:         ABI class: X.Org Video Driver, version 25.2
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) LoadModule: "vboxvideo"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) Loading /nix/store/ai5aa6yivxmba2s1qzb95anj4mry5gcz-xf86-video-vboxvideo-1.0.0/lib/xorg/modules/drivers/vboxvideo_drv.so
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) Module vboxvideo: vendor="Oracle Corporation"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:         compiled for 1.21.1.11, module version = 1.0.1
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:         Module class: X.Org Video Driver
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:         ABI class: X.Org Video Driver, version 25.2
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (**) Load address of symbol "VBOXVIDEO" is 0x7f24c9cd5320
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) LoadModule: "modesetting"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) Loading /nix/store/rh9iw6jw9gbz9v00ryzgx2anmxkyv7zr-xorg-server-21.1.11/lib/xorg/modules/drivers/modesetting_drv.so
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) Module modesetting: vendor="X.Org Foundation"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:         compiled for 1.21.1.11, module version = 1.21.1
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:         Module class: X.Org Video Driver
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:         ABI class: X.Org Video Driver, version 25.2
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) LoadModule: "vboxmouse"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (WW) Warning, couldn't open module vboxmouse
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (EE) Failed to load module "vboxmouse" (module does not exist, 0)
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) AMDGPU: Driver for AMD Radeon:
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:         All GPUs supported by the amdgpu kernel driver
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) vmware: driver for VMware SVGA: vmware0405, vmware0710
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) VBoxVideo: guest driver for VirtualBox: vbox
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modesetting: Driver for Modesetting Kernel Drivers: kms
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): using drv /dev/dri/card1
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): Creating default Display subsection in Screen section
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:         "Screen-modesetting[0]" for depth/fbbpp 24/32
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (==) modeset(0): Depth 24, (==) framebuffer bpp 32
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (==) modeset(0): RGB weight 888
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (==) modeset(0): Default visual is TrueColor
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) Loading sub module "glamoregl"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) LoadModule: "glamoregl"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) Loading /nix/store/rh9iw6jw9gbz9v00ryzgx2anmxkyv7zr-xorg-server-21.1.11/lib/xorg/modules/libglamoregl.so
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) Module glamoregl: vendor="X.Org Foundation"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:         compiled for 1.21.1.11, module version = 1.0.1
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:         ABI class: X.Org ANSI C Emulation, version 0.4
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): glamor X acceleration enabled on Mesa Intel(R) Graphics (ADL GT2)
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): glamor initialized
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (==) modeset(0): VariableRefresh: disabled
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (==) modeset(0): AsyncFlipSecondaries: disabled
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): Output eDP-1 has no monitor section
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): Output HDMI-2 has no monitor section
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): Output DP-4 has no monitor section
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): Output DP-5 has no monitor section
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): EDID for output eDP-1
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): Manufacturer: AUO  Model: a08b  Serial#: 0
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): Year: 2019  Week: 0
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): EDID Version: 1.4
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): Digital Display Input
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): 8 bits per channel
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): Digital interface is DisplayPort
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): Max Image Size [cm]: horiz.: 34  vert.: 19
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): Gamma: 2.20
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): No DPMS capabilities specified
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): Supported color encodings: RGB 4:4:4
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): First detailed timing is preferred mode
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): Preferred mode is native pixel format and refresh rate
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): Display is continuous-frequency
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): redX: 0.566 redY: 0.339   greenX: 0.351 greenY: 0.568
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): blueX: 0.158 blueY: 0.121   whiteX: 0.313 whiteY: 0.329
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): Manufacturer's mask: 0
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): Supported detailed timing:
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): clock: 141.0 MHz   Image Size:  344 x 193 mm
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): h_active: 1920  h_sync: 2028  h_sync_end 2076 h_blank_end 2100 h_border: 0
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): v_active: 1080  v_sync: 1090  v_sync_end 1100 v_blanking: 1116 v_border: 0
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): Supported detailed timing:
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): clock: 94.0 MHz   Image Size:  344 x 193 mm
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): h_active: 1920  h_sync: 2028  h_sync_end 2076 h_blank_end 2100 h_border: 0
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): v_active: 1080  v_sync: 1090  v_sync_end 1100 v_blanking: 1116 v_border: 0
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): Unknown vendor-specific block 2
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): EDID (in hex):
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0):         00ffffffffffff0006af8ba000000000
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0):         001d0104a5221378033e859156599128
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0):         1f505400000001010101010101010101
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0):         010101010101143780b4703824406c30
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0):         aa0058c110000018b82480b470382440
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0):         6c30aa0058c110000018000000000000
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0):         00000000000000000000000000000002
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0):         001430ff123cc80b0719c820202000bd
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): Printing probed modes for output eDP-1
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): EDID for output HDMI-2
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): EDID for output DP-4
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): EDID for output DP-5
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): Output eDP-1 connected
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): Output HDMI-2 disconnected
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): Output DP-4 disconnected
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): Output DP-5 disconnected
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): Using exact sizes for initial modes
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): Output eDP-1 using initial mode 1920x1080 +0+0
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (==) modeset(0): Using gamma correction (1.0, 1.0, 1.0)
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (==) modeset(0): DPI set to (96, 96)
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) Loading sub module "fb"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) LoadModule: "fb"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) Module "fb" already built-in
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (==) AMDGPU(G0): Depth 24, (--) framebuffer bpp 32
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) AMDGPU(G0): Pixel depth = 24 bits stored in 4 bytes (32 bpp pixmaps)
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (==) AMDGPU(G0): Default visual is TrueColor
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (==) AMDGPU(G0): RGB weight 888
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) AMDGPU(G0): Using 8 bits per RGB (8 bit DAC)
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (--) AMDGPU(G0): Chipset: "AMD Radeon RX 5700 XT" (ChipID = 0x731f)
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) Loading sub module "fb"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) LoadModule: "fb"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) Module "fb" already built-in
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) Loading sub module "dri2"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) LoadModule: "dri2"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) Module "dri2" already built-in
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) Loading sub module "glamoregl"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) LoadModule: "glamoregl"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) Loading /nix/store/rh9iw6jw9gbz9v00ryzgx2anmxkyv7zr-xorg-server-21.1.11/lib/xorg/modules/libglamoregl.so
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) Module glamoregl: vendor="X.Org Foundation"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:         compiled for 1.21.1.11, module version = 1.0.1
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:         ABI class: X.Org ANSI C Emulation, version 0.4
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) AMDGPU(G0): glamor X acceleration enabled on AMD Radeon RX 5700 XT (radeonsi, navi10, LLVM 17.0.6, DRM 3.54, 6.6.22)
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) AMDGPU(G0): glamor detected, initialising EGL layer.
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (==) AMDGPU(G0): TearFree property default: auto
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) AMDGPU(G0): Output DisplayPort-1-0 has no monitor section
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) AMDGPU(G0): Output DisplayPort-1-1 has no monitor section
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) AMDGPU(G0): Output DisplayPort-1-2 has no monitor section
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) AMDGPU(G0): Output HDMI-A-1-0 has no monitor section
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) AMDGPU(G0): EDID for output DisplayPort-1-0
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) AMDGPU(G0): EDID for output DisplayPort-1-1
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) AMDGPU(G0): EDID for output DisplayPort-1-2
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) AMDGPU(G0): EDID for output HDMI-A-1-0
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) AMDGPU(G0): mem size init: gart size :3e1804000 vram size: s:1fdcdd000 visible:1fdcdd000
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (==) AMDGPU(G0): DPI set to (96, 96)
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (==) AMDGPU(G0): Using gamma correction (1.0, 1.0, 1.0)
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) Loading sub module "ramdac"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) LoadModule: "ramdac"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) Module "ramdac" already built-in
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) UnloadModule: "vmware"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) Unloading vmware
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) UnloadModule: "vboxvideo"
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) Unloading vboxvideo
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (==) modeset(0): Backing store enabled
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (==) modeset(0): Silken mouse enabled
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): Initializing kms color map for depth 24, 8 bpc.
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (==) modeset(0): DPMS enabled
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): [DRI2] Setup complete
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): [DRI2]   DRI driver: iris
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) modeset(0): [DRI2]   VDPAU driver: va_gl
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) AMDGPU(G0): [DRI2] Setup complete
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) AMDGPU(G0): [DRI2]   DRI driver: radeonsi
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) AMDGPU(G0): [DRI2]   VDPAU driver: radeonsi
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) AMDGPU(G0): Front buffer pitch: 4096 bytes
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) AMDGPU(G0): SYNC extension fences enabled
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) AMDGPU(G0): Present extension enabled
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (==) AMDGPU(G0): DRI3 enabled
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (==) AMDGPU(G0): Backing store enabled
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) AMDGPU(G0): Direct rendering enabled
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) AMDGPU(G0): Use GLAMOR acceleration.
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (II) AMDGPU(G0): Acceleration enabled
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (==) AMDGPU(G0): DPMS enabled
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (==) AMDGPU(G0): Silken mouse enabled
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (EE)
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (EE) Backtrace:
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (EE) 0: /nix/store/rh9iw6jw9gbz9v00ryzgx2anmxkyv7zr-xorg-server-21.1.11/bin/X (OsSigHandler+0x29) [0x5b52c9]
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (EE) unw_get_proc_name failed: no unwind info found [-10]
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (EE) 1: /nix/store/ksk3rnb0ljx8gngzk19jlmbjyvac4hw6-glibc-2.38-44/lib/libc.so.6 (?+0x0) [0x7f24ca3b4eb0]
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (EE) 2: /nix/store/rh9iw6jw9gbz9v00ryzgx2anmxkyv7zr-xorg-server-21.1.11/bin/X (InitOutput+0x482) [0x488362]
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (EE) 3: /nix/store/rh9iw6jw9gbz9v00ryzgx2anmxkyv7zr-xorg-server-21.1.11/bin/X (dix_main+0x190) [0x4496a0]
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (EE) 4: /nix/store/ksk3rnb0ljx8gngzk19jlmbjyvac4hw6-glibc-2.38-44/lib/libc.so.6 (__libc_start_call_main+0x7e) [0x7f24ca39f0ce]
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (EE) 5: /nix/store/ksk3rnb0ljx8gngzk19jlmbjyvac4hw6-glibc-2.38-44/lib/libc.so.6 (__libc_start_main+0x89) [0x7f24ca39f189]
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (EE) 6: /nix/store/rh9iw6jw9gbz9v00ryzgx2anmxkyv7zr-xorg-server-21.1.11/bin/X (_start+0x25) [0x432825]
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (EE)
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (EE) Segmentation fault at address 0x51
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (EE)
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: Fatal server error:
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (EE) Caught signal 11 (Segmentation fault). Server aborting
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (EE)
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (EE)
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: Please consult the The X.Org Foundation support
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:          at http://wiki.x.org
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]:  for help.
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (EE) Please also check the log file at "/dev/null" for additional information.
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (EE)
Mar 27 06:42:01 Windows11 xserver-wrapper[2211]: (EE) Server terminated with error (1). Closing log file.
Mar 27 06:42:01 Windows11 systemd[1]: Started Process Core Dump (PID 2225/UID 0).
Mar 27 06:42:01 Windows11 systemd-coredump[2226]: Process 2211 (X) of user 0 dumped core.

Never seen it but it errors on what’s encountered here, no? https://www.linuxquestions.org/questions/slackware-14/xorg-doesn’t-start-after-mesa-19-1-1-update-no-unwind-info-found-error-4175656401/ strange that it all works if you plug it back in

I found a config that works, the problem is, since it creates a new xorg.conf and use it instead of the nixos-generated one, no keyboard or mouse is usable, all the other services.xserver configs in my configuration is meaningless

The said config: The Struggle to get Thunderbolt eGPU to output to its display at all in NixOS

ah, glad you got it figured out…and thanks for helping me learn about eGPUs! :slight_smile:

in the process, i noticed that xrandr --listproviders does not give me a provider, which is really weird since my igpu works, there’s output to screen just fine.

and I’m still struggling with the egpu since, in the thread i mentioned, they have successfully got the gpu running and output, but not mouse or keyboard.

my igpu is 00:02.0 VGA compatible controller: Intel Corporation Alder Lake-P GT2 [Iris Xe Graphics] (rev 0c)

xrandr --listproviders                                                                                                                                                                                           
Providers: number : 0

I think the reason why xrandr --listproviders gives me no provider is because I’m using hyprland.

This is my alternative approach, however, I was not successful. I booted up with this config fine, but it stop when it suppose to show SDDM log in screen.

It shows a black screen instead.

But other than that, there is no crash, xserver loaded fine (i guess?).

Here’s the config:
I use Radeon RX 5700 XT as my egpu, and hyprland

{lib, pkgs, ...}: {

  services.hardware.bolt.enable = true;
  boot = {
    # Ensure module for external graphics is loaded
    initrd.kernelModules = [ "amdgpu" ];
  
    kernelParams = [
      "amdgpu.pcie_gen_cap=0x40000"
      "udev.log_level=3"
    ];
  };
  # Use external graphics
  services.xserver = {
    videoDrivers = [ "amdgpu" "modesetting"];
    # Load amdgpu first
    serverLayoutSection = ''
      Screen "Screen-amdgpu"
    '';
    # add section for amdgpu because it doesn't overwrite amdgpu[0] for some reason
    config = lib.mkAfter ''
      Section "Device"
        Identifier "Device-amdgpu"
        Driver     "amdgpu" 
        BusID      "PCI:06:00:0"
        Option     "AllowExternalGpus" "True"
        Option     "AllowEmptyInitialConfiguration"
      EndSection

      Section "Screen"
        Identifier "Screen-amdgpu"
        Device "Device-amdgpu"
      EndSection
    '';
  };
  hardware = { 
    opengl = {
      enable = true;
      driSupport = true;
      driSupport32Bit = true;
      extraPackages = with pkgs; [ 
        rocmPackages.clr.icd
        amdvlk
      ];
      extraPackages32 = with pkgs; [
      driversi686Linux.amdvlk
      ];
    };
  };
}

Here’s the xorg log, full on pastebin

[    72.367] (==) ServerLayout "Layout[all]"
[    72.367] (**) |-->Screen "Screen-amdgpu" (0)
[    72.367] (**) |   |-->Monitor "<default monitor>"
[    72.367] (**) |   |-->Device "Device-amdgpu"
[    72.367] (==) No monitor specified for screen "Screen-amdgpu".
	Using a default monitor configuration.
[    72.367] (**) |-->Screen "Screen-amdgpu[0]" (1)
[    72.367] (**) |   |-->Monitor "<default monitor>"
[    72.367] (**) |   |-->Device "Device-amdgpu[0]"
[    72.367] (==) No monitor specified for screen "Screen-amdgpu[0]".
	Using a default monitor configuration.
[    72.367] (**) |-->Screen "Screen-modesetting[0]" (2)
[    72.367] (**) |   |-->Monitor "<default monitor>"
[    72.367] (**) |   |-->Device "Device-modesetting[0]"
[    72.367] (==) No monitor specified for screen "Screen-modesetting[0]".
	Using a default monitor configuration.
[    72.367] (**) |-->Screen "Screen-vmware[0]" (3)
[    72.367] (**) |   |-->Monitor "<default monitor>"
[    72.367] (**) |   |-->Device "Device-vmware[0]"
[    72.367] (==) No monitor specified for screen "Screen-vmware[0]".
	Using a default monitor configuration.
[    72.367] (**) |-->Screen "Screen-virtualbox[0]" (4)
[    72.367] (**) |   |-->Monitor "<default monitor>"
[    72.367] (**) |   |-->Device "Device-virtualbox[0]"
[    72.367] (==) No monitor specified for screen "Screen-virtualbox[0]".
	Using a default monitor configuration.
[    72.367] (**) |-->Screen "Screen-modesetting[0]" (5)
[    72.367] (**) |   |-->Monitor "<default monitor>"
[    72.368] (**) |   |-->Device "Device-modesetting[0]"
[    72.368] (==) No monitor specified for screen "Screen-modesetting[0]".
	Using a default monitor configuration.

...
blah blah blah
...

	All GPUs supported by the amdgpu kernel driver
[    72.385] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[    72.385] (II) vmware: driver for VMware SVGA: vmware0405, vmware0710
[    72.385] (II) VBoxVideo: guest driver for VirtualBox: vbox
[    72.404] (II) modeset(1): using drv /dev/dri/card1
[    72.404] (WW) Falling back to old probe method for modesetting
[    72.405] (II) AMDGPU(0): Creating default Display subsection in Screen section
	"Screen-amdgpu" for depth/fbbpp 24/32
[    72.405] (==) AMDGPU(0): Depth 24, (--) framebuffer bpp 32
[    72.405] (II) AMDGPU(0): Pixel depth = 24 bits stored in 4 bytes (32 bpp pixmaps)
[    72.405] (==) AMDGPU(0): Default visual is TrueColor
[    72.405] (==) AMDGPU(0): RGB weight 888
[    72.405] (II) AMDGPU(0): Using 8 bits per RGB (8 bit DAC)
[    72.405] (--) AMDGPU(0): Chipset: "AMD Radeon RX 5700 XT" (ChipID = 0x731f)
[    72.405] (II) Loading sub module "fb"
[    72.405] (II) LoadModule: "fb"
[    72.405] (II) Module "fb" already built-in
[    72.405] (II) Loading sub module "dri2"
[    72.405] (II) LoadModule: "dri2"
[    72.405] (II) Module "dri2" already built-in
[    72.418] (II) Loading sub module "glamoregl"
[    72.418] (II) LoadModule: "glamoregl"
[    72.418] (II) Loading /nix/store/rh9iw6jw9gbz9v00ryzgx2anmxkyv7zr-xorg-server-21.1.11/lib/xorg/modules/libglamoregl.so
[    72.419] (II) Module glamoregl: vendor="X.Org Foundation"
[    72.419] 	compiled for 1.21.1.11, module version = 1.0.1
[    72.419] 	ABI class: X.Org ANSI C Emulation, version 0.4
[    72.423] (II) AMDGPU(0): glamor X acceleration enabled on AMD Radeon RX 5700 XT (radeonsi, navi10, LLVM 17.0.6, DRM 3.54, 6.6.22)
[    72.423] (II) AMDGPU(0): glamor detected, initialising EGL layer.
[    72.423] (==) AMDGPU(0): TearFree property default: auto
[    72.423] (==) AMDGPU(0): VariableRefresh: disabled
[    72.423] (==) AMDGPU(0): AsyncFlipSecondaries: disabled
[    72.423] (II) AMDGPU(0): KMS Pageflipping: enabled
[    72.423] (II) AMDGPU(0): Output DisplayPort-0 has no monitor section
[    72.423] (II) AMDGPU(0): Output DisplayPort-1 has no monitor section
[    72.423] (II) AMDGPU(0): Output DisplayPort-2 has no monitor section
[    72.423] (II) AMDGPU(0): Output HDMI-A-0 has no monitor section
[    72.424] (II) AMDGPU(0): EDID for output DisplayPort-0
[    72.424] (II) AMDGPU(0): EDID for output DisplayPort-1
[    72.424] (II) AMDGPU(0): EDID for output DisplayPort-2
[    72.424] (II) AMDGPU(0): EDID for output HDMI-A-0
[    72.424] (II) AMDGPU(0): Output DisplayPort-0 disconnected
[    72.424] (II) AMDGPU(0): Output DisplayPort-1 disconnected
[    72.424] (II) AMDGPU(0): Output DisplayPort-2 disconnected
[    72.424] (II) AMDGPU(0): Output HDMI-A-0 disconnected
[    72.424] (WW) AMDGPU(0): No outputs definitely connected, trying again...
[    72.424] (II) AMDGPU(0): Output DisplayPort-0 disconnected
[    72.424] (II) AMDGPU(0): Output DisplayPort-1 disconnected
[    72.424] (II) AMDGPU(0): Output DisplayPort-2 disconnected
[    72.424] (II) AMDGPU(0): Output HDMI-A-0 disconnected
[    72.424] (WW) AMDGPU(0): Unable to find connected outputs - setting 1024x768 initial framebuffer
[    72.424] (II) AMDGPU(0): mem size init: gart size :3e1804000 vram size: s:1fdcdd000 visible:1fdcdd000
[    72.424] (==) AMDGPU(0): DPI set to (96, 96)
[    72.424] (==) AMDGPU(0): Using gamma correction (1.0, 1.0, 1.0)
[    72.424] (II) Loading sub module "ramdac"
[    72.424] (II) LoadModule: "ramdac"
[    72.424] (II) Module "ramdac" already built-in
[    72.424] (II) modeset(1): Creating default Display subsection in Screen section
	"Screen-modesetting[0]" for depth/fbbpp 24/32
[    72.424] (==) modeset(1): Depth 24, (==) framebuffer bpp 32
[    72.424] (==) modeset(1): RGB weight 888
[    72.424] (==) modeset(1): Default visual is TrueColor
[    72.424] (II) Loading sub module "glamoregl"
[    72.424] (II) LoadModule: "glamoregl"
[    72.424] (II) Loading /nix/store/rh9iw6jw9gbz9v00ryzgx2anmxkyv7zr-xorg-server-21.1.11/lib/xorg/modules/libglamoregl.so
[    72.424] (II) Module glamoregl: vendor="X.Org Foundation"
[    72.424] 	compiled for 1.21.1.11, module version = 1.0.1
[    72.424] 	ABI class: X.Org ANSI C Emulation, version 0.4
[    72.428] (II) modeset(1): glamor X acceleration enabled on Mesa Intel(R) Graphics (ADL GT2)
[    72.428] (II) modeset(1): glamor initialized
[    72.428] (==) modeset(1): VariableRefresh: disabled
[    72.428] (==) modeset(1): AsyncFlipSecondaries: disabled
[    72.431] (II) modeset(1): Output eDP-1 has no monitor section
[    72.431] (II) modeset(1): Output HDMI-2 has no monitor section
[    72.431] (II) modeset(1): Output DP-4 has no monitor section
[    72.431] (II) modeset(1): Output DP-5 has no monitor section
[    72.434] (II) modeset(1): EDID for output eDP-1
[    72.434] (II) modeset(1): Manufacturer: AUO  Model: a08b  Serial#: 0
[    72.434] (II) modeset(1): Year: 2019  Week: 0
[    72.434] (II) modeset(1): EDID Version: 1.4
[    72.434] (II) modeset(1): Digital Display Input
[    72.434] (II) modeset(1): 8 bits per channel
[    72.434] (II) modeset(1): Digital interface is DisplayPort
[    72.434] (II) modeset(1): Max Image Size [cm]: horiz.: 34  vert.: 19
[    72.434] (II) modeset(1): Gamma: 2.20
[    72.434] (II) modeset(1): No DPMS capabilities specified
[    72.434] (II) modeset(1): Supported color encodings: RGB 4:4:4 
[    72.434] (II) modeset(1): First detailed timing is preferred mode
[    72.434] (II) modeset(1): Preferred mode is native pixel format and refresh rate
[    72.434] (II) modeset(1): Display is continuous-frequency
[    72.434] (II) modeset(1): redX: 0.566 redY: 0.339   greenX: 0.351 greenY: 0.568
[    72.434] (II) modeset(1): blueX: 0.158 blueY: 0.121   whiteX: 0.313 whiteY: 0.329
[    72.434] (II) modeset(1): Manufacturer's mask: 0
[    72.434] (II) modeset(1): Supported detailed timing:
[    72.434] (II) modeset(1): clock: 141.0 MHz   Image Size:  344 x 193 mm
[    72.434] (II) modeset(1): h_active: 1920  h_sync: 2028  h_sync_end 2076 h_blank_end 2100 h_border: 0
[    72.434] (II) modeset(1): v_active: 1080  v_sync: 1090  v_sync_end 1100 v_blanking: 1116 v_border: 0
[    72.434] (II) modeset(1): Supported detailed timing:
[    72.434] (II) modeset(1): clock: 94.0 MHz   Image Size:  344 x 193 mm
[    72.434] (II) modeset(1): h_active: 1920  h_sync: 2028  h_sync_end 2076 h_blank_end 2100 h_border: 0
[    72.434] (II) modeset(1): v_active: 1080  v_sync: 1090  v_sync_end 1100 v_blanking: 1116 v_border: 0
[    72.434] (II) modeset(1): Unknown vendor-specific block 2
[    72.434] (II) modeset(1): EDID (in hex):
[    72.434] (II) modeset(1): 	00ffffffffffff0006af8ba000000000
[    72.434] (II) modeset(1): 	001d0104a5221378033e859156599128
[    72.434] (II) modeset(1): 	1f505400000001010101010101010101
[    72.434] (II) modeset(1): 	010101010101143780b4703824406c30
[    72.434] (II) modeset(1): 	aa0058c110000018b82480b470382440
[    72.434] (II) modeset(1): 	6c30aa0058c110000018000000000000
[    72.434] (II) modeset(1): 	00000000000000000000000000000002
[    72.434] (II) modeset(1): 	001430ff123cc80b0719c820202000bd
[    72.434] (II) modeset(1): Printing probed modes for output eDP-1
[    72.434] (II) modeset(1): Modeline "1920x1080"x60.2  141.00  1920 2028 2076 2100  1080 1090 1100 1116 -hsync -vsync (67.1 kHz eP)
[    72.434] (II) modeset(1): Modeline "1920x1080"x120.0  356.38  1920 2080 2288 2656  1080 1081 1084 1118 doublescan -hsync +vsync (134.2 kHz d)
[    72.434] (II) modeset(1): Modeline "1920x1080"x119.9  266.50  1920 1944 1960 2000  1080 1081 1084 1111 doublescan +hsync -vsync (133.2 kHz d)
[    72.434] (II) modeset(1): Modeline "1920x1080"x60.0  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync (67.2 kHz d)
[    72.434] (II) modeset(1): Modeline "1920x1080"x59.9  138.50  1920 1968 2000 2080  1080 1083 1088 1111 +hsync -vsync (66.6 kHz d)
[    72.434] (II) modeset(1): Modeline "1920x1080"x40.1   94.00  1920 2028 2076 2100  1080 1090 1100 1116 -hsync -vsync (44.8 kHz e)
[    72.434] (II) modeset(1): Modeline "1680x1050"x60.0  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync (65.3 kHz d)
[    72.434] (II) modeset(1): Modeline "1680x1050"x59.9  119.00  1680 1728 1760 1840  1050 1053 1059 1080 +hsync -vsync (64.7 kHz d)
[    72.434] (II) modeset(1): Modeline "1400x1050"x60.0  122.00  1400 1488 1640 1880  1050 1052 1064 1082 +hsync +vsync (64.9 kHz d)

...
blah blah blah
...

[    72.434] (II) modeset(1): EDID for output HDMI-2
[    72.434] (II) modeset(1): EDID for output DP-4
[    72.434] (II) modeset(1): EDID for output DP-5
[    72.434] (II) modeset(1): Output eDP-1 connected
[    72.434] (II) modeset(1): Output HDMI-2 disconnected
[    72.434] (II) modeset(1): Output DP-4 disconnected
[    72.434] (II) modeset(1): Output DP-5 disconnected
[    72.434] (II) modeset(1): Using exact sizes for initial modes
[    72.434] (II) modeset(1): Output eDP-1 using initial mode 1920x1080 +0+0
[    72.434] (==) modeset(1): Using gamma correction (1.0, 1.0, 1.0)
[    72.434] (==) modeset(1): DPI set to (96, 96)
[    72.434] (II) Loading sub module "fb"
[    72.434] (II) LoadModule: "fb"
[    72.434] (II) Module "fb" already built-in
[    72.434] (II) UnloadModule: "vmware"
[    72.434] (II) Unloading vmware
[    72.434] (II) UnloadModule: "vboxvideo"
[    72.434] (II) Unloading vboxvideo
[    72.435] (II) AMDGPU(0): [DRI2] Setup complete
[    72.435] (II) AMDGPU(0): [DRI2]   DRI driver: radeonsi
[    72.435] (II) AMDGPU(0): [DRI2]   VDPAU driver: radeonsi
[    72.435] (II) AMDGPU(0): Front buffer pitch: 4096 bytes
[    72.435] (II) AMDGPU(0): SYNC extension fences enabled
[    72.435] (II) AMDGPU(0): Present extension enabled
[    72.435] (==) AMDGPU(0): DRI3 enabled
[    72.435] (==) AMDGPU(0): Backing store enabled
[    72.435] (II) AMDGPU(0): Direct rendering enabled
[    72.439] (II) AMDGPU(0): Use GLAMOR acceleration.
[    72.439] (II) AMDGPU(0): Acceleration enabled
[    72.439] (==) AMDGPU(0): DPMS enabled
[    72.439] (==) AMDGPU(0): Silken mouse enabled
[    72.439] (II) AMDGPU(0): Set up textured video (glamor)
[    72.440] (WW) AMDGPU(0): Option "AllowExternalGpus" is not used
[    72.440] (WW) AMDGPU(0): Option "AllowEmptyInitialConfiguration" is not used
[    72.442] (==) modeset(1): Backing store enabled
[    72.442] (==) modeset(1): Silken mouse enabled
[    72.522] (II) modeset(1): Initializing kms color map for depth 24, 8 bpc.
[    72.523] (==) modeset(1): DPMS enabled
[    72.523] (II) modeset(1): [DRI2] Setup complete
[    72.523] (II) modeset(1): [DRI2]   DRI driver: iris
[    72.523] (II) modeset(1): [DRI2]   VDPAU driver: va_gl
[    72.523] (II) Initializing extension Generic Event Extension
[    72.524] (II) Initializing extension SHAPE
[    72.524] (II) Initializing extension MIT-SHM
[    72.524] (II) Initializing extension XInputExtension
[    72.525] (II) Initializing extension XTEST
[    72.525] (II) Initializing extension BIG-REQUESTS
[    72.525] (II) Initializing extension SYNC
[    72.526] (II) Initializing extension XKEYBOARD
[    72.526] (II) Initializing extension XC-MISC
[    72.526] (II) Initializing extension SECURITY
[    72.526] (II) Initializing extension XFIXES
[    72.527] (II) Initializing extension RENDER
[    72.527] (II) Initializing extension RANDR
[    72.527] (II) Initializing extension COMPOSITE
[    72.527] (II) Initializing extension DAMAGE
[    72.527] (II) Initializing extension MIT-SCREEN-SAVER
[    72.527] (II) Initializing extension DOUBLE-BUFFER
[    72.527] (II) Initializing extension RECORD
[    72.527] (II) Initializing extension DPMS
[    72.527] (II) Initializing extension Present
[    72.527] (II) Initializing extension DRI3
[    72.527] (II) Initializing extension X-Resource
[    72.527] (II) Initializing extension XVideo
[    72.527] (II) Initializing extension XVideo-MotionCompensation
[    72.527] (II) Initializing extension GLX
[    72.529] (II) AIGLX: Loaded and initialized radeonsi
[    72.529] (II) GLX: Initialized DRI2 GL provider for screen 0
[    72.532] (II) AIGLX: Loaded and initialized iris
[    72.532] (II) GLX: Initialized DRI2 GL provider for screen 1
[    72.532] (II) Initializing extension XFree86-VidModeExtension
[    72.533] (II) Initializing extension XFree86-DGA
[    72.533] (II) Initializing extension XFree86-DRI
[    72.533] (II) Initializing extension DRI2
[    72.533] (II) modeset(1): Damage tracking initialized
[    72.533] (II) modeset(1): Setting screen physical size to 508 x 285

the xorg config generated:

Section "Files"

  FontPath "/nix/store/8wardfhspl44sdfginlka32b9vg715pj-ucs-fonts-20090406/share/fonts/misc"
  FontPath "/nix/store/nawaanbvss8q31g0wk0rfwrqf90bnlyl-font-cursor-misc-1.0.4/lib/X11/fonts/misc"
  FontPath "/nix/store/wr1y3nb4r6f4lj75jhnraxaa2p82j8br-font-misc-misc-1.1.3/lib/X11/fonts/misc"
  FontPath "/nix/store/5hsw9pi88rf4g78mljn5kkv7mhsdfczw-unifont-15.1.05/share/fonts"
  FontPath "/nix/store/js0rwgxd22yjvfb8zs4d9m2fg9wkv3jp-font-adobe-100dpi-1.0.4/lib/X11/fonts/100dpi"
  FontPath "/nix/store/2l44lzkg46b9wy9xg389i7n5dwx27ica-font-adobe-75dpi-1.0.4/lib/X11/fonts/75dpi"
  ModulePath "/nix/store/ai5aa6yivxmba2s1qzb95anj4mry5gcz-xf86-video-vboxvideo-1.0.0/lib/xorg/modules/drivers"
  ModulePath "/nix/store/fvy3f8y5bazd3chfvciykq4rywlc7bqw-xf86-video-vmware-13.4.0/lib/xorg/modules/drivers"
  ModulePath "/nix/store/h9y1zi7ib62zgc5ipsqh69qwzjrv9nds-xf86-video-amdgpu-23.0.0/lib/xorg/modules/drivers"
  ModulePath "/nix/store/jaif81646dykd6bz3wnafhk8jnz8ydn7-xf86-input-evdev-2.10.6/lib/xorg/modules/input"
  ModulePath "/nix/store/kzwziwwpb00fvqn7y7ysabw1pz3ckikz-xf86-input-libinput-1.4.0/lib/xorg/modules/input"
  ModulePath "/nix/store/rh9iw6jw9gbz9v00ryzgx2anmxkyv7zr-xorg-server-21.1.11/lib/xorg/modules"
  ModulePath "/nix/store/rh9iw6jw9gbz9v00ryzgx2anmxkyv7zr-xorg-server-21.1.11/lib/xorg/modules/drivers"
  ModulePath "/nix/store/rh9iw6jw9gbz9v00ryzgx2anmxkyv7zr-xorg-server-21.1.11/lib/xorg/modules/extensions"
  ModulePath "/nix/store/rh9iw6jw9gbz9v00ryzgx2anmxkyv7zr-xorg-server-21.1.11/lib/xorg/modules/input"

EndSection

Section "InputDevice"
  Identifier "VBoxMouse"
  Driver "vboxmouse"
EndSection

Section "ServerFlags"
  Option "AllowMouseOpenFail" "on"
  Option "DontZap" "on"
  
EndSection

Section "Module"
  
EndSection

Section "Monitor"
  Identifier "Monitor[0]"
  
EndSection

# Additional "InputClass" sections
Section "InputClass"
  Identifier "libinput mouse configuration"
  MatchDriver "libinput"
  MatchIsPointer "on"
  
  Option "AccelProfile" "adaptive"
  
  
  
  
  
  Option "LeftHanded" "off"
  Option "MiddleEmulation" "on"
  Option "NaturalScrolling" "off"
  
  Option "ScrollMethod" "twofinger"
  Option "HorizontalScrolling" "on"
  Option "SendEventsMode" "enabled"
  Option "Tapping" "on"
  
  Option "TappingDragLock" "on"
  Option "DisableWhileTyping" "off"
  
  
EndSection

Section "InputClass"
  Identifier "libinput touchpad configuration"
  MatchDriver "libinput"
  MatchIsTouchpad "on"
  
  Option "AccelProfile" "adaptive"
  
  
  
  
  Option "ClickMethod" "clickfinger"
  Option "LeftHanded" "off"
  Option "MiddleEmulation" "on"
  Option "NaturalScrolling" "on"
  
  Option "ScrollMethod" "twofinger"
  Option "HorizontalScrolling" "on"
  Option "SendEventsMode" "enabled"
  Option "Tapping" "on"
  
  Option "TappingDragLock" "on"
  Option "DisableWhileTyping" "on"
  
  
EndSection



Section "ServerLayout"
  Identifier "Layout[all]"
  Screen "Screen-amdgpu"
  
  InputDevice "VBoxMouse"
  
  # Reference the Screen sections for each driver.  This will
  # cause the X server to try each in turn.
  Screen "Screen-amdgpu[0]"
Screen "Screen-modesetting[0]"
Screen "Screen-vmware[0]"
Screen "Screen-virtualbox[0]"
Screen "Screen-modesetting[0]"
EndSection

# For each supported driver, add a "Device" and "Screen"
# section.

Section "Device"
  Identifier "Device-amdgpu[0]"
  Driver "amdgpu"
EndSection

Section "Screen"
  Identifier "Screen-amdgpu[0]"
  Device "Device-amdgpu[0]"
EndSection


Section "Device"
  Identifier "Device-modesetting[0]"
  Driver "modesetting"
EndSection

Section "Screen"
  Identifier "Screen-modesetting[0]"
  Device "Device-modesetting[0]"
EndSection


Section "Device"
  Identifier "Device-vmware[0]"
  Driver "vmware"
EndSection

Section "Screen"
  Identifier "Screen-vmware[0]"
  Device "Device-vmware[0]"
EndSection


Section "Device"
  Identifier "Device-virtualbox[0]"
  Driver "vboxvideo"
EndSection

Section "Screen"
  Identifier "Screen-virtualbox[0]"
  Device "Device-virtualbox[0]"
EndSection


Section "Device"
  Identifier "Device-modesetting[0]"
  Driver "modesetting"
EndSection

Section "Screen"
  Identifier "Screen-modesetting[0]"
  Device "Device-modesetting[0]"
EndSection

Section "Device"
  Identifier "Device-amdgpu"
  Driver     "amdgpu" 
  BusID      "PCI:06:00:0"
  Option     "AllowExternalGpus" "True"
  Option     "AllowEmptyInitialConfiguration"
EndSection

Section "Screen"
  Identifier "Screen-amdgpu"
  Device "Device-amdgpu"
EndSection

Please help me I have no idea what to do now…

What i want is the egpu is used when i plug it in, and igpu when i’m not plug in my egpu. That’s why i added

serverLayoutSection = ''
      Screen "Screen-amdgpu"
'';

This adds Screen "Screen-amdgpu" which i will define later on with config = lib.mkAfter '' at the very first of Section "ServerLayout"

since X server is (I’m guessing) going to try each in turn?

Am i doing this correct?

does it work? I can’t speak to the correctness as I don’t have your setup. But it looks OK to me

also are you using xwayland or whatnot? what’s xserver doing when wayland is involved?

It shows a black screen where it is suppose to be SDDM log in screen. It’s like there is no output at all.
I think xserver works but it doesnt seem to output to my screen.

I don’t know how to check this

I have xwayland enable, if my understanding is correct then

programs.hyprland = {
      enable = true;
      xwayland.enable = true;
      package = inputs.hyprland.packages.${pkgs.system}.hyprland;
    };

Sorry, I can’t help here. xorg configs beyond the simple always confused me when they didn’t work. At least there are no overt errors so maybe it’ll be simple in the end

at this point I’m desperate for any solution that you might have. I’m willing to test them all

Full log : pastebin
a thing that i noticed is that

[    72.435] (II) AMDGPU(0): [DRI2]   DRI driver: radeonsi
[    72.435] (II) AMDGPU(0): [DRI2]   VDPAU driver: radeonsi

but later it changed to

[    72.523] (II) modeset(1): [DRI2]   DRI driver: iris
[    72.523] (II) modeset(1): [DRI2]   VDPAU driver: va_gl

Is it perhaps using both AMDGPU and modesetting? or was I misunderstood it?

Is that a good sign or a bad sign? I honestly don’t know

[    72.440] (WW) AMDGPU(0): Option "AllowExternalGpus" is not used
[    72.440] (WW) AMDGPU(0): Option "AllowEmptyInitialConfiguration" is not used

And the AllowExternalGpus option is also not used

Although according to arch wiki, it is required for proprietary NVIDIA driver, but I’m using AMD so i guess that’s fine?

[    72.435] (II) AMDGPU(0): [DRI2] Setup complete
[    72.435] (II) AMDGPU(0): [DRI2]   DRI driver: radeonsi
[    72.435] (II) AMDGPU(0): [DRI2]   VDPAU driver: radeonsi
[    72.435] (II) AMDGPU(0): Front buffer pitch: 4096 bytes
[    72.435] (II) AMDGPU(0): SYNC extension fences enabled
[    72.435] (II) AMDGPU(0): Present extension enabled
[    72.435] (==) AMDGPU(0): DRI3 enabled
[    72.435] (==) AMDGPU(0): Backing store enabled
[    72.435] (II) AMDGPU(0): Direct rendering enabled
[    72.439] (II) AMDGPU(0): Use GLAMOR acceleration.
[    72.439] (II) AMDGPU(0): Acceleration enabled
[    72.439] (==) AMDGPU(0): DPMS enabled
[    72.439] (==) AMDGPU(0): Silken mouse enabled
[    72.439] (II) AMDGPU(0): Set up textured video (glamor)
[    72.440] (WW) AMDGPU(0): Option "AllowExternalGpus" is not used
[    72.440] (WW) AMDGPU(0): Option "AllowEmptyInitialConfiguration" is not used
[    72.442] (==) modeset(1): Backing store enabled
[    72.442] (==) modeset(1): Silken mouse enabled
[    72.522] (II) modeset(1): Initializing kms color map for depth 24, 8 bpc.
[    72.523] (==) modeset(1): DPMS enabled
[    72.523] (II) modeset(1): [DRI2] Setup complete
[    72.523] (II) modeset(1): [DRI2]   DRI driver: iris
[    72.523] (II) modeset(1): [DRI2]   VDPAU driver: va_gl

and this

[    72.404] (II) modeset(1): using drv /dev/dri/card1
[    72.404] (WW) Falling back to old probe method for modesetting

/dev/dri/card1 is my AMD gpu, so why is it using modesetting
And I don’t see any log that AMDGPU uses /dev/dri/card1 too

I’m lost

I just wanna clarify that i wanna use my egpu to output to intergrated laptop screen

I connected the egpu directly to my thunderbolt 4 port on the laptop, and no external monitor

Tested on windows, the hardware is fine, no problem whatsoever with the egpu