Xperia 10 III - Hall/Magnet sensor

So, according to all kinds of rumors the Xperia 10 III does have a magnetic/hall sensor, but it has been “disabled” ob both Android and SailfishOS devices.

Can someone say how ‘disabled’ that thing really is?

Because for one there’s hints that it does do something here, and myself I see the following:

I have an aftermarket “book” style case with a magnet in the flap.

Usually when sitting and browsing things on the internet I have the flap flipped over to the back side, and use index and middle finger to hold the flap (thus securing the phone so it can’t slip out of my hands).
Diagram:

       screen side
=========================
|      Phone            | )
========================= |
______________            /       
 index finger )          /
--------------          /
  --------[~]-----------   book case flap w/ magnet [~]
_______________                   
   ring finger )        
---------------          

As is wont to happen on the interwebs, regularly there come Facepalm moments, in which I use my left hand to perform the facepalm, and put the phone down with my right hand.
When putting down, I remove the fingers and put it e.g. on my upper leg or a table.

Now, it regularly happens at this moment that the display goes off.
Picking the phone up again sometimes turns it right on again, in any case it is not locked.
So basically it’s the opposite of this post.

I believe this is the hall/magnet sensor reacting to the flap magnet coming into contact on the back of the phone.

Questions:

  • does the theory sound reasonable?
  • is is possible that the sensor is indeed active, contrary to the official “rumors”? (e.g. because I flashed on top of an Android version that didn’t have the turn off fix?)
  • how to really turn it off?
5 Likes

Have a look in mcetools.

  --set-lid-sensor-mode=<enabled|disabled>
    set the lid sensor mode; valid modes are:
    'enabled' and 'disabled'

  --set-lid-open-actions=<disabled|unblank|tkunlock>
    set the lid open actions; valid modes are:
    'disabled' ignore lid open
    'unblank'  unblank (and show lockscreen)
    'tkunlock' unblank and deactivate lockscreen (if possible)

  --set-lid-close-actions=<disabled|blank|tklock>
    set the lid close actions; valid modes are:
    'disabled' ignore lid close
    'blank'    blank display
    'tklock'   blank display and activate lockscreen

Nice diagram by the way. :wink:

2 Likes

Thank you, @nephros, for your hilarious storytelling and ASCII art! This could have been a boring topic, but YMMD :slight_smile:

3 Likes
2 Likes

Thanks for the bug references, yea so what I call rumors above is now concrete information.

Still, it appears something is active which turns the lights off…

Thanks. My current config is:

$ mcetool  | grep -i lid
Kbd slide blank inhibit:             disabled
PS acts as LID sensor:               disabled
Use lid sensor mode:                 enabled
Filter lid with als:                 disabled
Lid closed als limit:                0 (lux)
Lid open actions:                    tkunlock
Lid close actions:                   tklock
Kbd slide open trigger:              no-proximity
Kbd slide open actions:              unblank
Kbd slide close trigger:             after-open
Kbd slide close actions:             tklock

I’ll experiment with ALS filter mode ( --set-filter-lid-with-als), maybe that helps.

Oh and while revisiting MCE I also found this (which is ON on my device):

      --set-orientation-change-is-activity=<enabled|disabled>
        set the orientation change cancels inactivity toggle; valid modes are:
          'enabled'  orientation changes keep display on etc
          'disabled' orientation changes do not affect inactivity state

Hmm, on reflection and taking 5 minutes to play, I realise that perhaps mcetool is of no help here. I don’t have a case for my device, but I do have a small magnet wrapped in blutak. I don’t seem to be able to affect the device at all with any settings previously listed. I guess the cover just works on the proximity sensor and timing.

Does state in /sys/bus/platform/devices/soc:bu520x1nvx/ have 1 maybe on your device?

Nope, that’s zero:

root@PGXperiiia10:/home/nemo # cat /sys/bus/platform/devices/soc:bu520x1nvx/state
0

Try changing Hall=0 to 1 in /usr/share/csd/settings.d/10-hw-settings.ini and then run hall test in csd?

Jeez, Sony implemented a flaky hall sensor and disabled it deliberately in SoC? What else did they mess up with this device (e.g. the way off LED colours because of wrong current to power the led, missing echo cancelation even if correct acdb IDs are in use, the OLED screen colour problem and last but not least the hall sensor that is not working reliably and instead of finding and fixing the issue let’s simply remove it from the SoC sensors).

As expected, the test always stays on “Fail”.

So maybe I’m on the wrong path wrt the whole magnet thing and it 's just mce orientation-change-is-activity=enabled.

I also have this enabled, but have not noticed any weird screen blankings (and can’t reproduce with a magnet, but maybe using wrong magnet, the defconfigs were turned to y it seems [defconfig][7.1.r1] msm8956/msm8996/msm8998/sdm845/sm6125/sm8150: Enable INPUT_BU520X1NVX by mlehtima · Pull Request #98 · sonyxperiadev/kernel-defconfig · GitHub so maybe it works in 1 in 100 phones and you got lucky?)

Heh using magnet from tablet cover, it works, there is a slight vibration when it triggers


edit: and the state goes 1:
[defaultuser@Xperia10III ~]$ cat /sys/bus/platform/devices/soc:bu520x1nvx/state
1

2 Likes

Cool, do you remember which Android version you had the device on when flashing?

11 as it came from the shop, managed to disable all the auto-updates that were trying to trigger on it, but not sure what exactly minor versions

Ashes on my head… SONY didn’t disable the hall sensor instead they fixed it… I did some tests today evening and can confirm that:

@nephros

a) there IS a working Hall sensor inside the device
b) it is NOT disabled by Sony

