NVIDIA / nvidia-settings

NVIDIA driver control panel
http://www.nvidia.com/object/unix.html
GNU General Public License v2.0
297 stars 77 forks source link

parsing hostname with -a does not find display #61

Open AllKind opened 3 years ago

AllKind commented 3 years ago

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)