Dell Precision 5560 - Broken optimus-manager

Hi all, new to the forum.

I was given a Precision 5560 for work with an NVidia A6000. We use docks with external monitors at the office, which work fine with Endeavour, but it uses the integrated GPU and my integrated graphics end up getting very hot. I had optimus-manager working, but a recent update seems to have broken it. I made sure to install the newest nvidia drivers with nvidia-inst and installed optimus-manager from the official repos. Running optimus-manager --switch nvidia --no-confirm will log me out and then put me at a TTY with occasionally messages about systemd. Sometimes I can change the TTY and sometimes I can’t. Here is the output of journalctl -u optimus-manager.service for a boot where I tried to switch to nvidia from integrated:

-- Boot a9b838fd9af24eea9e6735e63368c7ec --
14:58:39 MY_UNAME systemd[1]: Starting Optimus Manager Commands Daemon...
14:58:39 MY_UNAME python3[551]: [12] INFO: # Daemon pre-start hook
14:58:39 MY_UNAME python3[551]: [12] INFO: Removing /etc/X11/xorg.conf.d/10-optimus-manager.conf (if present)
14:58:39 MY_UNAME python3[551]: [14] INFO: Startup mode is: auto
14:58:39 MY_UNAME python3[551]: [16] INFO: Effective startup mode is: integrated
14:58:39 MY_UNAME python3[551]: [16] INFO: Writing state {'type': 'pending_pre_xorg_start', 'requested_mode': 'integrated', 'current_mode': None}
14:58:39 MY_UNAME python3[551]: [16] INFO: Daemon pre-start hook completed successfully.
14:58:39 MY_UNAME python3[551]: [16] INFO: Calling Xorg pre-start hook.
14:58:39 MY_UNAME python3[577]: [11] INFO: # Xorg pre-start hook
14:58:39 MY_UNAME python3[577]: [11] INFO: Previous state was: {'type': 'pending_pre_xorg_start', 'requested_mode': 'integrated', 'current_mode': None}
14:58:39 MY_UNAME python3[577]: [11] INFO: Requested mode is: integrated
14:58:39 MY_UNAME python3[579]: modinfo: ERROR: Module bbswitch not found.
14:58:39 MY_UNAME python3[580]: modinfo: ERROR: Module acpi_call not found.
14:58:39 MY_UNAME python3[577]: [180] INFO: Available modules: ['nouveau', 'nvidia', 'nvidia_drm', 'nvidia_modeset', 'nvidia_uvm']
14:58:39 MY_UNAME python3[577]: [180] INFO: Unloading modules ['nvidia_drm', 'nvidia_modeset', 'nvidia_uvm', 'nvidia'] (if loaded)
14:58:39 MY_UNAME python3[577]: [185] INFO: switching=none, nothing to do
14:58:40 MY_UNAME python3[577]: [962] INFO: Writing to /etc/X11/xorg.conf.d/10-optimus-manager.conf
14:58:40 MY_UNAME python3[577]: [962] INFO: Writing state {'type': 'pending_post_xorg_start', 'switch_id': '20220728T145839', 'requested_mode': 'integrated'}
14:58:40 MY_UNAME python3[577]: [963] INFO: Xorg pre-start hook completed successfully.
14:58:40 MY_UNAME systemd[1]: Started Optimus Manager Commands Daemon.
14:58:40 MY_UNAME python3[699]: [1] INFO: # Commands daemon
14:58:40 MY_UNAME python3[699]: [2] INFO: Opening UNIX socket
14:58:40 MY_UNAME python3[699]: [2] INFO: Awaiting commands
15:02:24 MY_UNAME python3[699]: [224507] INFO: Received command : {"type": "switch", "args": {"mode": "nvidia"}}
15:02:24 MY_UNAME python3[699]: [224507] INFO: Writing requested GPU mode nvidia
15:02:24 MY_UNAME python3[699]: [224507] INFO: Writing state {'type': 'pending_pre_xorg_start', 'requested_mode': 'nvidia', 'current_mode': 'integrated'}
15:03:21 MY_UNAME python3[699]: [281482] INFO: Received command : {"type": "switch", "args": {"mode": "nvidia"}}
15:03:21 MY_UNAME python3[699]: [281482] INFO: Writing requested GPU mode nvidia
15:03:21 MY_UNAME python3[699]: [281482] INFO: Writing state {'type': 'pending_pre_xorg_start', 'requested_mode': 'nvidia', 'current_mode': 'integrated'}
15:06:10 MY_UNAME python3[699]: [449869] INFO: Process stop requested
15:06:10 MY_UNAME systemd[1]: Stopping Optimus Manager Commands Daemon...
15:06:10 MY_UNAME python3[699]: [449869] INFO: Closing and removing the socket...
15:06:10 MY_UNAME python3[699]: [449869] INFO: Goodbye !
15:06:10 MY_UNAME systemd[1]: optimus-manager.service: Deactivated successfully.
15:06:10 MY_UNAME systemd[1]: Stopped Optimus Manager Commands Daemon.

If you notice the timestamps, you’ll see that at 15:02 I ran optimus-manager --switch nvidia, then switched TTY and tried it again, at which point I shutdown. Here is the corresponding optimus-manager log, which looks much the same:

[8] INFO: # Xorg pre-start hook
[8] INFO: Previous state was: {'type': 'pending_pre_xorg_start', 'requested_mode': 'nvidia', 'current_mode': 'integrated'}
[8] INFO: Requested mode is: nvidia
[145] INFO: Available modules: ['nouveau', 'nvidia', 'nvidia_drm', 'nvidia_modeset', 'nvidia_uvm']
[145] INFO: Unloading modules ['nouveau'] (if loaded)
[148] INFO: switching=none, nothing to do
[594] INFO: Resetting Nvidia PCI device
[594] INFO: Performing function-level reset of Nvidia
[618] INFO: Writing "1" to /sys/bus/pci/devices/0000:01:00.0/reset
[747] INFO: Loading module nvidia

Nvidia died after the 700 series. You can read about this for example here: https://www.phoronix.com/news/MTc5ODA

Even hacking them to force them to release a full open source driver have not helped until now: https://videocardz.com/newz/hackers-now-demand-nvidia-should-make-their-drivers-open-source-or-they-leak-more-data

Write a mail to nvidia and tell them to release the source code of this binary blob under GPL and tell them to release the private key for signing this. Then someone could help you.

Until then:
nvidia-fuck-you

Of optimus manager was working before but stopped working, you can install an older version with downgrade utility or install the -git version from the AUR.