NVIDIA / NVIDIA/nvidia-xconfig
Unable to query GPU information inside of a docker container that has less than all GPUs
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 42
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Description
Similar to #1.
Although a very rare situation, I'm running xorg inside a container.
When using ALL gpus, nvida-xconfig works because it can for-each over each pci device, and there is a corresponding /dev/nvidiaN to query.
When not-ALL, nvidia-xconfig fails with:
WARNING: Unable to use the nvidia-cfg library to query NVIDIA hardware.
ERROR: Unable to query GPU information
I think the code hint is around:
https://github.com/NVIDIA/nvidia-xconfig/blob/ebdd4d69f0e143dedbc4265f63be30d421343b0d/multiple_screens.c#L384
and the change would need to be where it can tolerate not seeing every pci device, and being "OK" with just having access to say, /dev/nvidia5, and returning only that random one 5th device instead of failing.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in multiple_screens.c around line 384, then inspect how GPU and PCI devices are enumerated when nvidia-xconfig runs inside a container. Reproduce the failure with access to only a subset of GPUs, such as /dev/nvidia5. Done means the tool tolerates unavailable PCI devices and returns information for an accessible GPU instead of failing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, docker
- Domain
- devops, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100