NVIDIA / NVIDIA/nvidia-settings

Can't produce a valid query/assignment specification in the CLI

Open
#95 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
345
Forks
92
PR merge metrics
No merged PRs in 30d

Description

Hello. I'm trying to change the DigitalVibrance attribute of the display attached to my GPU but I can't seem to be able to produce a valid CLI assignment specification. Even to just query this specific attribute I can't craft a spec that works.

Querying works with -q all:

$ nvidia-settings -q all
...
 Attribute 'DigitalVibrance' (laptop:1[gpu:0]; display device: TV-0): 0.
    The valid values for 'DigitalVibrance' are in the range -1024 - 1023 (inclusive).
    'DigitalVibrance' is display device specific.
    'DigitalVibrance' can use the following target types: X Screen, GPU, Display Device.
...

Based on the output above and on the format suggested by the --help, i.e., {DISPLAY}/{attribute name}[{display devices}], I tried:

$ nvidia-settings -q laptop:1[gpu:0]/DigitalVibrance[TV-0]


ERROR: Error resolving target specification 'gpu-0' (No targets match target specification), specified in query 'laptop:1[gpu-0]/DigitalVibrance[TV-0]'.

But no success. So I tried different things with the following script:

#!/bin/bash
# query_gpu.sh
set -u
attribute="DigitalVibrance"
for host in "" "laptop" "localhost" "$(hostname -s)"; do
    for display in "0" "1"; do
        for target_type in "DPY" "gpu" "GPU" "gpu-0" "GPU-0"; do
            for target_id in "HDMI-1-0" "0" "1"; do
                for display_device in "TV-0" "HDMI-1-0" "DPY-0" ""; do
                    if [ -z "${display_device}" ]; then
                        query="${host}:${display}[${target_type}:${target_id}]/${attribute}"
                    else
                        query="${host}:${display}[${target_type}:${target_id}]/${attribute}[${display_device}]"
                    fi
                    echo "#### Trying: ${query}"
                    nvidia-settings -q "${query}"
                done
            done
        done
    done
done

None worked, but some interesting results: querying with these targets does not produce an error but also no output:

$ nvidia-settings -q [GPU:0]/DigitalVibrance


$ nvidia-settings -q [gpu:0]/DigitalVibrance


If something other than GPU:0 or gpu:0 is given as targets then an error is produced. Strangely enough, specifying the host with the "correct" targets as above also doesn't work:

$ nvidia-settings -q laptop:1[GPU-0]/DigitalVibrance


ERROR: Error resolving target specification 'GPU-0' (No targets match target specification), specified in query 'laptop:1[GPU-0]/DigitalVibrance'.

But it doesn't complain if we omit the host:

$ nvidia-settings -q :1[GPU-0]/DigitalVibrance


$ nvidia-settings -q :1[gpu-0]/DigitalVibrance


What suggests that it might be a bug: everything works as expected in the GUI and if I set the DigitalVibrance to something, e.g., -100, and then save the configuration, then the format in which is saved is not a valid query. That is:

$ grep DigitalVibrance .nvidia-settings-rc 
[DPY:HDMI-1-0]/DigitalVibrance=-100
$ nvidia-settings -q [DPY:HDMI-1-0]/DigitalVibrance


ERROR: Error resolving target specification 'DPY:HDMI-1-0' (No targets match
       target specification), specified in query
       '[DPY:HDMI-1-0]/DigitalVibrance'.

Information about the system:

  • Computer: Laptop Dell G3 with a built-in Intel GPU and the NVIDIA GPU, external monitor connected to the HDMI output of the laptop, PRIME profile "On-Demand" in use
  • NVIDIA GPU: NVIDIA GeForce GTX 1060 with Max-Q Design
  • NVIDIA Driver version: 525.78.01
  • nvidia-settings version: 510.47.03
  • Operating system: Ubuntu 22.04
  • Xorg version: 7.7
  • Linux kernel: 5.19.0-32-generic

The output of -q gpus and -q all is attached, also the output of the small shell script shown above.

script-query-gpu-output.txt
nvidia-settings-query-all.txt
nvidia-settings-query-gpus.txt

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the documented nvidia-settings query and assignment commands, then compare their behavior with the attached query-all, query-gpus, and script output. Done means DigitalVibrance can be queried and assigned with a valid CLI specification, and the saved [DPY:HDMI-1-0] entry can be used successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.