Unable to install Nvidia-Prime via APT

Whenever I try to install prime, I get the following message on my terminal:

max@Max-Linux:~$ sudo apt install nvidia-prime
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package nvidia-prime is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package ‘nvidia-prime’ has no installation candidate

How can I fix this? Desperate, haven’t been able to use my secondary monitor for a month now, wanting to punch a wall since January. nvidia-settings wont work due to “ERROR: Unable to load info from any available system.” and thats why I cant use my secondary monitor since HDMI wont detect though I see it plugged in with my own eyes.

I am running Deepin OS, Debian-based, kernel 5.4 or something.

Nvidia-smi output:

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.32.03    Driver Version: 460.32.03    CUDA Version: 11.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  GeForce GTX 106...  On   | 00000000:01:00.0 Off |                  N/A |
| N/A   55C    P8     5W /  N/A |      1MiB /  6078MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

https://www.programmersought.com/article/33623796710/

maybe that guide helps?

1 Like

I’ll check it out, thanks for the response :)

Sadly, the guide did not fix my issues.

Also, what is making me wonder right now, is that NVIDIA-SMI is showing that my graphics card is on, but says “OFF” next to the PCI number.

How do I turn this “ON”, how it should be?

And why can’t it detect my HDMI thats connected?

First: on bare debian there is no nvidia-prime package. That’s an ubuntu python script.
I don’t know how it’s implemented in Deepin OS. Might be better off asking there.

If that:

4. Switch the graphics solution

Enter Deepin Video Driver Manager and select the PRIME solution to install. The installation time is about 5 minutes. After installation, you need to restart the computer.

prompt: The PRIME solution is only available in versions after deepin 15.7. If there is no upgrade, please upgrade the system first.

from the link I gave you does not work, you are maybe also better off asking at Deepin forums.

Here you can read how it’s done on a bare debian setup:
https://wiki.debian.org/NVIDIA%20Optimus

Also, what is making me wonder right now, is that NVIDIA-SMI is showing that my graphics card is on, but says “OFF” next to the PCI number.

Simply running man nvidia-smi could give you the answer:

Display Active
A flag that indicates whether a display is initialized on the GPU’s (e.g. memory is allocated on the device for display). Display can be active even when no moni‐
tor is physically attached. “Enabled” indicates an active display. “Disabled” indicates otherwise.

1 Like

Problem: I dont have deepin video driver manager. Everyone mentions it but I dont have it in my system, and yes ive ran system OS upgrade, apt upgrade, and apt update. So my OS and packages are all up to date. I still do not have that application on my system.

Also, Nvidia SMI shows that my Graphics Card is now given power, but it says “OFF” next to PCI, how do I turn this on?

Mart’s reply describes the nvidia-smi thing: The layout of that table is kind of confusing, where the labels for multiple items are in the box above where the values are. If you’re referring to the Off thing next to the PCI bus ID of the device, that’s the value that corresponds to the “Disp.A” label, which indicates whether the GPU’s display hardware is active. It’s expected to say Off if the GPU is not driving a display (directly, rather than through PRIME display offload).

So, how can I enable it to drive my display directly, since PRIME is only an Ubuntu thing. (Which still confuses me since its a python script)

I feel like if I can enable this, it will detect my HDMI.

“PRIME” is just a common name for a couple of related technologies, which include the ability to render the desktop on one GPU and display it on another (“PRIME display offload”) and to render individual applications on one GPU and display them on a desktop that’s running on a different GPU (“PRIME render offload”).

Ubuntu has a set of scripts (gpu-manager and nvidia-prime) to help make managing these different modes easier, but they’re not required to use either mode. It sounds like Deepin doesn’t have a port of these Ubuntu packages.

It’s not immediately clear whether your HDMI port is connected to your laptop’s integrated GPU or to the NVIDIA GPU. Please run sudo nvidia-bug-report.sh and attach the resulting log file here. That should provide some more detailed information about your setup.

1 Like

nvidia-bug-report.log.gz (246.1 KB)

Here is the nvidia-bug-report.log, and also thanks for the quick response

It says “nvidia-installer.log does not exist” probably because I installed proprietary drivers via the OS installer and not manually, and upgraded my drivers from there with apt.

Looks like your system is configured to use a “display offload” configuration: the Intel iGPU is rendering the desktop, and the X server is trying to load NVIDIA as a secondary GPU (a so-called “GPU screen” in Xorg terminology). However, your X server is too old to support that:

So you have to decide whether you want to reconfigure X to use display offload, where the desktop is on the NVIDIA GPU and Intel is only used for display, or whether you want to upgrade the X server in order to use render offload mode where only applications you specifically choose to offload run on NVIDIA.

Each mode has pros and cons, so I recommend reading the README sections about them:

1 Like

So according to the read me, it requires a version above 1.20.7, but when I run an upgrade on the xorg core, it outputs that its already at the newest version.

max@Max-Linux:~$ sudo apt install xserver-xorg-core
Reading package lists... Done
Building dependency tree       
Reading state information... Done
xserver-xorg-core is already the newest version (2:1.20.4.10-1+eagle).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Am I upgrading it right? Its current version is 1.20.4

Deepin might just not have a newer version available in their package repositories. You’ll have to check with them.

1 Like

Sounds to me the OP wants display offload.

From the readme:

For displaying NVIDIA GPU desktop contents on a screen connected to another graphics device, X.Org X server version 1.13 or higher.

You didn’t give us your Deepin version… but a quick search brought up this:

But maybe you can also install the driver manager through apt.

something like:
apt search "*driver*manager*"

would give you a list of possible packages.