如何让 Debian 12 上的 X11/Xorg/X Server 起死回生?

如何让 Debian 12 上的 X11/Xorg/X Server 起死回生?

急需帮助!我最近不得不对运行 Debian 12 的机器进行硬重置(关闭电源),X11 无法启动。输入密码后,屏幕变黑。什么都没有。不过我有时能看到光标(不是鼠标)。我尝试过启动到 KDE(首选),也尝试过启动到 GNOME(我都有)。Wayland 不可用。有趣的是,XScreensaver 仍然有效。

切换到其中一个控制台 (TTY),我无法在日志中找到任何信息来表明它出了什么问题。除了视频驱动程序(NVIDIA 专有)。

笔记:

  • 没有xorg.conf文件。
  • 安全启动已打开。

Xorg 日志(尾部):

$ tail /var/logs/Xorg.0.log.old
[ 16039.960] (II) systemd-logind: releasing fd for 13:75
[ 16039.997] (II) UnloadModule: "libinput"
[ 16039.997] (II) systemd-logind: releasing fd for 13:68
[ 16040.025] (WW) NVIDIA(G0): Failed to set the display configuration
[ 16040.025] (WW) NVIDIA(G0):  - Setting a mode on head 0 failed: Insufficient permissions
[ 16040.025] (WW) NVIDIA(G0):  - Setting a mode on head 1 failed: Insufficient permissions
[ 16040.025] (WW) NVIDIA(G0):  - Setting a mode on head 2 failed: Insufficient permissions
[ 16040.025] (WW) NVIDIA(G0):  - Setting a mode on head 3 failed: Insufficient permissions
[ 16040.032] (II) NVIDIA(GPU-0): Deleting GPU-0
[ 16040.035] (II) Server terminated successfully (0). Closing log file.

这些“头”是什么?

稍微更新一点的日志:

$ tail /var/logs/Xorg.0.log
[ 16063.397] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
[ 16063.397] (WW) Disabling Mouse0
[ 16063.397] (WW) Disabling Keyboard0
[ 16063.404] (II) intel(0): Using Kernel Mode Setting driver: i915, version 1.6.0 20201103
[ 16063.404] (II) intel(0): SNA compiled: xserver-xorg-video-intel 2:2.99.917+git20210115-1 (Timo Aaltonen <[email protected]>)
[ 16063.404] (II) intel(0): SNA compiled for use with valgrind
[ 16063.406] (EE) [drm] Failed to open DRM device for pci:0000:01:00.0: -2
[ 16063.406] Number of created screens does not match number of detected devices.
  Configuration failed.
[ 16063.406] (EE) Server terminated with error (2). Closing log file.

想法:可能是因为我没有连接外接显示器而发出抱怨?

启动日志(头部):

