我有一台配备 AMD GPU 的无头 CentOS 8 服务器。我想使用硬件加速,但当我使用 xvfb-run(例如 glxinfo)运行 OpenGL 程序时,系统报告我正在使用软件渲染。如何在无头服务器上使用硬件加速?
请注意,即使输出显示供应商为 WMvare,但该机器也不是虚拟机。
sudo lshw -c display
输出:
*-display
description: VGA compatible controller
product: Cedar [Radeon HD 5000/6000/7350/8350 Series]
vendor: Advanced Micro Devices, Inc. [AMD/ATI]
physical id: 0
bus info: pci@0000:01:00.0
version: 00
width: 64 bits
clock: 33MHz
capabilities: pm pciexpress msi vga_controller bus_master cap_list rom
configuration: driver=radeon latency=0
resources: irq:33 memory:e0000000-efffffff memory:f7e20000-f7e3ffff ioport:e000(size=256)
memory:c0000-dffff
xvfb-run glxinfo
输出:
Extended renderer info (GLX_MESA_query_renderer):
Vendor: VMware, Inc. (0xffffffff)
Device: llvmpipe (LLVM 9.0.0, 128 bits) (0xffffffff)
Version: 19.3.4
Accelerated: no
Video memory: 7746MB
Unified memory: no
Preferred profile: core (0x1)
Max core profile version: 3.3
Max compat profile version: 3.1
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.1
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: llvmpipe (LLVM 9.0.0, 128 bits)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 19.3.4
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile