Hi Ulf,

I've attached the patches for 2022.1 yocto patches. Now you can run wayland without root user. Let me know how it goes. Varun team can address other issues.

Below is the test results.

PetaLinux 2022.2_dev yocto-ultra96-reva-2022.2 ttyPS0

yocto-ultra96-reva-2022 login: petalinux
You are required to change your password immediately (administrator enforced).
New password:
Retype new password:
[   25.331866] audit: type=1006 audit(1637342388.048:2): pid=829 uid=0 old-auid=4294967295 auid=1001 tty=(none) old-ses=4294967295 ses=1 res=1 [   25.344505] audit: type=1300 audit(1637342388.048:2): arch=c00000b7 syscall=64 success=yes exit=4 a0=8 a1=ffffe11abea0 a2=4 a3=ffffa15be6b0 items=0 ppid=1 pid=829 auid=1001 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=1 comm="(systemd)" exe="/lib/systemd/systemd" key=(null) [   25.371139] audit: type=1327 audit(1637342388.048:2): proctitle="(systemd)"
yocto-ultra96-reva-2022:~$
yocto-ultra96-reva-2022:~$
yocto-ultra96-reva-2022:~$ ls -la /usr/lib/libMali.so.9.0
lrwxrwxrwx    1 root     root            27 Nov 19 17:19 /usr/lib/libMali.so.9.0 -> /usr/lib/x11/libMali.so.9.0
yocto-ultra96-reva-2022:~$
yocto-ultra96-reva-2022:~$ sudo su

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

Password:
yocto-ultra96-reva-2022:/home/petalinux# exit
exit
yocto-ultra96-reva-2022:~$
yocto-ultra96-reva-2022:~$ sudo update-alternatives --install /usr/lib/libMali.so.9.0 libmali /usr/lib/wayland/libMali.so.9.0 90 update-alternatives: Linking /usr/lib/libMali.so.9.0 to /usr/lib/wayland/libMali.so.9.0
yocto-ultra96-reva-2022:~$
yocto-ultra96-reva-2022:~$ sudo systemctl start weston
[  213.454922] audit: type=1006 audit(1637342576.172:3): pid=891 uid=0 old-auid=4294967295 auid=1001 tty=tty7 old-ses=4294967295 ses=2 res=1 [  213.467513] audit: type=1300 audit(1637342576.172:3): arch=c00000b7 syscall=64 success=yes exit=4 a0=8 a1=ffffe11abea0 a2=4 a3=0 items=0 ppid=1 pid=891 auid=1001 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=tty7 ses=2 comm="(weston)" exe="/lib/systemd/systemd" key=(null) [  213.493208] audit: type=1327 audit(1637342576.172:3): proctitle="(weston)"
yocto-ultra96-reva-2022:~$
yocto-ultra96-reva-2022:~$ id petalinux
uid=1001(petalinux) gid=1001(petalinux) groups=1001(petalinux),19(input),29(audio),44(video),988(aie)
yocto-ultra96-reva-2022:~$ export XDG_RUNTIME_DIR=/run/user/1001/
yocto-ultra96-reva-2022:~$ time -p glmark2-es2-wayland
=======================================================
    glmark2 2021.02
=======================================================
    OpenGL Information
    GL_VENDOR:     ARM
    GL_RENDERER:   Mali-400 MP
    GL_VERSION:    OpenGL ES 2.0 "67dc026"
