Owners of Xiaomi, Redmi and Poco smartphones often face a situation where the phone screen stops automatically turning off when the cover of the case is closed or, conversely, lights up without pressing a button. This is a direct signal that the Hall sensor is not working correctly or is software-enabled.
In modern MIUI and HyperOS firmware, this sensor is usually active by default, but failures can be caused by software errors, calibration or physical damage to the plume. Enabling and checking the health of the system often requires moving to hidden engineering parts of the system that are not available to the average user. Without the correct operation of this module, it is impossible to fully use smart cases and some locking functions.
In this article, we will discuss how to activate the sensor, conduct a deep diagnostic through the engineering menu and determine whether hardware repair is required, learn what codes to use to access the tests and how to correctly interpret the results of the magnetic field test.
What is a Hall sensor and why you need it in a smartphone
The Hall sensor is a miniature device that detects changes in the magnetic field. In Xiaomi smartphones, it performs one of the key functions of interacting with accessories: it responds to a magnet sewn into the cover of the case. When you close the case, the magnet comes to the sensor, the field changes, and the screen goes out, putting the phone into sleep mode. When you open, the screen lights up.
In addition to controlling the screen, this sensor can be used to determine the position of the device in space in conjunction with the accelerometer, although the main work of navigation is taken by the gyroscope and magnetometer (compass). It is important not to confuse these concepts: the magnetometer is for maps and navigation, and the Hall sensor is for mechanical interaction with the case. If the first is responsible for orientation in space, the second is for the physical closure of the housing.
The lack of response to the cover closure is the first sign of a malfunction, which can cause the battery to run out because the screen remains active in the pocket or bag, and there may be false positives where the phone thinks the case is open even though it is closed, and in some cases the system may completely ignore the presence of the magnetic accessory.
π‘
Before you start the diagnosis, make sure that your case does have a magnet. Some cheap models of books don't have a built-in magnet, so the Hall sensor won't physically respond to them.
Checking the performance through the engineering menu
The most reliable way to check whether the sensor is on and how it responds to magnets is to use the CIT (Customer Inspection Test) Menu, a diagnostic tool built into the MIUI shell, which does not require root rights to log in, just enter a special code in the Phone application.
Dial ##6484## or ##64663##. If the code is entered correctly, the list of tests will open. Find the Hall Sensor or Sensor β Hall. In some versions of the firmware, it may be simply called "Magnetic" or combined with the accelerometer test. When you run the test, the current magnetic field value will appear on the screen.
Hold the magnet (or close the case) to the top of the smartphone, usually next to the front camera. If the sensor is working and on, the values on the screen will change dramatically, and the system will give a message Pass or OK. If the values do not change or the test immediately gives Fail, further diagnosis is required.
βοΈ Diagnostics of Hall's sensor
Calibration and resetting of sensor settings
Sometimes the sensor works, but it gives out incorrect data because of a calibration failure, in which case the screen may go out too early or too late. To remedy this, you can try recalibrating the sensors, and this will not delete your personal data, but return the factory parameters of sensitivity.
To do this, go to Settings β About β MIUI version (click 7 times to activate additional features). Then, in the Advanced Settings menu β Special features (or in the engineering menu in the Single test section), find Calibration. Select Accel or Magnetometer and follow the instructions on the screen, turning the phone in different directions.
There is also a software way to reset through the engineering menu by entering the code ##4636##. In the Phone Information section, you can find reset options, but on Xiaomi global firmware this functionality is often cut. A more effective method is to clear the cache of system services responsible for sensors through the recovery menu (Recovery Mode), but this requires caution.
What if calibration doesnβt help?
Use of third-party applications for activation
If Xiaomiβs built-in tools donβt explicitly enable the sensor to be turned on (since itβs often hard-wired on kernel drivers), Google Play apps come to the rescue. They canβt turn on the physical sensor if itβs turned off at the kernel level, but they can force the sensor to poll and process its signals correctly for the cases to work.
A popular solution is SecondScreen, or specialized utilities like Hall Sensor Test, which allow you to see a graph of the magnetic field change in real time, and if the graph is dead and is a straight line when you lift a magnet, then the device driver is not polling the sensor.
Advanced users can access root. With superuser rights, you can edit kernel configuration files by force activating a sensor survey. However, this requires knowledge of the specific device code and kernel version. An error in editing system files can lead to a bootloop.
| Method of verification | Necessary rights | Difficulty | Efficiency |
|---|---|---|---|
| Engineering Menu (CIT) | No. | Low. | Tall. |
| Third-party annexes | No. | Low. | Medium |
| Resetting calibration | No. | Medium | Medium |
| Root and kernel editing | Root | Tall. | Maximum |
Typical problems and ways to fix them
One of the common problems with Xiaomi is when the Hall sensor sticks. The screen may not light up after opening the case, requiring the power button to be pressed. This is often due to a software failure of the System UI service or a design conflict. Try changing the theme to a standard one and restart the device.
Another common cause is physical damage: Redmi and Poco smartphones often get hit, and even a slight hit to the top of the case can damage the sensor chip or unplug the plume. In such cases, software methods are powerless, and it's worth checking whether the phone's body has magnetized from being constantly worn near powerful field sources.
If you've recently changed a display or battery, the problem may be poor build, and service center wizards sometimes forget to plug in the Hall sensor plume, which often comes as part of a shared charging plume or buttons, or use non-original screens without magnetic protection.
β οΈ Warning: When you try to disassemble your smartphone to check the plume, you automatically lose your warranty. Xiaomi's internal components are extremely sensitive to static electricity, so use an antistatic bracelet.
When hardware repairs are needed
If neither calibration nor reset nor check in the engineering menu yield results (the sensor does not see the magnetic field at all), most likely, the component has failed. The Hall sensor is a separate chip on the board or part of the module that can burn out when voltage surges or moisture hits.
Replacing the Hall sensor on Xiaomi boards is a complicated procedure. Often it is soldered directly on the motherboard, rather than put on a separate plume. In such cases, work is required with a microscope and a soldering station. It is cheaper and more advisable to replace the entire charging plume or lower board if the sensor is integrated there, as happens in some models of the Redmi Note series.
A temporary solution might be to disable the "Cover" function in the settings if this option is available in your version of MIUI. This will prevent the system from responding to the magnet, and the screen will have to be extinguished with a button. This is inconvenient, but saves from randomly turning on the screen in your pocket.
β οΈ Warning: Do not use powerful neodymium magnets to "check" the sensor close to the camera (OIS) lens, and the photos will become blurry.
π‘
If the software methods and calibration do not help, and in the engineering menu the sensor shows "Fail" or zero values when the magnet is lifted, the problem is hardware in nature and requires replacing the component in the service.