Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing option to select which nvidia card to use (nvidia eGPU vs nvidia iGPU) #472

Open
hnsl opened this issue Jan 27, 2022 · 1 comment

Comments

@hnsl
Copy link

hnsl commented Jan 27, 2022

Describe the bug
I have two Nvidia GPUs. Sometimes I have my Nvidia eGPU connected. I am using optimus-manager to switch between my eGPU and internal GPU. However, when I have both GPUs connected, optimus-manager doesn't have any flag to say what Nvidia card to use. Instead it just prints "Multiple nvidia GPUs found ! Picking the last enumerated one." This heuristic is wrong for me as I always want it to pick the eGPU if it's connected, which comes later in the list.

I did an ugly hack where I just manually patched pci.py to pick the one last in the list instead. But preferably this should be solved with a flag (like --prefer_gpu) or better heuristic (e.g. use most powerful) although this is bound to be wrong for some use-cases.

Note that this is a critical feature and not a "nice to have". This is the primary reason why I am using optimus-manager and this bug is breaking the usefulness of this tool for me, but thankfully I could just patch the code as a workaround.

System info
Please include :

  • Your distribution
  • Your desktop manager (KDE, GNOME, Cinnamon...), if you have one
  • You display manager (SDDM, GDM, LightDM...), if you have one. If you do not know, you are probably using the one coming with your desktop manager.
  • Your laptop model, if you think it could be related to the problem
  • The version of optimus-manager you are using : latest stable release (optimus-manager), or the latest Git version (optimus-manager-git)
  • Your custom optimus-manager configuration file at /etc/optimus-manager/optimus-manager.conf, if you made one

Logs
Run optimus-manager --status in a console, and if an error message appears, post it here. The message should also point you to a log path, attach it here as well. If there is no error message but you are still experiencing issues, grab the most recent files in /var/log/optimus-manager/switch/ and /var/log/optimus-manager/daemon/.

@jamincollins
Copy link

I just ran into this myself and can definitely say I would love an option (other than patching the code) to indicate which to select if multiples are present. For now I too have altered pci.py to return the last one:

        if len(ids_list) > 0:                                                                                          
            #bus_ids[manufacturer] = ids_list[0]                                                                       
            bus_ids[manufacturer] = ids_list[-1]    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants