AsteroidOS / meta-anthias-hybris

OpenEmbedded layer that provides libhybris support for the Asus ZenWatch 1. (Merged to: https://github.com/AsteroidOS/meta-smartwatch)
GNU General Public License v2.0
5 stars 2 forks source link

Touch not working after screen wake-up #1

Closed maciak closed 3 years ago

maciak commented 6 years ago

In build from 07-May-2018 03:04 touch does not work after watch goes to sleep and gets waken up. I dont know if that happened befre it's just the first version I've tried.

Atrate commented 6 years ago

Can confirm, also happens here.

On another note, have you been able to get past the first language selection dialog? For me the button doesn't work.

locusf commented 6 years ago

Yes I can also confirm this, but for any fixes, I have gotten very little diagnosed on the actual issue.

Do you two get the touch indicators when unlocking the screen via the power button? So it does react to touch but only by flashing the indicators?

maciak commented 6 years ago

Yes I can see the indicators but after unlocking rouch is not responding. Watch is working really well untill it goes to sleep. I can do full setup and it connexts to the phone and syncs notifications.

locusf commented 6 years ago

What if you start your watch with bluetooth disabled? I've disabled it and now it properly locks.

linuxmobile commented 6 years ago

The same. Once the smart watch screen is turned off, the touchscreen does not work again until the device is restarted. I tried turning off the bluetooth and it does not work either. Another small bug, is that by turning off the bluetooth, you can not re-activate it until a reboot.

smugworthfellow commented 6 years ago

I can confirm as well. Experienced the above listed issues with the touch not responding until device is booted with bluetooth off. Would like to be able to pair the device though. Any idea on if this can be fixed? anything a regular user can do to help/troubleshoot?

benyanke commented 6 years ago

Can confirm - just installed today.

linuxmobile commented 6 years ago

any fix?

stefanreimers commented 6 years ago

To raise attention on this issue: I am also an Anthias user looking forward to a fix.

FlorentRevest commented 6 years ago

Thanks to @timttmy 's donation of an anthias watch, I was finally able to start debugging this issue tonight. I think I may have come up with a fix with https://github.com/AsteroidOS/meta-anthias-hybris/commit/cdd8520fbfe48912baca6297e2b81ed74c3004ff but I am very short on time and I wasn't able to fully try it out yet. Keep an eye on the nightly releases https://release.asteroidos.org/nightlies/anthias/ and let me know if the next one (once the file's timestamp will be set to a date after the 20th of July) shows some progress.

EDIT: After having tested the patch overnight, I noticed that it keeps a wakelock enabled and destroys battery life so the patch will still need some work.

timttmy commented 6 years ago

Hey @FlorentRevest just flashed the nightly from the 23rd and I can report that it's working! Let's see how the battery life goes :) One thing which may need adding to the upgrade instructions or maybe it's just my experiance is that I had to ssh into the watch and run 'systemctl --force reboot bootloader' to get the watch in to bootloader mode. adb either complained of no device with the watch in developer mode as per the instructions and if I put the watch into ADB mode then adb just hangs and waits.

Anyway Many many thanks :)

EDIT: I can confirm that the battery life is terrible. I'm getting around 6 hours on a full charge.

Atrate commented 6 years ago

@FlorentRevest I don't want to be annoying, but is there any progress on eliminating the wakelock?

FlorentRevest commented 6 years ago

You're not. Unfortunately I haven't much to report yet. I definitely want to get back to this bug soon but I'm always kept busy by one thing or another...

Atrate commented 5 years ago

@FlorentRevest Is there anything I could do to help make progress?

Atrate commented 5 years ago

@FlorentRevest It's been more than half a year, please, at least a status update?

FlorentRevest commented 5 years ago

@MegaArthur nothing new to report regarding this issue... Please understand that I (try to) have a life next to AsteroidOS. I'm currently in a key time of my life, about to finish my master degree abroad and get a job... somewhere? This is already very demanding in itself and although I would really like to close this issue, I can only keep it low-priority next to the other things I have to do. Be assured you will be updated whenever this problem gets solved.

black9404 commented 5 years ago

any progress regarding this ?

Atrate commented 4 years ago

