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-04-09 16:25

Re: Flatpak on Sailfish OS
 
seems angelfish is not built for i386. can you build it please? want to try on my Jolla Tablet.

same for keyboard plugin. telegram installed and starting fine

rinigus 2020-04-09 16:55

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by coderus (Post 1566737)
seems angelfish is not built for i386. can you build it please? want to try on my Jolla Tablet.

same for keyboard plugin. telegram installed and starting fine

The problem is that KDE 5.14 platform has i386 discontinued (5.12 is fine). So, you have to build it yourself by changing https://invent.kde.org/kde/plasma-an...elfish.json#L4 to 5.12. Same goes for Maliit plugin - cannot build it against discontinued platform/arch combo.

Shift to 5.14 came as Plasma is moving to 5.14 by default.

Building is not difficult, you have to install platforms+SDK with correct arch on your PC and then use flatpak-builder.

rinigus 2020-04-09 16:57

Re: Flatpak on Sailfish OS
 
In addition there were few other changes as well. Better use https://invent.kde.org/kde/plasma-an...angelfish.json

rinigus 2020-04-09 17:18

Re: Flatpak on Sailfish OS
 
@Nekron: I checked the loaded libs and they seem to be the same for Flatpak and SFOS native. So, can't tell on the basis of that and its not why Xperia X is slower than XA2

try to run

flatpak-runner org.kde.mobile.angelfish chrome://gpu

(until corresponding issue is fixed, have to start new angelfish for it). I have HW accelerated canvas, flash and few others (not all). compare X and XA2 and see if there is some major difference.

vbelloir 2020-04-09 17:21

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by rinigus (Post 1564143)
Due to QtWayland limitations, only Qt/QML applications run well with Gdk apps refusing to start due to the absence of currently standard Wayland extensions.

Is there a way to know on flathub which app is designed with QT/QML. It is not clear for me.

For example, nothing about than on
https://flathub.org/apps/details/org.telegram.desktop

rinigus 2020-04-09 17:26

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by vbelloir (Post 1566741)
Is there a way to know on flathub which app is designed with QT/QML. It is not clear for me.

For example, nothing about than on
https://flathub.org/apps/details/org.telegram.desktop

No, not visually shown on Flathub. you have to dig into the app source

vbelloir 2020-04-09 17:28

Re: Flatpak on Sailfish OS
 
Ok, thanks.

coderus 2020-04-09 17:33

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by rinigus (Post 1566738)
The problem is that KDE 5.14 platform has i386 discontinued (5.12 is fine). So, you have to build it yourself by changing https://invent.kde.org/kde/plasma-an...elfish.json#L4 to 5.12. Same goes for Maliit plugin - cannot build it against discontinued platform/arch combo.

Shift to 5.14 came as Plasma is moving to 5.14 by default.

Building is not difficult, you have to install platforms+SDK with correct arch on your PC and then use flatpak-builder.

which arch is available then? 486? what is the limit really?

rinigus 2020-04-09 17:49

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by coderus (Post 1566744)
which arch is available then? 486? what is the limit really?

good questions. i386 was available for org.freedesktop.Platform 18.08 (used by KDE 5.12), not 19.08 (used by KDE 5.14). available arches are x86_64, arm, aarch64. They plan to discontinue ARM for the next platform, so we better get ready for running AARCH64 or to start compiling our own Flatpaks for ARM. Security updates for 19.08 will be done for some time, will stop in 2021 Aug (I think).

Why they drop platforms I don't know. Please feel free to ping them around on IRC (#freedesktop-sdk) or find the issue tracker and complain. I am somewhat tired of doing complaining and asking there :( [as I did regarding i386 and ARM already; don't remember where was issue tracker]

rinigus 2020-04-09 18:20

Re: Flatpak on Sailfish OS
 
Question to those who know about web:

When I open TMO in Sailfish browser, the page is shown in full width. Not very readable, but all is there and we can zoom as we need. Same with Chrome on Android.

In Angelfish, I get it shown with readable fonts, but only part of it. Same is if I use Chrome or Firefox on desktop.

