balena-io / etcher

Flash OS images to SD cards & USB drives, safely and easily.
https://etcher.io/
Apache License 2.0
29.27k stars 2.08k forks source link

Ubuntu 24.04: black window opened when running etcher #4184

Open csdougliss opened 6 months ago

csdougliss commented 6 months ago

image

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

DavidAntliff commented 5 months ago

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.

sneetsher commented 5 months ago

@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 .

DavidAntliff commented 5 months ago

@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!

archisman-panigrahi commented 4 months ago

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

archisman-panigrahi commented 4 months ago

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

MennoLabs commented 3 months ago

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

dptsolutions commented 3 months ago

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