I upgraded my device to firmware 62.0.A.9.11 (latest Android 11) before flashing Sailfish OS.

You should place your magnet on top of the phone approx. 1cm left to the volume up/down button to turn on the display if you remove the magnet from that position (or turn it off if you replace it).

If the magnet is in the right position the state will switch from 0 to 1:

[root@Xperia10III defaultuser]# cat /sys/bus/platform/devices/soc:bu520x1nvx/state
1

Journalctl Log:

Jul 10 22:32:10 Xperia10III mce[1985]: modules/display.c: mdy_display_state_enter(): current display state = OFF
Jul 10 22:32:10 Xperia10III mce[1985]: modules/display.c: mdy_display_state_leave(): current display state = POWER_UP
Jul 10 22:32:10 Xperia10III lipstick[5856]: [D] unknown:0 - unsleepDisplay
Jul 10 22:32:10 Xperia10III kernel: [drm:dsi_display_set_mode] [msm-dsi-info]: mdp_transfer_time_us=15666 us
Jul 10 22:32:10 Xperia10III kernel: [drm:dsi_display_set_mode] [msm-dsi-info]: hactive= 1080,vactive= 2520,fps=60
Jul 10 22:32:10 Xperia10III kernel: [drm:dsi_ctrl_isr_configure] [msm-dsi-info]: dsi-ctrl-0: IRQ 385 registered
Jul 10 22:32:10 Xperia10III kernel: dsi_panel_driver_touch_pinctrl_set_state: invalid 'somc_ts_int_active' pinstate
Jul 10 22:32:10 Xperia10III kernel: @@@@ panel power on @@@@
Jul 10 22:32:10 Xperia10III kernel: somc_panel_color_manager: somc_panel_inject_crtc_overrides (786): Override: Already have original funcs! Is setup called twice??
Jul 10 22:32:10 Xperia10III kernel: somc_panel_color_manager: somc_panel_pcc_setup (884): Cannot read uv data: missing command
Jul 10 22:32:10 Xperia10III kernel: somc_panel_color_manager: somc_panel_pcc_setup (888): u,v is flashed 0.
Jul 10 22:32:10 Xperia10III kernel: somc_panel_color_manager: somc_panel_colormgr_apply_calibrations: Couldn't apply PCC calibration
Jul 10 22:32:10 Xperia10III kernel: somc_panel_color_manager: somc_panel_colormgr_apply_calibrations: Cannot send HSIC calibration
Jul 10 22:32:10 Xperia10III kernel: sec_ts 1-0048: [sec_input] sec_ts_dsi_panel_notifier_cb: power up
Jul 10 22:32:10 Xperia10III kernel: sec_ts 1-0048: [sec_input] sec_ts_start_device
Jul 10 22:32:10 Xperia10III kernel: sec_ts 1-0048: [sec_input] sec_ts_pinctrl_configure: ACTIVE
Jul 10 22:32:10 Xperia10III kernel: (NULL device *): deviceless supply vdd not found, using dummy regulator
Jul 10 22:32:10 Xperia10III kernel: (NULL device *): deviceless supply avdd not found, using dummy regulator
Jul 10 22:32:10 Xperia10III kernel: sec_ts 1-0048: [sec_input] sec_ts_power: on: avdd:on, dvdd:on
Jul 10 22:32:10 Xperia10III kernel: dsi_panel_driver_oled_short_det_handler: VREG_NG interrupt!
Jul 10 22:32:10 Xperia10III kernel: sec_ts 1-0048: [sec_input] sec_ts_wait_for_ready: 09, 00, 10, 00, 00, 00, 00, 00 [0]
Jul 10 22:32:10 Xperia10III kernel: sec_ts 1-0048: [sec_input] sec_ts_start_device: cover open, not send cmd
Jul 10 22:32:10 Xperia10III kernel: sec_ts 1-0048: [sec_input] sec_ts_set_grip_type: re-init grip(0), edh:0, edg:0, lan:0
Jul 10 22:32:10 Xperia10III kernel: sec_ts 1-0048: [sec_input] sec_ts_read_event: STATUS 1d 61 2 2 3 0 0 0
Jul 10 22:32:10 Xperia10III mce[1985]: modules/proximity.c: mp_datapipe_set_proximity_sensor_actual(): state: UNDEF -> OPEN
Jul 10 22:32:10 Xperia10III mce[1985]: modules/display.c: mdy_display_state_enter(): current display state = ON
Jul 10 22:32:10 Xperia10III droid-hal-init: processing action (ril.ecclist1=*) from (/usr/libexec/droid-hybris/system/etc/init/ecclist.rc:10)
Jul 10 22:32:10 Xperia10III droid-hal-init: processing action (ril.ecclist=*) from (/usr/libexec/droid-hybris/system/etc/init/ecclist.rc:6)
Jul 10 22:32:12 Xperia10III kernel: [schedu][0x5d137f1c8][22:32:12.978680] wlan: [6580:I:OSIF] vdev 0, scan id 41031 type COMPLETED(1) reason COMPLETED(1) scan found 6 bss
Jul 10 22:32:13 Xperia10III kernel: [schedu][0x5d13f2952][22:32:13.003314] wlan: [6580:I:OSIF] scan start scan id 41032
Jul 10 22:32:13 Xperia10III kernel: rpmh_rsc_send_data: 9 callbacks suppressed
2 Likes

It works just fine also when installing on first recommended Android 10. I have had this magnetic book case since day one, so I never even thought about it.
Sorry about the Swedish site.

1 Like

Wow, it works! I just moved the magnet in my case to the correct position; I use the same case as with X10 II, so the magnet just needs to be in a different place. I would never have found the correct place myself, thank you!

1 Like