Cluster-gauges (QtWaylandCompositor) start fail
Description
Environment
Activity
Walt Miner September 6, 2019 at 8:36 PM
Close for Halibut 8.0.1 release

Scott Murray September 4, 2019 at 12:44 PM
I believe all the changes to fix this have been merged.

Scott Murray August 29, 2019 at 4:31 PM
I'm looking into this, there are some configuration tweaks needed for the running applications as non-root change in Halibut that have been tied to weston-ini in meta-agl-profile-graphical, so they're missing when building without weston. I think I'm close to a fix.

Zhou Mingying August 29, 2019 at 8:10 AM(edited)
Hi Scott
Thank you for your mention. We have added the display permission to it's config.xml file as bellow( same as apps/agl-cluster-demo-dashboard's config.xml file)
---------
<feature name="urn:AGL:widget:required-permission">
<param name="urn:AGL:permission::public:display" value="required" /> =====> here
<param name="urn:AGL:permission::system:run-by-default" value="required" />
<param name="urn:AGL:permission::public:no-htdocs" value="required" />
</feature>
--------
But it seems not enough because apps/agl-cluster-demo-gauges may need the permission as weston because it will access the bellow resource.
/dev/dri/card0
/dev/input/event0
/dev/input/event1
/dev/input/event2 etc.
So I think there are two methods to resolve this problem
Method 1: make the agl-cluster-demo-gauges's user to display.
weston sets user and group to display in the config file /lib/systemd/system/weston.service
As a AGL application, can we set agl-cluster-demo-gauges's user to display? (which configure file can set the user?)
Method2: add smack rules
we should add rules to access /dev reources, we also can consult the rules added by weston.
The file's do_install_append (file: ../meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init.bbappend)
But it's not enough, we also need to modify the user attribute of /dev/input from input to display.
However, I can not grasp all the effects of the user attribute change,
Can you give me your opinion?

Scott Murray August 27, 2019 at 5:02 PM
I think I mentioned in our meeting at ALS that the cluster-gauges application needs the new display permission added to its config.xml. Not having that causes the problem you're seeing. See:
Details
Details
Assignee

Reporter

add patch 21880 to Halibut8.0.0 , and the application cluster-gauges start failed.
but success on AGL 7.0.2 and can start by run "/var/local/lib/afm/applications/cluster-gauges/1.0-0495ad8-dirty/bin/cluster-gauges" lonely .
the failed message is as bellow
------------
Aug 20 14:20:35 m3ulcb afbd-cluster-gauges@1.0-0495ad8-dirty[3884]: QStandardPaths: wrong ownership on runtime directory /run/platform/display, 0 instead of 1001
Aug 20 14:20:35 m3ulcb afbd-cluster-gauges@1.0-0495ad8-dirty[3884]: Could not open DRM device /dev/dri/card0 (Permission denied)
Aug 20 14:20:35 m3ulcb afbd-cluster-gauges@1.0-0495ad8-dirty[3884]: Could not open DRM device
Aug 20 14:20:35 m3ulcb audit[3884]: ANOM_ABEND auid=4294967295 uid=1001 gid=1001 ses=4294967295 subj=User::App::cluster-gauges pid=3884 comm="cluster-gauges" exe="/var/local/lib/afm/applications/cluster-gauges/1.0-0495ad8-dirty/bin/cluster-gauges" sig=6 res=1
Aug 20 14:20:35 m3ulcb systemd[1]: afm-appli-cluster-gauges--1.0-0495ad8-dirty--main@1001.service: Main process exited, code=killed, status=6/ABRT
Aug 20 14:20:35 m3ulcb systemd[1]: afm-appli-cluster-gauges--1.0-0495ad8-dirty--main@1001.service: Failed with result 'signal'.
------------