Comment 4 for bug 1848326

Revision history for this message
Dmitrii Shcherbakov (dmitriis) wrote : Re: error booting with prime-select intel

If anybody still has a reproducer, it would be useful to set a trace point like this:

sudo vim /usr/bin/prime-select

# ...
        import pdb
        pdb.set_trace()

        if profile == 'nvidia':
            # Always allow enabling nvidia
            # (No need to check if nvidia is available)
            self._enable_nvidia()
        elif profile == "on-demand":
            self._disable_nvidia(keep_nvidia_modules=True)
        else:
            # Make sure that the installed packages support PRIME
            #if not self._supports_prime():
            # sys.stderr.write('Error: the installed packages do not support PRIME\n')
            # return False
            self._disable_nvidia()

# ...

and see if _disable_nvidia is entered when `prime-select intel` is invoked while `prime-select query` shows "nvidia" or "on-demand".

Before I removed the driver and the nvidia-prime package, I could switch the profile back and forth using `prime-select intel` and `prime-select nvidia` without any positive effect so it would be useful to find out why.

The code only depends on the target profile specified via command line and the current profile (read from /etc/prime-discrete) so I don't have any guesses yet:

https://github.com/tseliot/nvidia-prime/blob/cf757cc9585dfc032930379fc81effb3a3d59606/prime-select#L114-L143