Starting X with NVIDIA locks system

TL;DR: After switching from nouveau to nvidia, when I run startx the system locks up and I have to hard reset. I’m at a loss for how to proceed

I recently had need of CUDA so I decided to switch from my integrated graphics to dedicated graphics (RTX A3000 Mobile) on my laptop. To support CUDA I also migrated from nouveau to nvidia. I installed the nvidia drivers, then nvidia-utils and nvidia-settings (in that order), blacklisted nouveau (both in modprobe.d and in grub via nouveau.modeset=0. Finally I set nvidia_drm.modeset=1 in grub.cfg (this flag doesn’t affect the outcome, but it’s currently set). I then rebooted. Once I pass grub it takes several minutes to boot and when I’m finally greeted with a terminal I get a bunch of messages of the form [] audit: .

I then built a new xorg.conf using nvidia-xconfig and ran startx -logverbose 6 (this was working with nouveau and integrated graphics). I get the usual splash in the terminal about where the logs are going etc and then the system is unresponsive and I have to hard reset to regain control. There doesn’t seem to be anything useful in the x logs, but they are below in case they are of some use. I’ve also attached the output of nvidia-bug-report.sh --safe-mode --extra-system-data (it locks up without the extra flags).

Without any errors, I’m at a complete loss for how to proceed…

system info

CPU -> Intel Xeon W-11955M (16) @ 4.9GHz
GPU -> NVIDIA RTX A3000 Mobile
Kernel -> Linux 6.0.1-arch1-1
GPU Driver -> NVIDIA 520.56.06

Xorg.0.log

[   210.091] 
X.Org X Server 1.21.1.4
X Protocol Version 11, Revision 0
[   210.092] Current Operating System: Linux Dragnipur 6.0.1-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 12 Oct 2022 18:28:09 +0000 x86_64
[   210.092] Kernel command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=190557fc-2eea-4923-8deb-617ad44f92b7 rw loglevel=3 quiet nouveau.modeset=0 nvidia_drm.modeset=1
[   210.094]  
[   210.095] Current version of pixman: 0.40.0
[   210.096] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[   210.096] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   210.097] (==) Log file: "/var/log/Xorg.0.log", Time: Fri Oct 14 09:55:10 2022
[   210.097] (==) Using config file: "/etc/X11/xorg.conf"
[   210.097] (==) Using config directory: "/etc/X11/xorg.conf.d"
[   210.098] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[   210.098] (==) ServerLayout "Layout0"
[   210.098] (**) |-->Screen "Screen0" (0)
[   210.098] (**) |   |-->Monitor "Monitor0"
[   210.098] (**) |   |-->Device "Device0"
[   210.098] (**) |-->Input Device "Keyboard0"
[   210.098] (**) |-->Input Device "Mouse0"
[   210.098] (==) Automatically adding devices
[   210.098] (==) Automatically enabling devices
[   210.098] (==) Automatically adding GPU devices
[   210.098] (==) Automatically binding GPU devices
[   210.098] (==) Max clients allowed: 256, resource mask: 0x1fffff
[   210.098] (WW) The directory "/usr/share/fonts/misc" does not exist.
[   210.098] 	Entry deleted from font path.
[   210.098] (WW) The directory "/usr/share/fonts/Type1" does not exist.
[   210.098] 	Entry deleted from font path.
[   210.099] (==) FontPath set to:
	/usr/share/fonts/TTF,
	/usr/share/fonts/OTF,
	/usr/share/fonts/100dpi,
	/usr/share/fonts/75dpi
[   210.099] (==) ModulePath set to "/usr/lib/xorg/modules"
[   210.099] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
[   210.099] (WW) Disabling Keyboard0
[   210.099] (WW) Disabling Mouse0
[   210.099] (II) Module ABI versions:
[   210.099] 	X.Org ANSI C Emulation: 0.4
[   210.099] 	X.Org Video Driver: 25.2
[   210.099] 	X.Org XInput driver : 24.4
[   210.099] 	X.Org Server Extension : 10.0
[   210.099] (++) using VT number 1

[   210.100] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_31
[   210.102] (--) PCI:*(1@0:0:0) 10de:24b8:1028:0a6a rev 161, Mem @ 0xb0000000/16777216, 0x4000000000/8589934592, 0x4200000000/33554432, I/O @ 0x00003000/128, BIOS @ 0x????????/524288
[   210.102] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[   210.102] (II) LoadModule: "glx"
[   210.103] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[   210.105] (II) Module glx: vendor="X.Org Foundation"
[   210.105] 	compiled for 1.21.1.4, module version = 1.0.0
[   210.105] 	ABI class: X.Org Server Extension, version 10.0
[   210.105] (II) LoadModule: "nvidia"
[   210.106] (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so
[   210.108] (II) Module nvidia: vendor="NVIDIA Corporation"
[   210.108] 	compiled for 1.6.99.901, module version = 1.0.0
[   210.109] 	Module class: X.Org Video Driver
[   210.109] (II) NVIDIA dlloader X Driver  520.56.06  Thu Oct  6 21:29:26 UTC 2022
[   210.109] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[   210.109] (II) Loading sub module "fb"
[   210.109] (II) LoadModule: "fb"
[   210.109] (II) Module "fb" already built-in
[   210.109] (II) Loading sub module "wfb"
[   210.109] (II) LoadModule: "wfb"
[   210.109] (II) Loading /usr/lib/xorg/modules/libwfb.so
[   210.110] (II) Module wfb: vendor="X.Org Foundation"
[   210.110] 	compiled for 1.21.1.4, module version = 1.0.0
[   210.110] 	ABI class: X.Org ANSI C Emulation, version 0.4
[   210.110] (II) Loading sub module "ramdac"
[   210.110] (II) LoadModule: "ramdac"
[   210.110] (II) Module "ramdac" already built-in

.xinitrc

xmodmap ~/.Xmodmap

xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

exec i3

xorg.conf

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 520.56.06

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Nvidia bug report
nvidia-bug-report.log.gz (56.9 KB)

The nvidia driver isn’t even loaded. Please check if you have secure boot enabled and disable it, if so.

secure boot was disabled

I just tried passing ibt=off as a kernel flag and x started!

Ahh yes another intel with nvidia ibt=off issue.

Link to the Arch wiki… Intel needs to fix this.
https://wiki.archlinux.org/title/NVIDIA#Installation

See section 1 part 3 note.