etcher icon indicating copy to clipboard operation
etcher copied to clipboard

Ubuntu 24.04: black window opened when running etcher

Open csdougliss opened this issue 11 months ago • 7 comments

  • Etcher version: 1.18.11
  • Operating system and architecture: Ubuntu 24.04 x86-64 noble (daily as of March 8th 2024)
  • Image flashed: none yet
  • What do you think should have happened:
  • Etcher GUI visible
  • What happened:
  • Black window opened
  • Setting TMPDIR=/tmp ./balenaEtcher-1.18.11-x64.AppImage does not resolve the issue

image

  • Do you see any meaningful error information in the DevTools? sudo ./balenaEtcher-1.18.11-x64.AppImage
[147480:0308/094016.942576:ERROR:bus.cc(398)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[147480:0308/094016.942650:ERROR:bus.cc(398)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
Authorization required, but no authorization protocol specified

Authorization required, but no authorization protocol specified

Authorization required, but no authorization protocol specified

Authorization required, but no authorization protocol specified

[147513:0308/094017.017255:ERROR:angle_platform_impl.cc(43)] Display.cpp:977 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display.
[147513:0308/094017.017768:ERROR:gl_surface_egl.cc(852)] EGL Driver message (Critical) eglInitialize: Could not open the default X display.
[147513:0308/094017.017925:ERROR:gl_surface_egl.cc(1489)] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next display type
Authorization required, but no authorization protocol specified

[147513:0308/094017.019614:ERROR:angle_platform_impl.cc(43)] Display.cpp:977 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display.
[147513:0308/094017.019711:ERROR:gl_surface_egl.cc(852)] EGL Driver message (Critical) eglInitialize: Could not open the default X display.
[147513:0308/094017.019788:ERROR:gl_surface_egl.cc(1489)] eglInitialize OpenGLES failed with error EGL_NOT_INITIALIZED
[147513:0308/094017.019830:ERROR:gl_ozone_egl.cc(21)] GLSurfaceEGL::InitializeOneOff failed.
[147513:0308/094017.034296:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization
[147480:0308/094017.137834:ERROR:bus.cc(398)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
Authorization required, but no authorization protocol specified

Authorization required, but no authorization protocol specified

Authorization required, but no authorization protocol specified

Authorization required, but no authorization protocol specified

[147547:0308/094017.244401:ERROR:angle_platform_impl.cc(43)] Display.cpp:977 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display.
[147547:0308/094017.244539:ERROR:gl_surface_egl.cc(852)] EGL Driver message (Critical) eglInitialize: Could not open the default X display.
[147547:0308/094017.244594:ERROR:gl_surface_egl.cc(1489)] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next display type
Authorization required, but no authorization protocol specified

[147547:0308/094017.244800:ERROR:angle_platform_impl.cc(43)] Display.cpp:977 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display.
[147547:0308/094017.244856:ERROR:gl_surface_egl.cc(852)] EGL Driver message (Critical) eglInitialize: Could not open the default X display.
[147547:0308/094017.244898:ERROR:gl_surface_egl.cc(1489)] eglInitialize OpenGLES failed with error EGL_NOT_INITIALIZED
[147547:0308/094017.244942:ERROR:gl_ozone_egl.cc(21)] GLSurfaceEGL::InitializeOneOff failed.
[147547:0308/094017.246226:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization
Authorization required, but no authorization protocol specified

Authorization required, but no authorization protocol specified

Authorization required, but no authorization protocol specified

Authorization required, but no authorization protocol specified

[147554:0308/094017.272269:ERROR:angle_platform_impl.cc(43)] DisplayVkXcb.cpp:59 (initialize): xcb_connect() failed, error 1
[147554:0308/094017.272409:ERROR:angle_platform_impl.cc(43)] Display.cpp:977 (initialize): ANGLE Display::initialize error 12289: Not initialized.
[147554:0308/094017.272488:ERROR:gl_surface_egl.cc(852)] EGL Driver message (Critical) eglInitialize: Not initialized.
[147554:0308/094017.272572:ERROR:gl_surface_egl.cc(1489)] eglInitialize SwANGLE failed with error EGL_NOT_INITIALIZED
[147554:0308/094017.272638:ERROR:gl_ozone_egl.cc(21)] GLSurfaceEGL::InitializeOneOff failed.
[147554:0308/094017.274155:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization
Authorization required, but no authorization protocol specified

Authorization required, but no authorization protocol specified

[147561:0308/094017.284125:ERROR:gpu_init.cc(481)] Passthrough is not supported, GL is disabled, ANGLE is 
[147561:0308/094017.293096:ERROR:x11_software_bitmap_presenter.cc(141)] XGetWindowAttributes failed for window 25165827
Language changed to: en
[147480:0308/094017.795121:ERROR:bus.cc(398)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
packageUpdatable false
ready-to-show: 1.196s

csdougliss avatar Mar 08 '24 09:03 csdougliss

This happens for me too, on Ubuntu 22.04, but only when I run etcher via sudo. If I run it without sudo, the GUI appears, but I'm not able to actually flash anything due to the polkit issue.

Version 1.8.0's GUI works with and without sudo, but again, I need sudo to actually do anything useful with it.

DavidAntliff avatar Mar 13 '24 02:03 DavidAntliff

@DavidAntliff Could it be due Wayland limitation? Like explained here https://wiki.archlinux.org/title/Running_GUI_applications_as_root . They have listed two workarounds either xhost or sudo -E .

sneetsher avatar Mar 15 '24 05:03 sneetsher

@sneetsher I'm not using Wayland because $XDG_SESSION_TYPE=x11.

The xhost si:localuser:root workaround seems to work, however the sudo -E one does not. So maybe a similar issue?

Thanks for the info!

DavidAntliff avatar Mar 17 '24 22:03 DavidAntliff

It could be due to this bug in apparmor https://bugs.launchpad.net/ubuntu/+source/wike/+bug/2046844/comments/4

archisman-panigrahi avatar Apr 13 '24 11:04 archisman-panigrahi

Perhaps related https://github.com/electron/electron/issues/41066 I verified that this workaround works https://github.com/electron/electron/issues/41066#issuecomment-1913509942

archisman-panigrahi avatar Apr 13 '24 11:04 archisman-panigrahi

Starting it with --no-sandbox --disable-gpu-sandbox fixes it. Just make an alias or a script. Not sure about security implications?

MennoLabs avatar May 27 '24 15:05 MennoLabs

I'm pretty sure it's about that electron bug, as I googled the implication of --no-sandbox and a lot of hits revolved around electron and the underlying chromium that powers it needing unprivileged namespaces to run without a sandbox.

Starting with --no-sandbox seems to be all that's required. I didn't need --disable-gpu-sandbox

dptsolutions avatar Jun 04 '24 05:06 dptsolutions