virtualbox VM 中的 debian 控制台 startx 失败:(EE) 打开 /dev/dri/card0:没有这样的文件或目录

virtualbox VM 中的 debian 控制台 startx 失败:(EE) 打开 /dev/dri/card0:没有这样的文件或目录

我正在 VirtualBox VM(Windows 10 主机,VBox 5.2.20)中运行 debian 测试,并启动到控制台。我曾经能够在登录后很好地运行 startx,但在过去它不起作用,我想修复它。

我已经进入高级启动一段时间了,选择故障安全,在提示输入维护模式密码时按 CTRL-D,然后正常登录并运行 startx,这有效。

正常启动和故障安全启动之间的日志中的一个显着差异是,/dev/dri/card0在正常启动后调用 startx 时会出现有关不存在的错误,但/dev/dri/card0会在故障安全启动的 startx 中找到并使用该错误。

/var/log/Xorg.0.log这是我登录控制台后尝试运行 startx 时的完整内容。

[  1389.124] 
X.Org X Server 1.20.1
X Protocol Version 11, Revision 0
[  1389.125] Build Operating System: Linux 4.9.0-8-amd64 x86_64 Debian
[  1389.125] Current Operating System: Linux vm-stretch-amd64 4.18.0-2-amd64 #1 SMP Debian 4.18.10-2 (2018-10-07) x86_64
[  1389.125] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.18.0-2-amd64 root=UUID=3e8c1e3c-233e-4ece-975f-29e2e0d54691 ro nomodeset
[  1389.125] Build Date: 26 September 2018  10:20:47AM
[  1389.125] xorg-server 2:1.20.1-4 (https://www.debian.org/support) 
[  1389.125] Current version of pixman: 0.34.0
[  1389.125]    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[  1389.125] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  1389.126] (==) Log file: "/var/log/Xorg.0.log", Time: Sat Oct 27 21:04:35 2018
[  1389.126] (==) Using config directory: "/etc/X11/xorg.conf.d"
[  1389.126] (==) Using system config directory 
"/usr/share/X11/xorg.conf.d"
[  1389.126] (==) No Layout section.  Using the first Screen section.
[  1389.126] (==) No screen section available. Using defaults.
[  1389.126] (**) |-->Screen "Default Screen Section" (0)
[  1389.126] (**) |   |-->Monitor "<default monitor>"
[  1389.127] (==) No monitor specified for screen "Default Screen Section".
    Using a default monitor configuration.
[  1389.127] (==) Automatically adding devices
[  1389.127] (==) Automatically enabling devices
[  1389.127] (==) Automatically adding GPU devices
[  1389.127] (==) Max clients allowed: 256, resource mask: 0x1fffff
[  1389.127] (==) FontPath set to:
    /usr/share/fonts/X11/misc,
    /usr/share/fonts/X11/cyrillic,
    /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
[  1389.127] (==) ModulePath set to "/usr/lib/xorg/modules"
[  1389.127] (II) The server relies on udev to provide the list of input devices.
    If no devices become available, reconfigure udev or disable AutoAddDevices.
[  1389.127] (II) Loader magic: 0x558f7b1d5e20
[  1389.127] (II) Module ABI versions:
[  1389.127]    X.Org ANSI C Emulation: 0.4
[  1389.127]    X.Org Video Driver: 24.0
[  1389.127]    X.Org XInput driver : 24.1
[  1389.127]    X.Org Server Extension : 10.0
[  1389.127] (++) using VT number 1

