Unable to get Nvidia Optimus working

I have installed the Nvidia drivers successfully on my laptop and they seem to be working well. However, I wanted the abitiliy to switch to the integrated AMD graphics on the Ryzen so I installed OptimusUI.

When I try to open the application I get the error: “prime-select not found…”

So… I followed the instructions posted on this thread. Namely I did the following:

$ sudo dnf install dnf-plugins-core -y
$ sudo dnf copr enable t0xic0der/nvidia-auto-installer-for-fedora -y
$ sudo dnf install nvautoinstall -y

then

$ sudo dnf update --refresh

Everything was fine until the last step:

$ sudo nvautoinstall primec

I get the error:

[ ✗ ] RPM Fusion repository for Proprietary NVIDIA Driver was not detected
      Please try executing `nvautoinstall rpmadd` with elevated privileges before this

Then executing nvautoinstall rpmadd results in a series of 404 errors followed by:

Failed to download files
 Librepo error: Status code: 404 for https://rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release- (IP: 212.129.31.198)
[ ✗ ] RPM Fusion NVIDIA repository could not be enabled
      Please try executing `dnf update` with elevated privileges before this

Executing dnf update and then repeating the same had no effect. I got the same errors.

I cannot seem to get prime-select installed.

I would appreciate any help.

Why do you need to uses some lame copr repo to install the rpmfusion driver?

https://rpmfusion.org/Howto/NVIDIA?highlight=(\bCategoryHowto\b)

Hi Leigh, thanks for the response.

Maybe I am misunderstanding something but the link you sent discusses the driver installation. I have the driver installed and working. It is only prime-select that I am unable to install.

Thanks

The copr is using a non-existent url, I doubt it ever worked.
We have never used that url for our release files.

https://rpmfusion.org/Configuration

The toxicoder copr repo used to work and did what a manual install does, but has not been updated for some time.

@alkhater
There is a package installed (by default) that manages switching between the GPUs easily.
I believe the package is switcheroo-control and the command for it is switcherooctl but do not use it myself.

Prime-select is not required for most.

Cinnamon and gnome have builtin switcheroo support for launching apps using the dedicated gpu.

So it relied on the rpmfusion repos being already installed on the system

Thank you all for your help. I had no idea about switcheroo and found it already installed.

Yes, and seems to have been created about the time or just before the rpmfusion-nonfree-nvidia-driver repo was created and began to be included in the fedora first-boot stage.