Day 3 Season 2
ofono - (day 34)
Today I’ve tested GPS - installed chum, puremaps and in about 30 minutes the first-cold-fix was done. That’s good, because I have no clue how to debug GPS if it doesn’t work. Hope it’s better next time though.
I temporary copy 5.4.61-qgki-perf-gc8a3515be514
to 5.4.61-qgki-perf-gc8a3515be514-dirty
for the wlan module to be picked up without insmod, at bootup.
Trying /usr/lib64/ofono/test/list-modems
from zypper in ofono-tests
lists no modems.
According to porter’s log I need to have either ofono-ril-binder-plugin
or ofono-binder-plugin
.
Let’s zypper in ofono-binder-plugin
and systemctl restart ofono
Now list-modems outputs stuff !
Unfortunately my SIM card is in slot 2 and the GUI for dual-sim is not available.
zypper in jolla-settings-networking-multisim
Hmm… Im pretty sure there was something else for flashlight… yep:
zypper in jolla-settings-system-flashlight
Also, GSM data doesn’t seem to work. Another grep on the porters channel:
zypper in dummy_netd
All of the above packages need to be added to patterns in droid-config-sake
later.
There’s also the sensors part from hadk-faq. I need to create a hw-settings.ini file akin to this: droid-config-f5121/hw-settings.ini at master · mer-hybris/droid-config-f5121 · GitHub
I add it to the device, reboot, and indeed: orientation starts to work. Compass works too. Proximity works too.
(Did I mention I tested telephony today and it luckily “just worked”? After adding the ofono-binder-plugin. But the wonder is that call audio worked too).
There is something about vibration that I need to fix - it seems that no matter what event, the vibra just does one “click”, and a very fad one for that matter.
Also compass works and is one class above my previous device, where it was very unstable.
Ramdumps today: one when testing compass in CSD, one when disabling wifi (reproducible again) and another one when pulling the device out of charger => in the next minute.
Unfortunately, all of them unthethered so no dmesg
…
Now that I think I figured out GSM data, I can mask wifiservice to be sure that that is the problem.
The last ramdump after disabling wifiservice I took some time to see what the usb device looks like when in the ramdump screen to the host computer (something with QUSB_BULK_SN) and search internet (fail) and github (a bit better) about tools to extract the ramdump from the phone - without success. I did found some repos that claim to analyze qcom ramdumps, but no instructions how to extract them from the device. And I think dd
won’t work for /dev/usb…
I think I won’t get away without fixing this - the lack of kernel crash logs. My hope is that I will be able to inspect the ASUS specific changes that lead to ramdump instead of a mainline pstore kernel crash log + reboot.
On the other side, if disabling the wifiservice will make the device not crash, at least I will have the problem localized…
Anyway, while applying those above patterns changes, I notice the reference to -dummy-af in the patterns.
I manually install that package and indeed, there is something different about camera video recording: it starts and updates the screen.
It still crashes on stop, and doesn’t save the video, and it still can’t be restarted.
Also I remembered from previous logs that there was a service that didn’t start:
Could not start service ‘miniaf’ as part of class ‘main’: Cannot find ‘/usr/libexec/droid-hybris/system/bin/miniafservice’: No such file or directory
That would be mini audioflinger service.
Its probably missing because I’ve done something wrong while compiling droidmedia…?
Hmm it’s something obsolete says rinigus in the past archive
Hmm… with wifiservice off, there is “something” less to wait for user@100000 service to start… and the GUI is not showing at boot anymore (it used to be that it did, but without vibra).
When it doesnt start, Lipstick says:
Apr 21 21:53:06 Zenfone8 lipstick[6782]: file offset for the library “/vendor/lib64/hw/gralloc.default.so” >= file size: 0 >= 0
Apr 21 21:53:06 Zenfone8 lipstick[6782]: library “/vendor/lib64/egl/libEGL_adreno.so” needed or dlopened by “/usr/libexec/droid-hybris/system/lib64/libvndksupport.so” is not accessible for the namespace “(default)”
When it does, it says:
Apr 21 21:53:09 Zenfone8 lipstick[6964]: file offset for the library “/vendor/lib64/hw/gralloc.default.so” >= file size: 0 >= 0
Apr 21 21:53:09 Zenfone8 lipstick[6964]: library “libcutils.so” not found
So basically the first error is because I bind-mouted /dev/null over gralloc.default.so
in both cases, but the second one is because the init (which is droid-hal-init
in SFOS) did not switch the linkerconfig yet, I’d guess.
I need to find a way to way to wait for that - or just be pragmatic and add 5s delay… (notice the timestamps above)
According to my logs from Day 30, linkerconfig has a default
subfolder before init finishes switching and none after.
There’s a /usr/lib/startup/wait-for-file
script already, maybe I should create a /usr/lib/startup/wait-for-no-file
?
It’s used like this now:
# find /usr/lib/systemd -exec grep wait-for-file {} \; -print
ExecStartPre=/usr/lib/startup/wait-for-file /run/user-session/user-init-done.flag
/usr/lib/systemd/system/actdead.target.wants/init-done.service
The script is
while [ ! -f $1 ]
do
sleep 1
done
echo "Found $1 file"
I can just copy it and remove the !
.
Unfortunately /usr/lib/systemd/system/user@.service
already has an ExecStartPre
But /usr/lib/systemd/user/lipstick.service
does not.
And as far as I see in mal’s fp4 I can just use a conf file to add one.
Creating /usr/lib/systemd/user/lipstick.service.d/40-linkerconfig.conf
[Service]
ExecStartPre=/usr/lib/startup/wait-for-no-file /linkerconfig/default/ld.config.txt
reboot
Hmm
lipstick.service: Failed at step EXEC spawning /usr/lib/startup/wait-for-no-file: Permission denied
But there’s another one, more worrying: “Failed to start PulseAudio”
The first one makes sense. The lipstick service is run as user, and the ‘wait-for-file’ I copied was not executable but for root.
Let’s fix that first and see consequences later:)
Hmm… still doesn’t work.
There’s a /usr/lib/systemd/user/pre-user-session.target.wants/
too that lipstick depends on.
In the meantime, just for kicks, I add a sleep 3 to that wait-for-no-file… But this means I more or less give up:-S
But it works - at least one time. Since this is not a well understood problem, this can come back and bite me with a race.
Well, “works” but doesn’t do much - lipstick is on screen, but browser does not start:
invoker[9900]: warning: Launch failed, application specific booster is not available
So maybe I should go with the pre-user-session.target.wants and write a new service.
But looking at logs it seems that the problem is that lipstick starts on re-try, and the booster services don’t (media, browser )
Changing 3 to 5…
This time lipstick, browser and camera work, but pulseaudio does not.
So really, I should fix that with pre-user-session.
One more try, not very scientific:
# cat /usr/lib/systemd/user/linkerconfig-user.service
[Service]
ExecStartPre=/bin/bash -c "while [ -f /linkerconfig/default/ld.config.txt ]; do sleep 1; done; sleep 5"
ExecStart=/usr/bin/sleep 5
Restart=on-failure
RestartSec=1
TimeoutStartSec=infinity
(linked to pre-user-session.target.wants/
)
Notice that I actually added the sleep 5 to ExecStartPre. And I don’t need another script…
Pulseaudio now works, but only because of the 5 seconds.
ngfd does not work, god knows why.
systemctl-user restart ngfd does make vibra work though.
So I think I have a booting device without wifi (that was just adding some delay because of reasons, that made lipstick work).
I should know tomorrow if ramdumps are occuring often without wifi kernel module…