sailfishos-sony-tama / main

Documentation, releases, and issues
MIT License
38 stars 7 forks source link

XZ2 Compact Support (apollo, H8314 and H8324) #38

Closed ApostolosB closed 4 years ago

ApostolosB commented 4 years ago

As stated in the Readme.md. An issue for monitoring the status/development of the single sim XZ2 Compact.

ApostolosB commented 4 years ago

And one more thing. I inserted an SD card and i had to go into settings>storage to get it to mount. (i was expecting that to happen automatically on boot). Its vfat i think. Also nothing appeared on the media app (sd is full of flac files.) but its maybe that i needed to wait more.

rinigus commented 4 years ago

can't tell that something would be slower than expected. I would expect that UI is accelerated, as we use hybris. To check whether you get very poor performance, try to enable in Settings/Developer tools/Frame rate display -> Simple. Green means its OK, red is delayed. I usually would get most green with bits in red. If I open Pure Maps and start shifting a map fast, I can get more red regions. But nothing unexpected, I guess.

You could ask around (TMO/TJC) if there are ways to check it better

rinigus commented 4 years ago

Re SD Card: last time I mounted it, it was on 1+X and I used ext4. So, no idea on whether it is expected to be mounted on boot.

PS: indexing may take some time

PPS: but keep an eye on whether index appears - we have different storage layout than the official devices

ApostolosB commented 4 years ago

Yeah i enabled the frame rate thing and only got few reds here and there. Probably an optimization thing or something.

For the indexing/ssd stuff i'll check again once i have phone i can leave on the side and not needing to have a finger on it all the time :rofl:

rinigus commented 4 years ago

With reboots. We see, top have lots of messages in logs that I don't have on XZ2:

Dec 16 20:41:17 Sailfish kernel: synaptics_tcm_i2c 2-003c: touch_set_input_reporting: Input parameters unchanged
Dec 16 20:41:37 Sailfish kernel: i2c_geni a88000.i2c: i2c error :-107
Dec 16 20:41:38 Sailfish kernel: synaptics_tcm_i2c 2-003c: syna_tcm_dispatch_message: Received identify report (firmware mode = 0x01)
Dec 16 20:41:38 Sailfish kernel: synaptics_tcm_i2c 2-003c: touch_set_input_reporting: Input parameters unchanged
Dec 16 20:43:01 Sailfish kernel: i2c_geni a88000.i2c: i2c error :-107

journal finishes on suspend message before reboot and your description suggests that it happens on suspend entry (~10 seconds after closing display).

Dec 16 20:43:01 Sailfish mce[3172]: powerkey.c: pwrkey_datapipe_keypress_event_cb(): powerkey pressed
Dec 16 20:43:01 Sailfish mce[3172]: powerkey.c: pwrkey_datapipe_keypress_event_cb(): powerkey released
Dec 16 20:43:01 Sailfish mce[3172]: modules/display.c: mdy_display_state_leave(): current display state = POWER_DOWN
Dec 16 20:43:01 Sailfish sensorfwd[3356]: virtual bool HybrisAdaptor::setInterval(unsigned int, int) setInterval not ok
Dec 16 20:43:01 Sailfish statefs[3186]: Display: "off"
Dec 16 20:43:01 Sailfish kernel: CPU0: update max cpu_capacity 306
Dec 16 20:43:01 Sailfish lipstick[4173]: [D] unknown:0 - sleepDisplay
Dec 16 20:43:01 Sailfish kernel: i2c_geni a88000.i2c: i2c error :-107
Dec 16 20:43:01 Sailfish kernel: CPU0: update max cpu_capacity 306
Dec 16 20:43:01 Sailfish kernel: pn547_dev_ioctl power off, irq=0
Dec 16 20:43:01 Sailfish nfcd[3262]: [gbinder] WARNING! Unknown local object 0xe8504f00
Dec 16 20:43:01 Sailfish kernel: @@@@ panel power off @@@@
Dec 16 20:43:01 Sailfish mce[3172]: modules/display.c: mdy_display_state_enter(): current display state = OFF
Dec 16 20:43:01 Sailfish kernel: CPU2: update max cpu_capacity 306
Dec 16 20:43:02 Sailfish kernel: CPU2: update max cpu_capacity 306
Dec 16 20:43:03 Sailfish kernel: CPU1: update max cpu_capacity 306
Dec 16 20:43:03 Sailfish kernel: CPU1: update max cpu_capacity 306
Dec 16 20:43:06 Sailfish kernel: PM: suspend entry 2019-12-16 18:43:06.720334213 UTC

This looks very similar to report at XDA on AOSP9 issue https://forum.xda-developers.com/showpost.php?p=80549303&postcount=991

Looks to be resolved, as in https://forum.xda-developers.com/showpost.php?p=80549977&postcount=994

@MartinX3 : what was in that V10?

ApostolosB commented 4 years ago

With the new image. I have bad news and worst news. Bad news first. The reboot issue persists.

Worst news is that the 4G issue came back.

this is what i get in the journal when trying to activate the 4g from top menu:

