Wednesday, 2021-02-17

T42<thisisthethirdshoukosaccount> @thisisthethirdshoukosaccount [okay, I will try it once my image is built, mi …], Bump05:39
xmnsailfish on the PinePhone made me so happy today. I was able finally able to load, sync and update my pebble and a heartrate monitor via bluetooth. It was like a small bday gift06:59
T42kiransaaho was added by: kiransaaho08:02
T42<kiransaaho> Any body please port sailfish os for poco m2 pro08:02
T42<zinstack625> @kiransaaho people can only port if they have the device and/or testers willing to sacrifice their own. Also having proper sources, preferably Los 16 or lower is a must. Ports based on android 10 are very early and might be unreliable. The best is to learn how to port yourself and ask the questions here. Working with a remote devi09:28
T42ce and, worse, remote people is very hard, so it's very unlikely without the involvement from poco m2 community09:28
T42mintphin was added by: mintphin09:36
T42<edp_17> Hi all. Any idea how to fix the error at line 691? https://pastebin.ubuntu.com/p/xNvK9H8CXR/09:37
T42<edp_17> (hammerhead, sfos 4.0.1.48, cm12.1)09:37
T42<zinstack625> Bad file descriptor? Are you sure those places are mounted correctly? Can you look through that directory?09:38
T42<edp_17> What directory?09:41
T42<zinstack625> Those of the issue, like sys09:42
T42<edp_17> The problem is that the device is on boot logo, there is no ssh or telnet and even if I get in, I have only 20 seconds before it disconnects. I'll try to list those.09:43
T42<adampigg> Xmn: great09:45
T42<edp_17> Yeah, it looks like they are correctly mounted: https://paste.ubuntu.com/p/ShhjCJw3pG/09:45
T42<edp_17> @zinstack625 ^^09:45
T42<zinstack625> Weird, maybe something to do with kernel09:48
xmnadampigg, yeah very thankful. If I could make sound reliable or just work I could almost use it as my daily. One day09:49
T42<zinstack625> Usually bad file descriptor means unable to read/write due to some hardware failure09:50
T42<edp_17> @zinstack625 : My other sfos builds (3.3, 3.4 and olders) boot up properly, so I don't think this is hardware failure.09:53
T42<zinstack625> Well, by hardware failure I mean the kernel09:53
T42<zinstack625> In this situation, it's most likely that it fails to properly communicate with systemd09:54
T42<zinstack625> Like an old version kind of deal09:54
T42<edp_17> Sfos 4.0.1 has a known kernel limitation. It only supports kernel from version 3.10 and this device has kernel 3.4.09:55
T42<zinstack625> Patching kernel might be necessary09:56
T42<edp_17> Yeah, but I have no idea what patch(es) is(are) required.09:57
T42<edp_17> @elros34 : You said had a working sfos 4.0.1 on your device with kernel version 3.0. Can you help me out what's missing from my hammerhead's kernel, please? Or do you have any idea?09:59
T42<elros34> Did you check whether you have all those stat.c and statfs.c patches mentioned in channel?10:02
T42<elros34> btw /init_enter_debug2 should prevents rebooting10:03
T42<edp_17> It is not rebooting, it just drops the connection after a short time. Then I need to unplug the cable, plug back in and attach an IP and telnet in again.10:07
T42<edp_17> No, I have not checked those patches but they were not necessary for the Note4 either. I mean the Note4 was able to boot into the OS without them. Those were only necessary to be able to start the apps with sailjail.10:08
T42<elros34> but error looks similar, can't read information of file/dir/mountpoint because bad file descriptor10:11
T42<edp_17> Hmm, Okay, I'll add that patch to see what happens.10:12
T42<elros34> compare commit history of those stat*.c files with some known 3.4 working kernel10:13
T42<elros34> I think here is 3.4 kernel: https://irclogs.sailfishos.org/logs/%23sailfishos-porters/%23sailfishos-porters.2021-02-15.log.html#t2021-02-15T16:09:2810:14
T42<edp_17> @elros34 : Thanks! That was it! 👍 I modified stat.c and statfs.c and now the devicehas booted up! I'll do the initial setup and check what's working. 😃10:54
T42<Herrie1982> @edp_17 [@elros34 : Thanks! That was it! 👍 I modified …], Yes there were quite some changes in the various 3.4 kernels for it11:05
T42<Herrie1982> And systemd is quite picky about which one you have ;)11:05
T42<edp_17> The initial process went throug fine. I selected all jolla apps to install. I left the device on my desk for a few minutes. Then I unlocked the screen and wanted to see whether it finished with the install. The screen became unresponsieve and the red led started to blink and now the screen is black. I think it is time to reboot. 😊11:08
T42<edp_17> After the reboot all apps that uses sailjail/firejail do work fine. 😎 Although, there is issue with BT on this device too. 😔11:21
mal@edp_17 can you show what changes you did?11:41
deathmist_soo back to early porting for me, I'm moving my OnePlus 5/5T port to the hybris-17.1 base and going aarch64. problem is the kernel has changed quite a bit as well since 16.0 and doesn't even boot into hybris-recovery (telnet) without flashing anything yet, nothing on host and device reboots after ~1 seconds after booting kernel (led indicator on device turns off when it boots). anything11:42
deathmist_in particular I should check starting with 17.1?11:42
T42<edp_17> mal: I only applied these two patches:11:42
T42<edp_17> https://github.com/shr-distribution/linux/commit/5187f535beeb3731677c6f6d05402f9adec6e03411:42
T42<edp_17> https://github.com/shr-distribution/linux/commit/01141a353241d545a2aaf9addaa32afe39a9856211:42
T42<edp_17> mal ^^11:42
malok11:42
T42<edp_17> Oh, after the login I needed to remove remove busybox-symlinks-psmisc because I got that error on this device too.11:43
T42<Verevka86> @deathmist_ [soo back to early porting for me, I'm moving m …], <mal> @Verevka86 to fix the hybris-boot issue on hybris-17.1 please run "export TEMPORARY_DISABLE_PATH_RESTRICTIONS=true" before you run make hybris-hal11:46
maldeathmist_: ^ you need to set that environmental variable to get a working hybris-boot, otherwise kernel initrd is empty11:54
deathmist_mal: cool, it works. I'll start collecting things like this so they can be added to the FAQ for 17.1 or so11:58
maldeathmist_: there is also an issue with the droid config submodule, it has a config which is a bit too device specific, I need to fix that12:00
T42<Verevka86> <deathmist_> Did you manage to launch hybris17.1?13:01
deathmist_well I got to hybris-recovery and a telnet shell in the initramfs, just wanted to make sure my kernel was sane. it appears I now also have to revert some commits on my 4.4 kernel tree to boot with VT=y13:18
deathmist_these reverted commits include "tty: check before stopping kthread", "tty: move tty_port workqueue to be a kthread", "tty: add tty_port_set_policy function" & "msm_serial_hs: make the Bluetooth tty thread RT"13:19
deathmist_I'll probably add them to the FAQ too as I think most (LineageOS) kernels have adopted these changes starting with Android 1013:19
T42<elros34> IIRC these breaking commits affects also few lineage 15 and 16 devices13:27
T42<edp_17> @elros34 : Do you have idea why bluetoothd is unhappy? https://paste.ubuntu.com/p/vRVsQpnV5S/14:25
T42<edp_17> Sensors do work fine.14:25
T42<elros34> systemd-tmpfiles-setup.service fails. Do you have all cgroups related changes required by mer-kernel-checker?14:27
T42<edp_17> I think so: https://paste.ubuntu.com/p/Hf3fR8mzvP/14:31
T42<edp_17> I've updated mer-kernel-check as part of this new build.14:32
T42<elros34> not sure about bluetooth, check whether it's not hard blocked in rfkill. BTW do you use some modified qpa-hwcomposer-plugin?14:32
T42<edp_17> How can I check this: qpa-hwcomposer-plugin?14:33
T42<elros34> If that is 3.4 kernel then you are missing quite few changes like CONFIG_CGROUP_MEM_RES_CTLR_SWAP or CONFIG_CGROUP_MEM_RES_CTLR_KMEM14:33
T42<elros34> zypper show qt5-qpa-hwcomposer-plugin14:33
T42<elros34> info not show14:33
T42<edp_17> https://paste.ubuntu.com/p/KCQqB8WFDd/14:35
T42<edp_17> Those 2 flags are not set in the kernel. Never were, are they required for sfos 4.0?14:36
T42<elros34> they are not required but recomended for system. Either set them or use https://github.com/elros34/droid-config-moto_msm8960_jbbl/blob/master/sparse/etc/systemd/system/systemd-tmpfiles-setup.service.d/execstart.conf14:37
T42<elros34> systemd*14:37
T42<edp_17> I think I am using your hdmi qt5-qpa-hwcomposer-plugin.14:37
T42<adampigg> @elros34 [they are not required but recomended for syste …], Is that instead of the command line changes myself and mal are using?14:37
T42<elros34> ok, I was just wondering about strange messages from lipstick. That explainst it14:37
T42<elros34> @adampigg no idea what commandline changes your are talking about14:38
T42<adampigg> @elros34 [@adampigg no idea what commandline changes you …], https://github.com/sailfish-on-fxtecpro1/droid-hal-img-boot-fxtec-t5/commit/75cbf44353fdaf22322d5c6a60b5cbaa548597a214:38
T42<edp_17> What is strange with the bt is. I can turn on and pair with another sfos but cannot pair with the bt speaker that I used with this device prior sfos 4.14:38
T42<elros34> @adampigg no, that is different14:39
T42<edp_17> @elros34 : I think bt is working now. At least bluetoothd service is happy. I removed the bt-sleep-monitor.service and bt-sleep-monitor.timer things from /usr/lib/systemd/system.14:59
deathmist_mal: should some packages such as nfcd be put into platform sdk repos so building will be faster (and actually works), or should I make a PR to fix https://github.com/mer-hybris/droid-hal-device/blob/master/helpers/build_packages.sh?15:23
maldeathmist_: what is broken now?15:35
deathmist_mal: libnciplugin doesn't build as it requires nfcd(-plugin)15:37
deathmist_running a "rpm/dhd/helpers/build_packages.sh --mw=https://git.sailfishos.org/mer-core/nfcd.git" allowed it to continue (I'm building for SFOS 4.0 fwiw)15:41
malok, maybe it should be built15:43
deathmist_can some of these be added to a repository so that everyone doesn't need to build generic stuff unrelated to droid HAL, or is there some requirement to build these always?15:45
maldeathmist_: make a PR15:45
deathmist_to add nfcd? sure15:45
malthe thing is that nfcd is in jolla repos but it can be older than required by the latest nci plugin for example15:46
deathmist_ah, I'm starting to see the issue. every adding everything except droid HAL specific things to repos at correct versions could cause dependency issues15:49
deathmist_s/every/even/15:49
malwe could need many packages there to prevent any breakage ever15:50
malbut not sure if that makes sense15:50
deathmist_mal: https://github.com/mer-hybris/droid-hal-device/pull/29515:55
T42<calebccff> deathmist: holy crap that PR has been needed for a long time...16:03
T42<calebccff> mal: have you worked with any A/B devices? Is there a plan to support them properly? The current OnePlus 6 port basically assumes that you're booting on slot A as the partitions are hardcoded systemd mount units. Can we move the mounts into the initramfs where slots can be detected properly (like Halium does)?16:06
calebccffNow that I think about it, does hybris-boot do anything that halium-boot doesn't? halium-boot supports rootfs-as-a-folder and can setup all the necessary Android mounts, forking it and patching out the lxc stuff might be enough16:10
T42<adampigg> @calebccff one way to look at it, is to use the B mounts for other things, like offical, sony and pro1 ports do16:23
mal@calebccff no such plans at the moment16:24
malporter can easily select which partitions to set in fixup-mountpoint, you could just use b slot partitionsthere16:24
T42<calebccff> @adampigg you mean like, sailfish on one slot android on the other? that's the intention, but it seems silly to limit to one slot, currently I'd need to generate 2 zips, one for each slot which is just a nightmare when, for example with postmarketOS I have a flashable zip that lets you pick the slot just by changing the zipfile name16:26
T42<adampigg> no, like sailfish on slot a system, slot b system is used for recovery image, and slot b vendor is used for /opt mount16:27
T42<calebccff> The slot suffix is passed as a cmdline arg so it's trivial to mount the correct partitions, just requires moving the mount logic into the initramfs16:27
T42<calebccff> @adampigg I don't really see the benefits of that beyond simplifying updates, I'd rather be able to dual boot with Android16:29
calebccffUnless I'm missing something there...16:33
T42<adampigg> why on earth would you want to dual boot with android?? :D16:33
calebccffahaha, true, dual booting with ubuntu touch or postmarketOS would be nice though16:34
calebccffwhat's the purpose of mounting /opt elsewhere?16:35
deathmist_@adampigg dual-booting with android is still valuable on community ports as some users simply can't go 100% native apps, e.g. they may need a banking app to accept payments etc.16:39
deathmist_well, more to get a code for authenticating payments than accepting them really16:40
T42<elros34> @edp_17 maybe that bt script use bash specific features and it fails. 4.0.1.x use buggy busybox bash/ash by default16:40
rinigusre slots discussion: in addition to mounting something as /opt, you could just extend LVM PVs accordingly and use the space fully on the device. some may like ability to reset the device using images on one of the partitions as well. all that is possible on official devices and couple of ports16:43
calebccffLVM PVs?16:44
rinigusfor sony tama, we just ask users to set slots accordingly16:45
rinigusLVM physical volumes16:45
calebccffAh right16:45
calebccffRepartitioning is feasible16:45
T42<elros34> @calebccff is not really that hard to adjust partitions in init script. Few lines in init script like https://github.com/elros34/droid-hal-moto_msm8960_jbbl/blob/master/patches/hybris-boot.patch#L4216:45
riniguscalebccff: not that you repartition, just reformat some "free" partitions and use them for your / or /home16:46
calebccff@elros34 Yeah, it just doesn't seem sensible to go fiddling with mount units during initramfs, a solution that can actually account for slots in the first place would be much better...16:48
deathmist_mal: I suppose aarch64 builds aren't exactly ready yet? mic fails as http://repo.merproject.org/obs/nemo:/devel:/hw:/common/sailfish_latest_aarch64/repodata/repomd.xml doesn't exist when trying to run rpm/dhd/helpers/build_packages.sh --mic16:48
T42<adampigg> no, aarch64 is broken on obs16:48
T42<adampigg> awaiting the obs gods (lbt)16:48
calebccffIs it possible to drop the systemd mount units alltogether and just setup mounts in init?16:49
calebccffinitrd*16:49
maldeathmist_: you will have to remove that repo, I haven't noticed that because I use selfhosted repos for my aarch64 build16:50
T42<elros34> @calebccff initramfs, /init-debug  or systemd, it doesn't matter how you mount partitions16:54
calebccffGood to know, thanks16:55
T42<elros34> The only small issue is that busybox is not built with gpt labels support by default. Therefore if you want something more generic you need to build custom busybox  or use sysfs to figure out correct partition by label16:58
T42<elros34> busybox fdisk*16:58
calebccffWill /dev/disk/by-partlabel exist?17:00
T42<elros34> no, otherwise hardcoded partitions/fixup-mountpoints wouldn't be needed17:01
calebccffAh right I see17:01
deathmist_"sh[3225]: nohup: can't execute '/sbin/droid-hal-init': No such file or directory" kek, SFOS 4.0 w/ hybris-17.1 (and yes the file does in fact exist)18:08
deathmist_I suppose I need to create a system_root mount unit manually for now (or always?)18:10
maldeathmist_: I had that same, I think it was incorrect ld.config.29.txt or incorrect base android version, can't remember which18:44
deathmist_oh yeah I'll need that patched again won't I, it seems my fstab also dosn't have an entry for the system_root partition so I'll go create that18:46
maldeathmist_: I just got UI up on aarch64 build based on hybris-17.118:51
T42<edp_17> @elros34 [@edp_17 maybe that bt script use bash specific …], I built a new image and sailfish-weather works fine. But now the Bluetooth menu in Settings is blank. Lol. There is nothing, so cannot turn bt on/off at all. Something isn't right, right? 😂20:00
T42<edp_17> Do you know why bash is removed?20:00
T42<elros34> maybe license changed. Whatever reason is you can still install gnu-bash. busybox one cause some strange issue for me iin rpm post script20:06
T42<edp_17> You suggest to remove busybox one?20:16
T42<elros34> it's up to you. I use some scripts which are not compatible with busybox one20:20
T42ChaosKing03 was added by: ChaosKing0320:43
deathmist_mal: got dhi up, but still can't launch many of the binaries including /usr/libexec/droid-hybris/system/bin/logcat (strace only has 3 lines first of which says execve(...) = -1 ENOENT (No such file or directory))20:49
deathmist_running "find /system -name 'ld.config*.txt'" only reveals etc/ld.config.vndk_lite.txt, apex/com.android.runtime.release/etc/ld.config.txt & apex/com.android.media.swcodec/etc/ld.config.txt20:50
maldeathmist_: my guess is selinux, that is enabled by the submodule for android 10 base but it assumes things, try replacing the symlinks with actual files somewhere under /etc/selinux20:50
maldeathmist_: I have /system/etc/ld.config.29.txt20:51
deathmist_I've got 'SELinux:  Disabled at boot.' in dmesg though and /etc/selinux/config is a file (not a symlink) containing just "SELINUX=disabled"; my ld.config.vndk_lite.txt looks like https://pastebin.com/raw/waf7n6Z620:53
malhmm20:54
malI think we have done things in system/core that might assume selinux is enabled20:55
deathmist_how far away are community ports from being able to properly operate with SELinux enabled?20:57
maldeathmist_: my port is community version and has selinux enabled in systemd in permissive mode20:58
deathmist_the aarch64 17.1 one? mind pushing the repos so I can take a look at things? permissive mode is perectly fine by me if it's required20:59
malI need to cleanup some things20:59
Tofeis my device completely dumb ? I'm trying to have my camera working with gst-droid, but when droid_media_camera_set_parameters is called, my android driver complains that some FPS range isn't supported... but it's a range that was previously returned as a possible setting...21:01
Tofeis it possible to exclude some settings by hand ? gstdroidcamsrcquirks.conf maybe ?21:02
T42<edp_17> @elros34 [it's up to you. I use some scripts which are n …], I removed the busybox bash and after a reboot the bt started to work. 😁21:04
T42<elros34> on both devices?21:06
malTofe: which device?21:13
T42<edp_17> @elros34 [on both devices?], No, only on hammerhead.21:16
Tofemal: xiaomi A1 (tissot)21:17
Tofemal: I also have a Redmi 5 (rosy) that I can try, to see if it's better there; may that's my next step21:18
Tofemaybe*21:18
T42<elros34> @edp_17 oh, while you are at bluetooth, could you check whether changing bluetooth name in settings works for you?21:19
T42<edp_17> @elros34 : Nope, it doesn't work. When I come out and go back it shows the original name.21:27
T42<elros34> is that bluez4 or 5?21:27
T42<mintphin> Hey, my device doesn't have official Lineage support. Can i just use an unofficial base?22:27
vknechtsure, unofficial los is ok, as long as it works fine22:29
T42<mintphin> ah ok22:34
T42<mintphin> btw are you planning to create matrix room?22:37
calebccffThat would be mighty nice, you can let IRC users connect to matrix rooms iirc22:45
T42<mintphin> yup, plus matrix is more open than telegram22:48

Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!