GrapheneOS / os-issue-tracker

Issue tracker for GrapheneOS Android Open Source Project hardening work. Standalone projects like Auditor, AttestationServer and hardened_malloc have their own dedicated trackers.
https://grapheneos.org/
349 stars 19 forks source link

USB-C Earbud Start-Stop Issues While Phone is Locked #3720

Open TheZorse opened 2 months ago

TheZorse commented 2 months ago

A recent update seems to have introduced issues with USB-C earbuds while the phone is locked. The most recent update has made the issue worse, so I'll describe what I'm experiencing since that latest update. (I actually had the same problem with this phone and these earbuds when I first bought them over a year ago, but an update got them working for several months.)

I'm on the stable update branch and using Skullcandy USB-C earbuds on a Pixel 6a. The Skullcandy buds have only a start/stop button, no volume buttons. I have the phone's USB settings set to "Charging-only when locked, except before first unlock."

While the phone is locked, I can listen to music with no problem (as long as I plug in the buds and start a song before locking). I can stop the music without issue by pressing the earbud button, and if I press the button again within one or two seconds, it resumes playing immediately.

The problem: if I stop the music using the earbud button and leave it for more than a couple of seconds, pressing the button again has no immediate effect. Here are the ways I can get the music playing again:

-after I press the button, the music will resume playing, but not immediately. Sometimes it takes 3-5 seconds, sometimes closer to 15, sometimes 30, and once nearly a minute.

-when I press the button and the music doesn't come back on, if I wake the phone by tapping the screen or pressing the power button, the music will then come on. It seems like the earbuds have sent the message to the phone to play the music, but the message isn't received until I manually wake the phone.

I've tried setting the phone to have no USB restrictions at all and rebooted, but the issues persist.

maade93791 commented 2 months ago

are the developer options enabled?

maade93791 commented 2 months ago

changing USB configuration in the developer settings can cause such behavior

TheZorse commented 2 months ago

Developer options are enabled but I haven't messed with them at all. This was definitely the result of an update. About two updates ago, I started needing to press the earbud button twice to resume playing the music. After today's update, I started having the issues described above.

If I'm not mistaken Graphene changed something about the way USB works, about two updates ago.

TheZorse commented 1 month ago

This issue has been greatly mitigated, but not quite resolved. As I mentioned, the issue described in my report was preceded by a "less-worse" issue. The situation has reverted to that previous state, which is:

As per my report, while the phone is locked, after music has been stopped, if the button is pressed ONCE, the music will not restart immediately - I have to either wait some number of seconds or manually wake the phone.

HOWEVER, now, if I press the button once and then right away press it again and hold it for half a second, the music will start immediately. (The button can't be double-pressed too fast because this skips songs, or too slow because it won't start the music.)

Expected behaviour is a single press of the button restarts the music.

The current status is perfectly acceptable to me, but not technically fixed. This is my first-ever bug report, so I'm not sure if I should leave it open of not.