Author Topic: Final call for TP3  (Read 43512 times)

Adam Boardman

  • Full Member
  • ***
  • Posts: 191
    • View Profile
Final call for TP3
« Reply #45 on: February 23, 2019, 11:53:02 am »
Yea the names are confusing, master is the generic branch just has the fixes so is for use by others eg sailfish (though they appear to have a mer branch too now), 'packaging' was my first debian-ized version using stretch cross compiler (gcc-aarch64-linux-gnu), when I got stuck getting that into the jenkins build system I made the 'native' branch which uses the slow qemu building so is the same as if you were building natively on the gemini ie arm64. I still use it locally though so fixes have to be applied to all three branches in the end.

So for 'debuild -b -uc -us' use branches as per:
amd64 - packaging
arm64 - native

Kiriririn

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Final call for TP3
« Reply #46 on: February 24, 2019, 03:51:41 pm »
Quote from: TheKit
Quote from: Kiriririn
Quote from: Eric BF
How do you disable Glamor? I would like to try. Thanks.
I believe I rebuilt xf86-video-hwcomposer without --enable-glamor-hybris, cant remember if there was more to it than that
It can be disabled by setting         Option          "AccelMethod" "None" in the device section of /etc/X11/xorg.conf, for example:
Quote
Section "Device"
        Identifier      "MediaTek HWC"
        Driver          "hwcomposer"
        Option          "AccelMethod" "None"
EndSection
If you update to latest libhybris and xf86-video-hwcomposer from Gemian repos, chromium will still work, but with color channels flipped. Might be interesting to compare performance though. If it is really much better without glamor, we could look into dri3 support without glamor, which would allow EGL applications to still work, although a bit slower due to buffer copy involved.

An update on this: I've updated everything and reverted all packages (except for repowerd and gemian-lock) to unmodified versions - unfortunately it's still slow with glamor enabled. The effect is most noticeable in Firefox which literally goes from 15-30 fps to < 1 fps, but you can also feel the difference scrolling in terminals and other apps. I will say it is improved though compared to when I last tried

But thank you for that AccelMethod config tweak, saves me maintaining a modified xserver-xorg-video-hwcomposer package!
« Last Edit: February 24, 2019, 03:53:15 pm by Kiriririn »

idc

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
Final call for TP3
« Reply #47 on: March 02, 2019, 01:42:23 pm »
Quote from: Adam Boardman
If you could do a 'sudo lvscan' to tell me the volume names that would be handy.

Hi Adam,
Sorry for the delay getting back to you.
The result of # lvscan from my sailfishOS gemini is as follows:
/dev/mmcblk0rpmb: read failed after 0 of 4096 at 0: Input/output error
ACTIVE                    '/dev/sailfish/root'    [2.44 GiB] inherit
ACTIVE                    '/dev/sailfish/home'  [37.00 GiB] inherit

A df shows that I'm using 60% of the root, but only 3% of home, so I should be able to shrink that and give Debian 20 GiB or so to play with. That should be enough, given I've an SD card which could be pressed into service for extra storage.
I hope that helps. Are there other commands you'd like me to run?

I love the idea of trying out shrinking the Sailfish volumes and creating a Debian that can run. Happy to be a guinea pig, if you don't mind the fact that I'm an amateur not a professional and may need some hand-holding, if we start doing complicated stuff! (So I'd welcome recommendations for what commands to use from Sailfish—or Android—to backup the whole thing before I start, and then what commands to use from SailfishOS or Android to shrink the /dev/sailfish/home folder.)

I'm keen to try out Exagear's Eltech's Exagear desktop to run some Intel-only programmes and according to the manual it requires Debian, which if I've understood correctly precludes Sailfish, if it is based on Redhat Linux — I've not had much to do with non-Debian based Linuxes so a bit hazy as to the main differences beyond the fact that I can't apt-get stuff but have to pkcon.

Thanks again for all your work on all this.
All the best,
Ian

Adam Boardman

  • Full Member
  • ***
  • Posts: 191
    • View Profile
Final call for TP3
« Reply #48 on: March 03, 2019, 05:36:09 pm »
Cool, thanks, currently thinking of a plan that would involve dd'ing a new boot image to one of your bootX spots, that will look for an MMC card with a stretch.img.gz and a stretch.config.txt file on it. The config would say what space to allocate, and do the resize, copy, etc. Will send you link when we have something to test.

idc

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
Final call for TP3
« Reply #49 on: March 04, 2019, 03:53:36 am »
Thanks, Adam. That sounds fantastic. I'll wait to hear more in due course!
(Currently I have Sailfish in boot 1, and Android in the 'hold esc and silver button' boot position—is that 3 or 4? In any case, that leaves space for Debian in the 'boot with silver button' position.)
« Last Edit: March 04, 2019, 04:07:46 am by idc »

gabs5807

  • Newbie
  • *
  • Posts: 44
    • View Profile
Final call for TP3
« Reply #50 on: March 05, 2019, 03:07:26 pm »
Hello Adam,
many thanks for the debian stuff. I'm also using a trible boot (debian, Sailfish and Android - only 4GB for that ;-)).
And so i'm also very interested in a solution which allow me to boot debian and Sailfish. So you can also count on me for testing proposes.
At the moment i did not update to the licenced Sailfish because of losing debian :-( which i did not want.
So if you have something please let me know. May be i cannot install it right now (i first have to order a Sailfish licence but i will order it if a solution is available).

Again many thanks

Gabriel

Btw. i think at tjc (together.jolla.com) you can also find some information about the Sailfish lvm configuration - and many more ..

Quote from: Adam Boardman
Cool, thanks, currently thinking of a plan that would involve dd'ing a new boot image to one of your bootX spots, that will look for an MMC card with a stretch.img.gz and a stretch.config.txt file on it. The config would say what space to allocate, and do the resize, copy, etc. Will send you link when we have something to test.
« Last Edit: March 05, 2019, 03:09:20 pm by gabs5807 »
Amongst many other Computers and Phones i'm using a Gemini PDA WIFI+G4 and a Cosmo Communicator both with German keyboard, all with SailfishOS and Debian ;-)

mgfm99

  • Newbie
  • *
  • Posts: 12
    • View Profile
Final call for TP3
« Reply #51 on: March 06, 2019, 11:58:57 am »
Quote from: Adam Boardman
Cool, thanks, currently thinking of a plan that would involve dd'ing a new boot image to one of your bootX spots, that will look for an MMC card with a stretch.img.gz and a stretch.config.txt file on it. The config would say what space to allocate, and do the resize, copy, etc. Will send you link when we have something to test.

V slightly off topic: I don't know if you have seen this, but on the talk.maemo.org website there are instructions for running an xwayland image in a chroot on Sailfish. The relevant scripts are instructions are all stored on github at https://github.com/elros34/sailfish_ubu_chroot?files=1

This loads a xfce4 ubuntu image which works with the Gemini. The current script copies over the keyboard definition from Sailfish - and this works partially with the Gemini but has the same problems that running KDE with the old Debian TP2 image had - various keys are dead; and also the Fn key is not recognized.

Do you think there would be a way of linking Debian TP3 so one can use it as an image within Sailfish under xwayland, but with a working keyboard unlike the current XFCE4?

gabs5807

  • Newbie
  • *
  • Posts: 44
    • View Profile
Final call for TP3
« Reply #52 on: March 07, 2019, 03:09:52 pm »
Quote from: Adam Boardman
Cool, thanks, currently thinking of a plan that would involve dd'ing a new boot image to one of your bootX spots, that will look for an MMC card with a stretch.img.gz and a stretch.config.txt file on it. The config would say what space to allocate, and do the resize, copy, etc. Will send you link when we have something to test.

Hello Adam,
using an own boot partition on the Sailfish LVM would also allow to use the same /home (if somebody wish)   .
Sailfish use the user nemo with following IDs (i take it from my FP2 not from an original SailfishX, but it should be the same - may be @idc could check this?):

$ id
uid=100000(nemo) gid=100000(nemo) groups=39(video),100(users),990(ssu),991(timed),995(oneshot),1000(system),1002(b
uetooth),1003(graphics),1004(input),1005(audio),1006(camera),1013(media),1023(me
ia_rw),1024(mtp),100000(nemo)
$ id

Using the same /home would allow access the SailfishX nemo account from debian and vice versa with out splitting up the /home partition in two separate partitions.
May be some security reasons speak again this approach, but if the PDA is used as a single user system it should work (and if someone will split access rights it is possible to use an other id for the gemini account on the debian system).
Using the same ID for nemo and gemini require a symlink on home from /home/gemini (or an other account if required) to /home/nemo.

Only my thought - should be discussed   ..
Amongst many other Computers and Phones i'm using a Gemini PDA WIFI+G4 and a Cosmo Communicator both with German keyboard, all with SailfishOS and Debian ;-)

idc

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
Final call for TP3
« Reply #53 on: March 07, 2019, 05:31:43 pm »
Quote from: gabs5807
... may be @idc could check this?):

$ id
uid=100000(nemo) gid=100000(nemo) groups=39(video),100(users),990(ssu),991(timed),995(oneshot),1000(system),1002(b
uetooth),1003(graphics),1004(input),1005(audio),1006(camera),1013(media),1023(me
ia_rw),1024(mtp),100000(nemo)
$ id

Typing the same command on my gemini SFOS gives the result below (so some minor differences?):
uid=100000(nemo) gid=100000(nemo) groups=39(video),100(users),991(ssu),992(timed),993(oneshot),996(input),1000(sys
em),1002(bluetooth),1003(graphics),1005(audio),1006(camera),1013(media),1024(mtp
,3003(inet),100000(nemo)

Hope that helps
Ian

Adam Boardman

  • Full Member
  • ***
  • Posts: 191
    • View Profile
Final call for TP3
« Reply #54 on: March 09, 2019, 09:28:16 am »
A first bash at an (untested) LVM install.

You'll need an SD card with a ext4 partition containing: You may omit NEW_LV_SIZE from the config to allow the new volume to take the remaining space after the home partition is reduced in size. Though having both smaller and then online growing whichever happens to need extra space first might be a nice way to use the system.

You'll need to flash/dd a new boot image:The boot image only attempts an install if it fails to find the volume to mount, so no need to flash a different kernel if it works, reboots should take you back to the installed system.

Note: I've not tried this out, so only guinea pigs who are happy to go back to the flashing station should try it out... You may also like to pre-review the scripts geminipda
« Last Edit: March 09, 2019, 09:46:57 am by Adam Boardman »

idc

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
Final call for TP3
« Reply #55 on: March 10, 2019, 08:45:35 am »
Thanks, Adam. I've ordered an SD card and will have a go when it arrives. Will let you know how it goes.

gabs5807

  • Newbie
  • *
  • Posts: 44
    • View Profile
Final call for TP3
« Reply #56 on: March 10, 2019, 02:32:20 pm »
Quote from: Adam Boardman
A first bash at an (untested) LVM install.

You'll need an SD card with a ext4 partition containing: You may omit NEW_LV_SIZE from the config to allow the new volume to take the remaining space after the home partition is reduced in size. Though having both smaller and then online growing whichever happens to need extra space first might be a nice way to use the system.

You'll need to flash/dd a new boot image:The boot image only attempts an install if it fails to find the volume to mount, so no need to flash a different kernel if it works, reboots should take you back to the installed system.

Note: I've not tried this out, so only guinea pigs who are happy to go back to the flashing station should try it out... You may also like to pre-review the scripts geminipda

Hello Adam,
may thanks for files. I hope i can install it next weekend.
About the linux-boot-lvm-stretch.img, which boot (boot, boot2, or boot3) device i have to use for dd?
I created a Gemini_x27_A4GB_L52GB_Multi_Boot.txt with 'default boot' SailfishX, (second is recovery) and third is TWRP recovery and fourth is Android.

I think i can scaling down the SailfishX about 10GB.
If i'm able to set the German keyboard on SailfishX and debian without booting Android (last time i didn't work :-(), i also will delete the Android partition ;-).
Amongst many other Computers and Phones i'm using a Gemini PDA WIFI+G4 and a Cosmo Communicator both with German keyboard, all with SailfishOS and Debian ;-)

Adam Boardman

  • Full Member
  • ***
  • Posts: 191
    • View Profile
Final call for TP3
« Reply #57 on: March 10, 2019, 09:10:27 pm »
I messed up those images, so some new ones apologies if you downloaded them already.

You'll need an SD card/USB memory stick with a partition containing:You may omit NEW_LV_SIZE from the config to allow the new volume to take the remaining space after the home partition is reduced in size. Though having both smaller and then online growing whichever happens to need extra space first might be a nice way to use the system.

You may also omit LV_TO_REDUCE_NAME from the config if you already have enough space available in your volume group.

You'll need to flash/dd a new boot image:This time I have test it, granted on a slightly different setup, I put an SD card in, created a LVM VG of planetlinux (the scripts prefer this to sailfishos though should boot/install to whichever is available), I then inserted a USB memory stick with the config & img files (FAT32 commented out the TO_REDUCE lines as with a fresh VG there is nothing to reduce), flashed the boot image to my choice of bootX and rebooted into that with the appropriate key combination. It took just under an hour for the actual install to happen, uncertain if that is due to the XZ compression applied to the image or the slowness of my SD/USB cards. This does of course mean that you could create the LVM setup on a desktop with a SD card reader and just do the flash/dd of the boot image on the device. I could write either of these up in more detail if needed. Its also occurred to me that you don't need to name the new LV in the config file as that is set from the cmdline inside the boot image which was one of the issues I had before where the config was making a different LV to the one the boot image was going to try to boot.

gabs5807 - given your current selection of boots (your using all of them) you'll have to sacrifice one, I'd probably drop TWRP to start with myself... but whatever you use the least.

Something I've noticed with this fresh image is that the QTerminal console fonts seem to be lacking a bunch of characters, fn+y|u, shift+fn+y|u etc gave you arrow pictures in different directions, now they give nothing. Must be a package missing from the minimal desktop install.
« Last Edit: April 06, 2019, 02:58:14 am by Adam Boardman »

idc

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
Final call for TP3
« Reply #58 on: March 17, 2019, 05:40:29 pm »
Quote from: Adam Boardman
<snip> I could write either of these up in more detail if needed. Its also occurred to me that you don't need to name the new LV in the config file as that is set from the cmdline inside the boot image which was one of the issues I had before where the config was making a different LV to the one the boot image was going to try to boot.

gabs5807 - given your current selection of boots (your using all of them) you'll have to sacrifice one, I'd probably drop TWRP to start with myself... but whatever you use the least.
</snip>

Hi Adam,
My new sd card is now arrived. And I realised (thanks to your mention) that I can of course use a USB stick to hold the files. The offer of a more detailed write up--a bit more hand-holding-- would therefore be of great help to me. (I haven't messed with LVM partitions before) I have sailfish on boot 1 (i.e. default), and Android at the last boot (holding esc and silver button together). Ideally, I would like to avoid having to reinstall the Android.
Available, then, I have 40GB devoted to 'Linux' (i.e. Sailfish at present--I'm sure this could be reduced to 16GB or less, leaving 24GB to Debian); and 16 GB to Android. I have 128GB sd card (currently in vfat or xfat--still in its packet--what's the best way to format this to make it available to Debian). And I've a 16GB USB stick, which sounds like the way to get the gemian-config.txt and .img onto the whole thing.
For the initial step, of resizing the Sailfish partition, I presume I need to be in something other than Sailfish?€”so presumably, as I only have SFOS and Android on my gemini as yet, that has to be done when I'm booted into Android, is that right? So I presumably need to install some sort of terminal? Or is there another route ...?
Gabriel, did you manage to find time this weekend? How did it go?
Looking forward to trying it out.
All the best,
Ian
« Last Edit: September 01, 2019, 08:05:08 am by idc »

Adam Boardman

  • Full Member
  • ***
  • Posts: 191
    • View Profile
Final call for TP3
« Reply #59 on: March 17, 2019, 07:49:34 pm »
You have two options from where you are:

1. Ignore the SD card (or use it for the install source), and keep the android and sailfish on the primary eMMC but also add Gemian: This would involve dropping the previously mentioned install files on the USB or SD and plug it in, 'dd' from sailfish terminal* or use the flash tool to install the boot image to boot2 (leaving your android and sailfish on boot and boot3). Reboot and pick boot2 (silver button), the install process will do the LVM resize and install for you (probably take an hour, so make sure your fully charged or powered).

* - Kernel/boot image install from terminal, sailfish might hide terminal until you enable dev mode:
wget https://gemian.thinkglobally.org/system/lin...-lvm-gemian.img
sudo dd if=linux-boot-lvm-gemian.img of=/dev/disk/by-partlabel/boot2

2. Leave the primary eMMC with android and sailfish mostly untouched, place the SD card into the Gemini and install Gemian to that: Still needs the boot image 'dd' from sailfish terminal* then the following to setup the LVM:

Re-partition the full SD card to an LVM host (will clear the contents, could also delete and re-create the fat partition smaller if wanted):
sudo fdisk /dev/mmcblk1
d - delete the current partition
n - create a new one (selecting defaults will fill the disk)
t - change the type, pick 8e (LVM)
p - print the partition table (keep a note of the relevant /dev/...)
w - write table to disk and exit

Create the volume group (using name planetlinux will keep it entirely separate from sailfishos) on the SD card (replacing the LVM partition as above):
sudo lvm vgcreate planetlinux /dev/mmcblk1p1

Edit the config file as suggested (removing resize bits) and put the install files on the USB stick and reboot into boot2 (silver button only). This will do the lvm create and install (will similarly take ages).
« Last Edit: March 17, 2019, 07:51:51 pm by Adam Boardman »