AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1465485
Accepted
jameszp
jameszp
Asked: 2023-04-27 13:25:37 +0800 CST2023-04-27 13:25:37 +0800 CST 2023-04-27 13:25:37 +0800 CST

xrandr --listproviders 不显示任何图形卡

  • 772

我希望能够xrandr识别我的两张 RTX 3070 Nvidia 显卡。

但是,xrandr 不返回任何内容。

xrandr --listproviders
Providers: number : 0

我正在使用nvidia-prime和nvidia-driver-530。

我相信这是由于Xwayland在其上运行 X 合成层wayland而不是xorg直接运行造成的。

虽然我真的不知道这是否真的wayland是根本原因,但我相信我想wayland在我的服务器机器(Ubuntu Server 22.04)上禁用所有并xorg只运行。ssh -X我正在通过Ubuntu 桌面客户端访问服务器。

xrandr --listmonitors
Monitors: 1
 0: +*XWAYLAND15 3840/620x2160/330+0+0  XWAYLAND15
xinput
WARNING: running xinput against an Xwayland server. See the xinput man page for details.
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ xwayland-pointer:16                       id=6    [slave  pointer  (2)]
⎜   ↳ xwayland-relative-pointer:16              id=7    [slave  pointer  (2)]
⎜   ↳ xwayland-pointer-gestures:16              id=8    [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ xwayland-keyboard:16                      id=9    [slave  keyboard (3)]

echo $XDG_SESSION_TYPE
tty
loginctl show-session 1 -p Type
Type=tty

我需要什么设置或配置才能xrandr --listproviders显示 Nvidia 显卡?

我很乐意根据需要提供更多详细信息。

nvidia
  • 2 2 个回答
  • 49 Views

2 个回答

  • Voted
  1. Terrance
    2023-04-27T21:18:33+08:002023-04-27T21:18:33+08:00

    您应该使用像lshw和nvidia-smiwhen using这样的应用程序ssh -X,因为它们实际上会在您的远程系统上运行,向您显示该系统中的硬件。 在远程系统上运行ssh -X时只会显示您的本地显示器和视频卡。xrandr原因是您在运行这些命令时将显示调用转发给本地主机。 lshw并将nvidia-smi在远程系统上正常运行并向您展示您拥有的硬件。

    举个例子,我这​​里有两位主人并排坐着。一个有 GTX 1060,另一个有 GTX 1650:

    本地系统:

    terrance@terrance-ubuntu:~$ xrandr --listproviders
    Providers: number : 1
    Provider 0: id: 0x1b7 cap: 0x1, Source Output crtcs: 4 outputs: 5 associated providers: 0 name:NVIDIA-0
    terrance@terrance-ubuntu:~$ xrandr --listmonitors
    Monitors: 3
     0: +*DVI-D-1 1920/521x1080/293+1920+0  DVI-D-1
     1: +DVI-D-0 1280/338x1024/270+3840+0  DVI-D-0
     2: +HDMI-0 1920/509x1080/286+0+0  HDMI-0
    terrance@terrance-ubuntu:~$ sudo lshw -C video
    [sudo] password for terrance: 
      *-display                 
           description: VGA compatible controller
           product: GP104 [GeForce GTX 1060 6GB]
           vendor: NVIDIA Corporation
           physical id: 0
           bus info: pci@0000:01:00.0
           version: a1
           width: 64 bits
           clock: 33MHz
           capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
           configuration: driver=nvidia latency=0
           resources: irq:36 memory:fb000000-fbffffff memory:c0000000-cfffffff memory:de000000-dfffffff ioport:ef00(size=128) memory:c0000-dffff
      *-graphics
           product: VESA VGA
           physical id: 1
           logical name: /dev/fb0
           capabilities: fb
           configuration: depth=32 resolution=1280,1024
    terrance@terrance-ubuntu:~$ nvidia-smi
    Thu Apr 27 07:13:38 2023       
    +---------------------------------------------------------------------------------------+
    | NVIDIA-SMI 530.41.03              Driver Version: 530.41.03    CUDA Version: 12.1     |
    |-----------------------------------------+----------------------+----------------------+
    | GPU  Name                  Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
    | Fan  Temp  Perf            Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
    |                                         |                      |               MIG M. |
    |=========================================+======================+======================|
    |   0  NVIDIA GeForce GTX 1060 6GB     Off| 00000000:01:00.0  On |                  N/A |
    |  0%   58C    P0               31W / 120W|    534MiB /  6144MiB |      1%      Default |
    |                                         |                      |                  N/A |
    +-----------------------------------------+----------------------+----------------------+
                                                                                             
    +---------------------------------------------------------------------------------------+
    | Processes:                                                                            |
    |  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
    |        ID   ID                                                             Usage      |
    |=======================================================================================|
    |    0   N/A  N/A      3031      G   /usr/lib/xorg/Xorg                          348MiB |
    |    0   N/A  N/A      3306      G   xfwm4                                         2MiB |
    |    0   N/A  N/A      3413      G   /usr/local/bin/ckb-next                       1MiB |
    |    0   N/A  N/A    137496      G   ...,WinRetrieveSuggestionsOnlyOnDemand       38MiB |
    |    0   N/A  N/A    141190      G   /usr/lib/firefox/firefox                    139MiB |
    +---------------------------------------------------------------------------------------+
    

    远程系统(通过连接ssh -X):

    terrance@terrance-ubuntu:~$ ssh -X intrepid
    Welcome to Ubuntu 22.04.2 LTS (GNU/Linux 5.15.0-71-generic x86_64)
    
      System information as of Thu Apr 27 07:12:42 AM MDT 2023
    
      System load:  0.02                Processes:              222
      Usage of /:   73.4% of 454.44GB   Users logged in:        0
      Memory usage: 9%                  IPv4 address for bond0: 10.0.0.220
      Swap usage:   0%                  IPv4 address for tun0:  10.8.0.1
    
    Expanded Security Maintenance for Applications is enabled.
    
    0 updates can be applied immediately.
    
    You have new mail.
    Last login: Thu Apr 27 07:02:50 2023 from 10.0.0.100
    -------------------------------------------------------------- 04/27/23 07:12:43
    terrance@Intrepid:~$ xrandr --listproviders
    Providers: number : 1
    Provider 0: id: 0x1b7 cap: 0x1, Source Output crtcs: 4 outputs: 5 associated providers: 0 name:NVIDIA-0
    -------------------------------------------------------------- 04/27/23 07:12:53
    terrance@Intrepid:~$ xrandr --listmonitors
    Monitors: 3
     0: +*DVI-D-1 1920/521x1080/293+1920+0  DVI-D-1
     1: +DVI-D-0 1280/338x1024/270+3840+0  DVI-D-0
     2: +HDMI-0 1920/509x1080/286+0+0  HDMI-0
    -------------------------------------------------------------- 04/27/23 07:13:01
    terrance@Intrepid:~$ sudo lshw -C video
      *-display                 
           description: VGA compatible controller
           product: TU117 [GeForce GTX 1650]
           vendor: NVIDIA Corporation
           physical id: 0
           bus info: pci@0000:01:00.0
           version: a1
           width: 64 bits
           clock: 33MHz
           capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
           configuration: driver=nvidia latency=0
           resources: irq:29 memory:fb000000-fbffffff memory:c0000000-cfffffff memory:de000000-dfffffff ioport:ef00(size=128) memory:c0000-dffff
      *-graphics
           product: VESA VGA
           physical id: 1
           logical name: /dev/fb0
           capabilities: fb
           configuration: depth=32 resolution=640,480
    -------------------------------------------------------------- 04/27/23 07:13:16
    terrance@Intrepid:~$ nvidia-smi
    Thu Apr 27 07:13:25 2023       
    +-----------------------------------------------------------------------------+
    | NVIDIA-SMI 525.105.17   Driver Version: 525.105.17   CUDA Version: 12.0     |
    |-------------------------------+----------------------+----------------------+
    | GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
    | Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
    |                               |                      |               MIG M. |
    |===============================+======================+======================|
    |   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0 Off |                  N/A |
    | 35%   41C    P8    11W /  75W |      1MiB /  4096MiB |      0%      Default |
    |                               |                      |                  N/A |
    +-------------------------------+----------------------+----------------------+
                                                                                   
    +-----------------------------------------------------------------------------+
    | Processes:                                                                  |
    |  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
    |        ID   ID                                                   Usage      |
    |=============================================================================|
    |  No running processes found                                                 |
    +-----------------------------------------------------------------------------+
    -------------------------------------------------------------- 04/27/23 07:13:25
    

    如您所见,xrandr在我的本地主机和远程主机上运行时,该命令将显示完全相同的内容。但是lshw和nvidia-smi显示了我需要在两台主机上看到的内容。

    • 0
  2. Best Answer
    jameszp
    2023-04-28T01:35:10+08:002023-04-28T01:35:10+08:00

    最终,我试图做的事情似乎是不可能的。

    因为我不认为图形软件应该以这种方式在无头 Ubuntu 服务器上运行,所以我安装了lightdm这样我可以访问服务器机器上的 GUI,并通过直接视频连接将其直接连接到显示器。

    安装 GUI 后,所有 Nvidia 卡都被识别,一切似乎都运行良好。

    • 0

相关问题

  • 普利茅斯将来会允许使用专有图形驱动程序获得良好的启动体验吗?

  • 未连接到任何可见进程的令人讨厌的 CPU 峰值

  • 10.04 Lucid 中的多席位状态如何?[关闭]

  • 升级到 10.04 后字体模糊,Nvidia 问题?

  • 帮助让 Flash 播放器在第二个屏幕上工作?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve