NVIDIA / NVIDIA/nvidia-settings

parsing hostname with -a does not find display

Open
#61 0 comments 0 reactions 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

Good day,

while trying to help someone over at the Nvidia developer forum for linux

https://forums.developer.nvidia.com/t/nvidia-settings-attribute-gpumemorytransferrateoffsetallperformancelevels-is-not-available/166846

(maybe you can take a look to help that guy :) )

I stumbled over an issue, that using the hostname in an attribute assignment (or query) results in nvidia-settings not finding the display.
Maybe I'm doing it wrong, but as far as I can see I'm not ;)

The output of nvidia-settings -h shows:

  The ASSIGN argument to the '--assign' command line option is of the form:
  
    {DISPLAY}/{attribute name}[{display devices}]={value}
  
  This assigns the attribute {attribute name} to the value {value} on the X Display {DISPLAY}.  {DISPLAY} follows the usual {host}:{display}.{screen} syntax of the DISPLAY environment v
  ariable and is optional; when it is not specified, then it is implied following the same rule as the --ctrl-display option.  If the X screen is not specified, then the assignment is m
  ade to all X screens.  Note that the '/' is only required when {DISPLAY} is present.
  
  {DISPLAY} can additionally include a target specification to direct an assignment to something other than an X screen.  A target specification is contained within brackets and consist
  s of a target type name, a colon, and the target id.  The target type name can be one of "screen", "gpu", "framelock", "fan", "thermalsensor", "svp", or "dpy"; the target id is the in
  dex into the list of targets (for that target type).  The target specification can be used in {DISPLAY} wherever an X screen can be used, following the syntax {host}:{display}[{target
  _type}:{target_id}].

The output of nvidia-settings -q screens shows on my system:

1 X Screen on darklord:0

[0] darklord:0.0 (GeForce RTX 2080 Ti)

  Has the following name:
    SCREEN-0

Which tells me darklord:0 or darklord:0.0 are {host}:{display}.{screen} identifiers to use.

So these are the commands I tried:

nvidia-settings -a darklord:0/GPUMemoryTransferRateOffsetAllPerformanceLevels=0
ERROR: Unable to find display on any available system

nvidia-settings -a darklord:0.0/GPUMemoryTransferRateOffsetAllPerformanceLevels=0
ERROR: Unable to find display on any available system

nvidia-settings -a darklord:0[gpu:0]/GPUMemoryTransferRateOffsetAllPerformanceLevels=0
ERROR: Unable to find display on any available system

nvidia-settings -a darklord:0.0[gpu:0]/GPUMemoryTransferRateOffsetAllPerformanceLevels=0
ERROR: Unable to find display on any available system

But omitting the host specification results in success:

nvidia-settings -a :0[gpu:0]/GPUMemoryTransferRateOffsetAllPerformanceLevels=0
Attribute 'GPUMemoryTransferRateOffsetAllPerformanceLevels' (darklord:0[gpu:0]) assigned value 0.

nvidia-settings -a :0.0/GPUMemoryTransferRateOffsetAllPerformanceLevels=0
Attribute 'GPUMemoryTransferRateOffsetAllPerformanceLevels' (darklord:0.0) assigned value 0.

nvidia-settings --version
nvidia-settings: version 455.23.05

driver version: 460.39 (from ppa)
distro: linux mint 19.3 (ubuntu 18.04 based)
kernel: 5.9.16 (custom)

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

Reproduce the reported commands using --assign with darklord:0, darklord:0.0, and the working :0 forms, then inspect the command-line parsing and display lookup paths for hostname-qualified displays. Done means hostname-based assignments locate the same display as the equivalent hostless commands, with regression coverage for the reported forms.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
cli, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.