sailfishos-sony-tama / main

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

[XZ2c] Sensors are not working #159

Closed caio2k closed 3 years ago

caio2k commented 3 years ago

Hi there, thanks for the fantastic work put in this port. I'm using XZ2c with 4.1.0.24 AOSP10 beta and everything works (well, everything with aarch64 support at least), but the automatic screen rotation. I also noted the screen was way too bright at minimum when auto adjust was activaed. Also, following the instructions, pickupd did not work. So I decided to check the reason why...

In Sensor section inside CSD application I got:

If you need further info please let me know how to get it!

rinigus commented 3 years ago

This is strange as on my XZ2c all sensors work fine. Are you sure you flashed a correct OEM binaries? It sounds like a wrong version was used, not for AOSP10.

caio2k commented 3 years ago

I've followed the instructions in flash.md file. To be more precise, I'm using H8324 (XZ2c dual sim). The only thing that I could not follow was running flash.sh due to my USB setup, I had to run each flash step manually. Anyways, I've reflashed it and the issue persists. The files used are below:

a04c1e2caf2e77139b4002a76fc89ae3  Sailfish_OS-4.1.0.24-h8324-0.4.0.1.zip
4006329983881f25119439df4b961048  SW_binaries_for_Xperia_Android_10.0.7.1_r1_v12a_tama.zip
719ff4dcb40300a9034d4df00c07ae2a  vbmeta.zip

Please find below the logs captured from the csd tool:

[D] SensorManagerInterface::interface:78 - Requested sensor id ' "proximitysensor" ' interface not granted
[D] SensorManagerInterface::interface:78 - Requested sensor id ' "proximitysensor" ' interface not granted
[D] unknown:0 - Load settings from "10-hw-settings.ini"
[D] unknown:0 - Append settings from "20-hw-settings-dual-sim.ini"
[D] unknown:0 - "BackCamera/Flash" variable found, value: true
[D] unknown:0 - "LED/LedType" variable found, value: "RGB"
[D] unknown:0 - "SIM/ModemCount" variable found, value: 2
[D] unknown:0 - "Battery/VoltageTest" variable found, value: false
[D] unknown:0 - "Audio/RecordTopDevice" variable found, value: "input-builtin_mic"
[D] unknown:0 - "Audio/RecordBottomDevice" variable found, value: "input-builtin_mic"
[D] unknown:0 - "Audio/RecordTopDeviceChannel" variable found, value: "left"
[D] unknown:0 - "Audio/RecordBottomDeviceChannel" variable found, value: "right"
[D] SensorManagerInterface::interface:78 - Requested sensor id ' "gyroscopesensor" ' interface not granted
[D] SensorManagerInterface::interface:78 - Requested sensor id ' "gyroscopesensor" ' interface not granted
[W] unknown:0 - Failed to start Gyro Sensor
[D] SensorManagerInterface::interface:78 - Requested sensor id ' "accelerometersensor" ' interface not granted
[D] SensorManagerInterface::interface:78 - Requested sensor id ' "accelerometersensor" ' interface not granted
[D] SensorManagerInterface::interface:78 - Requested sensor id ' "gyroscopesensor" ' interface not granted
[D] SensorManagerInterface::interface:78 - Requested sensor id ' "gyroscopesensor" ' interface not granted
[D] SensorManagerInterface::interface:78 - Requested sensor id ' "compasssensor" ' interface not granted
[D] SensorManagerInterface::interface:78 - Requested sensor id ' "compasssensor" ' interface not granted

I don't know if I should try to re-flash Android and check if it still working there, but before flashing it was! I promise :)

rinigus commented 3 years ago

I have exactly the same device and all sensors are working fine, according to CSD as well. I wonder whether your USB setup leads to some issues with flashing. Maybe you should try to flash on some other PC with USB2 support? Don't think it is hardware issue either if all was working in Android

caio2k commented 3 years ago

After resurrecting an old i386 computer to run tests, I was able to reproduce the issue with a fresh beta and alpha 4.1 builds. It was only fixed after using emma to flash back Android and activating the "automatic rotation"... Which is was my mistake, in SFOS the toggle is to de-activate auto-rotation, while in Android the toggle is to activate it... After re-flashing 4.1 beta all sensors started working. The only thing I still see in csd is the range of some sensors goes beyond the expectation, but I guess it is a minor since rotation is working fine. Thanks again for your amazing work @rinigus not only in this port!

rinigus commented 3 years ago

Please report which sensors are off the expected ranges in a separate new issue. I will be able then to test it as well