[  1389.129] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_37
[  1389.131] (--) PCI:*(0@0:2:0) 80ee:beef:0000:0000 rev 0, Mem @ 0xe0000000/134217728, BIOS @ 0x????????/131072
[  1389.131] (II) LoadModule: "glx"
[  1389.131] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[  1389.132] (II) Module glx: vendor="X.Org Foundation"
[  1389.132]    compiled for 1.20.1, module version = 1.0.0
[  1389.132]    ABI class: X.Org Server Extension, version 10.0
[  1389.132] (==) Matched vboxvideo as autoconfigured driver 0
[  1389.132] (==) Matched modesetting as autoconfigured driver 1
[  1389.132] (==) Matched fbdev as autoconfigured driver 2
[  1389.132] (==) Matched vesa as autoconfigured driver 3
[  1389.132] (==) Assigned the driver to the xf86ConfigLayout
[  1389.132] (II) LoadModule: "vboxvideo"
[  1389.132] (WW) Warning, couldn't open module vboxvideo
[  1389.132] (EE) Failed to load module "vboxvideo" (module does not exist, 0)
[  1389.132] (II) LoadModule: "modesetting"
[  1389.133] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[  1389.133] (II) Module modesetting: vendor="X.Org Foundation"
[  1389.133]    compiled for 1.20.1, module version = 1.20.1
[  1389.133]    Module class: X.Org Video Driver
[  1389.133]    ABI class: X.Org Video Driver, version 24.0
[  1389.133] (II) LoadModule: "fbdev"
[  1389.133] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[  1389.133] (II) Module fbdev: vendor="X.Org Foundation"
[  1389.133]    compiled for 1.20.0, module version = 0.5.0
[  1389.133]    Module class: X.Org Video Driver
[  1389.133]    ABI class: X.Org Video Driver, version 24.0
[  1389.133] (II) LoadModule: "vesa"
[  1389.133] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so
[  1389.133] (II) Module vesa: vendor="X.Org Foundation"
[  1389.133]    compiled for 1.20.1, module version = 2.4.0
[  1389.133]    Module class: X.Org Video Driver
[  1389.133]    ABI class: X.Org Video Driver, version 24.0
[  1389.133] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[  1389.133] (II) FBDEV: driver for framebuffer: fbdev
[  1389.133] (II) VESA: driver for VESA chipsets: vesa
[  1389.133] (EE) open /dev/dri/card0: No such file or directory
[  1389.133] (WW) Falling back to old probe method for modesetting
[  1389.133] (EE) open /dev/dri/card0: No such file or directory
[  1389.133] (II) Loading sub module "fbdevhw"
[  1389.133] (II) LoadModule: "fbdevhw"
[  1389.133] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[  1389.133] (II) Module fbdevhw: vendor="X.Org Foundation"
[  1389.133]    compiled for 1.20.1, module version = 0.0.2
[  1389.133]    ABI class: X.Org Video Driver, version 24.0
[  1389.133] (EE) Unable to find a valid framebuffer device
[  1389.133] (WW) Falling back to old probe method for fbdev
[  1389.133] (II) Loading sub module "fbdevhw"
[  1389.133] (II) LoadModule: "fbdevhw"
[  1389.133] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[  1389.133] (II) Module fbdevhw: vendor="X.Org Foundation"
[  1389.133]    compiled for 1.20.1, module version = 0.0.2
[  1389.133]    ABI class: X.Org Video Driver, version 24.0
[  1389.133] (II) FBDEV(2): using default device
[  1389.133] (EE) Screen 0 deleted because of no matching config section.
[  1389.133] (II) UnloadModule: "modesetting"
[  1389.133] (EE) Screen 0 deleted because of no matching config section.
[  1389.133] (II) UnloadModule: "fbdev"
[  1389.133] (II) UnloadSubModule: "fbdevhw"
[  1389.133] (EE) 
Fatal server error:
[  1389.133] (EE) Cannot run in framebuffer mode. Please specify busIDs        for all framebuffer devices
[  1389.133] (EE) 
[  1389.133] (EE) 
Please consult the The X.Org Foundation support 
     at http://wiki.x.org
 for help. 
[  1389.133] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[  1389.133] (EE) 
[  1389.141] (EE) Server terminated with error (1). Closing log file.

出于比较目的,这里是 内容的第一部分~/.local/share/xorg/Xorg.0.log,其中似乎包含从故障安全模式成功启动 x 的日志。我截断了它,因为 StackExchange 对帖子有最大字符数限制。

[   363.740] 
X.Org X Server 1.20.1
X Protocol Version 11, Revision 0
[   363.744] Build Operating System: Linux 4.9.0-8-amd64 x86_64 Debian
[   363.747] Current Operating System: Linux vm-stretch-amd64 4.18.0-2-amd64 #1 SMP Debian 4.18.10-2 (2018-10-07) x86_64
[   363.747] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.18.0-2-amd64 root=UUID=3e8c1e3c-233e-4ece-975f-29e2e0d54691 ro single
[   363.751] Build Date: 26 September 2018  10:20:47AM
[   363.752] xorg-server 2:1.20.1-4 (https://www.debian.org/support) 
[   363.753] Current version of pixman: 0.34.0
[   363.756]    Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[   363.756] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   363.762] (==) Log file: "/home/dave/.local/share/xorg/Xorg.0.log", 
Time: Sat Oct 27 21:14:52 2018
[   363.764] (==) Using config directory: "/etc/X11/xorg.conf.d"
[   363.765] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[   363.765] (==) No Layout section.  Using the first Screen section.
[   363.765] (==) No screen section available. Using defaults.
[   363.765] (**) |-->Screen "Default Screen Section" (0)
[   363.765] (**) |   |-->Monitor "<default monitor>"
[   363.766] (==) No monitor specified for screen "Default Screen Section".
        Using a default monitor configuration.
