QT EGLFS后端,带有不带X11/Xorg的Mesa驱动程序
我试图在没有安装XServer的情况下运行Qt5.12中的一个示例应用程序。我正在使用Ubuntu Linux。当我使用QT EGLFS后端,带有不带X11/Xorg的Mesa驱动程序,qt,opengl,intel,eglfs,Qt,Opengl,Intel,Eglfs,我试图在没有安装XServer的情况下运行Qt5.12中的一个示例应用程序。我正在使用Ubuntu Linux。当我使用linuxfb后端启动它时,它工作正常,但是mapboxgl插件不工作(可能是因为缺少原生opengl) 但是当我开始使用EGLFS后端时 ./qml_location_mapviewer -platform eglfs 它因“无法初始化egl显示”而失败 我试过weston/wayland合成器和-platform wayland一切都很好。为什么QT EGLFS看不到我的
linuxfb
后端启动它时,它工作正常,但是mapboxgl插件不工作(可能是因为缺少原生opengl)
但是当我开始使用EGLFS后端时
./qml_location_mapviewer -platform eglfs
它因“无法初始化egl显示”而失败
我试过weston/wayland合成器和
-platform wayland
一切都很好。为什么QT EGLFS看不到我的Intel Haswell Open GL设备,但其他人都可以看到?正如@derhass建议的那样,需要先安装所有必要的OpenGL库,然后重新编译QT
# essentials
sudo apt-get install build-essential libssl-dev python
# bluez stack (optional)
sudo apt-get install libbluetooth-dev bluetooth blueman bluez libusb-dev libdbus-1-dev bluez-hcidump bluez-tools
# OpenGL EGL support
sudo apt-get install mesa-utils libegl1-mesa libegl1-mesa-dev libgbm-dev libgbm1 libgl1-mesa-dev libgl1-mesa-dri libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev
# assuming QT is downloaded and extracted before
cd ~/qt-everywhere-src-5.12.6
./configure -confirm-license -opensource -nomake tests -nomake examples -openssl-linked
确保获得类似以下内容的EGLFS部分:
QPA backends:
DirectFB ............................... no
EGLFS .................................. yes
EGLFS details:
EGLFS OpenWFD ........................ no
EGLFS i.Mx6 .......................... no
EGLFS i.Mx6 Wayland .................. no
EGLFS RCAR ........................... no
EGLFS EGLDevice ...................... yes
EGLFS GBM ............................ yes
EGLFS VSP2 ........................... no
EGLFS Mali ........................... no
EGLFS Raspberry Pi ................... no
EGLFS X11 ............................ yes
LinuxFB ................................ yes
VNC .................................... yes
Mir client ............................. no
然后编译并安装整个程序
make
sudo make install
编译项目并运行它
cd mapviewer
/usr/local/Qt-5.12.6/qmake
make
./qml_location_mapviewer -platform eglfs
请看这里: 特别是,在运行应用程序之前,请尝试设置以下环境变量:
export QT_QPA_EGLFS_INTEGRATION=eglfs_kms
如果不起作用,请执行strace
并检查失败的open
调用,以检查是否缺少任何库:
strace ./qml_location_mapviewer -platform eglfs 2>&1 | tee log.txt
特别重要的是/usr/lib
中的以下库/插件:
- libQt5EglFSDeviceIntegration.so.5
- libQt5EglFsKmsSupport.so.5
- qt5/plugins/platforms/libqeglfs.so
- qt5/plugins/egldeviceintegrations/libqeglfs-kms-integration.so