I have a Dell Inspiron 7706 2n1 with a NVIDIA GeForce MX350 and a 11th Gen Intel i7-1165G7.
Right now I'm using Intel Integrated Graphics but I want to be able to switch to my NVIDIA card when using certain apps. I've looked up online what to do but nothing seems to help me. I've tried doing prime-run
but it's not installed. When I do __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxinfo
to test gpu switching, I get this back in return:
name of display: :0
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 152 (GLX)
Minor opcode of failed request: 24 (X_GLXCreateNewContext)
Value in failed request: 0x0
Serial number of failed request: 50
Current serial number in output stream: 51
What can I do?
Things that might help
❯ lspci -k | grep -A 2 -E "(VGA|3D)"
00:02.0 VGA compatible controller: Intel Corporation Device 9a49 (rev 01)
DeviceName: Onboard - Video
Subsystem: Dell Device 09df
--
2b:00.0 3D controller: NVIDIA Corporation GP107M [GeForce MX350] (rev a1)
Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia
2c:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd Device a809
❯ modprobe nvidia
modprobe: ERROR: ../libkmod/libkmod-module.c:838 kmod_module_insert_module() could not find module by name='off'
modprobe: ERROR: could not insert 'off': Unknown symbol in module, or unknown parameter (see dmesg)
❯ prime-select query
intel
/etc/modprobe.d
❯ grep nvidia /etc/modprobe.d/* /lib/modprobe.d/*
/etc/modprobe.d/blacklist-framebuffer.conf:blacklist nvidiafb
/lib/modprobe.d/blacklist-nvidia.conf:# This file was generated by nvidia-prime
/lib/modprobe.d/blacklist-nvidia.conf:blacklist nvidia
/lib/modprobe.d/blacklist-nvidia.conf:blacklist nvidia-drm
/lib/modprobe.d/blacklist-nvidia.conf:blacklist nvidia-modeset
/lib/modprobe.d/blacklist-nvidia.conf:alias nvidia off
/lib/modprobe.d/blacklist-nvidia.conf:alias nvidia-drm off
/lib/modprobe.d/blacklist-nvidia.conf:alias nvidia-modeset off
❯ find /usr/lib/modules -name nvidia.ko
/usr/lib/modules/5.15.0-41-generic/kernel/nvidia-470/nvidia.ko
❯ modinfo nvidia | grep version
version: 470.129.06
srcversion: EB51CE03E42F9639560C463
vermagic: 5.15.0-41-generic SMP mod_unload modversions
❯ xrandr --listproviders
Providers: number : 1
Provider 0: id: 0x47 cap: 0x9, Source Output, Sink Offload crtcs: 4 outputs: 4 associated providers: 0 name:modesetting
I have noticed that the ordering is inconsistent in Ubuntu 22.04, so sometimes I need it, sometimes I don't. The only blacklist of nvidia should be the nvidiafb. That and options nvidia-drm modeset=1 should be the only nvidia in that directory. See what alias off got you! – ubfan1 Jul 22 '22 at 23:33
❯ xrandr --listproviders Providers: number : 1 Provider 0: id: 0x47 cap: 0x9, Source Output, Sink Offload crtcs: 4 outputs: 4 associated providers: 0 name:modesetting
– TheHackerCoding Jul 23 '22 at 20:59