Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swapping from a Left screen posture to any other posture freezes the touch input on Duo 2 #136

Open
9 tasks done
Ethanol10 opened this issue Dec 22, 2024 · 15 comments
Open
9 tasks done
Labels
duo 2 Issue is only on duo second generation

Comments

@Ethanol10
Copy link
Contributor

Acknowledgements

  • I have chosen an appropriate title.
  • All requested information has been provided properly.
  • This is not a feature request.
  • This issue is not a duplicate of an existing issue.
  • The issue is solely related to this GSI.
  • This issue occurs with the latest available build.
  • I am not running a custom vendor on my device.
  • This issue is not kernel related.
  • This issue is not related to Magisk/KernelSU/APatch.

Info

  • Device: Surface Duo 2
  • GSI version: v2024.12.21
  • Vendor version:

Expected Behavior

The device should swap screens seamlessly without losing touch input between single/dual postures

Current Behavior

Any transition from a left screen posture will lock the screen up and prevent touch unless a reboot is performed, or a pen is used on Surface Duo 2. As seen in Archfx's GIF demonstrating the new feature, we can see that this does not affect Surface Duo 1, as he seamlessly swaps from Left -> Right -> Dual Screen without the touch locking up.

This is an extension of #50 . However, we now know it's just the left transitions, never the right or dual transition.

Possible Solution

Something in the way we set the display composition for left screens may be weirdly set, perhaps the negative panel offset?

Steps to Reproduce

  1. Set the option "Default Screen in Single-screen postures" to Left
  2. Fold device to show on singular screen
  3. Open the device to transition to Dual screen
  4. Screen locks up unless pen or reboot is performed.
  5. Try again using the Posture locking option in 2024.12.21
  6. Transition from auto to manual left.
  7. Transition again from left to dual/right, which ever is next.
  8. Screen locks up again, Pen or reboot is required.

Logs

No response

Additional context

No response

@Archfx Archfx added the duo 2 Issue is only on duo second generation label Dec 22, 2024
@Clanceeinfinity
Copy link

same for me!

@plan0495
Copy link

plan0495 commented Dec 24, 2024

Since updating to v12.23, the frequency of freezing when closing and reopening has increased.
Default Screen is Right.

@plan0495
Copy link

In previous versions, when closing the phone, the screen would go dark and both screens would show the clock and battery level.
In v12.23, when closing the phone, only one screen is shown and the clock and battery level are not shown.
If that screen is the left, the touch doesn't work.

@Ethanol10
Copy link
Contributor Author

Can confirm, when the overlay for the peek mode appears on left only, it breaks the touch input for Duo2.

Either way, for peeking the time, I reckon it should show on both screens. So as a result we should show on both when peeking the screen. However we still need to try fix the left screen lockups down the line.

@CyberChun0329
Copy link

I would suggest an option to disable using the left screen of duo2 alone before there is a solution to this problem

@Clanceeinfinity
Copy link

New issue: with the newest update, sometimes touch completely stops working when opening my duo 2. i disabled the left screen with the settings too.

@Ethanol10
Copy link
Contributor Author

New issue: with the newest update, sometimes touch completely stops working when opening my duo 2. i disabled the left screen with the settings too.

This is probably the peek mode optimisations that only show on one screen, if the peek mode shows up on the left screen it will lockup the display as expected here.

@Clanceeinfinity
Copy link

New issue: with the newest update, sometimes touch completely stops working when opening my duo 2. i disabled the left screen with the settings too.

This is probably the peek mode optimisations that only show on one screen, if the peek mode shows up on the left screen it will lockup the display as expected here.

this happend again, i saw when i folded the duo2 open, for a split second the right screen was inactive and the left one active, i expect this to be the reason.

@Clanceeinfinity
Copy link

