maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   Flatpak on Sailfish OS (https://talk.maemo.org/showthread.php?t=100909)

coderus 2020-02-29 11:28

Re: Flatpak on Sailfish OS
 
Just installed flatpak to my XA2
Code:

[nemo@Sailfish ~]$ flatpak-runner org.kde.mobile.angelfish
Starting: org.kde.mobile.angelfish
[D] unknown:0 - Using Wayland-EGL
Wayland socket: ../../display/wayland-1
WAYLAND_DISPLAY="../../display/wayland-1" FLATPAK_MALIIT_CONTAINER_DBUS="unix:abstract=/tmp/dbus-hxDgBBD9wQ,guid=aabaee73b085b4a4461ed6015e5a4a22" flatpak run --env=QT_WAYLAND_FORCE_DPI=289 --filesystem=/system:ro --filesystem=/vendor:ro --filesystem=/odm:ro --device=all --talk-name=org.maliit.server --env=QTWEBENGINE_CHROMIUM_FLAGS=--disable-gpu-compositing --num-raster-threads=1 --enable-viewport --disable-composited-antialiasing --env=QTWEBENGINE_DISABLE_GPU_THREAD=1 --env=QT_QUICK_CONTROLS_MOBILE=1 --env=QT_QUICK_CONTROLS_STYLE=Plasma --env=HYBRIS_EGLPLATFORM_DIR=/usr/lib/arm-linux-gnueabihf/GL/host/lib/libhybris --env=HYBRIS_LINKER_DIR=/usr/lib/arm-linux-gnueabihf/GL/host/lib/libhybris/linker --env=HYBRIS_LD_LIBRARY_PATH=/usr/lib/arm-linux-gnueabihf/GL/host/libexec/droid-hybris/system/lib:/usr/libexec/droid-hybris/system/lib:/vendor/lib:/system/lib --env=LD_LIBRARY_PATH=/usr/lib/arm-linux-gnueabihf/GL/host/lib org.kde.mobile.angelfish
[D] onCompleted:424 - Warning: specifying an object instance for initialPage is sub-optimal - prefer to use a Component
[W] unknown:52 - file:///usr/share/flatpak-runner/qml/main.qml:52:26: Unable to assign [undefined] to bool

i see window with angelfish logo, spinning busyindicator, and nothing happens

rinigus 2020-02-29 11:50

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by coderus (Post 1565778)
Just installed flatpak to my XA2
Code:

[nemo@Sailfish ~]$ flatpak-runner org.kde.mobile.angelfish
Starting: org.kde.mobile.angelfish
[D] unknown:0 - Using Wayland-EGL
Wayland socket: ../../display/wayland-1
WAYLAND_DISPLAY="../../display/wayland-1" FLATPAK_MALIIT_CONTAINER_DBUS="unix:abstract=/tmp/dbus-hxDgBBD9wQ,guid=aabaee73b085b4a4461ed6015e5a4a22" flatpak run --env=QT_WAYLAND_FORCE_DPI=289 --filesystem=/system:ro --filesystem=/vendor:ro --filesystem=/odm:ro --device=all --talk-name=org.maliit.server --env=QTWEBENGINE_CHROMIUM_FLAGS=--disable-gpu-compositing --num-raster-threads=1 --enable-viewport --disable-composited-antialiasing --env=QTWEBENGINE_DISABLE_GPU_THREAD=1 --env=QT_QUICK_CONTROLS_MOBILE=1 --env=QT_QUICK_CONTROLS_STYLE=Plasma --env=HYBRIS_EGLPLATFORM_DIR=/usr/lib/arm-linux-gnueabihf/GL/host/lib/libhybris --env=HYBRIS_LINKER_DIR=/usr/lib/arm-linux-gnueabihf/GL/host/lib/libhybris/linker --env=HYBRIS_LD_LIBRARY_PATH=/usr/lib/arm-linux-gnueabihf/GL/host/libexec/droid-hybris/system/lib:/usr/libexec/droid-hybris/system/lib:/vendor/lib:/system/lib --env=LD_LIBRARY_PATH=/usr/lib/arm-linux-gnueabihf/GL/host/lib org.kde.mobile.angelfish
[D] onCompleted:424 - Warning: specifying an object instance for initialPage is sub-optimal - prefer to use a Component
[W] unknown:52 - file:///usr/share/flatpak-runner/qml/main.qml:52:26: Unable to assign [undefined] to bool

i see window with angelfish logo, spinning busyindicator, and nothing happens

It depends on whether you have libhybris version >= 0.0.5.34 on XA2. Unless it's some kind of development device with future SFOS version running on it, you are out luck on XA2. Hopefully, next SFOS release will include that libhybris.

As for spinning disk, logo and absence of action. Don't forget that we have SFOS app (flatpak-runner) which starts first, then flatpak app is started with Wayland display pointing to the display created by flatpak-runner. Hence, spinning disk is just provided by flatpak-runner itself. I guess in XA2 case, it gets stuck with some hybris trouble and never finishes the flatpak process.

coderus 2020-03-01 08:18

Re: Flatpak on Sailfish OS
 
i have 0.0.5.34 on my XA2

what can be debugged?

rinigus 2020-03-01 10:59

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by coderus (Post 1565798)
i have 0.0.5.34 on my XA2

what can be debugged?

OK, then something is broken. As we seem to have AOSP9 devices (Sony Tama family and Pro1?) working so far, maybe its due to the other base.

Let's start with the simple test (assuming that all got installed and you did reboot after that):

Code:

flatpak run --command=sh org.kde.mobile.angelfish
That should bring you to the command prompt. As its not depending on hybris, it will show if the flatpak is running at all.

I wonder if you run flatpak-runner without any arguments (just from launcher) to initialize hybris extension? It is maybe easy to miss in the instructions.

If flatpak is working (shell in it is accessible), flatpak-runner has generated extension (ls -l ~/.local/share/flatpak/extension/org.freedesktop.Platform.GL.host), then we probably miss somethin in extension.

Check whether I miss any filesystem that should be there for libhybris in https://github.com/sailfishos-flatpa...runner.cpp#L83 for your device.

Next, we can run strace on angelfish and see where it breaks. For that, install Sdk:

Code:

flatpak install --user org.kde.Sdk//5.14
Then close flatpak-runner and let's start with the plain flatpak for simplicity (windows minimization will not work, but its not a problem as we don't have any window to start with). Command line is based on what flatpak-runner is composing and showing you in its terminal output as well as addition of -d --command=sh to get into development env

