xulongwu4/nvidia-optimus-manager

Can't run the command nvidia-optimus-manager

nitish159 opened this issue · 7 comments

When I try to run the command I get the following error:
Traceback (most recent call last): File "/usr/bin/nvidia-optimus-manager", line 266, in <module> switcher = Switcher() File "/usr/bin/nvidia-optimus-manager", line 21, in __init__ self._pci_id = self._get_pci_id() File "/usr/bin/nvidia-optimus-manager", line 75, in _get_pci_id return pci_info.split()[0] IndexError: list index out of range

Can you post the result of the following command?
lspci -D -d 10de::0300

Having the exact same issue. The command you gave outputs nothing for me

@TophC7 Can you check the output of this command then?
lspci -nnk | grep -i nvidia

This was the output

01:00.0 3D controller [0302]: NVIDIA Corporation GP108M [GeForce MX150] [10de:1d12] (rev a1) Kernel driver in use: nvidia

@TophC7 @nitish159 Can you try the latest master branch and see if that fixes the problem?

Its working I'm very impressed! Thanks a lot!

A little of topic but if you don't mind explaining does putting the the mode in intel turn off the nvidia card? I'm asking because when I see the bbswitch status it still says the card is on and I'm just wondering

edit: After posting this I also noticed now I can turn off the card with bbswitch which wasn't working before so that's a great bonus!!

@TophC7 There are actually (at least) two ways to turn off the nvidia card. One can either use bbswitch or the runtime power management. I used bbswitch for this purpose for a while until I found that it failed to turn the nvidia card on when it is turned off at boot on one of my laptops.

Since I use the runtime power management to control the power status of nvidia card, bbswitch will always report the card status as "on". I think it is more important to look at the overall power consumption of your laptop when you use nvidia-optimus-manager to toggle your nvidia card rather than simply look at the result of querying bbswitch. For example, if I set my nvidia card to on, my power consumption as reported by powertop is easily above 20W. If I turn off the nvidia card, it decreases to below 10W. In both cases, bbswitch would report the card as on. If I use bbswitch to turn off the nvidia card, the overall power consumption is comparable to using runtime power management (i.e., below 10W).

The other metric you can pay attention to is the temperatures reported by sensors. My observation is that using runtime power management has the same effect as using bbswitch on lowering the temperature of the laptop.

In short, I don't observe any difference in the behavior of my laptop whether I switch off the nvidia card using runtime power management (i.e. nvidia-optimus-manager) or bbswitch. I use runtime power management because I found bbswitch sometimes fail to talk to my nvidia card when it is off.

I will close this issue since it is working correctly now.