Chrome does not work in GUI enabled containers

Ok, where to begin… I’ve had a setup both on my desktop and and laptop where I’ve been running GUI enabled containers for different purposes and used Chrome as my main browser; running it in separate containers has allowed me to have an instance of the browrser which is using a speficic VPN and such… well you get the idea of why.

I’m running Kubuntu as the OS on both of my computers and now upgraded to 25.04. I’ve encountered this issue before on my laptop with an earlier OS and LXD version that starting Chrome from a GUI enabled container does not work, Chrome starts but it does not render properly… So this seems to be some kind of evil voodoo combo of the Plasma, LXD and Chrome versions as on my laptop the problem previously went away by itself as things got updated… but now it struck again and of course I’m not getting anything into any logs that would directly indicate what is the issue…

Other GUI apps like Firefox, Kate and such work in the GUI enabled containers

Any pointers on how to debug this would be greatly appreciated, I know this is a tricky one as there is no clear indication of what might be causing the issue…

OK, after some digging I noticed that dmesg shows an AppArmor denied message that appears when I start Chrome in a GUI enabled container. This occurs on both hosts.

apparmor="DENIED" operation="file_receive" class="file" profile="lxd_forkproxy-X0_tbox2_</var/snap/lxd/common/lxd>" name="/dev/dri/renderD128" pid=17312 comm="lxd" requested_mask="wr" denied_mask="wr" fsuid=1000 ouid=0

Ok, tried removing

nvidia.runtime: "true"

and changing the GPU type to

  mygpu:
    gputype: physical
    id: nvidia.com/gpu=0
    type: gpu

so now the command nvidia-smi shows the GPU inside the GUI enabled containers. But no effect on the Chrome issue… Also tried Brave and Chromium, with them as also with Chrome I’m getting these errors in the container… Brave and Chromium (usually) crash after a short while, Chrome does not.

Chrome:

[586:586:0525/225319.260874:ERROR:content/browser/gpu/gpu_process_host.cc:956] GPU process exited unexpectedly: exit_code=512
[586:586:0525/225338.262868:ERROR:content/browser/gpu/gpu_process_host.cc:956] GPU process exited unexpectedly: exit_code=512
[586:586:0525/225357.408487:ERROR:content/browser/gpu/gpu_process_host.cc:956] GPU process exited unexpectedly: exit_code=512

Brave:

[802:802:0525/230341.004658:ERROR:../src/content/browser/gpu/gpu_process_host.cc:956] GPU process exited unexpectedly: exit_code=512
[802:802:0525/230400.156481:ERROR:../src/content/browser/gpu/gpu_process_host.cc:956] GPU process exited unexpectedly: exit_code=512
[802:802:0525/230419.043555:ERROR:../src/content/browser/gpu/gpu_process_host.cc:956] GPU process exited unexpectedly: exit_code=512

Chromium (snap):

