azymohliad / watchmate

PineTime smart watch companion app for Linux phone and desktop
GNU General Public License v3.0
136 stars 4 forks source link

Doesn't recover from system suspend #31

Closed grahamvh closed 8 months ago

grahamvh commented 11 months ago

Hello! Watchmate doesn't recover after a suspend of my phone, and needs to be relaunched.

Steps to reproduce:

  1. Launch watchmate
  2. Either wait for your computer/phone to suspend or manually trigger a suspend
  3. Wake the computer/phone up
  4. Watchmate shows a blank window where it once showed the pinetime information (and the music controls stop working on the watch, if you had a music player running)

System Information

OS: PureOS 10 (Byzantium) Installed From: Flatpak Version: 0.4.5

Net Effect

On phones where the suspend time tends to be 1-2 min, this means that if I pause for too long, I need to not only wake it back up, but log back in and relaunch watchmate. It's an annoyance, and somewhat defeats the utility of being able to play/pause from the pinetime.

azymohliad commented 11 months ago

Thanks for the report, I can reproduce it and I agree that it's important. Not yet sure when I can look deeper into it.

grahamvh commented 11 months ago

Cool, thanks for taking a look.

azymohliad commented 8 months ago

Oops, I keep forgetting that merging PRs automatically closes the mentioned issues. Anyway, this should be fixed now in v0.5.0, which should be up on Flathub in a few hours and hopefully soon in available distro packages. Please, don't hesitate to reopen if it still doesn't work for you

grahamvh commented 8 months ago

Gave it a try, it works much better! Thank you!

I still see this occasionally on my Librem 5, but not on my laptop. Watchmate will just spin trying to reconnect, and won't succeed until I reset the watch(restarting watchmate has no effect). As I have not been able to reproduce this with my laptop, I suspect some odd interaction between the librem 5 and the PineTime. Thus likely not a watchmate issue.

I can also make this state happen consistently if I go out of range of the Librem 5. Again, this doesn't happen on the laptop.

I think you can close this issue though. Works much better after this fix :). If your interested in helping figure this out, would you like a separate bug?

azymohliad commented 8 months ago

Hm.. I have a theory that rebooting the PineTime is only needed for it to hide from Librem 5 for a sec. When going out of range, does your PineTime completely disappears from the devices list in Watchmate, or just immediately tries to reconnect? If latter, could you make sure that it disappears? Putting it into a metal enclosure may help, or into a turned-off microwave, or just disabling the bluetooth on the PineTime.

Also, when in this broken state, can you reconnect to it from the system bluetooth settings? If not, does forgetting the device form the system settings help? Or disabling and re-enabling the bluetooth on Librem 5?

Yes, I think a separate bug report would be the best to track it.

grahamvh commented 8 months ago

And now I can't reproduce it :P. I'll open a new bug if it happens again.