Askannz / optimus-manager

A Linux program to handle GPU switching on Optimus laptops.
MIT License
2.28k stars 166 forks source link

optimus manager --switch nvidia does not work #485

Closed LuciusofLegend closed 2 years ago

LuciusofLegend commented 2 years ago

I tried to switch to my nvidia gpu using optimus-manager --switch nvidia. I have the nvidia-intel hybrid driver installed. This is the log:

[11] INFO: # Xorg pre-start hook [12] INFO: Previous state was: {'type': 'pending_pre_xorg_start', 'requested_mode': 'nvidia', 'current_mode': None} [12] INFO: Requested mode is: nvidia [567] INFO: Available modules: ['nouveau', 'nvidia', 'nvidia_drm', 'nvidia_modeset', 'nvidia_uvm'] [567] INFO: Unloading modules ['nouveau'] (if loaded) [570] INFO: switching=none, nothing to do [584] INFO: Setting Nvidia PCI power state to on [597] INFO: Writing "on" to /sys/bus/pci/devices/0000:01:00.0/power/control [597] INFO: Writing "on" to /sys/bus/pci/devices/0000:01:00.1/power/control [617] INFO: Loading module nvidia [824] ERROR: Xorg pre-start setup error Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/optimus_manager/kernel.py", line 245, in _load_module subprocess.check_call( File "/usr/lib/python3.10/subprocess.py", line 369, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command 'modprobe nvidia NVreg_UsePageAttributeTable=1' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/optimus_manager/hooks/pre_xorg_start.py", line 51, in main setup_kernel_state(config, prev_state, requested_mode) File "/usr/lib/python3.10/site-packages/optimus_manager/kernel.py", line 22, in setup_kernel_state _nvidia_up(config, hybrid=(requested_mode == "hybrid")) File "/usr/lib/python3.10/site-packages/optimus_manager/kernel.py", line 95, in _nvidia_up _load_nvidia_modules(config, available_modules) File "/usr/lib/python3.10/site-packages/optimus_manager/kernel.py", line 164, in _load_nvidia_modules _load_module(available_modules, "nvidia", options=nvidia_options) File "/usr/lib/python3.10/site-packages/optimus_manager/kernel.py", line 249, in _load_module raise KernelSetupError(f"Error running modprobe for {module}: {e.stderr}") from e optimus_manager.kernel.KernelSetupError: Error running modprobe for nvidia: None [824] INFO: Removing /etc/X11/xorg.conf.d/10-optimus-manager.conf (if present) [824] INFO: Writing state {'type': 'pre_xorg_start_failed', 'switch_id': '20220316T100712', 'requested_mode': 'nvidia'}

LuciusofLegend commented 2 years ago

Sorry for the inconvenience but it works now. I just powered on my computer and there was the little icon in the system tray (I also have optimus manager qt). Don't know what I did to fix it but there it is. I'll close the issue now.