maaxboard mickledore branch chromium(chromium-ozone-wayland) service can NOT auto startup on wayland

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

maaxboard mickledore branch chromium(chromium-ozone-wayland) service can NOT auto startup on wayland

Jump to solution
682 Views
gonewithwind-peter
Senior Contributor I

hi all,
maaxboard mickledore branch chromium(chromium-ozone-wayland) service can NOT auto startup on wayland!
I used zeus branch before, zeus branch worked. before, for zeus branch I posted the solution here
https://community.nxp.com/t5/i-MX-Processors/how-to-write-a-system-service-to-auto-startup-chromium-...
https://community.nxp.com/t5/i-MX-Processors/can-not-auto-startup-chromium-chromium-ozone-wayland/td...

but I am using the same chromium.service file as below in mickledore branch , but not work
I login with ssh or serial debugging port with root user directly to run chromium --no-sandbox. it works! and I put the command chromium --no-sandbox in /etc/profile and login it works. but I put the command line in /etc/rc.local not work
anyway I need to auto startup, any solutions are OK for me, but not found

[Unit]
Description=launch chromium

[Service]
User=root
Environment=DISPLAY=:0
Environment=XDG_RUNTIME_DIR="/run/user/0"
Type=oneshot
ExecStart=/bin/sleep 9
ExecStart=/home/myuser/mouse.out &
ExecStart=/usr/bin/chromium --no-sandbox --disable-infobars --user-data-dir=/tmp/chromium --gpu-no-context-lost --enable-gpu-rasterization --start-fullscreen --kiosk --no-first-run --incognito http://localhost:3300/iframe.html &

[Install]
WantedBy=multi-user.target

I ran systemctl status chromium, the error oputput is
chromium.service - launch chromium
Loaded: loaded (/etc/systemd/system/chromium.service; enabled; preset: disabled)
Active: failed (Result: exit-code) since Thu 2024-11-21 23:01:07 UTC; 1min 11s ago
Process: 287 ExecStart=/bin/sleep 9 (code=exited, status=0/SUCCESS)
Process: 653 ExecStart=/home/myuser/mouse.out & (code=exited, status=0/SUCCESS)
Process: 719 ExecStart=/usr/bin/chromium --no-sandbox --disable-infobars --user-data-dir=/tmp/chromium --gpu-no-context-lost --enable-gpu-rasterization --start-fullscreen --kiosk --no-first-run --in)
Main PID: 719 (code=exited, status=1/FAILURE)

Nov 21 23:00:51 maaxboard systemd[1]: Starting launch chromium...
Nov 21 23:01:07 maaxboard chromium[723]: [719:719:1121/230107.465704:ERROR:wayland_connection.cc(209)] Failed to connect to Wayland display
Nov 21 23:01:07 maaxboard chromium[723]: [719:719:1121/230107.465925:ERROR:ozone_platform_wayland.cc(226)] Failed to initialize Wayland platform
Nov 21 23:01:07 maaxboard chromium[723]: [719:719:1121/230107.465963:ERROR:env.cc(225)] The platform failed to initialize. Exiting.
Nov 21 23:01:07 maaxboard systemd[1]: chromium.service: Main process exited, code=exited, status=1/FAILURE
Nov 21 23:01:07 maaxboard systemd[1]: chromium.service: Failed with result 'exit-code'.
Nov 21 23:01:07 maaxboard systemd[1]: Failed to start launch chromium.

any help?
Thank you very much.

I also posted the issue here:  https://github.com/Avnet/meta-maaxboard/issues/11

0 Kudos
Reply
1 Solution
658 Views
gonewithwind-peter
Senior Contributor I

changed chromium.service to below , It works

cat chromium.service
[Unit]
Description=launch chromium
After=weston.service
Requires=weston.service
[Service]
User=root
Environment=XDG_RUNTIME_DIR="/run/user/0"
Environment="WAYLAND_DISPLAY=/run/wayland-0"
Type=oneshot
#ExecStart=/bin/sleep 9
ExecStart=/home/myuser/mouse.out &
ExecStart=/usr/bin/chromium --no-sandbox --disable-infobars --user-data-dir=/tmp/chromium --gpu-no-context-lost --enable-gpu-rasterization --start-fullscreen --kiosk --no-first-run --incognito http://localhost:3300/iframe.html &

[Install]
WantedBy=multi-user.target

View solution in original post

2 Replies
659 Views
gonewithwind-peter
Senior Contributor I

changed chromium.service to below , It works

cat chromium.service
[Unit]
Description=launch chromium
After=weston.service
Requires=weston.service
[Service]
User=root
Environment=XDG_RUNTIME_DIR="/run/user/0"
Environment="WAYLAND_DISPLAY=/run/wayland-0"
Type=oneshot
#ExecStart=/bin/sleep 9
ExecStart=/home/myuser/mouse.out &
ExecStart=/usr/bin/chromium --no-sandbox --disable-infobars --user-data-dir=/tmp/chromium --gpu-no-context-lost --enable-gpu-rasterization --start-fullscreen --kiosk --no-first-run --incognito http://localhost:3300/iframe.html &

[Install]
WantedBy=multi-user.target

421 Views
Asadeds
Contributor II
that's a great achievement, could you please let me know , which board you are using, and how you activate the GPU support for this board
0 Kudos
Reply