Nvidia Xorg Struggle

Hello,

I’ve spent an embarrassing amount of time today trying to set up the Nvidia drivers on my laptop with the hope that this would enable hardware acceleration for the apps on my laptop. I followed the nvidia-inst tutorial, read through the various arch wiki pages related to kernel parameters and Nvidia setup and drivers but with not much success.

  1. I used nvidia-inst to install the drivers, which seem to have worked.
  2. But for some reason inix -G doesn’t show that.
  3. So I installed optimus-manager and switched to GPU mode with optimus-manager --switch nvidia.
  4. Then I tried to reboot and enable the ibt=off kernel parameter in systemd-boot during startup, which suddenly enabled the driver, but my second monitor stopped working and Xorg was still not configured to use Nvidia.

I also struggled to configure the kernel parameter permanently by editing /etc/sysctl.conf and applying it with:

❯ sudo sysctl -p
sysctl: cannot stat /proc/sys/ibt: No such file or directory

But this seems to not be working. I’m using systemd-boot.

Can maybe anyone help me on how to configure the kernel paramter ibt=off and how to proceed from here?

Here are some potentially useful outputs:

❯ lspci -k | grep -A 2 -E "(VGA|3D)"
00:02.0 VGA compatible controller: Intel Corporation Alder Lake-P Integrated Graphics Controller (rev 0c)
	Subsystem: Lenovo Device 22f6
	Kernel driver in use: i915
--
01:00.0 3D controller: NVIDIA Corporation GA107M [GeForce RTX 3050 Mobile] (rev a1)
	Subsystem: Lenovo Device 22f6
	Kernel modules: nouveau, nvidia_drm, nvidia
❯ inxi -G
Graphics:
  Device-1: Intel Alder Lake-P Integrated Graphics driver: i915 v: kernel
  Device-2: NVIDIA GA107M [GeForce RTX 3050 Mobile] driver: N/A
  Device-3: Chicony Integrated Camera type: USB driver: uvcvideo
  Display: x11 server: X.Org v: 21.1.6 driver: X: loaded: intel
    unloaded: modesetting dri: i965 gpu: i915 resolution: 1: 2560x1440~60Hz
    2: 1920x1080~60Hz
  API: OpenGL v: 4.6 Mesa 22.3.2 renderer: Mesa Intel Graphics (ADL GT2)
❯ pacman -Qs nvidia
local/egl-wayland 2:1.1.11-2
    EGLStream-based Wayland external platform
local/libvdpau 1.5-1
    Nvidia VDPAU library
local/libxnvctrl 525.78.01-1
    NVIDIA NV-CONTROL X extension
local/nvidia-dkms 525.78.01-1
    NVIDIA drivers - module sources
local/nvidia-inst 1.8-1
    Script to setup nvidia drivers (dkms version) in EndeavourOS
local/nvidia-installer-common 1.7-2
    Common scripts for nvidia-installer-dkms and nvidia-inst
local/nvidia-settings 525.78.01-1
    Tool for configuring the NVIDIA graphics driver
local/nvidia-utils 525.78.01-1
    NVIDIA drivers utilities
❯ ls /usr/share/X11/xorg.conf.d
10-nvidia-drm-outputclass.conf  30-touchpad.conf
10-quirks.conf                  40-libinput.conf

❯ sudo ls /etc/X11/xorg.conf.d
00-keyboard.conf

After uninstalling xf86-video-intel I switched to modsetting driver, which at least doesn’t cause lagging apps. I would still like to know, if there’s a way to enable Nvidia support?

❯ inxi -G
Graphics:
  Device-1: Intel Alder Lake-P Integrated Graphics driver: i915 v: kernel
  Device-2: NVIDIA GA107M [GeForce RTX 3050 Mobile] driver: N/A
  Device-3: Chicony Integrated Camera type: USB driver: uvcvideo
  Display: x11 server: X.Org v: 21.1.6 driver: X: loaded: modesetting
    dri: iris gpu: i915 resolution: 1: 3840x2160~60Hz 2: 1920x1080~60Hz
  API: OpenGL v: 4.6 Mesa 22.3.2 renderer: Mesa Intel Graphics (ADL GT2)

I just had a similar problem - is this a dracut install? My RTX3070 is dGPU, with an AMD iGPU, I just made a post in kernel + hardware.

As far as I know, no this is not a dracut install. How can I make sure?

And thanks for the heads up! :smiling_face:

What does pacman -Q | grep dracut return?

❯ pacman -Q | grep dracut
dracut 056-1
kernel-install-for-dracut 1.6-1

I guess that means I have dracut installed
.

Indeed.

So you could try this:

Then run sudo dracut-rebuild after making the change.

Thanks for the suggestion. I will try that out sometime soon.