Code:

flatpak run --env=QT_WAYLAND_FORCE_DPI=335 --filesystem=/system:ro --filesystem=/vendor:ro --filesystem=/odm:ro --device=all --talk-name=org.maliit.server --env=QTWEBENGINE_CHROMIUM_FLAGS="--disable-gpu-compositing --num-raster-threads=1 --enable-viewport --disable-composited-antialiasing" --env=QTWEBENGINE_DISABLE_GPU_THREAD=1 --env=QT_QUICK_CONTROLS_MOBILE=1 --env=QT_QUICK_CONTROLS_STYLE=Plasma --env=HYBRIS_EGLPLATFORM_DIR=/usr/lib/arm-linux-gnueabihf/GL/host/lib/libhybris --env=HYBRIS_LINKER_DIR=/usr/lib/arm-linux-gnueabihf/GL/host/lib/libhybris/linker --env=HYBRIS_LD_LIBRARY_PATH=/usr/lib/arm-linux-gnueabihf/GL/host/libexec/droid-hybris/system/lib:/usr/libexec/droid-hybris/system/lib:/vendor/lib:/system/lib --env=LD_LIBRARY_PATH=/usr/lib/arm-linux-gnueabihf/GL/host/lib --command=sh -d org.kde.mobile.angelfish
In Flatpak environment, check if you can get any useful info from strace:

Code:

strace /app/bin/angelfish
Hopefully, strace will get stuck on some hybris call.

coderus 2020-03-01 13:15

Re: Flatpak on Sailfish OS
 
GL was generated after install then rebooted, shell works okay

not sure what to do with filesystems?

strace is full of ENOENT: https://gist.github.com/CODeRUS/add4...c89520736ab9e9

rinigus 2020-03-01 13:55

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by coderus (Post 1565811)
GL was generated after install then rebooted, shell works okay

not sure what to do with filesystems?

strace is full of ENOENT: https://gist.github.com/CODeRUS/add4...c89520736ab9e9

As long as it finds library later, ENOENT is OK.

Looks like something is off with egl:

Code:

writev(6, [{iov_base="\0\7\0w\264[^\327C+!", iov_len=11}, {iov_base="\5", iov_len=1}, {iov_base="libEGL\0", iov_len=7}, {iov_base="eglInitialize(0x3726b78) failed "..., iov_len=48}], 4) = 67
Anything relevant in dmesg/journal?

As for filesystems, which ones are mounted on device? (df)

coderus 2020-03-01 15:31

Re: Flatpak on Sailfish OS
 
both journal and dmesg are silent.

Code:

[nemo@Sailfish ~]$ df
Filesystem          1K-blocks      Used Available Use% Mounted on
/dev/sailfish/root    2488624  1366160  1080532  56% /
devtmpfs              1263452      312  1263140  0% /dev
tmpfs                  1351608        0  1351608  0% /dev/shm
tmpfs                  1351608    21356  1330252  2% /run
tmpfs                  1351608        0  1351608  0% /sys/fs/cgroup
tmpfs                  1351608        8  1351600  0% /tmp
tmpfs                  1351608        0  1351608  0% /mnt
/dev/mmcblk0p71        840320    276924    538772  34% /opt
/dev/mmcblk0p68        380360    211172    156900  57% /odm
/dev/mmcblk0p42        112592    97936    14656  87% /firmware
/dev/mmcblk0p40          65488      496    64992  1% /bt_firmware
/dev/mmcblk0p2          28144      444    27048  2% /persist
/dev/mmcblk0p44          12016      7484      4208  64% /dsp
/dev/mapper/sailfish-home
                      18131468  4322680  13612804  24% /home
