![在 Hyper-V 上安装 Debian 12 后没有显示管理器](https://linux22.com/image/222394/%E5%9C%A8%20Hyper-V%20%E4%B8%8A%E5%AE%89%E8%A3%85%20Debian%2012%20%E5%90%8E%E6%B2%A1%E6%9C%89%E6%98%BE%E7%A4%BA%E7%AE%A1%E7%90%86%E5%99%A8.png)
我安装了(图形安装,选择xfce)Debian 12在 Windows 10 内的 Hyper-V Gen1 VM 上。重新启动 Debian 时,不会出现登录屏幕。 lightdm无法启动的问题是什么原因造成的?如果我使用不同的 DE 运行 Debian 12 live iso,也会出现同样的问题。转到文本终端alt+f1
并收集一些信息:
$ sudo cat /etc/X11/default-display-manager
/usr/sbin/lightdm
$ systemctl status lightdm.service
× lightdm.service - Light Display Manager
Loaded: loaded (/lib/systemd/system/lightdm.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Thu 2023-07-13 23:48:57 CEST; 22min ago
Duration: 34ms
Docs: man:lightdm(1)
Main PID: 612 (code=exited, status=1/FAILURE)
CPU: 36ms
Warning: some journal files were not opened due to insufficient permissions.
$ sudo lightdm --test-mode --debug
[+0.00s] DEBUG: Logging to /var/log/lightdm/lightdm.log
[+0.00s] DEBUG: Starting Light Display Manager 1.26.0, UID=0 PID=6878
[+0.00s] DEBUG: Loading configuration dirs from /usr/share/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/01_debian.conf
[+0.00s] DEBUG: Loading configuration dirs from /usr/local/share/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration dirs from /etc/xdg/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration from /etc/lightdm/lightdm.conf
[+0.00s] DEBUG: Registered seat module local
[+0.00s] DEBUG: Registered seat module xremote
[+0.00s] DEBUG: Registered seat module unity
[+0.00s] DEBUG: Using D-Bus name org.freedesktop.DisplayManager
[+0.00s] DEBUG: _g_io_module_get_default: Found default implementation local (GLocalVfs) for ?gio-vfs?
[+0.00s] DEBUG: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
[+0.01s] DEBUG: Monitoring logind for seats
[+0.01s] DEBUG: New seat added from logind: seat0
[+0.01s] DEBUG: Seat seat0: Loading properties from config section Seat:*
[+0.01s] DEBUG: Seat seat0 has property CanMultiSession=no
[+0.01s] DEBUG: Seat seat0: Starting
[+0.01s] DEBUG: Seat seat0: Creating greeter session
[+0.01s] DEBUG: Seat seat0: Creating display server of type x
[+0.01s] DEBUG: Using VT 7
[+0.01s] DEBUG: Seat seat0: Starting local X display on VT 7
[+0.01s] DEBUG: XServer 0: Logging to /var/log/lightdm/x-0.log
[+0.01s] DEBUG: XServer 0: Writing X server authority to /var/run/lightdm/root/:0
[+0.01s] DEBUG: XServer 0: Launching X Server
[+0.01s] DEBUG: Launching process 6884: /usr/bin/X :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
[+0.01s] DEBUG: XServer 0: Waiting for ready signal from X server :0
[+0.01s] WARNING: Could not enumerate user data directory /var/lib/lightdm/data: Error opening directory '/var/lib/lightdm/data': No such file or directory
[+0.01s] DEBUG: Acquired bus name org.freedesktop.DisplayManager
[+0.01s] DEBUG: Registering seat with bus path /org/freedesktop/DisplayManager/Seat0
[+0.05s] DEBUG: Seat seat0 changes active session to
[+0.07s] DEBUG: Process 6884 exited with return value 1
[+0.07s] DEBUG: XServer 0: X server stopped
[+0.07s] DEBUG: Releasing VT 7
[+0.07s] DEBUG: XServer 0: Removing X server authority /var/run/lightdm/root/:0
[+0.07s] DEBUG: Seat seat0: Display server stopped
[+0.07s] DEBUG: Seat seat0: Stopping session
[+0.07s] DEBUG: Seat seat0: Session stopped
[+0.07s] DEBUG: Seat seat0: Stopping display server, no sessions require it
[+0.07s] DEBUG: Seat seat0: Stopping; greeter display server failed to start
[+0.07s] DEBUG: Seat seat0: Stopping
[+0.07s] DEBUG: Seat seat0: Stopped
[+0.07s] DEBUG: Required seat has stopped
[+0.07s] DEBUG: Stopping display manager
[+0.07s] DEBUG: Display manager stopped
[+0.07s] DEBUG: Stopping daemon
[+0.07s] DEBUG: Exiting with return value 1
$ cat /var/log/Xorg.0.log
[ 6.524]
X.Org X Server 1.21.1.7
X Protocol Version 11, Revision 0
[ 6.524] Current Operating System: Linux aristarchos 6.1.0-10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.37-1 (2023-07-03) x86_64
[ 6.524] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-6.1.0-10-amd64 root=UUID=60c98bf2-7c27-4ea9-bada-f3ae1e1e642f ro quiet
[ 6.524] xorg-server 2:21.1.7-3 (https://www.debian.org/support)
[ 6.524] Current version of pixman: 0.42.2
[ 6.524] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 6.524] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 6.524] (==) Log file: "/var/log/Xorg.0.log", Time: Thu Jul 13 23:48:56 2023
[ 6.525] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 6.525] (==) No Layout section. Using the first Screen section.
[ 6.525] (==) No screen section available. Using defaults.
[ 6.525] (**) |-->Screen "Default Screen Section" (0)
[ 6.525] (**) | |-->Monitor "<default monitor>"
[ 6.525] (==) No monitor specified for screen "Default Screen Section".
Using a default monitor configuration.
[ 6.525] (==) Automatically adding devices
[ 6.525] (==) Automatically enabling devices
[ 6.525] (==) Automatically adding GPU devices
[ 6.525] (==) Automatically binding GPU devices
[ 6.525] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 6.525] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[ 6.525] Entry deleted from font path.
[ 6.525] (==) FontPath set to:
/usr/share/fonts/X11/misc,
/usr/share/fonts/X11/100dpi/:unscaled,
/usr/share/fonts/X11/75dpi/:unscaled,
/usr/share/fonts/X11/Type1,
/usr/share/fonts/X11/100dpi,
/usr/share/fonts/X11/75dpi,
built-ins
[ 6.525] (==) ModulePath set to "/usr/lib/xorg/modules"
[ 6.525] (II) The server relies on udev to provide the list of input devices.
If no devices become available, reconfigure udev or disable AutoAddDevices.
[ 6.525] (II) Loader magic: 0x55f4a49d2f00
[ 6.525] (II) Module ABI versions:
[ 6.525] X.Org ANSI C Emulation: 0.4
[ 6.525] X.Org Video Driver: 25.2
[ 6.525] X.Org XInput driver : 24.4
[ 6.525] X.Org Server Extension : 10.0
[ 6.526] (++) using VT number 7
[ 6.526] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[ 6.527] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 6.527] (II) Platform probe for /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00/device:07/VMBUS:01/5620e0c7-8062-4dce-aeb7-520c7ef76171/drm/card0
[ 6.531] (--) PCI:*(0@0:8:0) 1414:5353:0000:0000 rev 0, Mem @ 0xf8000000/67108864, BIOS @ 0x????????/131072
[ 6.531] (II) LoadModule: "glx"
[ 6.532] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 6.533] (II) Module glx: vendor="X.Org Foundation"
[ 6.533] compiled for 1.21.1.7, module version = 1.0.0
[ 6.533] ABI class: X.Org Server Extension, version 10.0
[ 6.533] (==) Matched modesetting as autoconfigured driver 0
[ 6.533] (==) Matched fbdev as autoconfigured driver 1
[ 6.533] (==) Matched vesa as autoconfigured driver 2
[ 6.533] (==) Assigned the driver to the xf86ConfigLayout
[ 6.533] (II) LoadModule: "modesetting"
[ 6.533] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[ 6.533] (II) Module modesetting: vendor="X.Org Foundation"
[ 6.533] compiled for 1.21.1.7, module version = 1.21.1
[ 6.533] Module class: X.Org Video Driver
[ 6.533] ABI class: X.Org Video Driver, version 25.2
[ 6.533] (II) LoadModule: "fbdev"
[ 6.533] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[ 6.533] (II) Module fbdev: vendor="X.Org Foundation"
[ 6.533] compiled for 1.21.1.3, module version = 0.5.0
[ 6.533] Module class: X.Org Video Driver
[ 6.533] ABI class: X.Org Video Driver, version 25.2
[ 6.533] (II) LoadModule: "vesa"
[ 6.533] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so
[ 6.533] (II) Module vesa: vendor="X.Org Foundation"
[ 6.533] compiled for 1.21.1.3, module version = 2.5.0
[ 6.533] Module class: X.Org Video Driver
[ 6.533] ABI class: X.Org Video Driver, version 25.2
[ 6.533] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 6.534] (II) FBDEV: driver for framebuffer: fbdev
[ 6.534] (II) VESA: driver for VESA chipsets: vesa
[ 6.534] (WW) Falling back to old probe method for modesetting
[ 6.535] (II) modeset(1): using default device
[ 6.535] (II) Loading sub module "fbdevhw"
[ 6.535] (II) LoadModule: "fbdevhw"
[ 6.535] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[ 6.535] (II) Module fbdevhw: vendor="X.Org Foundation"
[ 6.535] compiled for 1.21.1.7, module version = 0.0.2
[ 6.535] ABI class: X.Org Video Driver, version 25.2
[ 6.535] (EE) Unable to find a valid framebuffer device
[ 6.535] (WW) Falling back to old probe method for fbdev
[ 6.535] (II) Loading sub module "fbdevhw"
[ 6.535] (II) LoadModule: "fbdevhw"
[ 6.535] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[ 6.535] (II) Module fbdevhw: vendor="X.Org Foundation"
[ 6.535] compiled for 1.21.1.7, module version = 0.0.2
[ 6.535] ABI class: X.Org Video Driver, version 25.2
[ 6.535] (II) FBDEV(3): using default device
[ 6.535] vesa: Ignoring device with a bound kernel driver
[ 6.536] (II) modeset(G0): using drv /dev/dri/card0
[ 6.536] (EE) Screen 0 deleted because of no matching config section.
[ 6.536] (II) UnloadModule: "modesetting"
[ 6.536] (EE) Screen 1 deleted because of no matching config section.
[ 6.536] (II) UnloadModule: "fbdev"
[ 6.536] (II) UnloadSubModule: "fbdevhw"
[ 6.536] (EE) Screen 2 deleted because of no matching config section.
[ 6.536] (II) UnloadModule: "vesa"
[ 6.536] (EE)
Fatal server error:
[ 6.536] (EE) Cannot run in framebuffer mode. Please specify busIDs for all framebuffer devices
[ 6.536] (EE)
[ 6.536] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[ 6.536] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 6.536] (EE)
[ 6.544] (EE) Server terminated with error (1). Closing log file.
我还发现这帖子,描述了相同的问题(但在 Hyper-V Gen2 上而不是 Gen1 上)并建议安装xf86-video-fbdev
.我重新安装了 Debian 的等效软件包lightdm
:
sudo apt-get install --reinstall xserver-xorg-video-fbdev
sudo apt-get install --reinstall lightdm
如果我没记错的话,它被称为欢迎程序,即提示用户输入凭据的 GUI。所以我检查了 lightdm 配置:
$ sudo lightdm --show-config
[sudo] password for user:
[Seat:*]
A greeter-session=lightdm-greeter
A greeter-hide-users=true
A session-wrapper=/etc/X11/Xsession
[LightDM]
B logind-check-graphical=false
Sources:
A /usr/share/lightdm/lightdm.conf.d/01_debian.conf
B /etc/lightdm/lightdm.conf
是lightdm-greeter
一个正确的问候语吗?我之所以这么问,是因为如果我搜索迎宾员,我会找到lightdm-gtk-greeter
、lightdm-deepin-greeter
、lightdm-pantheon-greeter
、lightdm-webkit2-greeter
等,但没有lightdm-greeter
。