OSSystems / meta-browser

OpenEmbedded/Yocto BSP layer for Web Browsers
MIT License
185 stars 194 forks source link

chromium-ozone-wayland doesn't run on raspberrypi4 (yocto/dunfell)? #513

Open matt-hammond-001 opened 3 years ago

matt-hammond-001 commented 3 years ago

Has anyone been successful in using chromium-ozone-wayland on a raspberrypi4? I'm trying to get it working in wayland for core-image-minimal on poky dunfell.

I have the following config that works on a RPi3 with MACHINE=raspberrypi3 but fails on a RPi4. Is it something I'm doing wrong? Or is there a bug? On the RPi4, wayland starts, but chromium does not launch correctly.

Any suggestions/advice much appreciated.

Command line and error output:

$ chromium --no-sandbox
[709:709:0607/152414.179250:ERROR:browser_dm_token_storage_linux.cc(94)] Error: /etc/machine-id contains 0 characters (32 were expected).
[709:740:0607/152414.303758:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[709:740:0607/152414.303912:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[735:735:0607/152414.351041:ERROR:gpu_init.cc(426)] Passthrough is not supported, GL is egl
[709:784:0607/152414.714769:ERROR:object_proxy.cc(621)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.
UPower was not provided by any .service files
[709:784:0607/152414.715953:ERROR:object_proxy.cc(621)] Failed to call method: org.freedesktop.UPower.GetDisplayDevice: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesk
top.UPower was not provided by any .service files
[709:784:0607/152414.717031:ERROR:object_proxy.cc(621)] Failed to call method: org.freedesktop.UPower.EnumerateDevices: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesk
top.UPower was not provided by any .service files
drmPrimeFDToHandle() failed: Cannot allocate memory
Failed to create scanout resource.
[735:735:0607/152414.987369:ERROR:gl_surface_egl.cc(778)] EGL Driver message (Critical) eglCreateImageKHR: dri2_create_image_khr_texture
[735:735:0607/152414.991994:ERROR:gl_image_egl.cc(38)] Error creating EGLImage: EGL_BAD_ALLOC
[735:735:0607/152414.992545:ERROR:gpu_memory_buffer_factory_native_pixmap.cc(264)] Failed to create GLImage 945x1060, RGBA_8888, usage SCANOUT
drmPrimeFDToHandle() failed: Cannot allocate memory
Failed to create scanout resource.
[735:735:0607/152415.036303:ERROR:gl_surface_egl.cc(778)] EGL Driver message (Critical) eglCreateImageKHR: dri2_create_image_khr_texture
[735:735:0607/152415.036772:ERROR:gl_image_egl.cc(38)] Error creating EGLImage: EGL_BAD_ALLOC
[735:735:0607/152415.038605:ERROR:gpu_memory_buffer_factory_native_pixmap.cc(264)] Failed to create GLImage 945x1060, RGBA_8888, usage GPU_READ
[735:735:0607/152415.039036:ERROR:shared_image_backing_factory_gl_texture.cc(536)] CreateSharedImage: Failed to create bindable image
[735:735:0607/152415.039421:ERROR:shared_image_factory.cc(582)] CreateSharedImage: could not create backing.
[735:735:0607/152415.057591:ERROR:skia_output_surface_impl_on_gpu.cc(1495)] Failed to make current.
[735:735:0607/152415.058214:ERROR:skia_output_surface_impl_on_gpu.cc(1495)] Failed to make current.
[735:735:0607/152415.058980:ERROR:shared_image_stub.cc(452)] SharedImageStub: context already lost
[735:735:0607/152415.061472:ERROR:shared_image_stub.cc(452)] SharedImageStub: context already lost
[735:735:0607/152415.068997:ERROR:skia_output_surface_impl_on_gpu.cc(1495)] Failed to make current.
[735:735:0607/152415.075935:ERROR:skia_output_surface_impl_on_gpu.cc(1495)] Failed to make current.
[735:735:0607/152415.076601:ERROR:skia_output_surface_impl_on_gpu.cc(1495)] Failed to make current.
[735:735:0607/152415.077121:ERROR:skia_output_surface_impl_on_gpu.cc(1495)] Failed to make current.
[735:735:0607/152415.077670:ERROR:skia_output_surface_impl_on_gpu.cc(1495)] Failed to make current.
[735:735:0607/152415.079215:ERROR:raster_decoder.cc(1064)]   RasterDecoderImpl: Context lost during MakeCurrent.
[709:753:0607/152415.171316:ERROR:wayland_event_watcher.cc(249)] Fatal Wayland communication error: Broken pipe
drmPrimeFDToHandle() failed: Cannot allocate memory
Failed to create scanout resource.
[735:735:0607/152415.449951:ERROR:gl_surface_egl.cc(778)] EGL Driver message (Critical) eglCreateImageKHR: dri2_create_image_khr_texture
[735:735:0607/152415.450432:ERROR:gl_image_egl.cc(38)] Error creating EGLImage: EGL_BAD_ALLOC
[735:735:0607/152415.450878:ERROR:gpu_memory_buffer_factory_native_pixmap.cc(264)] Failed to create GLImage 945x1060, RGBA_8888, usage SCANOUT
drmPrimeFDToHandle() failed: Cannot allocate memory
Failed to create scanout resource.
[735:735:0607/152415.482919:ERROR:gl_surface_egl.cc(778)] EGL Driver message (Critical) eglCreateImageKHR: dri2_create_image_khr_texture
[735:735:0607/152415.483383:ERROR:gl_image_egl.cc(38)] Error creating EGLImage: EGL_BAD_ALLOC
[735:735:0607/152415.483811:ERROR:gpu_memory_buffer_factory_native_pixmap.cc(264)] Failed to create GLImage 945x1060, RGBA_8888, usage GPU_READ
[735:735:0607/152415.484205:ERROR:shared_image_backing_factory_gl_texture.cc(536)] CreateSharedImage: Failed to create bindable image
[735:735:0607/152415.484569:ERROR:shared_image_factory.cc(582)] CreateSharedImage: could not create backing.
[797:797:0607/152415.716259:ERROR:gpu_init.cc(426)] Passthrough is not supported, GL is egl
drmPrimeFDToHandle() failed: Cannot allocate memory
Failed to create scanout resource.
[797:797:0607/152416.048405:ERROR:gl_surface_egl.cc(778)] EGL Driver message (Critical) eglCreateImageKHR: dri2_create_image_khr_texture
[797:797:0607/152416.049116:ERROR:gl_image_egl.cc(38)] Error creating EGLImage: EGL_BAD_ALLOC
[797:797:0607/152416.049755:ERROR:gpu_memory_buffer_factory_native_pixmap.cc(264)] Failed to create GLImage 945x1060, RGBA_8888, usage SCANOUT
drmPrimeFDToHandle() failed: Cannot allocate memory
Failed to create scanout resource.
[797:797:0607/152416.082102:ERROR:gl_surface_egl.cc(778)] EGL Driver message (Critical) eglCreateImageKHR: dri2_create_image_khr_texture
[797:797:0607/152416.082585:ERROR:gl_image_egl.cc(38)] Error creating EGLImage: EGL_BAD_ALLOC
[797:797:0607/152416.083044:ERROR:gpu_memory_buffer_factory_native_pixmap.cc(264)] Failed to create GLImage 945x1060, RGBA_8888, usage GPU_READ
[797:797:0607/152416.083457:ERROR:shared_image_backing_factory_gl_texture.cc(536)] CreateSharedImage: Failed to create bindable image
[797:797:0607/152416.083839:ERROR:shared_image_factory.cc(582)] CreateSharedImage: could not create backing.
[797:797:0607/152416.085128:ERROR:skia_output_surface_impl_on_gpu.cc(1495)] Failed to make current.
[797:797:0607/152416.085653:ERROR:skia_output_surface_impl_on_gpu.cc(1495)] Failed to make current.
[797:797:0607/152416.099455:ERROR:skia_output_surface_impl_on_gpu.cc(1495)] Failed to make current.
[797:797:0607/152416.100029:ERROR:skia_output_surface_impl_on_gpu.cc(1495)] Failed to make current.
[797:797:0607/152416.112498:ERROR:raster_decoder.cc(1064)]   RasterDecoderImpl: Context lost during MakeCurrent.
[797:797:0607/152416.114967:ERROR:shared_image_stub.cc(452)] SharedImageStub: context already lost
[797:797:0607/152416.122765:ERROR:shared_image_stub.cc(452)] SharedImageStub: context already lost
drmPrimeFDToHandle() failed: Cannot allocate memory
Failed to create scanout resource.
[797:797:0607/152416.351404:ERROR:gl_surface_egl.cc(778)] EGL Driver message (Critical) eglCreateImageKHR: dri2_create_image_khr_texture
[797:797:0607/152416.351851:ERROR:gl_image_egl.cc(38)] Error creating EGLImage: EGL_BAD_ALLOC
[797:797:0607/152416.352271:ERROR:gpu_memory_buffer_factory_native_pixmap.cc(264)] Failed to create GLImage 945x1060, RGBA_8888, usage SCANOUT
drmPrimeFDToHandle() failed: Cannot allocate memory
Failed to create scanout resource.
[797:797:0607/152416.384299:ERROR:gl_surface_egl.cc(778)] EGL Driver message (Critical) eglCreateImageKHR: dri2_create_image_khr_texture
[797:797:0607/152416.384731:ERROR:gl_image_egl.cc(38)] Error creating EGLImage: EGL_BAD_ALLOC
[797:797:0607/152416.385210:ERROR:gpu_memory_buffer_factory_native_pixmap.cc(264)] Failed to create GLImage 945x1060, RGBA_8888, usage GPU_READ
[797:797:0607/152416.385589:ERROR:shared_image_backing_factory_gl_texture.cc(536)] CreateSharedImage: Failed to create bindable image
[797:797:0607/152416.385927:ERROR:shared_image_factory.cc(582)] CreateSharedImage: could not create backing.
[806:806:0607/152416.620222:ERROR:gpu_init.cc(426)] Passthrough is not supported, GL is egl
drmPrimeFDToHandle() failed: Cannot allocate memory
Failed to create scanout resource.
[806:806:0607/152417.035341:ERROR:gl_surface_egl.cc(778)] EGL Driver message (Critical) eglCreateImageKHR: dri2_create_image_khr_texture
[806:806:0607/152417.035832:ERROR:gl_image_egl.cc(38)] Error creating EGLImage: EGL_BAD_ALLOC
[806:806:0607/152417.036295:ERROR:gpu_memory_buffer_factory_native_pixmap.cc(264)] Failed to create GLImage 945x1060, RGBA_8888, usage SCANOUT
drmPrimeFDToHandle() failed: Cannot allocate memory
Failed to create scanout resource.
[806:806:0607/152417.059064:ERROR:gl_surface_egl.cc(778)] EGL Driver message (Critical) eglCreateImageKHR: dri2_create_image_khr_texture
[806:806:0607/152417.059579:ERROR:gl_image_egl.cc(38)] Error creating EGLImage: EGL_BAD_ALLOC
[806:806:0607/152417.060055:ERROR:gpu_memory_buffer_factory_native_pixmap.cc(264)] Failed to create GLImage 945x1060, RGBA_8888, usage GPU_READ
[806:806:0607/152417.060464:ERROR:shared_image_backing_factory_gl_texture.cc(536)] CreateSharedImage: Failed to create bindable image
[806:806:0607/152417.060897:ERROR:shared_image_factory.cc(582)] CreateSharedImage: could not create backing.
[806:806:0607/152417.062275:ERROR:skia_output_surface_impl_on_gpu.cc(1495)] Failed to make current.
[806:806:0607/152417.062940:ERROR:skia_output_surface_impl_on_gpu.cc(1495)] Failed to make current.
[806:806:0607/152417.063714:ERROR:shared_image_stub.cc(452)] SharedImageStub: context already lost
[806:806:0607/152417.068045:ERROR:shared_image_stub.cc(452)] SharedImageStub: context already lost
[806:806:0607/152417.069107:ERROR:skia_output_surface_impl_on_gpu.cc(1495)] Failed to make current.
[806:806:0607/152417.069693:ERROR:skia_output_surface_impl_on_gpu.cc(1495)] Failed to make current.
[806:806:0607/152417.119346:ERROR:skia_output_surface_impl_on_gpu.cc(1495)] Failed to make current.
[806:806:0607/152417.120088:ERROR:skia_output_surface_impl_on_gpu.cc(1495)] Failed to make current.
[806:806:0607/152417.120711:ERROR:skia_output_surface_impl_on_gpu.cc(1495)] Failed to make current.
[806:806:0607/152417.132761:ERROR:raster_decoder.cc(1064)]   RasterDecoderImpl: Context lost during MakeCurrent.
[806:806:0607/152417.135596:ERROR:shared_image_stub.cc(452)] SharedImageStub: context already lost
[806:806:0607/152417.143412:ERROR:shared_image_stub.cc(452)] SharedImageStub: context already lost
drmPrimeFDToHandle() failed: Cannot allocate memory
Failed to create scanout resource.
[806:806:0607/152417.469677:ERROR:gl_surface_egl.cc(778)] EGL Driver message (Critical) eglCreateImageKHR: dri2_create_image_khr_texture
[806:806:0607/152417.470170:ERROR:gl_image_egl.cc(38)] Error creating EGLImage: EGL_BAD_ALLOC
[806:806:0607/152417.470614:ERROR:gpu_memory_buffer_factory_native_pixmap.cc(264)] Failed to create GLImage 945x1060, RGBA_8888, usage SCANOUT
drmPrimeFDToHandle() failed: Cannot allocate memory
Failed to create scanout resource.
[806:806:0607/152417.492626:ERROR:gl_surface_egl.cc(778)] EGL Driver message (Critical) eglCreateImageKHR: dri2_create_image_khr_texture
[806:806:0607/152417.493117:ERROR:gl_image_egl.cc(38)] Error creating EGLImage: EGL_BAD_ALLOC
[806:806:0607/152417.493621:ERROR:gpu_memory_buffer_factory_native_pixmap.cc(264)] Failed to create GLImage 945x1060, RGBA_8888, usage GPU_READ
[806:806:0607/152417.494027:ERROR:shared_image_backing_factory_gl_texture.cc(536)] CreateSharedImage: Failed to create bindable image
[806:806:0607/152417.494422:ERROR:shared_image_factory.cc(582)] CreateSharedImage: could not create backing.
[826:826:0607/152417.718689:ERROR:gpu_init.cc(426)] Passthrough is not supported, GL is swiftshader
[762:774:0607/152417.824187:ERROR:command_buffer_proxy_impl.cc(121)] ContextResult::kTransientFailure: Failed to send GpuChannelMsg_CreateCommandBuffer.

Chromium does not terminate, but appears to sit there indefinitely adding to this output.

My yocto/poky setup:

Repos Branch/Tag Rev
poky tags/dunfell-23.0.6 3eaeeeaea611a9c6a7e79678f99e32beccc79cd8
meta-openembedded branch/dunfell 11eae114522a6befa06c7f4021a83bc016133543
meta-raspberrypi branch/dunfell 77190af02d48adc2b28216775e6318e9eeda571c
meta-clang branch/dunfell e63d6f9abba5348e2183089d6ef5ea384d7ae8d8
meta-python2 branch/dunfell 6b3000729ce3424c2aa8a03cd46ef37b200d2fc1
meta-browser master a5a5f277740a8434377f9844c62574efb17a4fa0

bblayers.conf:

POKY_BBLAYERS_CONF_VERSION = "2"

BBPATH = "${TOPDIR}"
BBFILES ?= ""

BBLAYERS ?= " \
  poky/meta \
  poky/meta-poky \
  poky/meta-yocto-bsp \
  meta-openembedded/meta-oe \
  meta-openembedded/meta-filesystems \
  meta-raspberrypi \
  meta-clang \
  meta-python2 \
  meta-browser/meta-chromium \
  "

local.conf (RPi3)

MACHINE ??= "qemux86-64"
DISTRO ?= "poky"
PACKAGE_CLASSES ?= "package_rpm"
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS ??= "\
    STOPTASKS,${TMPDIR},1G,100K \
    STOPTASKS,${DL_DIR},1G,100K \
    STOPTASKS,${SSTATE_DIR},1G,100K \
    STOPTASKS,/tmp,100M,100K \
    ABORT,${TMPDIR},100M,1K \
    ABORT,${DL_DIR},100M,1K \
    ABORT,${SSTATE_DIR},100M,1K \
    ABORT,/tmp,10M,1K"
PACKAGECONFIG_append_pn-qemu-system-native = " sdl"
CONF_VERSION = "1"

MACHINE = "raspberrypi3"

IMAGE_INSTALL_append = "\
    weston \
    chromium-ozone-wayland \
    openssh \
    ca-certificates \
    kernel-modules \
"

MACHINE_FEATURES_append = "\
    vc4graphics \
"

DISTRO_FEATURES_append = "\
    wayland \
"

DISTRO_FEATURES_remove = "\
    x11 \
"

ENABLE_UART = "1"
HDMI_FORCE_HOTPLUG = "1"
DISABLE_OVERSCAN = "1"
DISABLE_SPLASH = "1"
BOOT_DELAY = "0"
BOOT_DELAY_MS = "0"

PACKAGE_CLASSES = "package_deb"

local.conf (RPi4) ... same but with these additions/changes

MACHINE = "raspberrypi4"

RPI_KERNEL_DEVICETREE = "bcm2711-rpi-4-b.dtb"
RPI_KERNEL_DEVICETREE_OVERLAYS_append = " overlays/vc4-kms-v3d-pi4.dtbo"
VC4DTBO = "vc4-kms-v3d-pi4"

And have also tried when setting boot/config.txt to dtoverlay=vc4-fkms-v3d and rebooting, but the same result. Weston starts but chromium generates the same error output.

msisov commented 3 years ago

Mind to report to the upstream instead? Thanks.

matt-hammond-001 commented 3 years ago

You mean the chromium project?

msisov commented 3 years ago

Exactly.

rakuco commented 3 years ago

Specifically, https://bugs.chromium.org -- you can also paste the bug number here so that we can subscribe to it and maybe CC the relevant people.

bestgaurav007 commented 2 years ago

Hi, I am also facing the same issue. Do you get any solution to start chromium on raspberry pi 4 ?

matt-hammond-001 commented 2 years ago

unfortunately not

Escalion commented 1 year ago

For me it's working using the FKMS driver (although I have some issues with blotting/not-redrawing)

Himaniyocto commented 3 months ago

Hello All

i am facing similar issue for raspberry pi 5 can you please help

MaxIhlenfeldt commented 3 months ago

Does chromium-bin --ozone-platform=wayland --use-angle=opengles --no-sandbox work?

Himaniyocto commented 3 months ago

Does chromium-bin --ozone-platform=wayland --use-angle=opengles --no-sandbox work?

Hello @MaxIhlenfeldt i am trying to run chromium on yocto https://github.com/ds-hwang/yocto-chromium i am following and facing issue can you please help me if you have any sample example for this please

I have a Raspberry Pi 5. I want to get chromium to run on it. I want to build Linux via Yocto. I'm using the Kirkstone branch of Yocto. My local.conf relating to chromium IMAGE_INSTALL:append = " xserver-xorg xf86-video-fbdev xf86-input-evdev glew freeglut" IMAGE_INSTALL:append = " kbd chromium-x11 xkeyboard-config-locale-en-gb"

IMAGE_FEATURES:append = " hwcodecs x11 x11-base"

DISTRO_FEATURES:append = " opengl x11 systemd pam"

VIRTUAL-RUNTIME_init_manager = "systemd" VIRTUAL-RUNTIME_initscripts = "systemd-compat-units" I build with the command bitbake core-image-minimal

The build completes and linux boots on the pi, but when I try to run chromium with chromium --no-sandbox I get the following errors: [564:564:0423/091944.756707:ERROR:policy_logger.cc(157)] :components/enterprise/browser/controller/chrome_browser_cloud_management_controller.cc(163) Cloud management controller initialization aborted as CBCM is not enabled. [564:564:0423/091944.871246:ERROR:gpu_process_host.cc(990)] GPU process exited unexpectedly: exit_code=11 [564:564:0423/091944.910644:ERROR:gpu_process_host.cc(990)] GPU process exited unexpectedly: exit_code=11 [564:564:0423/091944.932636:ERROR:gpu_process_host.cc(990)] GPU process exited unexpectedly: exit_code=11 [564:564:0423/091944.956266:ERROR:gpu_process_host.cc(990)] GPU process exited unexpectedly: exit_code=11 [564:564:0423/091944.991144:ERROR:gpu_process_host.cc(990)] GPU process exited unexpectedly: exit_code=11 [564:564:0423/091945.011115:ERROR:gpu_process_host.cc(990)] GPU process exited unexpectedly: exit_code=11 [564:564:0423/091945.036033:ERROR:gpu_process_host.cc(990)] GPU process exited unexpectedly: exit_code=11 [564:564:0423/091945.057275:ERROR:gpu_process_host.cc(990)] GPU process exited unexpectedly: exit_code=11 [564:564:0423/091945.085960:ERROR:gpu_process_host.cc(990)] GPU process exited unexpectedly: exit_code=11 [564:564:0423/091945.086092:FATAL:gpu_data_manager_impl_private.cc(448)] GPU process isn't u

This is the error which i am facing any inputs would be helpful.

MaxIhlenfeldt commented 3 months ago

@Himaniyocto can you try running chromium-bin --ozone-platform=wayland --use-angle=opengles --no-sandbox instead of chromium --no-sandbox?

Himaniyocto commented 3 months ago

@Himaniyocto can you try running chromium-bin --ozone-platform=wayland --use-angle=opengles --no-sandbox instead of chromium --no-sandbox?

ok sure will try to run but can you have a look do i need to modify something inlocal.conf?