<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>NVIDIA on 猫猫鱼的小窝</title>
    <link>https://csdn.fjh1997.top/tags/nvidia/</link>
    <description>Recent content from 猫猫鱼的小窝</description>
    <generator>Hugo</generator>
    <language>zh-CN</language>
    
    <managingEditor>xxx@example.com (catcatyu)</managingEditor>
    <webMaster>xxx@example.com (catcatyu)</webMaster>
    
    <copyright>本博客所有文章除特别声明外，均采用 BY-NC-SA 许可协议。转载请注明出处！</copyright>
    
    <lastBuildDate>Thu, 26 Mar 2026 17:40:00 +0800</lastBuildDate>
    
    
    <atom:link href="https://csdn.fjh1997.top/tags/nvidia/atom.xml" rel="self" type="application/rss&#43;xml" />
    

    
    

    <item>
      <title>Ubuntu 24.04 安装 NVIDIA 驱动后 GNOME 远程桌面黑屏/灰屏的排错与解决</title>
      <link>https://csdn.fjh1997.top/posts/8009.html</link>
      <pubDate>Thu, 26 Mar 2026 17:40:00 &#43;0800</pubDate>
      <author>xxx@example.com (catcatyu)</author>
      <guid>https://csdn.fjh1997.top/posts/8009.html</guid>
      <description>
        <![CDATA[<h1>Ubuntu 24.04 安装 NVIDIA 驱动后 GNOME 远程桌面黑屏/灰屏的排错与解决</h1><p>作者：catcatyu（xxx@example.com）</p>
        
          <h2 id="问题描述">
<a class="header-anchor" href="#%e9%97%ae%e9%a2%98%e6%8f%8f%e8%bf%b0"></a>
问题描述
</h2><p>Ubuntu 24.04 LTS 工作站，安装 NVIDIA 闭源驱动（nvidia-driver-580）后，通过 Windows 远程桌面连接（mstsc）使用 GNOME 内置 RDP 服务连接时，出现灰屏或黑屏，无法正常显示桌面。</p>
<p>环境信息：</p>
<ul>
<li>系统：Ubuntu 24.04 LTS (Noble Numbat)</li>
<li>内核：6.17.0-19-generic</li>
<li>独显：NVIDIA GeForce RTX 4070</li>
<li>驱动：nvidia-driver-580 (580.126.09)</li>
<li>远程桌面服务：GNOME Remote Desktop (gnome-remote-desktop 46.2)</li>
<li>客户端：Windows 11 远程桌面连接 (mstsc)</li>
</ul>
<!-- more -->
<h2 id="根因分析">
<a class="header-anchor" href="#%e6%a0%b9%e5%9b%a0%e5%88%86%e6%9e%90"></a>
根因分析
</h2><p>GNOME Remote Desktop 的 RDP 连接链路如下：</p>
<pre tabindex="0"><code>Windows mstsc → GNOME Remote Desktop (系统级)
    → handover → 用户桌面会话
        → Mutter 合成器 → PipeWire 屏幕捕获
            → gnome-remote-desktop (用户级) → RDP 编码输出
</code></pre><p>问题的根本原因是 Ubuntu 24.04 默认安装的 <code>gnome-shell</code>（46.0-0ubuntu6~24.04.3）和 <code>gnome-remote-desktop</code>（46.2）版本过低，在 NVIDIA 闭源驱动环境下存在以下 bug：</p>
<ol>
<li>
<p><strong>gnome-shell 在 RDP handover 时 segfault</strong>：通过 RDP 登录触发用户会话创建时，gnome-shell 在 <code>libc.so.6</code> 中发生 general protection fault 崩溃，导致用户会话无法注册，GDM 报 <code>Session never registered, failing</code>。</p>
</li>
<li>
<p><strong>gnome-remote-desktop handover 超时</strong>：即使 gnome-shell 不崩溃，旧版 gnome-remote-desktop 在 NVIDIA + Wayland 环境下的 handover 流程也存在缺陷，日志表现为 <code>Failed to request remote desktop handover: Timeout was reached</code>。</p>
</li>
</ol>
<p>通过对比一台配置相似但 RDP 工作正常的机器（同样使用 NVIDIA 闭源驱动 580 + Wayland），发现其 <code>gnome-shell</code> 版本为 46.0-0ubuntu6~24.04.13，<code>gnome-remote-desktop</code> 版本为 46.3-0ubuntu1.2，均高于出问题的机器。升级后问题解决。</p>
<h2 id="解决方案">
<a class="header-anchor" href="#%e8%a7%a3%e5%86%b3%e6%96%b9%e6%a1%88"></a>
解决方案
</h2><p>一条命令：</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo apt update <span class="o">&amp;&amp;</span> sudo apt install -y gnome-shell gnome-remote-desktop mutter
</span></span></code></pre></td></tr></table>
</div>
</div><p>升级后重启：</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo reboot
</span></span></code></pre></td></tr></table>
</div>
</div><h3 id="验证">
<a class="header-anchor" href="#%e9%aa%8c%e8%af%81"></a>
验证
</h3><div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span><span class="lnt">7
</span><span class="lnt">8
</span><span class="lnt">9
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># 确认版本</span>
</span></span><span class="line"><span class="cl">dpkg -l <span class="p">|</span> grep -E <span class="s1">&#39;gnome-shell |gnome-remote-desktop &#39;</span>
</span></span><span class="line"><span class="cl"><span class="c1"># gnome-shell         46.0-0ubuntu6~24.04.13</span>
</span></span><span class="line"><span class="cl"><span class="c1"># gnome-remote-desktop 46.3-0ubuntu1.2</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># 确认远程桌面服务正常</span>
</span></span><span class="line"><span class="cl">journalctl --user -u gnome-remote-desktop --since <span class="s1">&#39;1 min ago&#39;</span>
</span></span><span class="line"><span class="cl"><span class="c1"># 应显示 &#34;RDP server started&#34;</span>
</span></span><span class="line"><span class="cl"><span class="c1"># CUDA 初始化成功：[RDP] Initialization of CUDA was successful</span>
</span></span></code></pre></td></tr></table>
</div>
</div><p>使用 Windows 远程桌面连接，输入 IP、用户名和密码，即可正常看到桌面。NVIDIA GPU 的 CUDA 计算能力不受影响。</p>
<h2 id="版本对比">
<a class="header-anchor" href="#%e7%89%88%e6%9c%ac%e5%af%b9%e6%af%94"></a>
版本对比
</h2><table>
  <thead>
      <tr>
          <th>包</th>
          <th>修复前（黑屏）</th>
          <th>修复后（正常）</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>gnome-shell</td>
          <td>46.0-0ubuntu6~24.04.<strong>3</strong></td>
          <td>46.0-0ubuntu6~24.04.<strong>13</strong></td>
      </tr>
      <tr>
          <td>gnome-remote-desktop</td>
          <td><strong>46.2</strong>-1~ubuntu24.04.2</td>
          <td><strong>46.3</strong>-0ubuntu1.2</td>
      </tr>
      <tr>
          <td>mutter</td>
          <td>旧版</td>
          <td>46.2-1ubuntu0.24.04.14</td>
      </tr>
  </tbody>
</table>
<h2 id="总结">
<a class="header-anchor" href="#%e6%80%bb%e7%bb%93"></a>
总结
</h2><p>这个问题不是 NVIDIA 驱动本身的兼容性问题，而是 Ubuntu 24.04 早期版本的 gnome-shell 和 gnome-remote-desktop 在 NVIDIA 驱动环境下存在 bug。升级到最新的补丁版本即可修复，无需切换核显、修改 prime-select 或更换远程桌面工具。</p>

        
        <hr><p>本文2026-03-26首发于<a href='https://csdn.fjh1997.top/'>猫猫鱼的小窝</a>，最后修改于2026-03-26</p>]]>
      </description>
      
        <category>Linux运维</category>
      
    </item>
    
  </channel>
</rss>
