| *** user25644[m] is now known as DL[m] | 03:24 | |
| mal | PSA: latest geoclue-providers-hybris cannot be built against 5.0 so keep using 0.2.40 or older for 5.0 | 16:45 |
|---|---|---|
| T42 | <nc1x72> So, the vibration is going to be a bit tricky to get working on SFOS. | 18:52 |
| T42 | <nc1x72> Unlike many devices, Spacewar doesn’t use /sys/class/leds or /sys/class/timed_out | 18:52 |
| T42 | <nc1x72> Instead, it uses /dev/aw8697_haptic but it needs to load a file called aac_richtap.config | 18:52 |
| T42 | <nc1x72> Logcat shows the driver can’t find such file, although it’s available in its location. | 18:52 |
| T42 | <nc1x72> - Current situation: native-vibrator plugin doesn’t work (no vibration at all), | 18:52 |
| T42 | <nc1x72> - fp5 binder plugin doesn’t work. It gets vibration started but it’s constant and strong. I’m assuming this is due to Android’s side hal failing to find the richtap config file and crashing. This file contains vibration patterns, effects and calibration data. If it’s not loaded, kernel seems to apply the only effect it has: CONSTANT | 18:52 |
| T42 | <nc1x72> - I had modified the vibration driver for UT to bypass the richtap config requirement (by including the necessary effects and patterns directly). hfd-service was able to work with that, ngfd doesn’t. | 18:52 |
| T42 | <nc1x72> | 18:52 |
| T42 | <nc1x72> So, what are my options? | 18:52 |
| T42 | <nc1x72> | 18:52 |
| T42 | <nc1x72> Here’s the main rc file for vibrator : https://github.com/SailfishOSSpacewar/droid-system-Spacewar/blob/main/sparse/vendor/etc/init/vendor.qti.hardware.vibrator.service.rc | 18:52 |
| mal | where should the config file be? | 18:58 |
| mal | do you see any backtrace of the android side vibra service in logcat? | 18:59 |
| mal | if it crashes | 18:59 |
| T42 | <nc1x72> The config file is in /odm/etc/ (and it’s there and world readable) | 19:00 |
| mal | but something fails to find it? | 19:01 |
| T42 | <nc1x72> Yes logcat shows in can’t find the config file and then it fails | 19:01 |
| mal | maybe show the relevant parts of logcat | 19:01 |
| T42 | <nc1x72> Ok give me a sec | 19:01 |
| T42 | <nc1x72> ```04-02 19:12:23.786 5598 5598 E vendor.qti.vibrator: open /dev/input/by-path failed, errno = 21 | 19:14 |
| T42 | <nc1x72> 04-02 19:12:23.787 5598 5598 E vendor.qti.vibrator: open /sys/class/leds/vibrator/activate failed, errno = 2 | 19:14 |
| T42 | <nc1x72> 04-02 19:12:23.787 5598 5598 E cutils-trace: Error opening trace file: No such file or directory (2) | 19:14 |
| T42 | <nc1x72> 04-02 19:12:23.788 5598 5601 E AacRichTapConfig: cannot get path in property,we will find in env!! | 19:14 |
| T42 | <nc1x72> 04-02 19:12:23.788 5598 5601 E AacRichTapConfig: cannot get path in env,we can not find config file,do nothing | 19:14 |
| T42 | <nc1x72> 04-02 19:12:23.788 5598 5601 E AacRichTapVibrator: cannot find config path,do nothing | 19:14 |
| T42 | <nc1x72> 04-02 19:12:23.788 5598 5601 E vendor.qti.hardware.vibrator.service: aac richtap init command failed : Operation not permitted``` | 19:14 |
| mal | what do you have under /dev/input/ ? | 19:37 |
| T42 | <nc1x72> [root@phone1 defaultuser]# ls -l /dev/input/ | 19:38 |
| T42 | <nc1x72> total 0 | 19:38 |
| T42 | <nc1x72> drwxr-xr-x 2 root root 140 Apr 2 20:06 by-path | 19:38 |
| T42 | <nc1x72> crw-rw---- 1 root input 13, 64 Apr 2 20:06 event0 | 19:38 |
| T42 | <nc1x72> crw-rw---- 1 root input 13, 65 Apr 2 20:06 event1 | 19:38 |
| T42 | <nc1x72> crw-rw---- 1 root input 13, 66 Apr 2 20:06 event2 | 19:39 |
| T42 | <nc1x72> crw-rw---- 1 root input 13, 67 Apr 2 20:06 event3 | 19:39 |
| T42 | <nc1x72> crw-rw---- 1 root input 13, 68 Apr 2 20:06 event4 | 19:39 |
| T42 | <nc1x72> crw-rw---- 1 root input 13, 69 Apr 2 20:06 event5 | 19:39 |
| T42 | <nc1x72> crw-rw---- 1 root input 13, 70 Apr 2 20:06 event6 | 19:39 |
| T42 | <nc1x72> The vibrator is on event1 | 19:39 |
| mal | is there anything more from vendor.qti.vibrator in logcat? | 19:59 |
| T42 | <nc1x72> Unfortunately nothing | 20:08 |
| mal | you said it crashes but haven't shown the crash | 20:14 |
| T42 | <nc1x72> By crash, I really meant this : E vendor.qti.hardware.vibrator.service: aac richtap init command failed | 20:48 |
| T42 | <nc1x72> But maybe I didn't compile ngfd binder plugin after all | 20:48 |
| T42 | <nc1x72> Despite switching it in device-config spec file (locally). Is there anything else I should do to get it compiled correctly? after checking droid-local-repo dir, I'm not sure anymore | 20:49 |
| mal | how did you build it? | 20:51 |
| T42 | <nc1x72> I didn't run any specific command besides rpm/dhd/helpers/build_packages.sh --configs | 20:52 |
| mal | oh, then it wasn't built | 20:53 |
| mal | do you have hybris/mw/ngfd-plugin-droid-vibrator folder in ANDROID_ROOT? | 20:53 |
| T42 | <nc1x72> No | 20:54 |
| mal | ok, I'll give some instructions, just a moment | 20:54 |
| mal | cd mw/hybris | 20:56 |
| mal | git clone https://github.com/mer-hybris/ngfd-plugin-droid-vibrator.git -b aidl | 20:56 |
| mal | cd $ANDROID_ROOT | 20:56 |
| mal | rpm/dhd/helpers/build_packages.sh -b mw/hybris/ngfd-plugin-droid-vibrator -s ngfd-plugin-binder-vibrator.spec | 20:56 |
| mal | then install the rpm you get (can be found in droid-local-repo/$DEVICE/) to device and see how vibrator works | 20:57 |
| mal | sorry | 20:57 |
| mal | those should be hybris/mw not mw/hybris | 20:57 |
| mal | the paths in the instruction | 20:58 |
| T42 | <nc1x72> Yes, I figured. And the correct command was : rpm/dhd/helpers/build_packages.sh -b hybris/mw/ngfd-plugin-droid-vibrator -s rpm/ngfd-plugin-binder-vibrator.spec | 21:05 |
| T42 | <nc1x72> Because the spec files are in rpm subdir | 21:05 |
| mal | ah, yes, sorry | 21:06 |
| mal | just quickly wrote those without testing | 21:06 |
| mal | I should try to get that plugin to sailfish 5.1 release so we wouldn't need a custom build anymore | 21:07 |
| mal | looks like I never made PR to fix droid-hal-version packaging | 21:09 |
| T42 | <nc1x72> Yeah that would make it easier. Maybe implement something that would automatically compile the binder plugin if it’s defined in droid-config-$DEVICE | 21:13 |
| mal | since that is binder plugin it would in the end come from official repos without need to build it for device | 21:14 |
| mal | so if you want to use fix the droid-hal-version packaging go to the submodule of droid-hal-version repo for your device and then checkout the vibrator_binder branch and then "build_packages.sh -v" | 21:16 |
| mal | and of course you should fix patterns in droid-config repo to use the ngfd binder plugin | 21:16 |
| mal | after which you of course need "build_packages.sh -c" | 21:16 |
| mal | maybe fix the patterns first and then droid-hal-version | 21:17 |
| T42 | <nc1x72> Okay. No change after installing the ngfd-plugin-binder-vibrator-1.4.2+aidl.20250729162936.31d717b-1.aarch64.rpm on device | 21:22 |
| T42 | <nc1x72> Maybe I should make the changes you mentioned and rebuild a new rootfs. Although I get the feeling it would be the same outcome | 21:23 |
| mal | it installed that without conflict? | 21:24 |
| mal | let's check some things | 21:24 |
| mal | don't build new image yet | 21:25 |
| mal | which sailfish version did you build? | 21:25 |
| T42 | <nc1x72> Dumb of me, I used —force to install it. It conflicts with ngfd-plugin-native-vibrator-1.4.1-1.7.1.jolla.aarch64 | 21:25 |
| T42 | <nc1x72> I'm running 5.0.0.67 | 21:26 |
| T42 | <nc1x72> Should I remove the native vibrator? | 21:26 |
| mal | it would be better, but also check which ngfd you have with "zypper if ngfd" | 21:28 |
| T42 | <nc1x72> 1.4.9-1.13.1.jolla | 21:28 |
| mal | ok, that is too old probably | 21:29 |
| T42 | <nc1x72> Wait | 21:29 |
| mal | do this: rpm/dhd/helpers/build_packages.sh --mw=https://github.com/sailfishos/ngfd.git | 21:29 |
| mal | then install the ngfd to your device | 21:30 |
| T42 | <nc1x72> Maybe using one from here : https://repo.sailfishos.org/obs/nemo:/testing:/hw:/fairphone:/fp5/sailfishos_5.0.0.67/aarch64 directly? No? | 21:30 |
| mal | the issue now is that ngfd is too old | 21:30 |
| mal | so it cannot load the custom configuration | 21:30 |
| T42 | <nc1x72> Even the releases on fp5 5.0.0.67 obs? | 21:31 |
| mal | fp5 has the needed ngfd built in the repo | 21:31 |
| mal | wait | 21:31 |
| mal | sorry | 21:31 |
| mal | wait a moment | 21:32 |
| mal | why did you build 5.0.0.67? latest is 5.0.0.77 | 21:34 |
| T42 | <nc1x72> I didn't know about 5.0.0.77 tbh | 21:35 |
| mal | the needed ngfd was updated in 5.0.0.73 | 21:36 |
| mal | so make the droid-config and droid-hal-version changes and build new image using 5.0.0.77, no need to build ngfd anymore with that | 21:36 |
| mal | forgot one thing, for droid-hal-version you need this in spec https://github.com/mlehtima/droid-hal-version-fp5/blob/master/rpm/droid-hal-version-fp5.spec#L9 | 21:37 |
| mal | do you now know what you need to do? | 21:38 |
| T42 | <nc1x72> Yes, got it! Will build new image tomorrow. Thank you, mal! | 21:40 |
| mal | I assume you still have this https://github.com/mlehtima/droid-config-fp5/blob/master/sparse/etc/ngfd/ngfd.ini | 21:41 |
| mal | looks like you do | 21:41 |
| T42 | <nc1x72> Yep | 21:41 |
| T42 | <nc1x72> Only changed binder to native in droid-config-spacewar | 21:42 |
| T42 | <nc1x72> Everything else is pretty much the same | 21:42 |
| mal | ok | 21:42 |
| mal | I should have documented the binder plugin changes somewhere | 21:42 |
| mal | and make the PRs a lot sooner but before this fp5 was the only device that needed the binder plugin so I wasn't in any hurry | 21:43 |
| T42 | <nc1x72> I hope it'll be enough for spacewar too. I'll let you know how it goes | 21:45 |
Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!