Nvidia freeze on boot (even with ibt=off)

Hey everyone! I’ve been happily using EndeavourOS for a few months and loving it! I’m brand new to this forum, though.

Yesterday I plugged in a new monitor to my laptop and it’s suddenly hella slow. The laptop is dual-boot and performs great with the same hardware running Windows.

Months ago I ran nvidia-inst but I don’t think it’s having any effect:

$ glxinfo | grep -i "OpenGL Renderer"
OpenGL renderer string: Mesa Intel(R) UHD Graphics 630 (CFL GT2)

I think this means it’s not using the Nvidia card.

Looking at the docs for nvidia-inst I found a --conf option to create a config file, so I ran again with that option. But then everything froze on boot. Reading a bit more I found the “ibt=off” kernel parameter, and added it, but no dice. Had to delete the config in the tty to get things to work again. Also tried with --nouveau with the same results.

Any idea what I’m doing wrong? Was I on the right track with the --conf option to nvidia-inst? Am I right that the output of glxinfo means that my graphics card isn’t being used?

EDIT: Machine info:

System:
  Kernel: 6.2.9-arch1-1 arch: x86_64 bits: 64 Desktop: Xfce v: 4.18.1
    Distro: EndeavourOS
Machine:
  Type: Laptop System: Razer product: Blade v: 1.04
    serial: <superuser required>
  Mobo: Razer model: C1_MB serial: <superuser required> UEFI: Razer v: 1.05
    date: 07/06/2018
Battery:
  ID-1: BAT0 charge: 64.8 Wh (82.9%) condition: 78.2/80.0 Wh (97.8%)
CPU:
  Info: 6-core model: Intel Core i7-8750H bits: 64 type: MT MCP cache:
    L2: 1.5 MiB
  Speed (MHz): avg: 1500 min/max: 800/4100 cores: 1: 800 2: 800 3: 2200
    4: 800 5: 800 6: 2200 7: 2200 8: 800 9: 2200 10: 800 11: 2200 12: 2200
Graphics:
  Device-1: Intel CoffeeLake-H GT2 [UHD Graphics 630] driver: i915 v: kernel
  Device-2: NVIDIA GP104M [GeForce GTX 1070 Mobile] driver: nvidia
    v: 530.41.03
  Device-3: Sunplus Innovation USB Camera type: USB driver: uvcvideo
  Display: x11 server: X.Org v: 21.1.8 with: Xwayland v: 23.1.1 driver: X:
    loaded: intel,nvidia unloaded: modesetting dri: i965 gpu: i915 resolution:
    1: 3440x1440~50Hz 2: 1920x1080~144Hz
  API: OpenGL v: 4.6 Mesa 23.0.1 renderer: Mesa Intel UHD Graphics 630 (CFL
    GT2)
Audio:
  Device-1: Intel Cannon Lake PCH cAVS driver: snd_hda_intel
  Device-2: NVIDIA GP104 High Definition Audio driver: snd_hda_intel
  API: ALSA v: k6.2.9-arch1-1 status: kernel-api
  Server-1: PipeWire v: 0.3.67 status: active
Network:
  Device-1: Intel Wireless-AC 9260 driver: iwlwifi
  IF: wlan0 state: up mac: 3c:6a:a7:1c:05:e3
Bluetooth:
  Device-1: Intel Wireless-AC 9260 Bluetooth Adapter type: USB driver: btusb
  Report: bt-adapter ID: hci0 state: up address: 3C:6A:A7:1C:05:E7
Drives:
  Local Storage: total: 476.94 GiB used: 18.98 GiB (4.0%)
  ID-1: /dev/nvme0n1 vendor: Samsung model: MZVLB512HAJQ-00000
    size: 476.94 GiB
Partition:
  ID-1: / size: 124.26 GiB used: 18.93 GiB (15.2%) fs: ext4
    dev: /dev/nvme0n1p6
  ID-2: /boot/efi size: 96 MiB used: 52 MiB (54.2%) fs: vfat
    dev: /dev/nvme0n1p2
Swap:
  Alert: No swap data was found.