[   363.766] (==) Automatically adding devices
[   363.766] (==) Automatically enabling devices
[   363.766] (==) Automatically adding GPU devices
[   363.766] (==) Max clients allowed: 256, resource mask: 0x1fffff
[   363.766] (==) FontPath set to:
        /usr/share/fonts/X11/misc,
        /usr/share/fonts/X11/cyrillic,
        /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
[   363.766] (==) ModulePath set to "/usr/lib/xorg/modules"
[   363.766] (II) The server relies on udev to provide the list of input devices.
        If no devices become available, reconfigure udev or disable AutoAddDevices.
[   363.766] (II) Loader magic: 0x555c7febbe20
[   363.766] (II) Module ABI versions:
[   363.766]    X.Org ANSI C Emulation: 0.4
[   363.766]    X.Org Video Driver: 24.0
[   363.766]    X.Org XInput driver : 24.1
[   363.766]    X.Org Server Extension : 10.0
[   363.767] (++) using VT number 1

[   363.769] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_31
[   363.769] (II) xfree86: Adding drm device (/dev/dri/card0)
[   363.770] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 11 paused 0
[   363.771] (--) PCI:*(0@0:2:0) 80ee:beef:0000:0000 rev 0, Mem @ 0xe0000000/134217728, BIOS @ 0x????????/131072
[   363.771] (II) LoadModule: "glx"
[   363.771] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[   363.773] (II) Module glx: vendor="X.Org Foundation"
[   363.773]    compiled for 1.20.1, module version = 1.0.0
[   363.773]    ABI class: X.Org Server Extension, version 10.0
[   363.773] (==) Matched vboxvideo as autoconfigured driver 0
[   363.773] (==) Matched modesetting as autoconfigured driver 1
[   363.773] (==) Matched fbdev as autoconfigured driver 2
[   363.773] (==) Matched vesa as autoconfigured driver 3
[   363.773] (==) Assigned the driver to the xf86ConfigLayout
[   363.773] (II) LoadModule: "vboxvideo"
[   363.773] (WW) Warning, couldn't open module vboxvideo
[   363.773] (EE) Failed to load module "vboxvideo" (module does not exist, 0)
[   363.773] (II) LoadModule: "modesetting"
[   363.773] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[   363.773] (II) Module modesetting: vendor="X.Org Foundation"
[   363.773]    compiled for 1.20.1, module version = 1.20.1
[   363.773]    Module class: X.Org Video Driver
[   363.773]    ABI class: X.Org Video Driver, version 24.0
[   363.773] (II) LoadModule: "fbdev"
[   363.773] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[   363.773] (II) Module fbdev: vendor="X.Org Foundation"
[   363.773]    compiled for 1.20.0, module version = 0.5.0
[   363.773]    Module class: X.Org Video Driver
[   363.773]    ABI class: X.Org Video Driver, version 24.0
[   363.773] (II) LoadModule: "vesa"
[   363.773] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so
[   363.773] (II) Module vesa: vendor="X.Org Foundation"
[   363.773]    compiled for 1.20.1, module version = 2.4.0
[   363.773]    Module class: X.Org Video Driver
[   363.773]    ABI class: X.Org Video Driver, version 24.0
[   363.773] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[   363.773] (II) FBDEV: driver for framebuffer: fbdev
[   363.773] (II) VESA: driver for VESA chipsets: vesa
[   363.773] xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted)
[   363.773] (II) modeset(0): using drv /dev/dri/card0
[   363.773] (WW) Falling back to old probe method for fbdev
[   363.773] (II) Loading sub module "fbdevhw"
[   363.773] (II) LoadModule: "fbdevhw"
[   363.773] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[   363.774] (II) Module fbdevhw: vendor="X.Org Foundation"
[   363.774]    compiled for 1.20.1, module version = 0.0.2
[   363.774]    ABI class: X.Org Video Driver, version 24.0
[   363.774] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[   363.774] (II) modeset(0): Creating default Display subsection in Screen section
        "Default Screen Section" for depth/fbbpp 24/32