$ head -n 30 /var/logs/boot.log
------------ Thu Apr 11 23:50:31 EDT 2024 ------------
/dev/nvme0n1p5: recovering journal
/dev/nvme0n1p5: Clearing orphaned inode 63713301 (uid=0, gid=0, mode=0100644, size=295613)
/dev/nvme0n1p5: Clearing orphaned inode 63713252 (uid=0, gid=0, mode=0100644, size=49748)
/dev/nvme0n1p5: Clearing orphaned inode 63713292 (uid=0, gid=0, mode=0100755, size=952824)
/dev/nvme0n1p5: Clearing orphaned inode 63809991 (uid=0, gid=0, mode=0100644, size=291232)
/dev/nvme0n1p5: Clearing orphaned inode 63713253 (uid=0, gid=0, mode=0100644, size=49636)
/dev/nvme0n1p5: Clearing orphaned inode 40632338 (uid=1000, gid=64055, mode=0100600, size=0)
/dev/nvme0n1p5: Clearing orphaned inode 40632337 (uid=1000, gid=64055, mode=0100600, size=38791)
/dev/nvme0n1p5: Clearing orphaned inode 40632336 (uid=1000, gid=64055, mode=0100600, size=4148)
/dev/nvme0n1p5: Clearing orphaned inode 40632333 (uid=1000, gid=64055, mode=0100600, size=5450107)
/dev/nvme0n1p5: Clearing orphaned inode 40632330 (uid=1000, gid=64055, mode=0100600, size=0)
/dev/nvme0n1p5: Clearing orphaned inode 40632329 (uid=1000, gid=64055, mode=0100600, size=0)
/dev/nvme0n1p5: Clearing orphaned inode 40632328 (uid=1000, gid=64055, mode=0100600, size=0)
/dev/nvme0n1p5: Clearing orphaned inode 40632327 (uid=1000, gid=64055, mode=0100600, size=0)
/dev/nvme0n1p5: Clearing orphaned inode 40632326 (uid=1000, gid=64055, mode=0100600, size=0)
/dev/nvme0n1p5: Clearing orphaned inode 40632324 (uid=1000, gid=64055, mode=0100600, size=0)
/dev/nvme0n1p5: clean, 543049/67051520 files, 11030003/268185344 blocks
[FAILED] Failed to start systemd-random-seed.service - Load/Save Random Seed.
[FAILED] Failed to start systemd-random-seed.service - Load/Save Random Seed.
[FAILED] Failed to start systemd-backlight@backlight:nvidia_wmi_ec_backlight.service - Load/Save Screen Backlight Brightness of backlight:nvidia_wmi_ec_backlight.
[FAILED] Failed to start systemd-random-seed.service - Load/Save Random Seed.
[FAILED] Failed to start systemd-rfkill.service - Load/Save RF Kill Switch Status.
[FAILED] Failed to start systemd-rfkill.service - Load/Save RF Kill Switch Status.
[FAILED] Failed to start systemd-random-seed.service - Load/Save Random Seed.
[FAILED] Failed to start systemd-rfkill.service - Load/Save RF Kill Switch Status.
[FAILED] Failed to start systemd-rfkill.service - Load/Save RF Kill Switch Status.
[FAILED] Failed to start systemd-rfkill.service - Load/Save RF Kill Switch Status.
[FAILED] Failed to start systemd-rfkill.service - Load/Save RF Kill Switch Status.
         Mounting proc-sys-fs-binfmt_misc.mount - Arbitrary Executable File Formats File System...

neofetch 工作时的样子:

$ neofetch
       _,met$$$$$gg.          [user]@[computer_name]
    ,g$$$$$$$$$$$$$$$P.       -------------------------
  ,g$$P"     """Y$$.".        OS: Debian GNU/Linux 12 (bookworm) x86_64
 ,$$P'              `$$$.     Host: PD5x_7xSNC_SND_SNE
',$$P       ,ggs.     `$$b:   Kernel: 6.1.0-18-amd64
`d$$'     ,$P"'   .    $$$    Uptime: 1 hour, 30 mins
 $$P      d$'     ,    $$P    Packages: 3594 (dpkg)
 $$:      $$.   -    ,d$$'    Shell: bash 5.2.15
 $$;      Y$b._   _,d$P'      Resolution: 1920x1080
 Y$$.    `.`"Y$$$$P"'         DE: Plasma 5.27.5
 `$$b      "-.__              WM: KWin
  `Y$$                        Theme: [Plasma], Breeze [GTK2/3]
   `Y$$.                      Icons: [Plasma], breeze [GTK2/3]
     `$$b.                    Terminal: konsole
       `Y$$b.                 CPU: Intel i9-14900HX (32) @ 2.200GHz
          `"Y$b._             GPU: NVIDIA GeForce RTX 4060 Max-Q / Mobile
              `"""            GPU: Intel Raptor Lake-S UHD Graphics
                              Memory: 3546MiB / 64000MiB

还需要其他信息吗?

答案1

检查日志后/var/lib/dkms/nvidia-current/525.147.05/build/make.log,我发现在实际路径中使用冒号并不太受欢迎,尽管 Linux 允许这样做。

我已将/home和符号链接/var到安装在 的驱动器分区/mnt/F:,实际路径分别为/mnt/F:/hone/mnt/F:/var。我删除了冒号,现在一切似乎都运行良好,功能齐全。

相关内容