Hence the question, is it a bug on Angelfish or web site side? If it's Angelfish, any idea how to fix it?

coderus 2020-04-09 19:18

Re: Flatpak on Sailfish OS
 
1 Attachment(s)
speaking of architectures... how does flatpak detects default target architecture?

my tablet kernel arch is x86_64, so i installed org.kde.mobile.angelfish/x86_64 and it works just fine, but navigation bar is blank.

angelfish log from tablet: https://gist.github.com/CODeRUS/f8dc...8897f4c54a1c85

then!

i opened xa2 which have aarch64 kernel, so i removed arm angelfish, and tried to install aarch64 one, but its not available
then i installed org.telegram.desktop/aarch64 but it's failing to start with syscall error: https://gist.github.com/CODeRUS/49bf...3f121229f3c02b

mosen 2020-04-09 20:28

Re: Flatpak on Sailfish OS
 
Regarding Website layouts my guess is the user-agent setting in anglefish to request mobile site layouts needs to be tinkered with?

The topic is mentioned in the preliminary roadmap:
https://github.com/KDE/plasma-angelfish

rinigus 2020-04-09 20:29

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by mosen (Post 1566752)
Regarding Website layouts my guess is the user-agent setting in anglefish to request mobile site layouts needs to be tinkered with?

The topic is mentioned in the preliminary roadmap:
https://github.com/KDE/plasma-angelfish

Do we have mobile layout for TMO? As for mobile layout setting, that should work for Angelfish already. At least works on other sites...

mosen 2020-04-09 20:37

Re: Flatpak on Sailfish OS
 
Did not realize you talked about TMO only.
No, no mobile view. Only this quasi responsive menu wrap if the page gets to small.

rinigus 2020-04-09 20:45

Re: Flatpak on Sailfish OS
 
@coderus, lovely headache before going to sleep!

I don't know how it does it. I have though that to run AARCH64, I will have to have flatpak binaries compiled in the same arch. And then you could maybe go down (64bit -> 32bit). Which you absolutely tanked with i386 example (tablet flatpak exec in 32 bit, runs 64 bit packages).

Maybe in ARM its trickier. I get the same syscall failure when running

flatpak run --command=sh org.kde.Platform/aarch64