=======================================================
[build] use-vbo=false: FPS: 288 FrameTime: 3.472 ms
[build] use-vbo=true: FPS: 351 FrameTime: 2.849 ms
[texture] texture-filter=nearest: FPS: 402 FrameTime: 2.488 ms
[texture] texture-filter=linear: FPS: 386 FrameTime: 2.591 ms
[texture] texture-filter=mipmap: FPS: 411 FrameTime: 2.433 ms
[shading] shading=gouraud: FPS: 210 FrameTime: 4.762 ms
[shading] shading=blinn-phong-inf: FPS: 214 FrameTime: 4.673 ms
[shading] shading=phong: FPS: 186 FrameTime: 5.376 ms
[shading] shading=cel: FPS: 183 FrameTime: 5.464 ms
[bump] bump-render=high-poly: FPS: 77 FrameTime: 12.987 ms
[bump] bump-render=normals: FPS: 427 FrameTime: 2.342 ms
[bump] bump-render=height: FPS: 353 FrameTime: 2.833 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 118 FrameTime: 8.475 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 54 FrameTime: 18.519 ms
[pulsar] light=false:quads=5:texture=false: FPS: 635 FrameTime: 1.575 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 38 FrameTime: 26.316 ms
[desktop] effect=shadow:windows=4: FPS: 178 FrameTime: 5.618 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 30 FrameTime: 33.333 ms [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 55 FrameTime: 18.182 ms [buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 30 FrameTime: 33.333 ms
[ideas] speed=duration: FPS: 286 FrameTime: 3.497 ms
[jellyfish] <default>: FPS: 154 FrameTime: 6.494 ms
Error: SceneTerrain requires Vertex Texture Fetch support, but GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS is 0
[terrain] <default>: Unsupported
[shadow] <default>: FPS: 130 FrameTime: 7.692 ms
[refract] <default>: FPS: 18 FrameTime: 55.556 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 532 FrameTime: 1.880 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 209 FrameTime: 4.785 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 529 FrameTime: 1.890 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 295 FrameTime: 3.390 ms [function] fragment-complexity=medium:fragment-steps=5: FPS: 145 FrameTime: 6.897 ms [loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 293 FrameTime: 3.413 ms [loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 293 FrameTime: 3.413 ms [loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 293 FrameTime: 3.413 ms
=======================================================
                                  glmark2 Score: 243
=======================================================
real 325.78
user 44.71
sys 21.25
yocto-ultra96-reva-2022:~$
yocto-ultra96-reva-2022:~$ sudo systemctl stop weston
Password:
Warning: Stopping weston.service, but it can still be activated by:
  weston.socket
yocto-ultra96-reva-2022:~$


Thanks,

Sandeep

On 10/27/2022 1:48 PM, Ulf Samuelsson via lists.yoctoproject.org wrote:
Thanks.
I setup
XDG_RUNTIME_DIR=/run/user/2000 # 2000 is uid of our main user.
in /etc/environment
and this is enough to start some test applications like weston-flower without problems
after I have logged in as a user.

I will send my weston.ini hopefully tomorrow.

Since this is the first time I try weston, I may have confused something.

As an example, I’d like an explanation on xwayland.

Best Regards
Ulf Samuelsson
+46 722 427 437

27 okt. 2022 kl. 21:09 skrev Sandeep Gundlupet Raju via lists.yoctoproject.org <[email protected]>:



+ Varun

Hi Ulf,

See my comments below. Varun team can help on MALI libraries and performance questions with respect to wayland or x11.

On 10/27/2022 12:18 PM, Ulf Samuelsson via lists.yoctoproject.org wrote:

Hi,

New to this list,so this is my first post.

We are trying to run Weston/Wayland-9 on an Ultrascale with Petalinux rev2022.1.

Initially we had problems getting Weston running at all, and tried building an x11 image. We got the Weston to work with the fbdev-backend, but performance is abyssmal compared to x11 and we suspect that the drm-backend is the proper one. This crashes however.

$ sudo -E weston-launch -t /dev/tty7 -u <user>  # We do not use 'root'.

[Sandeep]: This is expected in 2022.x Yocto or PetaLinux release but we can investigate on how fix this running as non-root user.

[10:02:26.236] weston 9.0.0
https://wayland.freedesktop.org
               Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
               Build: 9.0.0
[10:02:26.237] Command line: /usr/bin/weston
[10:02:26.237] OS: Linux, 5.15.19-xilinx-v2022.1, #1 SMP Wed Aug 24 06:33:16 UTC 2022, aarch64
[10:02:26.237] Using config file '/etc/xdg/weston/weston.ini'
[10:02:26.237] Output repaint window is 7 ms maximum.
[10:02:26.238] Loading module '/usr/lib/libweston-9/drm-backend.so'
[10:02:26.253] initializing drm backend
[10:02:26.254] logind: failed to get session seat
[10:02:26.254] logind: cannot setup systemd-logind helper (-61), using legacy fallback
[10:02:26.257] using /dev/dri/card0
[10:02:26.257] DRM: supports atomic modesetting
[10:02:26.258] DRM: does not support GBM modifiers
[10:02:26.258] DRM: supports picture aspect ratio
[10:02:26.258] Loading module '/usr/lib/libweston-9/gl-renderer.so'
[10:02:26.259] EGL client extensions: EGL_EXT_client_extensions
               EGL_EXT_platform_base EGL_KHR_platform_gbm
               EGL_KHR_platform_wayland
[10:02:26.260] failed to initialize display
[10:02:26.260] EGL error state: EGL_BAD_ALLOC (0x3003)
[10:02:26.260] failed to initialize egl
[10:02:26.260] fatal: failed to create compositor backend
Internal warning: debug scope 'drm-backend' has not been destroyed.

When I tested with fpdev-backend I can get weston to start. If I disable libmali, it will not start. The libmali is built for wayland, but since all four versions are included in the rootfs, I have tried all four, using update-alternatives without any noticeable performance difference.

Googling today, I found that 'libdbus-1', not having a depency on systemd-login may cause the first error since then it is built without systemd-login support.

While X11 runs faster, it is also on a minimal system without systemd, dbus, udev and other niceties.

Now for some questions:

* Should it be possible to run the drm-backend with Ultrascale?

* Is there a good weston.ini example with drm-backend.so

* Will it have higher performance than the fbdev-backend?

* Is it a problem, not running as 'root'?

* I am running a fullHD screen. Could this be too large? We have 4GB memory in the system.

* Can you determine how much memory weston can use? How?

==================

BTW: https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841928/Xilinx+MALI+driver has a lot of bad links.

--
Best Regards
Ulf Samuelsson







<<attachment: meta-petalinux.zip>>

<<attachment: meta-xilinx.zip>>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5074): 
https://lists.yoctoproject.org/g/meta-xilinx/message/5074
Mute This Topic: https://lists.yoctoproject.org/mt/94610493/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-xilinx/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to