touch: cannot touch '/home/ubuntu/snap/chromium/common/.cache/desktop-runtime-date': No such file or directory
[8425:8425:0525/231031.771506:ERROR:ui/gl/angle_platform_impl.cc:49] Display.cpp:1079 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
ERR: Display.cpp:1079 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
[8425:8425:0525/231031.771726:ERROR:ui/gl/gl_display.cc:508] EGL Driver message (Critical) eglInitialize: Could not create a backing OpenGL context.
[8425:8425:0525/231031.771809:ERROR:ui/gl/gl_display.cc:780] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next display type
[8425:8425:0525/231031.781147:ERROR:ui/gl/angle_platform_impl.cc:49] Display.cpp:1079 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
ERR: Display.cpp:1079 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
[8425:8425:0525/231031.785135:ERROR:ui/gl/gl_display.cc:508] EGL Driver message (Critical) eglInitialize: Could not create a backing OpenGL context.
[8425:8425:0525/231031.785252:ERROR:ui/gl/gl_display.cc:780] eglInitialize OpenGLES failed with error EGL_NOT_INITIALIZED
[8425:8425:0525/231031.785407:ERROR:ui/gl/gl_display.cc:815] Initialization of all EGL display types failed.
[8425:8425:0525/231031.785497:ERROR:ui/ozone/common/gl_ozone_egl.cc:26] GLDisplayEGL::Initialize failed.
[8425:8425:0525/231031.849160:ERROR:ui/gl/angle_platform_impl.cc:49] Display.cpp:1079 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
ERR: Display.cpp:1079 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
[8425:8425:0525/231031.849454:ERROR:ui/gl/gl_display.cc:508] EGL Driver message (Critical) eglInitialize: Could not create a backing OpenGL context.
[8425:8425:0525/231031.849600:ERROR:ui/gl/gl_display.cc:780] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next display type
[8425:8425:0525/231031.875482:ERROR:ui/gl/angle_platform_impl.cc:49] Display.cpp:1079 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
ERR: Display.cpp:1079 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
[8425:8425:0525/231031.875745:ERROR:ui/gl/gl_display.cc:508] EGL Driver message (Critical) eglInitialize: Could not create a backing OpenGL context.
[8425:8425:0525/231031.875883:ERROR:ui/gl/gl_display.cc:780] eglInitialize OpenGLES failed with error EGL_NOT_INITIALIZED
[8425:8425:0525/231031.876011:ERROR:ui/gl/gl_display.cc:815] Initialization of all EGL display types failed.
[8425:8425:0525/231031.876134:ERROR:ui/ozone/common/gl_ozone_egl.cc:26] GLDisplayEGL::Initialize failed.
[8425:8425:0525/231031.896123:ERROR:components/viz/service/main/viz_main_impl.cc:183] Exiting GPU process due to errors during initialization
[8205:8205:0525/231032.218301:ERROR:dbus/object_proxy.cc:590] Failed to call method: org.freedesktop.DBus.ListActivatableNames: object_path= /org/freedesktop/DBus: org.freedesktop.DBus.Error.AccessDenied: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.20" (uid=1000 pid=8205 comm="/snap/chromium/3125/usr/lib/chromium-browser/chrom" label="snap.chromium.chromium (enforce)") interface="org.freedesktop.DBus" member="ListActivatableNames" error name="(unset)" requested_reply="0" destination="org.freedesktop.DBus" (bus)
[8205:8205:0525/231032.222690:ERROR:dbus/object_proxy.cc:590] Failed to call method: org.freedesktop.DBus.ListActivatableNames: object_path= /org/freedesktop/DBus: org.freedesktop.DBus.Error.AccessDenied: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.20" (uid=1000 pid=8205 comm="/snap/chromium/3125/usr/lib/chromium-browser/chrom" label="snap.chromium.chromium (enforce)") interface="org.freedesktop.DBus" member="ListActivatableNames" error name="(unset)" requested_reply="0" destination="org.freedesktop.DBus" (bus)

