You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

树莓派上snapcraft打包的Electron Snap应用GPU加速失效求助

Electron Snap包在树莓派上无法启用GPU加速的问题求助

我已耗费数小时排查,发现用electron-builder构建并打包为snap的Electron应用在树莓派上无法启用GPU加速,导致运行卡顿。从截图可见所有加速功能已禁用,日志中出现以下驱动加载错误:

  • libGL Error: 无法加载驱动:vc4
  • MESA-LOADER: 无法打开vc4
  • vkCreateInstance: 未找到任何驱动!

我已使用electron-builder文档中提及的标准plugs,还尝试添加libglu1-mesa包,但无法在electron-builder配置中指定“desktop-glib-only”项。树莓派自带的Chromium可正常启用GPU硬件加速,因此问题疑似与snapcraft相关,我在snapcraft论坛提问未获回复,恳请协助。

环境信息

  • 树莓派4B / 最新版Raspberry Pi OS
  • 涉及的snap应用:vuepilot

启动日志详情

libGL error: MESA-LOADER: failed to open vc4 (search paths /snap/vuepilot/101/gnome-platform/usr/lib/aarch64-linux-gnu/dri) libGL error: failed to load driver: vc4 libGL error: MESA-LOADER: failed to open vc4 (search paths /snap/vuepilot/101/gnome-platform/usr/lib/aarch64-linux-gnu/dri) libGL error: failed to load driver: vc4 libGL error: MESA-LOADER: failed to open swrast (search paths /snap/vuepilot/101/gnome-platform/usr/lib/aarch64-linux-gnu/dri) libGL error: failed to load driver: swrast 11:13:27.923 ⺠SNAP env is defined, updater is disabled 11:13:27.935 ⺠checkForUpdatesAndNotify called, downloadPromise is null
[2967773:0212/111327.935597:ERROR:angle_platform_impl.cc(44)] Display.cpp:1056 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context. ERR: Display.cpp:1056 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
[2967773:0212/111327.936900:ERROR:gl_display.cc(520)] EGL Driver message (Critical) eglInitialize: Could not create a backing OpenGL context. [2967773:0212/111327.937188:ERROR:gl_display.cc(795)] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next display type
[2967773:0212/111327.944836:ERROR:angle_platform_impl.cc(44)] Display.cpp:1056 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context. ERR: Display.cpp:1056 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
[2967773:0212/111327.945113:ERROR:gl_display.cc(520)] EGL Driver message (Critical) eglInitialize: Could not create a backing OpenGL context. [2967773:0212/111327.945604:ERROR:gl_display.cc(795)] eglInitialize OpenGLES failed with error EGL_NOT_INITIALIZED
[2967773:0212/111327.945902:ERROR:gl_display.cc(829)] Initialization of all EGL display types failed.
[2967773:0212/111327.946236:ERROR:gl_ozone_egl.cc(26)] GLDisplayEGL::Initialize failed.
[2967773:0212/111328.003820:ERROR:angle_platform_impl.cc(44)] Display.cpp:1056 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context. ERR: Display.cpp:1056 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
[2967773:0212/111328.004147:ERROR:gl_display.cc(520)] EGL Driver message (Critical) eglInitialize: Could not create a backing OpenGL context. [2967773:0212/111328.004316:ERROR:gl_display.cc(795)] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next display type
[2967773:0212/111328.008252:ERROR:angle_platform_impl.cc(44)] Display.cpp:1056 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context. ERR: Display.cpp:1056 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
[2967773:0212/111328.008547:ERROR:gl_display.cc(520)] EGL Driver message (Critical) eglInitialize: Could not create a backing OpenGL context. [2967773:0212/111328.008692:ERROR:gl_display.cc(795)] eglInitialize OpenGLES failed with error EGL_NOT_INITIALIZED
[2967773:0212/111328.008826:ERROR:gl_display.cc(829)] Initialization of all EGL display types failed.
[2967773:0212/111328.008966:ERROR:gl_ozone_egl.cc(26)] GLDisplayEGL::Initialize failed.
[2967773:0212/111328.014692:ERROR:viz_main_impl.cc(196)] Exiting GPU process due to errors during initialization libGL error: MESA-LOADER: failed to open vc4 (search paths /snap/vuepilot/101/gnome-platform/usr/lib/aarch64-linux-gnu/dri) libGL error: failed to load driver: vc4 libGL error: MESA-LOADER: failed to open vc4 (search paths /snap/vuepilot/101/gnome-platform/usr/lib/aarch64-linux-gnu/dri) libGL error: failed to load driver: vc4 libGL error: MESA-LOADER: failed to open swrast (search paths /snap/vuepilot/101/gnome-platform/usr/lib/aarch64-linux-gnu/dri) libGL error: failed to load driver: swrast
[2967818:0212/111328.386543:ERROR:angle_platform_impl.cc(44)] Display.cpp:1056 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context. ERR: Display.cpp:1056 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
[2967818:0212/111328.387101:ERROR:gl_display.cc(520)] EGL Driver message (Critical) eglInitialize: Could not create a backing OpenGL context.
message (Critical) eglInitialize: Could not create a backing OpenGL context.

内容的提问来源于stack exchange,提问作者Cheyne

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.30 00:37:04