Public bug reported:
# prime-select treats "nvidia" as intel, and refuses nvidia on discrete-
only desktops
**Package:** nvidia-prime 0.8.17.2
**Ubuntu:** 24.04.4 LTS
**Hardware:** desktop, NVIDIA RTX 3050 only (no iGPU). Chassis type is not a
laptop.
## Summary
On a discrete-GPU desktop, `prime-select` cannot lock NVIDIA, and `query`
will report `intel` if `/etc/prime-discrete` contains the string `nvidia`.
There is no Intel GPU.
## Bug 1 — query() default is intel
`/usr/bin/prime-select` `_get_profile()`:
```python
config = settings.read().strip()
if config == 'on':
return 'nvidia'
elif config == "on-demand":
return 'on-demand'
else:
return 'intel'
```
`_write_profile('nvidia')` writes `on`, not `nvidia`. Any other tool or
older script that writes `nvidia` (the name of the profile) is then
reported as intel. Observed: `/etc/prime-discrete` was `nvidia`,
`prime-select query` printed `intel`, lspci showed only NVIDIA.
## Bug 2 — enable_profile() refuses nvidia when there is no iGPU
```python
def enable_profile(self, profile):
if not self._has_integrated_gpu():
sys.stderr.write('Error: no integrated GPU detected.\n')
return False
```
This runs *before* the profile is examined. So on a desktop with only an
RTX 3050:
```
$ sudo prime-select nvidia
Error: no integrated GPU detected.
```
PRIME switching is meaningless without an iGPU, but *enabling NVIDIA*
must still succeed: it is the only GPU. Today the command is a no-op,
and gpu-manager / leftover blacklist-nvidia.conf from a previous
`intel` or `on-demand` state can persist.
## Expected
- `prime-select nvidia` on a discrete-only machine writes `on` to
`/etc/prime-discrete`, removes nvidia blacklists, and returns 0.
- `prime-select query` treats `on` and `nvidia` as nvidia; `off` and
`intel` as intel; unknown values as unknown, not intel.
## Actual
- `prime-select nvidia` fails.
- `query` reports intel when the file says nvidia.
## Patch
See attached `04-prime-select.patch`. It is two hunks in
`/usr/bin/prime-select`.
## Why this matters
HWE kernel upgrades on this machine fell back to simpledrm (`None-1`)
when nvidia.ko was missing. Tools that then ran `prime-select nvidia`
to recover did nothing, and `query` claiming intel sent debugging down
the hybrid-graphics path on a PC that has never had an iGPU.
Related: LP: #2159683
** Affects: nvidia-prime (Ubuntu)
Importance: Undecided
Status: New
** Tags: noble nvidia
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2167616
Title:
prime-select treats "nvidia" as intel and refuses nvidia on discrete-
only desktops
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nvidia-prime/+bug/2167616/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs