Cannot start Ozone-GBM on Raspberry Pi

295 views
Skip to first unread message

Ewan Roycroft

unread,
Jan 9, 2020, 10:54:45 AM1/9/20
to Ozone-Dev
Hi all,

I've been trying to build/run Ozone on the Raspberry Pi, without much luck so far. Most of the documentation I've seen for Ozone has been using Intel processors and I appreciate that a lot of this is still in development, but I was wondering if anyone has had any luck with this yet.

Looking at the build files for minigbm, I can see that it has an option to build for the VC4 driver used by the RPi 3. Ultimately, I want to try and run this on a RPi 4, but I understand that it uses the VC3D driver instead; and, given that it is also in a development stage, I decided to try this on a 3B+ first.

I have build two versions of Ozone, the first using the following GN arguments:
use_ozone = true
ozone_platform_gbm = true

target_cpu = "arm"
use_sysroot = true
target_sysroot = "//build/linux/debian_sid_arm-sysroot"

is_debug = false
is_component_build = false
use_jumbo_build = true
enable_nacl = false
symbol_level = 0
blink_symbol_level = 0

Maksim mentioned in a response to my previous post that use_ozone should compile all platforms by default, which was true for all but GBM:
gn args out/OzoneARM --list=ozone_platform_gbm
ozone_platform_gbm
   
Current value = true
     
From //out/OzoneARM/args.gn:2
   
Overridden from the default = false
     
From //ui/ozone/ozone.gni:26

   
Compile the 'gbm' platform.
Perhaps this is caused by one of the other arguments?

This successfully built, but I decided to try a second build with one final argument to ensure that VC4 was enabled in minigbm:
use_vc4_minigbm = true

When testing both of these on the RPi, I cannot get either to launch. Both of them output the following:
$ ./content_shell --ozone-platform=gbm

[8438:8438:0109/154730.993809:FATAL:drm_display_host_manager.cc(92)] Failed to open primary graphics device.
#0 0x0000023ebf68 base::debug::CollectStackTrace()
#1 0x00000238bb56 logging::LogMessage::~LogMessage()
#2 0x00000135275a ui::DrmDisplayHostManager::DrmDisplayHostManager()
#3 0x000001359bcc ui::(anonymous namespace)::OzonePlatformGbm::InitializeUI()
#4 0x000001330fb2 ui::OzonePlatform::InitializeForUI()
#5 0x000002eaac86 aura::Env::Init()
#6 0x000002eaac24 aura::Env::CreateInstance()
#7 0x000001ef7d0e content::BrowserMainLoop::InitializeToolkit()
#8 0x000001ef8104 content::BrowserMainRunnerImpl::Initialize()
#9 0x000001ef52fe content::BrowserMain()
#10 0x000001e40ad8 content::ContentMainRunnerImpl::RunServiceManager()
#11 0x000001e407c6 content::ContentMainRunnerImpl::Run()
#12 0x000003203942 service_manager::Main()
#13 0x00000156d982 content::ContentMain()
#14 0x000000f97b68 main
#15 0x000076528718 __libc_start_main

Received signal 6
#0 0x0000023ebf68 base::debug::CollectStackTrace()
#1 0x0000023829d8 base::debug::StackTrace::StackTrace()
#2 0x0000023ebee6 base::debug::(anonymous namespace)::StackDumpSignalHandler()
#3 0x00007653e130 <unknown>
[end of stack trace]
Calling _exit(1). Core file will not be generated.

Am I missing something from the Pi that is stopping Chromium from accessing the GPU? Or am I too early to this and Ozone-GBM isn't quite ready for the RPi?

Thanks in advance for your help,

Ewan

Daniel Nicoara

unread,
Jan 9, 2020, 11:12:04 AM1/9/20
to Ewan Roycroft, Ozone-Dev
Hi Ewan,

I'm not very familiar with the state of DRM (as in Direct Rendering Manager) on RPi. Based on the error I'd suggest you check that "/dev/dri/card*" exists and it has the right permissions. It may also be possible that DRM support is there but there's no symlink to the actual device node.

I guess, if you'd like to do a few other sanity checks and verify that you have a working DRM stack, you could also try using modetest.

Hope that helps!

Ewan Roycroft

unread,
Jan 9, 2020, 12:40:30 PM1/9/20
to Ozone-Dev, ewan.r...@bbc.co.uk
Hi Daniel,

Thanks for the quick reply! You're right, /dev/dri/card* was missing. I corrected this with raspi-config > Advanced Options > GL Driver and enabling FKMS.

However, I now get the following output when I run content_shell:
Received signal 11 SEGV_MAPERR 000000000000
#0 0x000002337f68
DevTools listening on ws://127.0.0.1:41599/devtools/browser/1d05b827-ac4c-43da-8d8b-2e2e86344b30
base::debug::CollectStackTrace()
#1 0x0000022ce9d8 base::debug::StackTrace::StackTrace()
#2 0x000002337ee6 base::debug::(anonymous namespace)::StackDumpSignalHandler()
#3 0x00007650e130 <unknown>
#4 0x000002e03398 [715:715:0109/163613.081804:ERROR:gl_surface_egl.cc(612)] EGL Driver message (Critical) eglInitialize: xcb_connect failed
[715:715:0109/163613.082114:ERROR:gl_surface_egl.cc(612)] EGL Driver message (Critical) eglInitialize: xcb_connect failed
[715:715:0109/163613.082172:ERROR:gl_surface_egl.cc(612)] EGL Driver message (Critical) eglInitialize: xcb_connect failed
[715:715:0109/163613.082224:ERROR:gl_surface_egl.cc(612)] EGL Driver message (Critical) eglInitialize: xcb_connect failed
[715:715:0109/163613.082278:ERROR:gl_surface_egl.cc(612)] EGL Driver message (Error) eglInitialize: eglInitialize
[715:715:0109/163613.082327:ERROR:gl_surface_egl.cc(1057)] eglInitialize Default failed with error EGL_NOT_INITIALIZED
[715:715:0109/163613.082387:ERROR:gl_ozone_egl.cc(20)] GLSurfaceEGL::InitializeOneOff failed.
[715:715:0109/163613.095188:ERROR:viz_main_impl.cc(177)] Exiting GPU process due to errors during initialization
Received signal 11 SEGV_MAPERR 000000000000
#0 0x0000023c7f68 [716:716:0109/163613.106505:ERROR:test_root_certs.cc(27)] Can't load certificate /home/pi/chromium/net/data/ssl/certificates/root_ca_cert.pem
[716:716:0109/163613.106761:ERROR:test_root_certs.cc(27)] Can't load certificate /home/pi/chromium/net/data/ssl/certificates/ocsp-test-root.pem
[716:716:0109/163613.106829:ERROR:test_root_certs.cc(27)] Can'
t load certificate /home/pi/chromium/net/data/ssl/certificates/quic-root.pem
aura
::ScreenOzone::GetPrimaryDisplay()
#5 0x000002e03374 base::debug::CollectStackTrace()
#1 0x00000235e9d8 base::debug::StackTrace::StackTrace()
#2 0x0000023c7ee6 aura::ScreenOzone::GetDisplayNearestWindow()
#6 0x000002a34e06 base::debug::(anonymous namespace)::StackDumpSignalHandler()
#3 0x00007651f130 <unknown>
#4 0x0000023907b8 display::Screen::GetDisplayNearestView()
#7 0x000002008e16 base::TaskRunner::PostTask()
#5 0x00000131fc6a ui::DrmThreadMessageProxy::OnAddGraphicsDevice()
#6 0x00000131fb72 content::GetScaleFactorForView()
#8 0x000002059d8e IPC::MessageT<>::Dispatch<>()
#7 0x00000131e7b8 ui::DrmThreadMessageProxy::OnMessageReceived()
#8 0x00000235adea content::RenderWidgetHostImpl::SetupInputRouter()
#9 0x000002059a86 IPC::MessageFilterRouter::TryFilters()
#9 0x000002355fd4 content::RenderWidgetHostImpl::RenderWidgetHostImpl()
#10 0x00000205606e IPC::ChannelProxy::Context::TryFilters()
#10 0x0000030c9d14 content::RenderWidgetHostFactory::Create()
#11 0x000002055f72 content::RenderViewHostFactory::Create()
#12 0x000001f0dfc4 IPC::SyncChannel::SyncContext::OnMessageReceived()
#11 0x00000235538e content::FrameTree::CreateRenderViewHost()
#13 0x000001f4557e IPC::ChannelMojo::OnMessageReceived()
#12 0x000002357a2c content::RenderFrameHostManager::CreateRenderFrameHost()
#14 0x000001f3a82c content::RenderFrameHostManager::Init()
#15 0x0000021034f2 IPC::internal::MessagePipeReader::Receive()
#13 0x00000242c2ae content::WebContentsImpl::Init()
#16 0x0000020fa592 IPC::mojom::ChannelStubDispatch::Accept()
#14 0x00000242fc08 content::WebContentsImpl::CreateWithOpener()
#17 0x0000020fa424 mojo::InterfaceEndpointClient::HandleValidatedMessage()
#15 0x00000242e478 content::WebContents::Create()
#18 0x000002293780 mojo::Connector::DispatchMessage()
#16 0x00000242ea0c content::Shell::CreateNewWindow()
#19 0x0000022947d6 mojo::Connector::ReadAllAvailableMessages()
#17 0x00000242a742 content::ShellBrowserMainParts::InitializeMessageLoopContext()
#20 0x000002294820 mojo::SimpleWatcher::OnHandleReady()
#18 0x000002390c36 content::ShellBrowserMainParts::PreMainMessageLoopRun()
#21 0x000001e42ffc content::BrowserMainLoop::PreMainMessageLoopRun()
#22 0x0000020e0b4e base::TaskAnnotator::RunTask()
#19 0x00000239beb6 content::StartupTaskRunner::RunAllTasksNow()
#23 0x000001e42406 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl()
#20 0x00000239bbd2 content::BrowserMainLoop::CreateStartupTasks()
#24 0x000001e43ed6 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoSomeWork()
#21 0x00000239c20e content::BrowserMainRunnerImpl::Initialize()
#25 0x000001e412fe content::BrowserMain()
#26 0x000001d8cad8 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoSomeWork()
#22 0x0000023d543c content::ContentMainRunnerImpl::RunServiceManager()
#27 0x000001d8c7c6 base::MessagePumpLibevent::Run()
#23 0x00000239c712 content::ContentMainRunnerImpl::Run()
#28 0x00000314f942 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run()
#24 0x00000238275e service_manager::Main()
#29 0x0000014b9982 base::RunLoop::Run()
#25 0x0000023a70e6 content::ContentMain()
#30 0x000000ee3b68 main
#31 0x0000764f8718 __libc_start_main

[end of stack trace]
Calling _exit(1). Core file will not be generated.
base::Thread::ThreadMain()
#26 0x0000023d6f64 base::(anonymous namespace)::ThreadFunc()

[end of stack trace]
Calling _exit(1). Core file will not be generated.

I have attached the output of modetests. I wonder if there is another such executable to test GBM specifically?

Ewan
modetest_output.txt

Maksim Sisov

unread,
Jan 9, 2020, 1:27:36 PM1/9/20
to Ewan Roycroft, Ozone-Dev
Ozone/Gbm is solely developed and tested on chromeOs.

For Linux devices, you can use X11/Wayland. Otherwise, we can’t help you
much. Sorry.
>>> From //out/OzoneARM/args.gn:2 [1]
> --
> To unsubscribe from this group and stop receiving emails from it, send
> an email to ozone-dev+...@chromium.org.
>
>
> Links:
> ------
> [1] http://args.gn:2

--
Best Regards,
Maksim Sisov
0x8F4BE350.asc

Ewan Roycroft

unread,
Jan 10, 2020, 9:47:56 AM1/10/20
to Maksim Sisov, Ozone-Dev
Hi Maksim,

Thanks for this, I have managed to get it running with Wayland now and may look at ChromeOS in future.

Cheers
Ewan

Ewan Roycroft

unread,
Jan 29, 2020, 7:32:16 AM1/29/20
to Ozone-Dev, msi...@igalia.com
Hi all,

I've been trying some different builds of Ozone-GBM in an attempt to get it to run on Raspberry Pi. I've managed to solve some of the errors I was encountering earlier and think I have narrowed the problem down to some missing parts in the VC4 implementation of minigbm.
See my GDB output below:
drv_bo_create_with_modifiers (drv=0xbab2d0, width=width@entry=2048, height=height@entry=1080, format=format@entry=875713112, modifiers=0xbd6e80, modifiers@entry=0x752574fc, count=4, count@entry=7679409) at /home/pi/minigbm/drv.c:290
290                if (!drv->backend->bo_create_with_modifiers) {
(gdb) s
291                        errno = ENOENT;
(gdb) bt
#0  drv_bo_create_with_modifiers (drv=0xbab2d0, width=width@entry=2048, height=height@entry=1080, format=format@entry=875713112, modifiers=0xbd6e80, modifiers@entry=0x752574fc, count=4, count@entry=7679409) at /home/pi/minigbm/drv.c:291
#1  0x76fa26c0 in gbm_bo_create_with_modifiers (gbm=0xb8ed00, width=2048, height=1080, format=875713112, modifiers=0xbd6e80, count=4) at /home/pi/minigbm/gbm.c:171
#2  0x00752db0 in gbm_wrapper::Device::CreateBufferWithModifiers(unsigned int, gfx::Size const&, unsigned int, std::__1::vector<unsigned long long, std::__1::allocator<unsigned long long> > const&) ()
#3  0x00747f7a in ui::ScreenManager::GetModesetBuffer(ui::HardwareDisplayController*, gfx::Rect const&) ()
#4  0x00747b66 in ui::ScreenManager::ModesetController(ui::HardwareDisplayController*, gfx::Point const&, _drmModeModeInfo const&) ()
#5  0x007477de in ui::ScreenManager::ActualConfigureDisplayController(scoped_refptr<ui::DrmDevice> const&, unsigned int, unsigned int, gfx::Point const&, _drmModeModeInfo const&) ()
#6  0x007475f4 in ui::ScreenManager::ConfigureDisplayController(scoped_refptr<ui::DrmDevice> const&, unsigned int, unsigned int, gfx::Point const&, _drmModeModeInfo const&) ()
#7  0x00732b8a in ui::DrmDisplay::Configure(_drmModeModeInfo const*, gfx::Point const&) ()
#8  0x00734512 in ui::DrmGpuDisplayManager::ConfigureDisplay(long long, display::DisplayMode const&, gfx::Point const&) ()
#9  0x00738374 in ui::DrmThread::ConfigureNativeDisplay(long long, std::__1::unique_ptr<display::DisplayMode, std::__1::default_delete<display::DisplayMode> >, gfx::Point const&, base::OnceCallback<void (long long, bool)>) ()
#10 0x0073c728 in base::internal::Invoker<base::internal::BindState<void (ui::DrmThread::*)(long long, std::__1::unique_ptr<display::DisplayMode, std::__1::default_delete<display::DisplayMode> >, gfx::Point const&, base::OnceCallback<void (long long, bool)>), base::internal::UnretainedWrapper<ui::DrmThread>, long long, std::__1::unique_ptr<display::DisplayMode, std::__1::default_delete<display::DisplayMode> >, gfx::Point, base::OnceCallback<void (long long, bool)> >, void ()>::RunOnce(base::internal::BindStateBase*) ()
#11 0x007d4840 in base::TaskAnnotator::RunTask(char const*, base::PendingTask*) ()
#12 0x007dde7c in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::sequence_manager::LazyNow*, bool*) ()
#13 0x007ddc5c in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoSomeWork() ()
#14 0x007de156 in non-virtual thunk to base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoSomeWork() ()
#15 0x0080153a in base::MessagePumpLibevent::Run(base::MessagePump::Delegate*) ()
#16 0x007de5b2 in non-virtual thunk to base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool, base::TimeDelta) ()
#17 0x007d0dba in base::RunLoop::Run() ()
#18 0x007eb6e6 in base::Thread::ThreadMain() ()
#19 0x007ff628 in base::(anonymous namespace)::ThreadFunc(void*) ()
#20 0x76f5c494 in start_thread (arg=0x752583c0) at pthread_create.c:486
#21 0x76be9578 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:73 from /lib/arm-linux-gnueabihf/libc.so.6

It appears that Chromium encounters this problem because, while there is an Intel function i915_bo_create_with_modifiers() in i915.c, there is no equivalent vc4_bo_create_with_modifiers() in vc4.c.
I am trying to understand the differences between implementations of minigbm for different chipsets and wonder what it would take to fill the gaps for VC4.
Are there other versions of Chromium/Ozone that use the minigbm functions that have already been created for the VC4? How do these functions differ from the Intel implementation? Would anyone be able to point me at any documentation that might help with this, or know of any similar development going on for the Raspberry Pi that might be able to fill some of the gaps?

Thanks,
Ewan Roycroft

On Friday, 10 January 2020 14:47:56 UTC, Ewan Roycroft wrote:
Hi Maksim,

Thanks for this, I have managed to get it running with Wayland now and may look at ChromeOS in future.

Cheers
Ewan

    >
    >
    > Links:
    > ------
    > [1] http://args.gn:2
   
    --
    Best Regards,
    Maksim Sisov
   
    --
    To unsubscribe from this group and stop receiving emails from it, send an email to ozone-dev+unsubscribe@chromium.org.
   

rolyan...@gmail.com

unread,
Feb 1, 2020, 6:31:57 PM2/1/20
to Ozone-Dev, msi...@igalia.com
Probably the best people to chat to if you can are the igalia folk https://www.raspberrypi.org/blog/vc4-and-v3d-opengl-drivers-for-raspberry-pi-an-update/

I am trying the same as for the embedded scene the Pi4 is a great bit of kit.
Just been playing with Kodi GBM which works great but also struggling with Chromium Ozone GBM.
Was beginning to wonder about trying the compile minus the minigbm directive and see if it will now pick up MESA GBM as a straw clutch.
    > an email to ozon...@chromium.org.
    >
    >
    > Links:
    > ------
    > [1] http://args.gn:2
   
    --
    Best Regards,
    Maksim Sisov
   
    --
    To unsubscribe from this group and stop receiving emails from it, send an email to ozon...@chromium.org.
   

rolyan trauts

unread,
Feb 2, 2020, 5:49:28 AM2/2/20
to Ozone-Dev
I am a noob at this but yeah thinking that the gn chromium build is building for you host GPU and then you are compiling an external system gbm version.
If you compile with system gmb set = no then I think its compiled as part of the process but not sure how to set the switch so it compiles for vc4 rather than host GPU.

To unsubscribe from this topic, visit https://groups.google.com/a/chromium.org/d/topic/ozone-dev/JEUcj5RFuyw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ozone-dev+...@chromium.org.

Ewan Roycroft

unread,
Feb 3, 2020, 7:08:33 AM2/3/20
to Ozone-Dev, rolyan...@gmail.com
My current builds are done on an Intel machine with the following args:
use_ozone = true
ozone_platform_gbm = true

target_os="chromeos"
target_cpu = "arm"
use_sysroot = true
target_sysroot = "//build/linux/debian_sid_arm-sysroot"

enable_nacl = false
blink_symbol_level = 0

I am then following these instructions to build a native version of minigbm for VC4, replacing libminigbm.so in my build folder:
To unsubscribe from this group and all its topics, send an email to ozon...@chromium.org.
Reply all
Reply to author
Forward
0 new messages