andrebrait / prime-indicator

PRIME Indicator Plus - enhanced indicator applet for NVIDIA Optimus laptops
GNU General Public License v3.0
69 stars 12 forks source link

System freezes after installling prime-indicator with intel driver #19

Closed hckrtech closed 7 years ago

hckrtech commented 7 years ago

I installed prime-indicator and run it only once with Alt+F2 while using intel driver using webupd8 ppa. The system did freeze. Now every time I boot with intel driver the system freezes after the splash screen. I removed the application but the problem persists. I believe it is related to some option you switch during the installation or first run.

My computer uses Intel 6700HQ and GTX 960M.

andrebrait commented 7 years ago

It doesn't do anything on the first run besides writing the base config file to your home folder. Maybe your notebook has problems with bbswitch. What distro are you using? Do you have bumblebee installed as well?

Also,did you install prime-indicator or prime-indicator-plus?

Try running the following commands on the terminal:

$ rm -rf ~/.config/prime-indicator

Check if it's completely removed:

$ sudo rm /etc/xdg/autostart/prime-indicator.desktop $ sudo rm /etc/sudoers.d/99-prime-indicator-sudoers

Those commands whill clear any of the config files and the autostart entry for prime-indicator.

hckrtech commented 7 years ago

I installed using: sudo add-apt-repository ppa:nilarimogard/webupd8 sudo apt update sudo apt install prime-indicator-plus

My system uses Ubuntu 16.10 Kernel 4.8.0-26. I don't have bumblebee installed. The system did freeze immediately after I run the command prime-indicator and I am still not able to start the system using intel driver although I removed prime-indicator-plus completely. Are you sure the package does not change any option of the GPUs, like power management options? For example, normally if I set power management of GTX 960M "ON" using powertop, the system freezes. Do the installation or the executable itself change such options?

andrebrait commented 7 years ago

When the power management option is set to ON it will try to disable the NVIDIA card on start up, but this should already be happening due to Ubuntu's GPU Manager service. However, you can edit the config file to disable the power management completely.

I never tested it on 16.10 but since I can use similar things on Arch I doubt it is something related to 16.10. Maybe your system has some problem with bbswitch and it crashes when my script tries to turn the GPU on or off.

hckrtech commented 7 years ago

Could you please tell me what config file should I edit to get the option back? The problem is that I completely removed your script, but the config file seems to have the option for GPU Power Manager. On powertop before I installed prime-indicator, I am sure that Runtime PM for GTX 960M was disabled when I used intel driver. I never had any problem with bbswitch before.

        modprobe nvidia_drm nvidia_modeset nvidia_uvm nvidia &>/dev/null
        tee /proc/acpi/bbswitch <<< ON &>/dev/null

Could you please tell me what this snippet does?

Thanks.

andrebrait commented 7 years ago

Sure!

The only config file my application has is located in you user's home folder, in ~/.config/prime-indicator/prime-indicator.cfg (~ is a shortcut for /home/yourUserName). You can edit the file using any text editor you want. Inside it, you will find something like this:

[PowerManagement] enabled = True

Change it from True to False and it will stop trying to disable the card on start up the next time it starts.

The snipped you copied loads the nvidia modules on the system and uses bbswitch to turn the card on. It's only used when you manually turn the card on using the app's menu. There's a corresponding one that unloads every nvidia module from the system and then uses bbswitch to turn the card off as well, which is run when it starts if Power Management is enabled.

Yoi're welcome. Thank you for reporting the issue. Hope we find a fix for it soon.

andrebrait commented 7 years ago

Please notice that the application does not write settings other than those in the folder I pointed. There are a couple of files written in other places, but they're just an auto start desktop file and a sudoers file to enable the application to switch the dGPU on and off without requesting a password.

You can completely remove any leftovers by running the uninstall script present in this repository's root.

hckrtech commented 7 years ago

Hello,

It turns out that the problem has nothing to do with the prime-indicator-plus (probably about some settings or packages that I played with). I have to reinstall the system because I cannot recall what I changed.

Sorry for taking your time.