LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-09-2017, 08:10 AM   #1
f0k
LQ Newbie
 
Registered: Feb 2017
Posts: 2

Rep: Reputation: Disabled
How to run nvidia-settings remotely


I know this is an old thread, but it's one of the top search results for the issue of running nvidia-settings over ssh and maybe this is useful for people from the future.

If you just need to run the command-line nvidia-settings tool (e.g., to display information that nvidia-smi hides for certain GPUs) and you have root access to the remote machine, you can override the DISPLAY variable to :0. The remote X server will then give you an error Invalid MIT-MAGIC-COOKIE-1 key, because no matter whether you have root access or not, you need a valid xauth magic cookie. Luckily, even if nobody is logged in at the machine, the login screen (e.g., lightdm) will have such a magic cookie. You can try to find it with ps aux | grep auth. For lightdm, it is placed at /var/run/lightdm/root/:0. As root, you can hijack this cookie by setting the XAUTHORITY variable to it. Put together, the following should display the GPU, memory bandwidth and PCIe bandwidth utilization when logging in to a remote server with ssh (and no X-forwarding):
sudo DISPLAY=:0 XAUTHORITY=/var/run/lightdm/root/:0 nvidia-settings -t -q GPUUtilization
For a somewhat tidier output, you can try https://devtalk.nvidia.com/default/t...not-supported/, also overriding DISPLAY and XAUTHORITY as shown above.
 
Old 02-09-2017, 02:35 PM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Moderator Respnse

Your post to a necro thread has been moved to a thread of it's own. Please do not resurrect old threads.

Last edited by onebuck; 02-10-2017 at 05:34 AM. Reason: typo
 
Old 02-10-2017, 05:16 AM   #3
f0k
LQ Newbie
 
Registered: Feb 2017
Posts: 2

Original Poster
Rep: Reputation: Disabled
Quote:
Please do not resurrect old threads.
Sorry, that thread was the first search result on google that was still "editable" (the others were mailing list archives). I understand that my post won't spark any discussion with the OP from 2013, so posting to old threads generally doesn't fit the purpose of a forum, but it's also a way to archive solutions for others to find them. Anyway, this new thread already appears on the first page for the terms I searched for yesterday, mission accomplished! It'd still be cool if you could link to this thread from the old one (http://www.linuxquestions.org/questi...gs-4175448731/), but it's probably not super important. Cheers!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
nvidia proprietary driver, nvidia-settings and how to configure panning bluebox Linux - Hardware 1 03-11-2011 03:21 PM
Nvidia display settings will not run westwoodr Linux - Newbie 5 11-10-2007 02:45 AM
How to run a command remotely fw12 Linux - General 12 11-21-2006 02:18 AM
can't run X programs remotely mcshen Linux - General 2 07-28-2005 07:47 PM
Are you suppose to be able to run X remotely? abefroman SUSE / openSUSE 15 05-09-2005 03:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration