Optimus manager errors

Hi all! I just installed and set up optimus-manager and it's "working" with some problems.

Info about my system:

Graphics cards:
Intel(R) HD Graphics 630 (KBL GT2)
Nvidia GeForce 1050M

Driver:
video-hybrid-intel-nvidia-440xx-prime

DE:
Gnome

The first time I switch to Nvidia (switch method set to none in optimus-manager settings) it kinda works: it logs out but then the graphical session freezes, but if I change to a tty and then back to the graphical session, it loads the login screen and can access perfectly and uses nvidia card (checked with "glxinfo | grep "OpenGL renderer"" and looking into nvidia card usage being >0%).

After that, if I want to go back to intel, the same happens: freeze, refresh, log in and intel card in use. However, in this step some error happens that prevents me to going back to nvidia again.

Here I leave optimus-manager logs when switching to nvidia:

[7] INFO: # Xorg pre-start hook
[7] INFO: Requested mode is: nvidia
[7] INFO: Checking for GDM display servers
[26] INFO: Found a Xorg GDM process (PID 1018), killing it...
[213] INFO: Available modules: ['nouveau', 'nvidia', 'nvidia_drm', 'nvidia_modeset', 'nvidia_uvm']
[213] INFO: Unloading modules ['nouveau'] (if loaded)
[242] INFO: Loading module nvidia
[472] INFO: Loading module nvidia_drm
[2552] INFO: Loaded extra Intel Xorg options (0 lines)
[2552] INFO: Loaded extra Intel Xorg options (0 lines)
[2552] INFO: Writing to /etc/X11/xorg.conf.d/10-optimus-manager.conf
[2552] INFO: Writing state {'type': 'pending_post_xorg_start', 'switch_id': '20200610T124527', 'requested_mode': 'nvidia'}
[2553] INFO: Xorg pre-start hook completed successfully.
[3] INFO: # Xorg post-start hook
[3] INFO: Running xrandr commands
[747] INFO: Running /etc/optimus-manager/xsetup-nvidia.sh
[767] INFO: Writing state {'type': 'done', 'switch_id': '20200610T124527', 'current_mode': 'nvidia'}
[767] INFO: Xorg post-start hook completed successfully.

And here the one when going back to intel:

[6] INFO: # Xorg pre-start hook
[6] INFO: Requested mode is: intel
[6] INFO: Checking for GDM display servers
[22] INFO: Found a Xorg GDM process (PID 2114), killing it...
[226] INFO: Available modules: ['nouveau', 'nvidia', 'nvidia_drm', 'nvidia_modeset', 'nvidia_uvm']
[227] INFO: Unloading modules ['nvidia_drm', 'nvidia_modeset', 'nvidia_uvm', 'nvidia'] (if loaded)
[229] ERROR: Xorg pre-start setup error
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/optimus_manager/bash.py", line 11, in exec_bash
    out = subprocess.check_output(
  File "/usr/lib/python3.8/subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['bash', '-c', 'modprobe -r nvidia_drm nvidia_modeset nvidia_uvm nvidia']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/optimus_manager/kernel.py", line 196, in _unload_modules
    exec_bash("modprobe -r " + " ".join(modules_to_unload))
  File "/usr/lib/python3.8/site-packages/optimus_manager/bash.py", line 18, in exec_bash
    raise BashError(
optimus_manager.bash.BashError: Failed to execute 'modprobe -r nvidia_drm nvidia_modeset nvidia_uvm nvidia' :
modprobe: FATAL: Module nvidia_drm is in use.


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/optimus_manager/hooks/pre_xorg_start.py", line 33, in main
    setup_kernel_state(config, prev_state, requested_mode)
  File "/usr/lib/python3.8/site-packages/optimus_manager/kernel.py", line 24, in setup_kernel_state
    _nvidia_down(config)
  File "/usr/lib/python3.8/site-packages/optimus_manager/kernel.py", line 65, in _nvidia_down
    _unload_nvidia_modules(available_modules)
  File "/usr/lib/python3.8/site-packages/optimus_manager/kernel.py", line 148, in _unload_nvidia_modules
    _unload_modules(available_modules, ["nvidia_drm", "nvidia_modeset", "nvidia_uvm", "nvidia"])
  File "/usr/lib/python3.8/site-packages/optimus_manager/kernel.py", line 198, in _unload_modules
    raise KernelSetupError("Cannot unload modules %s : %s" % (str(modules_to_unload), str(e)))
optimus_manager.kernel.KernelSetupError: Cannot unload modules ['nvidia_drm', 'nvidia_modeset', 'nvidia_uvm', 'nvidia'] : Failed to execute 'modprobe -r nvidia_drm nvidia_modeset nvidia_uvm nvidia' :
modprobe: FATAL: Module nvidia_drm is in use.

[230] INFO: Removing /etc/X11/xorg.conf.d/10-optimus-manager.conf (if present)
[230] INFO: Writing state {'type': 'pre_xorg_start_failed', 'switch_id': '20200610T124705', 'requested_mode': 'intel'}

I don't know whats causing any of this. Any help is appreciated, don't hesitate to ask for more info if needed, I'm new and don't know which other files could be useful.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by