Dec 16 21:38:19 Sailfish estart[6415]: [W] unknown:17 - file:///usr/share/jolla-settings/pages/mobile/mainpage.qml:17: Error: Qt.createQmlObject(): failed to create object:
                                           file:///usr/share/jolla-settings/pages/mobile/inline:1:1: module "com.jolla.settings.multisim" is not installed

Back to where we were. Sending you journal by mail.

rinigus commented 4 years ago

No problem. I think I have a theory - as the port was started around the same time as the crash on XZ2c was reported (https://forum.xda-developers.com/showpost.php?p=80452073&postcount=931), I suspect I don't have proper fix for it in my base either. Symptoms, at least regarding reset, are the same.

AOSP issue seems to be fixed in https://github.com/MartinX3sAndroidDevelopment/bug_tracker/issues/31, so we will need to update AOSP base or just kernel. I'll work on it and will ping when the new images are ready.

ApostolosB commented 4 years ago

Thanks a lot.

rinigus commented 4 years ago

As far as I could see, main change was in the kernel. While new flashable image is being built, we should get the same effect (mostly) using OTA. For that, in terminal:

devel-su

to become root. As root

zypper ref
zypper up

That should pull and install droid-hal-apollo-img-boot and maybe few other packages. After install, reboot. During the next boot, it should flash boot image on boot partition. It should not go to GUI while it flashes boot. After flashing, it will reboot again and you should get to GUI.

Let's see how it will go.

As for image for flashing, it should be ready in 10-20 minutes.

ApostolosB commented 4 years ago

After the reboot and getting to GUI i have no touchscreen. However the phone doesn't seem to reboot any more. I can leave it like that for a few minutes and wake it up by pressing the power button.

rinigus commented 4 years ago

OK. Patch did change touchscreen driver. Now I wonder whether our touchscreen detection has been messed up by that. Or I disabled touchscreen.

If you have ssh access to the phone (wifi or usb), try to login and determine touchscreen device as we did earlier.

If you don't we have to flash new image (in usual location) and determine touch screen device using cat as we did earlier (/dev/input/event?), if there is any

ApostolosB commented 4 years ago

I changed the device in /var/lib/environment/compositor/droid-hal-device.conf with what we had earlier (dev/input/event1) and it didn't work.

I tried cating all events and nothing did anything.

rinigus commented 4 years ago

We have to determine the device again. I suspect it has either changed its name or description. So, if you have access to the device after booting to regular SFOS, check out

ApostolosB commented 4 years ago

There is a /dev/touchscreen but when i cat it doesn't do anything

No /dev/input/eventX reacts to anything. tried them all.

rinigus commented 4 years ago

and in agreement with my theory, we have CONFIG_TOUCHSCREEN_SYNAPTICS_TCM=y dropped from kernel apollo config. It is possible that we removed touchscreen support as well. So, if you cannot find new touch device, I will reenable that config and make new kernel/image.

But looks we are on the right path as there are no crashes.

Just got your message, thank you. Fix is on the way :)

rinigus commented 4 years ago

New kernel is ready. If you have access to device, please update via zypper ref && zypper up

Replace the touchscreen back to /dev/touchscreen. I hope it works now. Will start making new flashable image as well.

ApostolosB commented 4 years ago

OK. The touchscreen works. And on top of that the reboot problem is fixed as it seems.

Now on the serious one. 4g internet still doesn't work. When i go to settings cellular network it says disabled. Telephony and sms work.

rinigus commented 4 years ago

Good. Please send the log (journal and logcat). Easiest is probably to reboot and then grab from /root/*shutdown*

Also, just in case, please send output of getprop command. Send it via private email, please

rinigus commented 4 years ago

I am now looking into what could be missing. As you pointed out, seems like at least multisim gui is one. Try to install jolla-settings-networking-multisim and let me know if it was absent

ApostolosB commented 4 years ago
pkcon install jolla-settings-networking-multisim
Resolving                                                                                                                            [ ==                                                              ]
Querying                                                                                                                             [  ==                                                             ]          [                                                                 ] (0%)
Testing changes
Finished                                                                                                                             [                                                                 ] (0%)
The following packages have to be installed:
 jolla-settings-networking-multisim-0.5.58-1.25.1.jolla.armv7hl Settings plugin for Multi SIM
Proceed with changes? [N/y]
rinigus commented 4 years ago

looks like its missing, indeed. you may have to reboot after installing it.

ApostolosB commented 4 years ago

https://www.youtube.com/watch?v=usfiAsWR4qU

rinigus commented 4 years ago

:) I will tomorrow add multisim support (was sure its there, but somehow I missed it), finalize the builds and then we have to move over to OTA-enabled ones.

the last kernel is built with the faster timer, as updated by Sony AOSP devs. try to see if its any better.

great job, enjoy it!

ApostolosB commented 4 years ago

Everything seems to work ok now. I'll obviously need to test more stuff and i'll take the phone with me the next few days to see whats going on.

But it seems we are in a good state now. Lets go from here.I'll test the new stuff once they are ready. Just ping me.

Thanks for all your hard work. This device is all i could ask for from a SFOS handset. :smiley:

rinigus commented 4 years ago

Released and announced at TMO and XDA. Closing, thanks a lot for help!