Hi there!
I’ve got a laptop here with a dedicated GPU “Nvidia GeForce GTX 1650”
and integrated Intel UHD Graphics 630.
I’d like to use the Intel integrated graphics by default and only use the Nvidia card for certain apps / in certain situations.
This worked previously with prime-run
but my setup broke with the big change in nvidia driver packages.
$ prime-run glxgears
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: 3 (X_GLXCreateContext)
Value in failed request: 0x0
Serial number of failed request: 25
Current serial number in output stream: 26
$ dmesg
[ 52.681628] nvidia: loading out-of-tree module taints kernel.
[ 52.681645] nvidia: module license 'NVIDIA' taints kernel.
[ 52.681646] Disabling lock debugging due to kernel taint
[ 52.693954] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[ 52.719313] nvidia-nvlink: Nvlink Core is being initialized, major device number 511
[ 52.719928] nvidia 0000:01:00.0: enabling device (0000 -> 0003)
[ 52.768313] kernel read not supported for file pci0000:00/0000:00:01.0/0000:01:00.0/config (pid: 2536 comm: modprobe)
[ 52.768376] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 460.32.03 Sun Dec 27 19:00:34 UTC 2020
[ 54.002742] ACPI Warning: \_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20200925/nsarguments-61)
[ 54.898483] kernel read not supported for file pci0000:00/0000:00:01.0/0000:01:00.0/config (pid: 2534 comm: nvidia-smi)
[ 62.880567] audit: type=1131 audit(1612337313.313:80): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=systemd-hostnamed comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 63.056405] audit: type=1334 audit(1612337313.485:81): prog-id=10 op=UNLOAD
[ 63.056407] audit: type=1334 audit(1612337313.485:82): prog-id=9 op=UNLOAD
[ 537.033456] kernel read not supported for file pci0000:00/0000:00:01.0/0000:01:00.0/config (pid: 3768 comm: nvidia-smi)
$ inxi -F
System: Host: Laptop Kernel: 5.10.7-3-MANJARO x86_64 bits: 64 Desktop: KDE Plasma 5.20.5 Distro: Manjaro Linux
Machine: Type: Laptop System: Dell product: XPS 15 7590 v: N/A serial: <superuser required>
Mobo: Dell model: 0VYV0G v: A00 serial: <superuser required> UEFI: Dell v: 1.6.0 date: 02/06/2020
Battery: ID-1: BAT0 charge: 86.4 Wh condition: 87.3/97.0 Wh (90%)
CPU: Info: 6-Core model: Intel Core i7-9750H bits: 64 type: MT MCP L2 cache: 12 MiB
Speed: 1395 MHz min/max: 800/4500 MHz Core speeds (MHz): 1: 1395 2: 1978 3: 1838 4: 2289 5: 4248 6: 2008 7: 1436
8: 3989 9: 2638 10: 2851 11: 1748 12: 1266
Graphics: Device-1: Intel UHD Graphics 630 driver: i915 v: kernel
Device-2: NVIDIA TU117M [GeForce GTX 1650 Mobile / Max-Q] driver: nvidia v: 460.32.03
Device-3: Microdia Integrated_Webcam_HD type: USB driver: uvcvideo
Display: x11 server: X.Org 1.20.10 driver: loaded: modesetting resolution: 1920x1080
OpenGL: renderer: Mesa Intel UHD Graphics 630 (CFL GT2) v: 4.6 Mesa 20.3.3
Audio: Device-1: Intel Cannon Lake PCH cAVS driver: snd_hda_intel
Sound Server: ALSA v: k5.10.7-3-MANJARO
Network: Device-1: Intel Wi-Fi 6 AX200 driver: iwlwifi
IF: wlp59s0 state: up mac: 08:d2:3e:b6:92:8e
Drives: Local Storage: total: 476.94 GiB used: 376.66 GiB (79.0%)
ID-1: /dev/nvme0n1 vendor: Micron model: 2200S NVMe 512GB size: 476.94 GiB
Partition: ID-1: / size: 390.62 GiB used: 376.66 GiB (96.4%) fs: btrfs dev: /dev/dm-0
ID-2: /boot/efi size: 125 MiB used: 682 KiB (0.5%) fs: vfat dev: /dev/nvme0n1p3
ID-3: /home size: 390.62 GiB used: 376.66 GiB (96.4%) fs: btrfs dev: /dev/dm-0
Swap: ID-1: swap-1 type: partition size: 86.19 GiB used: 0 KiB (0.0%) dev: /dev/dm-1
Sensors: System Temperatures: cpu: 54.0 C mobo: N/A
Fan Speeds (RPM): cpu: 2394 fan-2: 2407
Info: Processes: 344 Uptime: 1h 31m Memory: 62.44 GiB used: 7.35 GiB (11.8%) Shell: Bash inxi: 3.2.02
$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x46 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 4 associated providers: 0 name:modesetting
Provider 1: id: 0x7da cap: 0x0 crtcs: 0 outputs: 0 associated providers: 0 name:modesetting
$ nvidia-smi
Wed Feb 3 10:01:16 2021
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.32.03 Driver Version: 460.32.03 CUDA Version: 11.2 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 GeForce GTX 1650 Off | 00000000:01:00.0 Off | N/A |
| N/A 57C P8 1W / N/A | 0MiB / 3914MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+