ok i switched to my pixel 7 now, the duo2 is unusable in this state. 1-5 folds and touch stops working and i have to force reboot, it is too annoying :(

@Ethanol10
Copy link
Contributor Author

@Archfx also just wondering, why do we Restart the launcher between some dual screen postures? I notice we have some launcher restarts between book and flat postures.

@Archfx
Copy link
Owner

Archfx commented Jan 5, 2025

@Archfx also just wondering, why do we Restart the launcher between some dual screen postures? I notice we have some launcher restarts between book and flat postures.

Trebuchet launcher does not correctly refresh during posture change, so the posture processor sends this broadcast such that the Trebuchet can refresh itself. This is related to #49 and #39.

@Ethanol10
Copy link
Contributor Author

Trebuchet launcher does not correctly refresh during posture change, so the posture processor sends this broadcast such that the Trebuchet can refresh itself. This is related to #49 and #39.

Oh no I get why we have to restart the launcher, but between some cases where the layout should stay the same it restarts anyway, specifically between about 110 deg to 180 deg there's something that feels like a launcher restart.

@Archfx
Copy link
Owner

Archfx commented Jan 5, 2025

That is weird, can you confirm it using the log.

adb logcat | grep RestartReceiver

This should be triggered if the broadcast is sent. My expected logic was to restart between tablet and phone modes.

@Archfx
Copy link
Owner

Archfx commented Jan 9, 2025

@Ethanol10 For the beta build I removed the broadcast. Looks like we no longer have #39, but #49 exists. We might be able to fix it more effectively.

@Ethanol10
Copy link
Contributor Author

Ethanol10 commented Jan 10, 2025

@Archfx Sorry I forgot to post a log, But the restart was happening when transitioning between FlatDualP and Book postures:

2025-01-10 11:44:53.365  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 121
2025-01-10 11:44:53.625  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 111
2025-01-10 11:44:53.667  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 114
2025-01-10 11:45:05.264  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 111
2025-01-10 11:45:07.064  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 116
2025-01-10 11:45:12.763  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 112
2025-01-10 11:45:13.042  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 116
2025-01-10 11:45:14.365  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 106
2025-01-10 11:45:14.526  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 97
2025-01-10 11:45:14.668  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 92
2025-01-10 11:45:14.824  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 81
2025-01-10 11:45:14.963  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 69
2025-01-10 11:45:14.964  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 61
2025-01-10 11:45:15.464  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 67
2025-01-10 11:45:15.663  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 89
2025-01-10 11:45:15.964  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 101
2025-01-10 11:45:15.964  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 111
2025-01-10 11:45:15.964  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 123
2025-01-10 11:45:16.111  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 129
2025-01-10 11:45:17.064  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 134
2025-01-10 11:45:17.064  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 138
2025-01-10 11:45:17.667  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 141
2025-01-10 11:45:18.363  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 148
2025-01-10 11:45:18.762  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Attempting a static posture transform, setRight: true
2025-01-10 11:45:18.764  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Converted FlatDualP ->
2025-01-10 11:45:18.764  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  to FlatDualP
2025-01-10 11:45:18.784  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting display composition 2 new!
2025-01-10 11:45:18.964  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 152
2025-01-10 11:45:21.666  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 159
2025-01-10 11:45:21.864  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 168
2025-01-10 11:45:23.064  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 161
2025-01-10 11:45:23.364  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 156
2025-01-10 11:45:23.364  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 153
2025-01-10 11:45:23.640  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 149
2025-01-10 11:45:23.662  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 146
2025-01-10 11:45:23.965  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 141
2025-01-10 11:45:24.164  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 136
2025-01-10 11:45:24.564  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 131
2025-01-10 11:45:24.564  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 126
2025-01-10 11:45:24.762  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 123
2025-01-10 11:45:24.764  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Attempting a static posture transform, setRight: true
2025-01-10 11:45:24.764  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Converted Book ->
2025-01-10 11:45:24.764  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  to Book
2025-01-10 11:45:24.781  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting display composition 2 new!
2025-01-10 11:45:24.927  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 119
2025-01-10 11:45:24.928  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 115
2025-01-10 11:45:25.063  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 109
2025-01-10 11:45:27.665  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 105
2025-01-10 11:45:27.900  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 110
2025-01-10 11:45:28.164  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 113
2025-01-10 11:45:28.165  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 110
2025-01-10 11:45:42.766  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 113
2025-01-10 11:45:43.364  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 109
2025-01-10 11:45:43.666  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 112
2025-01-10 11:45:44.564  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 139
2025-01-10 11:45:45.062  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Attempting a static posture transform, setRight: true
2025-01-10 11:45:45.063  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Converted FlatDualP ->
2025-01-10 11:45:45.063  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  to FlatDualP
2025-01-10 11:45:45.081  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting display composition 2 new!
2025-01-10 11:45:45.101  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 174
2025-01-10 11:45:45.101  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 187
2025-01-10 11:45:45.363  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 180
2025-01-10 11:45:46.665  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 166
2025-01-10 11:45:46.965  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 154
2025-01-10 11:45:46.967  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 134
2025-01-10 11:45:46.967  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 115
2025-01-10 11:45:47.262  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 106
2025-01-10 11:45:47.262  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Attempting a static posture transform, setRight: true
2025-01-10 11:45:47.262  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Converted Book ->
2025-01-10 11:45:47.262  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  to Book
2025-01-10 11:45:47.275  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting display composition 2 new!
2025-01-10 11:46:02.468  3462-3462  POSTURE PROCESSOR       com.thain.duo                        D  Setting hinge angle 110

At these same times, the RestartReceiver would receive a broadcast to restart the launcher

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duo 2 Issue is only on duo second generation
Projects
None yet
Development

No branches or pull requests

5 participants