(chrome:8205): IBUS-WARNING **: 23:10:32.248: Failed to mkdir /home/ubuntu/snap/chromium/3125/.config/ibus/bus: Not a directory
[8480:8480:0525/231033.352277:ERROR:ui/gl/angle_platform_impl.cc:49] Display.cpp:1079 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
ERR: Display.cpp:1079 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
[8480:8480:0525/231033.352555:ERROR:ui/gl/gl_display.cc:508] EGL Driver message (Critical) eglInitialize: Could not create a backing OpenGL context.
[8480:8480:0525/231033.352641:ERROR:ui/gl/gl_display.cc:780] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next display type
[8480:8480:0525/231033.358542:ERROR:ui/gl/angle_platform_impl.cc:49] Display.cpp:1079 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
ERR: Display.cpp:1079 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
[8480:8480:0525/231033.358656:ERROR:ui/gl/gl_display.cc:508] EGL Driver message (Critical) eglInitialize: Could not create a backing OpenGL context.
[8480:8480:0525/231033.358742:ERROR:ui/gl/gl_display.cc:780] eglInitialize OpenGLES failed with error EGL_NOT_INITIALIZED
[8480:8480:0525/231033.358821:ERROR:ui/gl/gl_display.cc:815] Initialization of all EGL display types failed.
[8480:8480:0525/231033.358896:ERROR:ui/ozone/common/gl_ozone_egl.cc:26] GLDisplayEGL::Initialize failed.
[8480:8480:0525/231033.404969:ERROR:ui/gl/angle_platform_impl.cc:49] Display.cpp:1079 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
ERR: Display.cpp:1079 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
[8480:8480:0525/231033.405112:ERROR:ui/gl/gl_display.cc:508] EGL Driver message (Critical) eglInitialize: Could not create a backing OpenGL context.
[8480:8480:0525/231033.405201:ERROR:ui/gl/gl_display.cc:780] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next display type
[8480:8480:0525/231033.413048:ERROR:ui/gl/angle_platform_impl.cc:49] Display.cpp:1079 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
ERR: Display.cpp:1079 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
[8480:8480:0525/231033.413190:ERROR:ui/gl/gl_display.cc:508] EGL Driver message (Critical) eglInitialize: Could not create a backing OpenGL context.
[8480:8480:0525/231033.413271:ERROR:ui/gl/gl_display.cc:780] eglInitialize OpenGLES failed with error EGL_NOT_INITIALIZED
[8480:8480:0525/231033.413361:ERROR:ui/gl/gl_display.cc:815] Initialization of all EGL display types failed.
[8480:8480:0525/231033.413450:ERROR:ui/ozone/common/gl_ozone_egl.cc:26] GLDisplayEGL::Initialize failed.
[8480:8480:0525/231033.417110:ERROR:components/viz/service/main/viz_main_impl.cc:183] Exiting GPU process due to errors during initialization
[0525/231048.599509:ERROR:third_party/crashpad/crashpad/util/linux/ptracer.cc:605] ptrace: Input/output error (5)
[0525/231048.605565:ERROR:third_party/crashpad/crashpad/util/linux/ptracer.cc:605] ptrace: Input/output error (5)
[0525/231048.606665:ERROR:third_party/crashpad/crashpad/util/linux/ptracer.cc:605] ptrace: Input/output error (5)
[0525/231048.607077:ERROR:third_party/crashpad/crashpad/util/linux/ptracer.cc:605] ptrace: Input/output error (5)
[0525/231048.702949:ERROR:third_party/crashpad/crashpad/snapshot/elf/elf_dynamic_array_reader.h:64] tag not found
[8205:8205:0525/231048.852194:ERROR:content/browser/gpu/gpu_process_host.cc:956] GPU process exited unexpectedly: exit_code=512
[0525/231103.957383:ERROR:third_party/crashpad/crashpad/util/linux/ptracer.cc:605] ptrace: Input/output error (5)
[0525/231103.961388:ERROR:third_party/crashpad/crashpad/util/linux/ptracer.cc:605] ptrace: Input/output error (5)
[0525/231103.962484:ERROR:third_party/crashpad/crashpad/util/linux/ptracer.cc:605] ptrace: Input/output error (5)
[0525/231103.962910:ERROR:third_party/crashpad/crashpad/util/linux/ptracer.cc:605] ptrace: Input/output error (5)
[0525/231104.055394:ERROR:third_party/crashpad/crashpad/snapshot/elf/elf_dynamic_array_reader.h:64] tag not found
[8205:8205:0525/231104.184838:ERROR:content/browser/gpu/gpu_process_host.cc:956] GPU process exited unexpectedly: exit_code=512
[0525/231119.289227:ERROR:third_party/crashpad/crashpad/util/linux/ptracer.cc:605] ptrace: Input/output error (5)
[0525/231119.293502:ERROR:third_party/crashpad/crashpad/util/linux/ptracer.cc:605] ptrace: Input/output error (5)
[0525/231119.294714:ERROR:third_party/crashpad/crashpad/util/linux/ptracer.cc:605] ptrace: Input/output error (5)
[0525/231119.295175:ERROR:third_party/crashpad/crashpad/util/linux/ptracer.cc:605] ptrace: Input/output error (5)
[0525/231119.385786:ERROR:third_party/crashpad/crashpad/snapshot/elf/elf_dynamic_array_reader.h:64] tag not found
[8205:8205:0525/231119.499059:ERROR:content/browser/gpu/gpu_process_host.cc:956] GPU process exited unexpectedly: exit_code=512
[0525/231134.539992:ERROR:third_party/crashpad/crashpad/util/linux/ptracer.cc:605] ptrace: Input/output error (5)
[0525/231134.544694:ERROR:third_party/crashpad/crashpad/util/linux/ptracer.cc:605] ptrace: Input/output error (5)
[0525/231134.545999:ERROR:third_party/crashpad/crashpad/util/linux/ptracer.cc:605] ptrace: Input/output error (5)
[0525/231134.546501:ERROR:third_party/crashpad/crashpad/util/linux/ptracer.cc:605] ptrace: Input/output error (5)
[0525/231134.632356:ERROR:third_party/crashpad/crashpad/snapshot/elf/elf_dynamic_array_reader.h:64] tag not found
[8205:8205:0525/231134.707468:ERROR:content/browser/gpu/gpu_process_host.cc:956] GPU process exited unexpectedly: exit_code=512
[0525/231149.750444:ERROR:third_party/crashpad/crashpad/util/linux/ptracer.cc:605] ptrace: Input/output error (5)
[0525/231149.755183:ERROR:third_party/crashpad/crashpad/util/linux/ptracer.cc:605] ptrace: Input/output error (5)
[0525/231149.756502:ERROR:third_party/crashpad/crashpad/util/linux/ptracer.cc:605] ptrace: Input/output error (5)
[0525/231149.757014:ERROR:third_party/crashpad/crashpad/util/linux/ptracer.cc:605] ptrace: Input/output error (5)
[0525/231149.846797:ERROR:third_party/crashpad/crashpad/snapshot/elf/elf_dynamic_array_reader.h:64] tag not found
[8205:8205:0525/231149.907163:ERROR:content/browser/gpu/gpu_process_host.cc:956] GPU process exited unexpectedly: exit_code=512
[0525/231204.948825:ERROR:third_party/crashpad/crashpad/util/linux/ptracer.cc:605] ptrace: Input/output error (5)
[0525/231204.953744:ERROR:third_party/crashpad/crashpad/util/linux/ptracer.cc:605] ptrace: Input/output error (5)
[0525/231204.955043:ERROR:third_party/crashpad/crashpad/util/linux/ptracer.cc:605] ptrace: Input/output error (5)
[0525/231204.955544:ERROR:third_party/crashpad/crashpad/util/linux/ptracer.cc:605] ptrace: Input/output error (5)
[0525/231205.042033:ERROR:third_party/crashpad/crashpad/snapshot/elf/elf_dynamic_array_reader.h:64] tag not found
[8205:8205:0525/231205.117672:ERROR:content/browser/gpu/gpu_process_host.cc:956] GPU process exited unexpectedly: exit_code=512
[8205:8205:0525/231205.119030:FATAL:content/browser/gpu/gpu_data_manager_impl_private.cc:416] GPU process isn't usable. Goodbye.
[0525/231205.125433:ERROR:third_party/crashpad/crashpad/util/linux/ptracer.cc:605] ptrace: Input/output error (5)
[0525/231205.127737:ERROR:third_party/crashpad/crashpad/util/linux/ptracer.cc:605] ptrace: Input/output error (5)
[0525/231205.128454:ERROR:third_party/crashpad/crashpad/util/linux/ptracer.cc:605] ptrace: Input/output error (5)
[0525/231205.128703:ERROR:third_party/crashpad/crashpad/util/linux/ptracer.cc:605] ptrace: Input/output error (5)
[0525/231205.228242:ERROR:third_party/crashpad/crashpad/snapshot/elf/elf_dynamic_array_reader.h:64] tag not found
Trace/breakpoint trap (core dumped)

