HKS Switches off results in screen rotation

Couldnt find a topic here but am i the only one where the screen consistently and always will rotate from portrait to landscape when switching all HKS switches to off?

Ideally what it should be doing is nothing. Take the current screen orientation value, store it, recover it once sensors come on line.

In other words when switching rotation from auto to manual or disabling the rotation related sensors, whatever the last orientation was should now become the new or current orientation- until manually changed by the user.

Sensors on, portrait
Sensors off, portrait

Sensors on, landscape
Sensors off, landscape

etc

1 Like

Completely agree, have annoyed me multiple times as well!

Do you have some more specific steps to reproduce? I’m not seeing anything like that here on my phone.

sure steps to repeat:

  1. switch all HKS on
  2. turn phone off
  3. turn phone on
  4. unlock
  5. make sure auto rotate is enabled, screen is in portrait orientation
  6. turn off microphone, camera HKS
  7. turn mobile data HKS off, wait a few seconds maybe use phone
  8. turn off wifi HKS

Observe screen rotates into landscape mode.

  1. turn wifi HKS on, observe auto rotate is active but rotating phone will not change it back to portrait mode,
  2. toggle auto rotate on and off,
  3. observe now the screen rotates to portrait based on phone orientation.
1 Like

Nice find :slight_smile: !

I can reproduce it like this:

  • auto rotate enabled, modem off (hks enabled), wifi/bt off (hks enabled), camera/mic on (hks disabled), phone in portrait position
  • turn phone to the left to auto rotate to landscape
  • turn camera/mic hks on (disabling camera/mic) → disables orientation sensor, icon in pull-down menu changs to manual setting landscape
  • turn phone back to portrait → screen stays in landscape, because sensors off
  • while phone still in portrait position and screen still in manual landscape mode switch camera/mic hks off (enable sensors and camera/mic) → screen auto rotates to portrait
  • keep phone in portrait position and turn camera/mic hks on (disabling camera/mic and sensors) → screen rotates back to landscape mode

Expected behaviour: screen stays in last active rotation state and doesn’t change back to landscape.

The point to trigger the problem is to switch sensors off in landscape mode, turn the phone back to portrait, enable sensors (at this point it seems that the saved state for manual rotation does not get overwritten?), disable sensors again (last saved state for manual rotation is restored?).

3 Likes

It isn’t easy to reproduce for me, but after several tries it did actually happen. At first glance it looks like a bug in iio-sensor-proxy.

2 Likes

weird thing is that did not happen for me and step 5 i would say is expected and correct behaviour. So maybe it is an intermittent bug.

does it reproduce at all when following my steps or just hit and miss?

No and yes.

Only if you prepend (as I remember):

a) have phone in landscape orientation with sensors switched off
b) turn phone to portrait orientation

It does seem like if the sensors don’t have power (HK on) then they don’t know you’ve rotated the phone (obviously). But it seems like they’re not “taking stock” of their position when they come back online and so the orientation reverts. Once you tilt the phone back and forth, they register the movement and behave accordingly.

My two cents.

1 Like

It happens to me often. It is related to changing the kill switches (switching them on).
It is somewhat irritating when it happens.

1 Like

I don’t actually know how to close a threat? If anybody does, but this has been resolved!

there is still a separate issue where auto rotate while enabled doesnt actually rotate screen so sensor is off, toggling soft setting does bring it back, not as annoying as bug explained above

I think you have to ask a moderator but there isn’t really a need. The main thing is to post a solution and then mark that post as the solution.

thanks irvin, i did the solution checkbox not sure where the right place would be, but at least it would make posts easier to search, filter