I have installed Optimus-manager on my DELL XPS 15 7590. I am mostly interested in using the Intel GPU, but I have noticed that switching to Nvidia is never possible.
Some information.
My inxi -Fzy:
System: Kernel: 5.10.15-1-MANJARO x86_64 bits: 64 Desktop: GNOME 3.38.3 Distro: Manjaro Linux Machine: Type: Laptop System: Dell product: XPS 15 7590 v: N/A serial: <filter> Mobo: Dell model: 018W12 v: A06 serial: <filter> UEFI: Dell v: 1.9.1 date: 12/14/2020 Battery: ID-1: BAT0 charge: 72.0 Wh condition: 95.9/97.0 Wh (99%) CPU: Info: 6-Core model: Intel Core i7-9750H bits: 64 type: MT MCP L2 cache: 12 MiB Speed: 800 MHz min/max: 800/2600 MHz Core speeds (MHz): 1: 800 2: 800 3: 801 4: 800 5: 800 6: 800 7: 800 8: 800 9: 800 10: 800 11: 800 12: 800 Graphics: Device-1: Intel UHD Graphics 630 driver: i915 v: kernel Device-2: NVIDIA TU117M [GeForce GTX 1650 Mobile / Max-Q] driver: N/A Device-3: Microdia Integrated_Webcam_HD type: USB driver: uvcvideo Display: x11 server: X.org 1.20.10 driver: loaded: modesetting unloaded: intel resolution: <missing: xdpyinfo> OpenGL: renderer: Mesa Intel UHD Graphics 630 (CFL GT2) v: 4.6 Mesa 20.3.4 Audio: Device-1: Intel Cannon Lake PCH cAVS driver: snd_hda_intel Sound Server: ALSA v: k5.10.15-1-MANJARO Network: Device-1: Intel Wi-Fi 6 AX200 driver: iwlwifi IF: wlp59s0 state: up mac: <filter> IF-ID-1: virbr0 state: down mac: <filter> Bluetooth: Device-1: Intel AX200 Bluetooth type: USB driver: btusb Message: Required tool hciconfig not installed. Check --recommends Drives: Local Storage: total: 476.94 GiB used: 156.15 GiB (32.7%) ID-1: /dev/nvme0n1 vendor: Western Digital model: PC SN730 NVMe WDC 512GB size: 476.94 GiB Partition: ID-1: / size: 349.36 GiB used: 156.15 GiB (44.7%) fs: ext4 dev: /dev/dm-0 ID-2: /boot/efi size: 511 MiB used: 500 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p7 Swap: ID-1: swap-1 type: file size: 10 GiB used: 0 KiB (0.0%) file: /swapfile Sensors: System Temperatures: cpu: 43.0 C mobo: N/A Fan Speeds (RPM): cpu: 2409 fan-2: 2421 Info: Processes: 351 Uptime: 20m Memory: 15.28 GiB used: 4.6 GiB (30.1%) Shell: Zsh inxi: 3.3.01
First problem that happens all the time: the command optimus-manager --status
fails:
ERROR: the latest GPU setup attempt failed at Xorg pre-start hook. Log at /var/log/optimus-manager/switch/switch-20210223T084844.log Cannot execute command because of previous errors.
To make it run, I have to run the command prime-offload
first. Note: this works only once since I reboot. After I’ve used it once, and attempted to switch GPU, I will always get the error above. Anyway, if I manage to give the command optimus-manager --switch nvidia
feb 23 08:48:44 manjaro gdm[3843]: [11] INFO: # Xorg pre-start hook feb 23 08:48:44 manjaro gdm[3843]: [11] INFO: Previous state was: {'type': 'pending_pre_xorg_start', 'requested_mode': 'nvidia', 'current_mode': 'intel'} feb 23 08:48:44 manjaro gdm[3843]: [11] INFO: Requested mode is: nvidia feb 23 08:48:44 manjaro gdm[3843]: [11] INFO: Checking for GDM display servers feb 23 08:48:44 manjaro gdm[3843]: [340] INFO: Available modules: ['nouveau', 'bbswitch', 'nvidia', 'nvidia_drm', 'nvidia_modeset', 'nvidia_uvm'] feb 23 08:48:44 manjaro gdm[3843]: [340] INFO: Unloading modules ['nouveau'] (if loaded) feb 23 08:48:44 manjaro gdm[3843]: [344] INFO: Loading module bbswitch feb 23 08:48:44 manjaro gdm[3843]: [347] INFO: Setting GPU power to ON via bbswitch feb 23 08:48:44 manjaro gdm[3843]: [462] INFO: Loading module nvidia feb 23 08:48:44 manjaro gdm[3843]: [749] ERROR: Xorg pre-start setup error feb 23 08:48:44 manjaro gdm[3843]: Traceback (most recent call last): feb 23 08:48:44 manjaro gdm[3843]: File "/usr/lib/python3.9/site-packages/optimus_manager/bash.py", line 11, in exec_bash feb 23 08:48:44 manjaro gdm[3843]: out = subprocess.check_output( feb 23 08:48:44 manjaro gdm[3843]: File "/usr/lib/python3.9/subprocess.py", line 420, in check_output feb 23 08:48:44 manjaro gdm[3843]: return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, feb 23 08:48:44 manjaro gdm[3843]: File "/usr/lib/python3.9/subprocess.py", line 524, in run feb 23 08:48:44 manjaro gdm[3843]: raise CalledProcessError(retcode, process.args, feb 23 08:48:44 manjaro gdm[3843]: subprocess.CalledProcessError: Command '['bash', '-c', 'modprobe nvidia NVreg_UsePageAttributeTable=1']' returned non-zero exit status 1. feb 23 08:48:44 manjaro gdm[3843]: During handling of the above exception, another exception occurred: feb 23 08:48:44 manjaro gdm[3843]: Traceback (most recent call last): feb 23 08:48:44 manjaro gdm[3843]: File "/usr/lib/python3.9/site-packages/optimus_manager/kernel.py", line 179, in _load_module feb 23 08:48:44 manjaro gdm[3843]: exec_bash("modprobe %s %s" % (module, options)) feb 23 08:48:44 manjaro gdm[3843]: File "/usr/lib/python3.9/site-packages/optimus_manager/bash.py", line 18, in exec_bash feb 23 08:48:44 manjaro gdm[3843]: raise BashError( feb 23 08:48:44 manjaro gdm[3843]: optimus_manager.bash.BashError: Failed to execute 'modprobe nvidia NVreg_UsePageAttributeTable=1' : feb 23 08:48:44 manjaro gdm[3843]: modprobe: ERROR: could not insert 'nvidia': No such device feb 23 08:48:44 manjaro gdm[3843]: During handling of the above exception, another exception occurred: feb 23 08:48:44 manjaro gdm[3843]: Traceback (most recent call last): feb 23 08:48:44 manjaro gdm[3843]: File "/usr/lib/python3.9/site-packages/optimus_manager/hooks/pre_xorg_start.py", line 45, in main feb 23 08:48:44 manjaro gdm[3843]: setup_kernel_state(config, prev_state, requested_mode) feb 23 08:48:44 manjaro gdm[3843]: File "/usr/lib/python3.9/site-packages/optimus_manager/kernel.py", line 21, in setup_kernel_state feb 23 08:48:44 manjaro gdm[3843]: _nvidia_up(config) feb 23 08:48:44 manjaro gdm[3843]: File "/usr/lib/python3.9/site-packages/optimus_manager/kernel.py", line 56, in _nvidia_up feb 23 08:48:44 manjaro gdm[3843]: _load_nvidia_modules(config, available_modules) feb 23 08:48:44 manjaro gdm[3843]: File "/usr/lib/python3.9/site-packages/optimus_manager/kernel.py", line 109, in _load_nvidia_modules feb 23 08:48:44 manjaro gdm[3843]: _load_module(available_modules, "nvidia", options="NVreg_UsePageAttributeTable=%d" % pat_value) feb 23 08:48:44 manjaro gdm[3843]: File "/usr/lib/python3.9/site-packages/optimus_manager/kernel.py", line 181, in _load_module feb 23 08:48:44 manjaro gdm[3843]: raise KernelSetupError("error running modprobe for %s : %s" % (module, str(e))) feb 23 08:48:44 manjaro gdm[3843]: optimus_manager.kernel.KernelSetupError: error running modprobe for nvidia : Failed to execute 'modprobe nvidia NVreg_UsePageAttributeTable=1' : feb 23 08:48:44 manjaro gdm[3843]: modprobe: ERROR: could not insert 'nvidia': No such device feb 23 08:48:44 manjaro gdm[3843]: [750] INFO: Removing /etc/X11/xorg.conf.d/10-optimus-manager.conf (if present) feb 23 08:48:44 manjaro gdm[3843]: [750] INFO: Writing state {'type': 'pre_xorg_start_failed', 'switch_id': '20210223T084844', 'requested_mode': 'nvidia'}
To make a long story short, loading the nvidia driver fails, and the new session is started loading again the intel driver.
My problem seems very similar to the one described in this old issue. I’ve tried some solutions described there but I didn’t try uninstalling optimus-manager and the video drivers because I didn’t want to risk being unable to boot.
That is all I have. Happy if someone can help.