tmpfs                  270324      820    269504  0% /run/user/100000
/dev/mmcblk1p1        15549952      8128  15541824  0% /run/media/nemo/3334-3431


rinigus 2020-03-01 18:38

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by coderus (Post 1565819)
both journal and dmesg are silent.

Code:

[nemo@Sailfish ~]$ df
Filesystem          1K-blocks      Used Available Use% Mounted on
/dev/sailfish/root    2488624  1366160  1080532  56% /
devtmpfs              1263452      312  1263140  0% /dev
tmpfs                  1351608        0  1351608  0% /dev/shm
tmpfs                  1351608    21356  1330252  2% /run
tmpfs                  1351608        0  1351608  0% /sys/fs/cgroup
tmpfs                  1351608        8  1351600  0% /tmp
tmpfs                  1351608        0  1351608  0% /mnt
/dev/mmcblk0p71        840320    276924    538772  34% /opt
/dev/mmcblk0p68        380360    211172    156900  57% /odm
/dev/mmcblk0p42        112592    97936    14656  87% /firmware
/dev/mmcblk0p40          65488      496    64992  1% /bt_firmware
/dev/mmcblk0p2          28144      444    27048  2% /persist
/dev/mmcblk0p44          12016      7484      4208  64% /dsp
/dev/mapper/sailfish-home
                      18131468  4322680  13612804  24% /home
tmpfs                  270324      820    269504  0% /run/user/100000
/dev/mmcblk1p1        15549952      8128  15541824  0% /run/media/nemo/3334-3431


Doesn't look from your strace that the missing mounts are missed. I am pretty much blank at this point. Maybe we can learn from comparison with some Sailfish app strace when its started.

I presume that the window of Angelfish did not appear in your test.

Also, maybe some folder needs to be exported in / . Is there anything obvious there?

As for no records in dmesg and journal - I wonder where do those writes with egl failed go (https://gist.github.com/CODeRUS/add4...r-strace-L9132)

Let's get the strace and ask for help in the porters channel. Maybe someone has an idea on what's wrong with XA2 setup.

coderus 2020-03-01 20:50

Re: Flatpak on Sailfish OS
 
got this from /system/bin/logcat:
Code:

03-01 20:50:12.930  7981    5 D vndksupport: Loading /vendor/lib/hw/gralloc.default.so from current namespace instead of sphal namespace.
03-01 20:50:12.931  7981    5 E cutils-trace: Error opening trace file: No such file or directory (2)
03-01 20:50:12.931  7981    5 D vndksupport: Loading /vendor/lib/egl/libEGL_adreno.so from current namespace instead of sphal namespace.
03-01 20:50:12.932  7981    5 D libEGL  : loaded /vendor/lib/egl/libEGL_adreno.so
03-01 20:50:12.938  7981    5 D vndksupport: Loading /vendor/lib/egl/libGLESv1_CM_adreno.so from current namespace instead of sphal namespace.
03-01 20:50:12.939  7981    5 D libEGL  : loaded /vendor/lib/egl/libGLESv1_CM_adreno.so
03-01 20:50:12.952  7981    5 D vndksupport: Loading /vendor/lib/egl/libGLESv2_adreno.so from current namespace instead of sphal namespace.
03-01 20:50:12.952  7981    5 D libEGL  : loaded /vendor/lib/egl/libGLESv2_adreno.so
03-01 20:50:12.969  7981    5 I Adreno  : QUALCOMM build                  : 1dcb581, I26dffed9a4
03-01 20:50:12.969  7981    5 I Adreno  : Build Date                      : 01/10/18
03-01 20:50:12.969  7981    5 I Adreno  : OpenGL ES Shader Compiler Version: EV031.22.00.01
03-01 20:50:12.969  7981    5 I Adreno  : Local Branch                    :
03-01 20:50:12.969  7981    5 I Adreno  : Remote Branch                    : refs/tags/AU_LINUX_ANDROID_LA.UM.6.4.R1.08.00.00.309.049
03-01 20:50:12.969  7981    5 I Adreno  : Remote Branch                    : NONE
03-01 20:50:12.969  7981    5 I Adreno  : Reconstruct Branch              : NOTHING
03-01 20:50:12.969  7981    5 D vndksupport: Loading /vendor/lib/hw/gralloc.default.so from current namespace instead of sphal namespace.
03-01 20:50:12.969  7981    5 I Adreno  : OpenGrallocModuleAndDevice: Failed to open the Gralloc device, error: -22
03-01 20:50:12.969  7981    5 W libEGL  : eglInitialize(0xbc110e8) failed (EGL_BAD_ALLOC)


rinigus 2020-03-02 06:38

Re: Flatpak on Sailfish OS
 
@coderus: thank you very much, at least some error message. I should have remembered about logcat...


All times are GMT. The time now is 09:01.

vBulletin® Version 3.8.8