Sensors:
  System Temperatures: cpu: 52.0 C pch: 45.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Info:
  Processes: 285 Uptime: 26m Memory: 15.52 GiB used: 2.77 GiB (17.9%)
  Shell: Zsh inxi: 3.3.26

First of all are you booting with systemd-boot or grub?

Edit: Does your laptop have settings in UEFI to set integrated, dedicated or hybrid graphics? You have to have a way of switching graphics. You may need to use optimus-manager or some other package in order to do this.

-------------------------------------------- Your system configuration
Your system configuration:
Graphics:
Device-1: Intel CoffeeLake-H GT2 [UHD Graphics 630] driver: i915 v: kernel
Device-2: NVIDIA GP104M [GeForce GTX 1070 Mobile] driver: nvidia
v: 530.41.03
Device-3: Sunplus Innovation USB Camera type: USB driver: uvcvideo
Display: x11 server: X.Org v: 21.1.8 with: Xwayland v: 23.1.1 driver: X:
loaded: intel,nvidia unloaded: modesetting dri: i965 gpu: i915 resolution:
1: 3440x1440~50Hz 2: 1920x1080~144Hz
API: OpenGL v: 4.6 Mesa 23.0.1 renderer: Mesa Intel UHD Graphics 630 (CFL
GT2)

kernel driver = i915
display driver = dri: i965 (loaded: intel,nvidia , unloaded: modesetting, bad)
gpu = i915
cpu Generation = 9.5

-------------------------------------------- My system configuration

My system configuration:

In the old days, when i used an old MB and an old nvidia card, each time i installed a new arch OS, there was always display troubles waiting for me.

Graphics:
Device-1: NVIDIA GP108 [GeForce GT 1030] driver: nvidia v: 515.43.04
Display: x11 server: X.Org v: 21.1.3 driver: X: loaded: nvidia
gpu: nvidia resolution: 3840x2160~60Hz
Message: Unable to show GL data. Required tool glxinfo missing.

20-nvidia.conf in /etc/X11/xorg.conf.d/ (change all specifications to yours)

Section “Device”
Identifier “Device0”
Driver “nvidia”
Option “metamodes” “HDMI-0: nvidia-auto-select +0+0 {ForceCompositionPipeline = On}”
VendorName “NVIDIA Corporation”
BoardName “GeForce GT 1030”
EndSection

Right now, i am using a new MB with only intel cpu and gpu to be used.

Device-1: Intel Alder Lake-S GT1 [UHD Graphics 710] driver: i915 v: kernel
Display: x11 server: X.Org v: 21.1.6 with: Xwayland v: 22.1.7 driver: X:
loaded: << modesetting>> dri: << iris >> gpu: i915 resolution: 3840x2160~60Hz
API: OpenGL v: 4.6 Mesa 22.3.1 << renderer: Mesa Intel UHD Graphics 710 >>
(ADL-S GT1)

kernel driver = i915
display driver = iris, loaded: modesetting
gpu = i915

20-intel.conf in /etc/X11/xorg.conf.d/

  Section "Device"
    Identifier  "Intel Graphics"
    Driver      "modesetting"
    Option      "DRI" "iris"             # DRI3 is now default 
  EndSection

-------------------------------------------- Reconfigure

For intel cpu in MB and making gpu for display basis, it is sure that the ‘modesetting’ must be loaded and driver can be ‘iris’ or others.
In your case, at least display driver must be i915.
If nvidia card is not used, modesetting must also be loaded.
If nvidia card is used, i am not sure if modesetting still needs to be loaded.
display driver = dri: i965 (loaded: intel,nvidia , unloaded: modesetting, bad)

I suggest you try the followings: (if the built-in intel is used without any nvidia, change 20-nvidia.conf to 20-intel.conf)
ibt=off has no much effect on display, it’s main effect is for virtuyalbox.
=========================== reconfigure intel

$ sudo pacman -Syu ( must)

$ sudo pacman -S xf86-video-intel

$ sudo pacman -S intel-media-driver

$ sudo pacman -S linux-firmware (if needed)

build /etc/X11/xorg.conf.d/20-nvidia.conf (change all specifications to yours)

