On my current device (a Pixel 4 XL) USB functionality like MTP file transfer and ADB debugging is unreliable, with the device disconnecting after a random amount of time. On GrapheneOS this behavior happens every couple of minutes, with it improving to happening after a longer period of time if nothing has been running on the device for a while. On the stock OS it would happen every minute, and when I rooted the stock OS (before I moved to to GrapheneOS) and ran top on the phone noticed a process would be terminated the same exact time the USB functionality would fail.

On an older Pixel 3 device running the stock OS, this issue would happen several times every minute, to the point of being almost impossible to transfer anything off the phone.

However on a Pixel 6 device running the stock OS, the issue would never come up, even if the phone was running many other apps in the foreground and background.

This behavior would happen regardless of what USB port I would plug the Pixel 4 XL and Pixel 3 into as well as regardless of what cable I would be using, even with the original cables the phones came with. It would also happen on multiple different PCs and laptops.

Is there a technical reason for why this behavior occurs, and why it did not seem to occur at all on the Pixel 6?

    lorarzi42 Sorry, can't help on this one, as I didn't start using GrapheneOS until the Pixel 6 Pro was out. USB works fine on both the Pixel 6 Pro and 7 Pro. Just used it the other day to transfer via SeedVault my apps and data from the 6 to the 7.

      Kamaehuakanaloa That's OK. I already know that the USB functionality works fine on the newer Pixel models (as I've not been able to reproduce the USB issues on a Pixel 6). I'm guessing it might be caused by older Pixels having less available system resources overall, resulting in whatever handles USB getting terminated on the phone.

      I should have added in the original question that the USB issues were present ever since I've had my Pixel 4 XL as well as ever since the owner of the Pixel 3 had theirs.