[   363.774] (==) modeset(0): Depth 24, (==) framebuffer bpp 32
[   363.774] (==) modeset(0): RGB weight 888
[   363.774] (==) modeset(0): Default visual is TrueColor
[   363.774] (II) Loading sub module "glamoregl"
[   363.774] (II) LoadModule: "glamoregl"
[   363.774] (II) Loading /usr/lib/xorg/modules/libglamoregl.so
[   363.777] (II) Module glamoregl: vendor="X.Org Foundation"
[   363.778]    compiled for 1.20.1, module version = 1.0.1
[   363.778]    ABI class: X.Org ANSI C Emulation, version 0.4
[   363.834] (EE) modeset(0): eglGetDisplay() failed
[   363.835] (EE) modeset(0): glamor initialization failed
[   363.835] (II) modeset(0): ShadowFB: preferred NO, enabled NO
[   363.835] (II) modeset(0): Output VGA-1 has no monitor section
[   363.835] (II) modeset(0): EDID for output VGA-1
[   363.835] (II) modeset(0): Manufacturer: VBX  Model: 0  Serial#: 70780800
[   363.835] (II) modeset(0): Year: 1990  Week: 1
[   363.835] (II) modeset(0): EDID Version: 1.3
[   363.835] (II) modeset(0): Digital Display Input
[   363.835] (II) modeset(0): Indeterminate output size
[   363.835] (II) modeset(0): Gamma: 2.20
[   363.835] (II) modeset(0): DPMS capabilities: StandBy Suspend Off
[   363.835] (II) modeset(0): Supported color encodings: RGB 4:4:4 YCrCb 4:4:4 
[   363.835] (II) modeset(0): Default color space is primary color space
[   363.835] (II) modeset(0): First detailed timing is preferred mode
[   363.835] (II) modeset(0): redX: 0.640 redY: 0.330   greenX: 0.300 greenY: 0.600
[   363.835] (II) modeset(0): blueX: 0.150 blueY: 0.060   whiteX: 0.312 whiteY: 0.329
[   363.835] (II) modeset(0): Manufacturer's mask: 0
[   363.835] (II) modeset(0): Supported detailed timing:
[   363.835] (II) modeset(0): clock: 125.5 MHz   Image Size:  0 x 0 mm
[   363.835] (II) modeset(0): h_active: 1920  h_sync: 1922  h_sync_end 1924 h_blank_end 1926 h_border: 0
[   363.835] (II) modeset(0): v_active: 1080  v_sync: 1080  v_sync_end 1114 v_blanking: 1086 v_border: 0
[   363.835] (II) modeset(0): Ranges: V min: 0 V max: 200 Hz, H min: 0 H max: 200 kHz, PixClock max 1005 MHz
[   363.835] (II) modeset(0): Monitor name: VBOX monitor
[   363.835] (II) modeset(0): EDID (in hex):
[   363.835] (II) modeset(0):   00ffffffffffff005858000080073804
[   363.835] (II) modeset(0):   0100010380000078eeee91a3544c9926
[   363.835] (II) modeset(0):   0f505400000001010101010101010101
[   363.835] (II) modeset(0):   01010101010105318006703806400202
[   363.835] (II) modeset(0):   0202000000000000000000fd0000c800
[   363.835] (II) modeset(0):   c864000a202020202020000000fc0056
[   363.835] (II) modeset(0):   424f58206d6f6e69746f720a00000010
[   363.835] (II) modeset(0):   000a20202020202020202020202000f0
[   363.835] (II) modeset(0): Printing probed modes for output VGA-1
[   363.835] (II) modeset(0): Modeline "1920x1080"x60.0  173.11  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync (67.2 kHz P)
[   363.835] (II) modeset(0): Modeline "2560x1600"x60.0  348.50  2560 2752 3032 3504  1600 1603 1609 1658 -hsync +vsync (99.5 kHz e)
[   363.835] (II) modeset(0): Modeline "2560x1600"x60.0  268.50  2560 2608 2640 2720  1600 1603 1609 1646 +hsync -vsync (98.7 kHz e)
[   363.835] (II) modeset(0): Modeline "1920x1440"x60.0  234.00  1920 2048 2256 2600  1440 1441 1444 1500 -hsync +vsync (90.0 kHz e)
[   363.835] (II) modeset(0): Modeline "1856x1392"x60.0  218.25  1856 1952 2176 2528  1392 1393 1396 1439 -hsync +vsync (86.3 kHz e)
[   363.835] (II) modeset(0): Modeline "1792x1344"x60.0  204.75  1792 1920 2120 2448  1344 1345 1348 1394 -hsync +vsync (83.6 kHz e)
[   363.835] (II) modeset(0): Modeline "2048x1152"x60.0  162.00  2048 2074 2154 2250  1152 1153 1156 1200 +hsync +vsync (72.0 kHz e)
[   363.835] (II) modeset(0): Modeline "1920x1200"x59.9  193.25  1920 2056 2256 2592  1200 1203 1209 1245 -hsync +vsync (74.6 kHz e)
[   363.835] (II) modeset(0): Modeline "1920x1200"x60.0  154.00  1920 1968 2000 2080  1200 1203 1209 1235 +hsync -vsync (74.0 kHz e)
[   363.835] (II) modeset(0): Modeline "1920x1080"x60.0  148.50  1920 2008 2052 2200  1080 1084 1089 1125 -hsync -vsync (67.5 kHz e)
[   363.835] (II) modeset(0): Modeline "1600x1200"x60.0  162.00  1600 1664 1856 2160  1200 1201 1204 1250 +hsync +vsync (75.0 kHz e)
[   363.835] (II) modeset(0): Modeline "1680x1050"x60.0  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync (65.3 kHz e)
[   363.835] (II) modeset(0): Modeline "1680x1050"x59.9  119.00  1680 1728 1760 1840  1050 1053 1059 1080 +hsync -vsync (64.7 kHz e)
[   363.835] (II) modeset(0): Modeline "1400x1050"x60.0  121.75  1400 1488 1632 1864  1050 1053 1057 1089 -hsync +vsync (65.3 kHz e)
[   363.835] (II) modeset(0): Modeline "1400x1050"x59.9  101.00  1400 1448 1480 1560  1050 1053 1057 1080 +hsync -vsync (64.7 kHz e)
[   363.835] (II) modeset(0): Modeline "1600x900"x60.0  108.00  1600 1624 1704 1800  900 901 904 1000 +hsync +vsync (60.0 kHz e)
[   363.835] (II) modeset(0): Modeline "1280x1024"x60.0  108.00  1280 1328 1440 1688  1024 1025 1028 1066 +hsync +vsync (64.0 kHz e)
[   363.835] (II) modeset(0): Modeline "1440x900"x59.9  106.50  1440 1520 1672 1904  900 903 909 934 -hsync +vsync (55.9 kHz e)
[   363.835] (II) modeset(0): Modeline "1440x900"x59.9   88.75  1440 1488 1520 1600  900 903 909 926 +hsync -vsync (55.5 kHz e)
[   363.835] (II) modeset(0): Modeline "1280x960"x60.0  108.00  1280 1376 1488 1800  960 961 964 1000 +hsync +vsync (60.0 kHz e)
[   363.835] (II) modeset(0): Modeline "1366x768"x59.8   85.50  1366 1436 1579 1792  768 771 774 798 +hsync +vsync (47.7 kHz e)
(a bunch more shows up, but the site limits posts to 30K characters)