@FlorentRevest May we get a status update?

FlorentRevest commented 4 years ago

This issue would be updated if there was any progress on it.

symphonymarie commented 4 years ago

I'm a novice (bad) developer mostly specializing in making useless optical devices, so I don't know if I'm capable of making a fix I would want to share with anyone. However, while googling this issue I came across some information that might help. As a caveat I am 100% accepting of the criticism that I might be talking out of my ass. nNo idea if any of this is actually relevant. Just offering here in case it helps anyone who DOES know what they are doing! :)

Possible leads:

I'll probably continue messing around with my watch though this will likely lead nowhere. Will update if anything interesting happens!

maciak commented 4 years ago

Hi, Awesome that someone actually had a look at this. I have no knowledge about how it works so could not help at all. This is progress :)

MagneFire commented 4 years ago

Thanks @symphonymarie for looking into this!

Regarding you comments:

That being said, I had a look into the kernel source. It seems that anthias uses the it7260_ts_i2c touchscreen driver. The source of which is located at: https://android.googlesource.com/kernel/msm/+/refs/heads/android-msm-anthias-3.10-lollipop-mr1-wear-release/drivers/input/touchscreen/it7260_ts_i2c.c

From my quick analysis, the following line peaks my attention: /* fix touch will not wake up system in suspend mode */ (https://android.googlesource.com/kernel/msm/+/refs/heads/android-msm-anthias-3.10-lollipop-mr1-wear-release/drivers/input/touchscreen/it7260_ts_i2c.c#457) That function (chipLowPowerMode) is called by mode_notify_sys which is utilized by the asus_utility driver (https://android.googlesource.com/kernel/msm/+/refs/heads/android-msm-anthias-3.10-lollipop-mr1-wear-release/drivers/misc/asus_utility.c).

This driver is actually the same one used for wren (Asus Zenwatch 2).

The keywords: FB_BLANK_ENTER_NON_INTERACTIVE and FB_BLANK_ENTER_INTERACTIVE are actually also used on wren for Ambient Mode/Always on display.

Why is this relevant? Well wren had an issue where Always-on-display didn't work. This was fixed recently with this patch: https://github.com/AsteroidOS/meta-asteroid/blob/master/recipes-qt/qt5/qt5-qpa-hwcomposer-plugin/0007-backend-setInteractive-based-on-display-state.patch. At first glance this patch does not seem relevant, but it uses PowerHAL when the screen sleeps(enters FB_BLANK_ENTER_NON_INTERACTIVE) and wakes(enters FB_BLANK_ENTER_INTERACTIVE).

So my question is: Can you test the most recent build and check whether this issue still exists, or if it has been solved with the patch mentioned above.

If it turns out that this wasn't solved. I would love to help with this, but I don't own an anthias. So can you provide a journalctl --no-pager log on AsteroidOS (Let the watch go to sleep and wake it via the power button). And also flash back Android Wear and provide a dmesg log (with the same process: let the watch go to sleep, wake it once).

EDIT: It actually looks like the PowerHAL was removed in this commit: https://github.com/AsteroidOS/meta-anthias-hybris/commit/d31b46a893b66b5d09385a589b968c99c9783e0a#diff-af4162fd839371915bfe84beec55144fdb9dd4b430f05856387c5027e064867b

Can someone try to push this file: https://www.dropbox.com/s/65o75zc9f2kxspj/power.default.so?dl=0 to /system/lib/hw/? You will likely need to symlink it to using:

cd /system/lib/hw # In case you weren't already at this location
ln -s power.default.so power.anthias.so

Then reboot the watch, success?

Atrate commented 3 years ago

Can you test the most recent build and check whether this issue still exists, or if it has been solved with the patch mentioned above.

Haven't applied the PowerHAL symlink patch, but the latest build seems to have really good battery life with working touch, unless the battery indicator is lying. Going to report in a couple of days with more information.

UPDATE: The battery life is not too good it turns out. Lasts 10-16hrs on full charge with standard usage. Will try the PowerHAL thing in a couple of days.

UPDATE: Pushing and linking PowerHAL does not seem to have any positive impact on battery life, it may have even gotten worse.