I cannot edit the post topic myself but this is affecting more applications than just Chrome and some other browsers, just noticed that VSCode does not work, Postman does not work.

Postman outputs:

120235:0527/191827.441873:ERROR:angle_platform_impl.cc(44)] Display.cpp:1086 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
ERR: Display.cpp:1086 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
[120235:0527/191827.443348:ERROR:gl_display.cc(497)] EGL Driver message (Critical) eglInitialize: Could not create a backing OpenGL context.
[120235:0527/191827.443541:ERROR:gl_display.cc(767)] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next display type
[120235:0527/191829.237980:ERROR:angle_platform_impl.cc(44)] Display.cpp:1086 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
ERR: Display.cpp:1086 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
[120235:0527/191829.238268:ERROR:gl_display.cc(497)] EGL Driver message (Critical) eglInitialize: Could not create a backing OpenGL context.
[120235:0527/191829.238449:ERROR:gl_display.cc(767)] eglInitialize OpenGLES failed with error EGL_NOT_INITIALIZED
[120235:0527/191829.238651:ERROR:gl_display.cc(801)] Initialization of all EGL display types failed.
[120235:0527/191829.238831:ERROR:gl_ozone_egl.cc(26)] GLDisplayEGL::Initialize failed.
[120235:0527/191838.273702:ERROR:angle_platform_impl.cc(44)] Display.cpp:1086 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
ERR: Display.cpp:1086 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
[120235:0527/191838.273991:ERROR:gl_display.cc(497)] EGL Driver message (Critical) eglInitialize: Could not create a backing OpenGL context.
[120235:0527/191838.274155:ERROR:gl_display.cc(767)] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next display type
[120235:0527/191840.056381:ERROR:angle_platform_impl.cc(44)] Display.cpp:1086 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
ERR: Display.cpp:1086 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
[120235:0527/191840.056640:ERROR:gl_display.cc(497)] EGL Driver message (Critical) eglInitialize: Could not create a backing OpenGL context.
[120235:0527/191840.056763:ERROR:gl_display.cc(767)] eglInitialize OpenGLES failed with error EGL_NOT_INITIALIZED
[120235:0527/191840.056880:ERROR:gl_display.cc(801)] Initialization of all EGL display types failed.
[120235:0527/191840.056991:ERROR:gl_ozone_egl.cc(26)] GLDisplayEGL::Initialize failed.
[120235:0527/191840.062454:ERROR:viz_main_impl.cc(166)] Exiting GPU process due to errors during initialization

Firefox works, Glxgears works, Terminator works, a lot of other stuff works but a lot of things that worked previously do not… This is extremely annoying.

Anyone?