on XZ2. We could try to look into it further by finding where it fails specifically (seems like in https://github.com/flatpak/flatpak/b.../flatpak-run.c). Let's see if I can check it out tomorrow...

But even if we make it run, we will get into trouble with libhybris as its 32 bit and cannot provide GL drivers for 64 bit AARCH64. Or do I miss something?

coderus 2020-04-09 21:09

Re: Flatpak on Sailfish OS
 
this is to be discussed with adaptation devs

coderus 2020-04-10 07:33

Re: Flatpak on Sailfish OS
 
tested some kde apps. usable ones:
org.kde.kolourpaint
org.kde.kreversi
org.kde.minuet
org.kde.ksudoku
org.kde.ksquares
org.kde.khangman
org.kde.kmines
org.kde.gcompris

fooxl 2020-04-10 07:45

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by rinigus (Post 1566733)
Sounds like its an issue with 3.3 and flatpak-runner. See earlier messages in this thread and try to remove setuid for flatpak-bwrap. Seems that it helps with crashes.

Thanks, this helped.

rinigus 2020-04-10 09:49

Re: Flatpak on Sailfish OS
 
coderus, I have made a devel version for flatpak which would not fail at https://github.com/flatpak/flatpak/b...ak-run.c#L2753 and then we get AARCH64 applications running as well.

Failing syscall is SCMP_SYS(migrate_pages)

tested on Pure Maps as its available on aarch64. Its slow, no hardware acceleration, that I have to ask about in the porters channel. Had to run directly, without flatpak-runner. The latter messed up something, will have to look into it later.

Angelfish does not have aach64 since its an issue with their infrastructure used for KDE flatpaks.

But all in all, aarch64 maybe available and usable if we get hybris working on it. Will have to file bug regarding migrate_pages though.

carmenfdezb 2020-04-10 09:59

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by coderus (Post 1566762)
tested some kde apps. usable ones:
org.kde.kolourpaint
org.kde.kreversi
org.kde.minuet
org.kde.ksudoku
org.kde.ksquares
org.kde.khangman
org.kde.kmines
org.kde.gcompris

I've tested Kodi in Jolla Tablet and it works, but videos are played slow.

taixzo 2020-04-10 13:13

Re: Flatpak on Sailfish OS
 
With the latest Firefox 75, it is now built for Flatpak. Any possibility of being able to run it on SFOS? I'm not sure whether it's GDK or QT or something else.

rinigus 2020-04-10 13:37

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by taixzo (Post 1566772)
With the latest Firefox 75, it is now built for Flatpak. Any possibility of being able to run it on SFOS? I'm not sure whether it's GDK or QT or something else.

you could always try, nothing will crash if its not working. but I expect that its for x86_64 only and I don't know their wayland status. I am sure its GDK as well

coderus 2020-04-10 14:44

Re: Flatpak on Sailfish OS
 
it uses org.gnome.Platform and failed with:
Code:

(firefox:4): Gdk-WARNING **: 17:43:24.967: The Wayland compositor does not provide any supported shell interface, not using Wayland display

coderus 2020-04-10 15:39

Re: Flatpak on Sailfish OS
 
can we build newer wayland to /opt and use it? :D

rinigus 2020-04-10 16:51

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by coderus (Post 1566775)
can we build newer wayland to /opt and use it? :D

wayland was supposed to be up to date. its qtwayland that is an issue. in theory (read I don't want to do it), it's probably possible to have wayland composer displayed on flatpak-runner QML item (through openGL, maybe) which is some current one. as some gtk based one. but, even if possible, its a lot of work and that will all be wasted as soon as we have newer qt. as with newer qt, it should be way easier to make such composer using its qtwayland.

coderus 2020-04-10 17:13

Re: Flatpak on Sailfish OS
 
we have a whole year to waste our time here :)

LouisDK 2020-04-11 11:39

Re: Flatpak on Sailfish OS
 
I managed to install flatpak on my Jolla C running 3.3.0.14 after running "zypper ref -f"

I then after rebooting activated the kdeapps and flatpak repos as described here: https://github.com/sailfishos-flatpak/main

Then I install angelfish, but when I try to run the app I get a message on the screen saying "Angelfish (Nightly) Application finished with exit code 1"

Shell output:
Code:

[nemo@host ~]$ 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-e4MC4yMLaS,guid=a8c12e36fb6c7a3600936b0f5e91ab2c" flatpak run --env=QT_WAYLAND_FORCE_DPI=293 --filesystem=/system:ro --filesystem=/vendor: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:53 - file:///usr/share/flatpak-runner/qml/main.qml:53:26: Unable to assign [undefined] to bool
bwrap: Creating new namespace failed: Invalid argument
error: ldconfig failed, exit status 256
[D] expression for onExit:59 - Skipping quit as it will hang the window. Proper exit is needed
^C
[nemo@host ~]$

Same story with Dolphin. Any ideas on how to get past this?

rinigus 2020-04-11 12:03

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by LouisDK (Post 1566782)
I managed to install flatpak on my Jolla C running 3.3.0.14 after running "zypper ref -f"

I then after rebooting activated the kdeapps and flatpak repos as described here: https://github.com/sailfishos-flatpak/main

Then I install angelfish, but when I try to run the app I get a message on the screen saying "Angelfish (Nightly) Application finished with exit code 1"

Shell output:
Code:

[nemo@host ~]$ 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-e4MC4yMLaS,guid=a8c12e36fb6c7a3600936b0f5e91ab2c" flatpak run --env=QT_WAYLAND_FORCE_DPI=293 --filesystem=/system:ro --filesystem=/vendor: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:53 - file:///usr/share/flatpak-runner/qml/main.qml:53:26: Unable to assign [undefined] to bool
bwrap: Creating new namespace failed: Invalid argument
error: ldconfig failed, exit status 256
[D] expression for onExit:59 - Skipping quit as it will hang the window. Proper exit is needed
^C
[nemo@host ~]$

Same story with Dolphin. Any ideas on how to get past this?

Looks like kernel does not support namespaces. If its newer than 3.5, complain to Jolla to enable it.

rinigus 2020-04-11 12:06

Re: Flatpak on Sailfish OS
 
PS: Maybe there is something else which is needed from kernel, I am not sure.

mattiviljanen 2020-04-12 09:45

Re: Flatpak on Sailfish OS
 
First of all, thanks for your hard work and help!

I finally managed to get Angelfish runnin on my Sony Xperia Z3 Compact Tablet with SFOS 3.3.0.14 EA. I get a lot of `gpg-connect-agent` messages during package installation, but it seems to work anyway.

I had to remove the setuid bit from `/usr/libecex/flatpak-bwrap` for installing Anglefish to workaround the rebooting issue, and I had to re-enable it actually starting it - and boy does it run well!

@LouisDK If you disabled the setuid bit, did you re-enable it after installation? If it's disabled Angelfish exits with error code 1, at least on my device.

rinigus 2020-04-12 13:07

Re: Flatpak on Sailfish OS
 
Flatpak Runner has been updated to include translations. Thank you everyone working on it!

carmenfdezb 2020-04-12 19:12

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by rinigus (Post 1566799)
Flatpak Runner has been updated to include translations. Thank you everyone working on it!

Hi @rinigus!
Thank you for the update! I've installed it but translation files are missing

rinigus 2020-04-12 21:00

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by carmenfdezb (Post 1566804)
Hi @rinigus!
Thank you for the update! I've installed it but translation files are missing

Forgot to add required dependency - 0.8.2 should fine. Thanks for reporting!

carmenfdezb 2020-04-12 21:33

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by rinigus (Post 1566807)
Forgot to add required dependency - 0.8.2 should fine. Thanks for reporting!

Thank you, now it works :)

