为什么`xvfb-run glxgears`失败并出现错误?


12

xvfb应该让我在无头的环境中运行X程序。但是当我跑步时xvfb-run glxgears,我得到:

libGL error: failed to load driver: swrast
libGL error: Try again with LIBGL_DEBUG=verbose for more details.
Error: couldn't get an RGB, Double-buffered visual

当我跑步时LIBGL_DEBUG=verbose xvfb-run glxgears,我得到:

libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
libGL error: failed to load driver: swrast
Error: couldn't get an RGB, Double-buffered visual

我正在运行带有英特尔Ivy Bridge集成图形的股票Lubuntu 13.10 x64。libgl1-mesa-dri已安装,并且/usr/lib/x86_64-linux-gnu/dri/swrast_dri.so存在。以root身份运行无济于事。

怎么了

Answers:


11

就像有人发现了这个旧问题一样,有一个错误报告中提到的解决方案,该报告与另一个unix.stackexchange 问题相关联。只需将默认服务器参数(-s/ --server-args)从-screen 0 640x480x8更改为-screen 0 640x480x24,即具有24色深的任何内容。


2
需要明确的是xvfb-run --server-args "-screen 0 1920x1080x24"(引用服务器参数)。
Halfgaar
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.