iMX6: Kirkstone can't run weston as non-root user

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

iMX6: Kirkstone can't run weston as non-root user

跳至解决方案
535 次查看
rro
Contributor III

Hello,

I am having trouble / am not able to run weston-imx as a non-root user after updating to kirkstone

wayland - 1.20.0-r0
weston - 10.0.1.imx-r0
weston-init - 1.0-r0

I have already found the following posts and commits:

https://community.nxp.com/t5/i-MX-Processors/Kirskstone-Weston-doesn-t-run-as-weston-non-root-user/m...

https://jira.automotivelinux.org/browse/SPEC-546

https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/9135

https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/9871

https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/9135

 

Regarding: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/9871/4/meta-agl/recipes-graphics/wayland/...

Nothing on my iMX6 has the SUBSYSTEM "gpu_class". This rule targets the /dev/galcore device. By changing the SUBSYSTEM to "graphics" I am able to get this rule to trigger, but with no beneficial results.

 

I have "XDG_RUNTIME_DIR=/run/user/1001" and must manually create and chown/chmod this directory to weston or an error is thrown after "systemctl start weston" that this directory doesn't exist. Why is this directory not being created automatically?

After creating, here is the log output

 

Apr 28 17:55:41 imx6 systemd[1]: Starting Weston, a Wayland compositor, as a system service...
Apr 28 17:55:41 imx6 weston[4411]: Date: 2022-04-28 UTC
Apr 28 17:55:41 imx6 weston[4411]: [17:55:41.544] weston 10.0.1
Apr 28 17:55:41 imx6 weston[4411]:                https://wayland.freedesktop.org
Apr 28 17:55:41 imx6 weston[4411]:                Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
Apr 28 17:55:41 imx6 weston[4411]:                Build: lf-5.15.52-2.1.0+
Apr 28 17:55:41 imx6 weston[4411]: [17:55:41.545] Command line: /usr/bin/weston --modules=systemd-notify.so --backend=fbdev-backend.so
Apr 28 17:55:41 imx6 weston[4411]: [17:55:41.545] OS: Linux, 5.15.71+gb344a4b199b0, #1 SMP PREEMPT Thu Dec 14 11:15:05 UTC 2023, armv7l
Apr 28 17:55:41 imx6 weston[4411]: [17:55:41.545] Flight recorder: enabled
Apr 28 17:55:41 imx6 weston[4411]: [17:55:41.545] Using config file '/etc/xdg/weston/weston.ini'
Apr 28 17:55:41 imx6 weston[4411]: [17:55:41.546] Output repaint window is 7 ms maximum.
Apr 28 17:55:41 imx6 weston[4411]: [17:55:41.546] Loading module '/usr/lib/libweston-10/fbdev-backend.so'
Apr 28 17:55:41 imx6 weston[4411]: [17:55:41.559] initializing fbdev backend
Apr 28 17:55:41 imx6 weston[4411]: [17:55:41.559] warning: the fbdev backend is deprecated, please migrate to the DRM backend
Apr 28 17:55:41 imx6 weston[4411]: [17:55:41.564] Trying logind launcher...
Apr 28 17:55:41 imx6 weston[4411]: [17:55:41.565] logind: cannot find systemd session for uid: 1001 -61
Apr 28 17:55:41 imx6 weston[4411]: [17:55:41.565] logind: cannot setup systemd-logind helper error: (No data available), using legacy fallback
Apr 28 17:55:41 imx6 weston[4411]: [17:55:41.565] Trying weston_launch launcher...
Apr 28 17:55:41 imx6 weston[4411]: [17:55:41.565] could not get launcher fd from env
Apr 28 17:55:41 imx6 weston[4411]: [17:55:41.565] Trying direct launcher...
Apr 28 17:55:41 imx6 weston[4411]: [17:55:41.565] fatal: fbdev backend should be run using weston-launch binary, or your system should provide the logind D-Bus API.
Apr 28 17:55:41 imx6 weston[4411]: [17:55:41.565] fatal: failed to create compositor backend
Apr 28 17:55:41 imx6 systemd[1]: weston.service: Main process exited, code=exited, status=1/FAILURE
Apr 28 17:55:41 imx6 systemd[1]: weston.service: Failed with result 'exit-code'.
Apr 28 17:55:41 imx6 systemd[1]: Failed to start Weston, a Wayland compositor, as a system service.

 

 

Regarding all of the changes made over at https://gerrit.automotivelinux.org/

1) Which of these are 100% required for the iMX6?

2) Are these changes present anywhere on official freescale branches? If not, why?

 

Thank you in advance

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
525 次查看
rro
Contributor III

it seems talking myself through the problem here was what I needed

 

My problem was two-fold

1) I had the following line commented out in weston.service

     PAMName=weston-autologin

Putting this back in then gave me the following errors when starting weston

 

Apr 28 18:04:26 imx6 systemd[1]: Starting Weston, a Wayland compositor, as a system service...
Apr 28 18:04:26 imx6 unix_chkpwd[6988]: could not obtain user info (weston)
Apr 28 18:04:26 imx6 systemd[6984]: PAM failed: Authentication service cannot retrieve authentication info
Apr 28 18:04:26 imx6 systemd[6984]: weston.service: Failed to set up PAM session: Operation not permitted
Apr 28 18:04:26 imx6 systemd[6984]: weston.service: Failed at step PAM spawning /usr/bin/weston: Operation not permitted
Apr 28 18:04:26 imx6 systemd[1]: weston.service: Main process exited, code=exited, status=224/PAM
Apr 28 18:04:26 imx6 systemd[1]: weston.service: Failed with result 'exit-code'.
Apr 28 18:04:26 imx6 systemd[1]: Failed to start Weston, a Wayland compositor, as a system service

 

2) This was a result of the weston user being in /etc/passwd, but NOT having an entry in /etc/shadow. Adding an entry to /etc/shadow for the weston user resolved the issue fully

 

/dev/galcore is also assigned to the "video" group per the 10-imx.rules UDEV rule file

在原帖中查看解决方案

0 项奖励
回复
1 回复
526 次查看
rro
Contributor III

it seems talking myself through the problem here was what I needed

 

My problem was two-fold

1) I had the following line commented out in weston.service

     PAMName=weston-autologin

Putting this back in then gave me the following errors when starting weston

 

Apr 28 18:04:26 imx6 systemd[1]: Starting Weston, a Wayland compositor, as a system service...
Apr 28 18:04:26 imx6 unix_chkpwd[6988]: could not obtain user info (weston)
Apr 28 18:04:26 imx6 systemd[6984]: PAM failed: Authentication service cannot retrieve authentication info
Apr 28 18:04:26 imx6 systemd[6984]: weston.service: Failed to set up PAM session: Operation not permitted
Apr 28 18:04:26 imx6 systemd[6984]: weston.service: Failed at step PAM spawning /usr/bin/weston: Operation not permitted
Apr 28 18:04:26 imx6 systemd[1]: weston.service: Main process exited, code=exited, status=224/PAM
Apr 28 18:04:26 imx6 systemd[1]: weston.service: Failed with result 'exit-code'.
Apr 28 18:04:26 imx6 systemd[1]: Failed to start Weston, a Wayland compositor, as a system service

 

2) This was a result of the weston user being in /etc/passwd, but NOT having an entry in /etc/shadow. Adding an entry to /etc/shadow for the weston user resolved the issue fully

 

/dev/galcore is also assigned to the "video" group per the 10-imx.rules UDEV rule file

0 项奖励
回复