mattiviljanen 2020-04-13 06:27

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by rinigus (Post 1566799)
Flatpak Runner has been updated to include translations. Thank you everyone working on it!

Just added Finnish translation!

eson 2020-04-13 06:53

Re: Flatpak on Sailfish OS
 
Updated both sailfish-runner and Angelfish and it still works with no problem, even though Angelfish is/was a bit laggy. I guess that is expected from an "old" Xperia X.

rinigus 2020-04-13 07:14

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by eson (Post 1566812)
Updated both sailfish-runner and Angelfish and it still works with no problem, even though Angelfish is/was a bit laggy. I guess that is expected from an "old" Xperia X.

It is bit laggy, surely when compared to Sailfish Browser. That seems to be on all devices. As for X, we didn't find anything out of ordinary - its as accelerated as others.

Note that its relatively experimental platform - Wayland and Android based device. See https://bugreports.qt.io/browse/QTBUG-82423 . So, some optimizations may help us in future

magic cucumber 2020-04-14 08:25

Re: Flatpak on Sailfish OS
 
1 Attachment(s)
Hello,
many thanks for your useful work. I had tried install falkon browser as well. It seems it works well surprisingly. Falkon has no mobile friendly UI I know. But it is feature rich relatively (adblock, extensions). Browsing is smooth no lags there.

When I installed telegram it says "Aplication finished with exit code 134 (I inserted QT_QPA_PLATFORM=wayland already). Nowadays angelfish is much better solution than damned Jolla browser :p

defactofactotum 2020-04-14 09:23

Re: Flatpak on Sailfish OS
 
I installed Flatpak on my XA2ultra SF3.3...and then Telegram Desktop but both from app grid and terminal I get the message "app finished with exit code 134". I added the env variable for wayland. Has anyone had better luck with Tg? TIA

coderus 2020-04-14 10:09

Re: Flatpak on Sailfish OS
 
are you sure you did adding env stuff correctly?
there are two different fields in UI, one for key and second for value


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

vBulletin® Version 3.8.8