![虚拟 X 服务器可以强制使用集成显卡吗?](https://linux22.com/image/951485/%E8%99%9A%E6%8B%9F%20X%20%E6%9C%8D%E5%8A%A1%E5%99%A8%E5%8F%AF%E4%BB%A5%E5%BC%BA%E5%88%B6%E4%BD%BF%E7%94%A8%E9%9B%86%E6%88%90%E6%98%BE%E5%8D%A1%E5%90%97%EF%BC%9F.png)
我有一个运行 Ubuntu 22.04 的无头桌面,需要通过 Team Viewer 访问。为此,请按照说明操作这里,已安装xserver-xorg-video-dummy
并创建以下 xorg 配置/etc/X11/xorg.conf
:
# This xorg configuration file is meant to be used
# to start a dummy X11 server.
# For details, please see:
# https://www.xpra.org/xorg.conf
Section "Device"
Identifier "Configured Video Device"
Driver "dummy"
#VideoRam 4096000
#VideoRam 256000
VideoRam 16384
EndSection
Section "Monitor"
Identifier "Configured Monitor"
HorizSync 5.0 - 1000.0
VertRefresh 5.0 - 200.0
Modeline "1920x1080" 23.53 1920 1952 2040 2072 1080 1106 1108 1135
EndSection
Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
Virtual 1920 1080
EndSubSection
EndSection
这确实很好用。但是视觉应用程序相当慢,检查后发现 GNOME 系统信息下的图形设备是llvmpipe (LLVM 15.0.6, 256 bits)
。据我所知,这是一个非常基本的渲染驱动程序,而不是应该在集成图形处理器上运行的驱动程序。
$ sudo lshw -c video
*-display UNCLAIMED
description: VGA compatible controller
product: CoffeeLake-S GT2 [UHD Graphics 630]
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 00
width: 64 bits
clock: 33MHz
capabilities: pciexpress msi pm vga_controller bus_master cap_list
configuration: latency=0
resources: memory:a0000000-a0ffffff memory:90000000-9fffffff ioport:4000(size=64) memory:c0000-dffff
*-graphics
product: EFI VGA
physical id: 2
logical name: /dev/fb0
capabilities: fb
configuration: depth=32 resolution=800,600
lspci -k
00:00.0 Host bridge: Intel Corporation 8th Gen Core 4-core Desktop Processor Host Bridge/DRAM Registers [Coffee Lake S] (rev 08)
DeviceName: Onboard - Other
Subsystem: Intel Corporation 8th Gen Core 4-core Desktop Processor Host Bridge/DRAM Registers [Coffee Lake S]
Kernel driver in use: skl_uncore
Kernel modules: ie31200_edac
00:02.0 VGA compatible controller: Intel Corporation CoffeeLake-S GT2 [UHD Graphics 630]
DeviceName: Onboard - Video
Subsystem: Intel Corporation CoffeeLake-S GT2 [UHD Graphics 630]
Kernel modules: i915
$ glxinfo -B
name of display: :1
display: :1 screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: Mesa/X.org (0xffffffff)
Device: llvmpipe (LLVM 15.0.6, 256 bits) (0xffffffff)
Version: 22.2.5
Accelerated: no
Video memory: 7849MB
Unified memory: no
Preferred profile: core (0x1)
Max core profile version: 4.5
Max compat profile version: 4.5
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.2
OpenGL vendor string: Mesa/X.org
OpenGL renderer string: llvmpipe (LLVM 15.0.6, 256 bits)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 22.2.5
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL version string: 4.5 (Compatibility Profile) Mesa 22.2.5
OpenGL shading language version string: 4.50
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 22.2.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
该机器没有专用显卡,但我可以让它使用集成显卡吗?或者它已经在使用集成显卡了?更改“设备”标识符和驱动程序xorg.conf
只会导致 x 服务器损坏,我必须转到 TTY 会话并重置文件或将其删除。