Section “Device”
Identifier “Device0”
Driver “nvidia”
Option “metamodes” “HDMI-0: nvidia-auto-select +0+0 {ForceCompositionPipeline = On}”
VendorName “NVIDIA Corporation”
BoardName “GeForce GT 1030”
EndSection

sudo nano /etc/mkinitcpio.conf

MODULES="i915 "

$ sudo mkinitcpio -p linux

$ reboot

=========================== reconfigure intel

ps. boot into live ISO
if you have grub installed, the followings are applicable to your system.

check disk

$ sudo mount /dev/sdx2 /mnt (sdx2 = from check disk)
$ yay -S arch-install-scripts (if needed)
$ sudo arch-chroot /mnt mkinitcpio -p linux
$ sudo arch-chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg (if needed)
$ sudo mount /dev/sdx1 /mnt/boot/efi (sdx1 = from check disk)
$ sudo pacman -S grub efibootmgr os-prober ( - - - no need if installed )
$ sudo grub-install --target=x86_64-efi --bootloader-id=GRUB --boot-directory=/mnt/boot --efi-directory=/mnt/boot/efi --no-nvram --removable

@jarg
You don’t need ibt=off kernel parameter with the latest Nvidia driver (and 8th gen Intel CPU).
Your log says Nvidia is not used, but Intel GPU is.

So to use Nvidia you need a GPU switching software. Both EndeavourOS and Arch wiki has lots of information about them.

Also, you may need to install nvidia-hook. Then reinstall nvidia-dkms to allow the hook to regenerate initramfs.

Are you sure you are in an emergency mode or are you just not reaching the graphical session..?

Boot with systemd.unit=multi-user.target if you do get to a terminal , assuming your previous boot was the one that failed, post sudo journalctl -b https://wiki.archlinux.org/title/List_of_applications#Pastebin_services for the journal of your previous boot (or other numbers like -2 for the boot even before that and so on)

grub. I think I’m getting past the grub stuff though and I think I’m looking at systemd stuff.

Cool, I will look into this. Thanks!

Thanks for all the tips, everyone! I think the missing piece was that I needed to use something like optimus-manager to switch into using the GPU. When I try to do that, I get these results:

ERROR: the active card is "integrated" but it should be "nvidia".
Something went wrong during the last GPU setup...
Log at /var/log/optimus-manager/switch/switch-20230407T185331.log
Cannot execute command because of previous errors.
[0]~/projects[:(]% cat /var/log/optimus-manager/switch/switch-20230407T185331.log

[7] INFO: # Xorg pre-start hook
[7] INFO: Previous state was: {'type': 'pending_pre_xorg_start', 'requested_mode': 'nvidia', 'current_mode': 'integrated'}
[8] INFO: Requested mode is: nvidia
[157] INFO: Available modules: ['nouveau', 'nvidia', 'nvidia_drm', 'nvidia_modeset', 'nvidia_uvm']
[157] INFO: Unloading modules ['nouveau'] (if loaded)
[161] INFO: switching=none, nothing to do
[210] INFO: Loading module nvidia
[213] INFO: Loading module nvidia_drm
[571] INFO: Writing to /etc/X11/xorg.conf.d/10-optimus-manager.conf
[571] INFO: Writing state {'type': 'pending_post_xorg_start', 'switch_id': '20230407T185331', 'requested_mode': 'nvidia'}
[571] INFO: Xorg pre-start hook completed successfully.
[7] INFO: # Xorg post-start hook
[7] INFO: Running xrandr commands
[470] INFO: Running /etc/optimus-manager/xsetup-nvidia.sh
[493] INFO: Writing state {'type': 'done', 'switch_id': '20230407T185331', 'current_mode': 'nvidia'}
[493] INFO: Xorg post-start hook completed successfully.

I’m not clear what the error is in that log. Any thoughts?

Did you check your UEFI Bios settings as it may have a way to set integrated, dedicated or hybrid.

I did at your suggestion, and didn’t see anything related to GPU that I could set. Would it have a cryptic name that I wouldn’t recognize?

Have you updated to have the latest nvidia driver now?

I thought so, but I will try again to make sure. Thanks!

Turns out I was running a Wayland Session for some reason :man_facepalming:. Got that all sorted out now and it works! Thanks for all the help, everyone!