答案1

除非你正在做 VGA 直通(我怀疑这种情况,因为很少有人这样做),否则nomodeset不应该出现在你的内核配置/虚拟环境中。

此外,在图形模式下使用 vbox 下的帧缓冲区,您必须支付额外的性能费用。

我建议还安装和使用 VBox 来宾添加项。除了更好地支持视频模式之外,您还将获得更好的性能。

VBox 用户手册 - 第 4 章. 访客添加

更好的视频支持 虽然 VirtualBox 为任何来宾操作系统模拟的虚拟显卡提供了所有基本功能,但随 Guest Additions 安装的自定义视频驱动程序为您提供超高和非标准视频模式以及加速视频性能。

此外,对于 Windows、Linux 和 Solaris 客户机,如果安装了客户机附加组件,您可以调整虚拟机窗口的大小。访客中的视频分辨率将自动调整(就像您在访客的显示设置中手动输入任意分辨率一样)。另请参阅第 1.9.5 节“调整机器窗口的大小”。

最后,如果安装了 Guest Additions,则可以加速访客应用程序的 3D 图形和 2D 视频;请参见第 4.5 节“硬件加速图形”。

无缝窗口 通过此功能,虚拟机桌面上显示的各个窗口可以映射到主机桌面上,就好像底层应用程序实际在主机上运行一样。有关详细信息,请参见第 4.6 节“无缝窗口”。

相关内容