Flashlight doesn't work if battery level is at 15% or lower

REPRODUCIBILITY: always
OS VERSION: 5.2.0.16 (Finlayson)
HARDWARE: Jolla Phone 2026
UI LANGUAGE: Finnish
REGRESSION:

DESCRIPTION:

Flashlight doesn’t work on Jolla Phone 2026 if battery level is 15% or below. This is the case even if the user controllable battery saving mode is off and even while charging the phone. The battery saving mode that can be toggled by the user doesn’t affect the flashlight. When the battery level goes down to 15% with the flashlight on, the light just turns off all of a sudden but the flashlight toggle stays on.

If flashlight toggle is set on at 15% or below battery level, the light doesn’t turn on even if battery is charged to above 15%. After that flashlight toggle needs to be turned off and on again to have the light actually turn on.

PRECONDITIONS:

Battery level of the phone is 15% or less. Flashlight toggle is in the top menu.

STEPS TO REPRODUCE:

  1. Tap the flashlight button in the top menu.

EXPECTED RESULT:

  1. Flashlight turns on and flashlight toggle state changes to on

ACTUAL RESULT:

  1. Flashlight doesn’t turn on but flashlight toggle state changes to on

MODIFICATIONS:

ADDITIONAL INFORMATION:

Journal logs of the case where flashlight turns off when battery level goes from 16% to 15%:

Summary
elo 08 15:59:54 JollaPhone2026 kernel: is_kernel_power_off_charging, bootmdoe = 0
elo 08 15:59:54 JollaPhone2026 kernel: [fgauged][FGADC_info] tmp:37 36 36 rdnafg:0 vc:0 disable_fg:0:0 fg_v:5730:4270:38485:-15321:55836:8473:1527:1527 low_temp:0 0 0
elo 08 15:59:54 JollaPhone2026 kernel: [fgauged][FGADC_intr_end][FG_INTR_UISOC_LT]soc:1527 fg_c_soc:1770 fg_v_soc:1527 ui_soc:1545 vc_diff:243 vc_mode 0 VBAT 35330 T:[37 V 37 C 37 avg:33] D0_C 8637 D0_V 4270 CAR[c:-38344 v:-15321] Q:[55836 55836 55836 55836 57819] aging 10000 bat_cycle 21 Trk[0(0):0:0] UI[0:0] Chr[0:0:0] pseudo1 105  DC_ratio 100 dodinit[9][0],ag[0 0 0 0 0 0],rl[0 1 1]I:-6249
elo 08 15:59:54 JollaPhone2026 kernel: fgauge:[K]FG_DAEMON_CMD_SET_KERNEL_UISOC = 1545 15 GM3:0 old:16 diff=193
elo 08 15:59:54 JollaPhone2026 kernel: init temp_stage=0 soc_stage=1 soc:last=15:16 temp:last=37:37
elo 08 15:59:54 JollaPhone2026 kernel: cmep_addr is NULL, skip write!
elo 08 15:59:54 JollaPhone2026 kernel: flashlight: pt_trigger: PT trigger(1,2,0) disable flashlight
elo 08 15:59:54 JollaPhone2026 kernel: pwrctrl->pbm_drv_done: 0
elo 08 15:59:54 JollaPhone2026 kernel: pwrctrl->pbm_drv_done: 0
elo 08 15:59:54 JollaPhone2026 kernel: flashlight: pt_trigger: PT trigger(1,2,0) disable flashlight
elo 08 15:59:54 JollaPhone2026 kernel: pwrctrl->pbm_drv_done: 0
elo 08 15:59:54 JollaPhone2026 kernel: [exec_bp_thl_callback] bp_level=2
elo 08 15:59:54 JollaPhone2026 healthd: battery l=15 v=3550 t=37.2 h=2 st=3 c=-561900 fc=3760000 cc=22 chg=
elo 08 15:59:54 JollaPhone2026 kernel: [fgauged][GM3_old_data] soc:1527 fg_c_soc:1770 fg_v_soc:1527 ui_soc:1545 vc_diff:243 vc_mode 0 VBAT 35330 T:[37 V 37 C 37] D0_C 8637 D0_V 4270 CAR[c:-38344 v:-15321] Q:[55836 55836 55836 55836] aging 10000 bat_cycle 21 Trk[0(0):0:0] UI[0:0] Chr[0:0:0] pseudo1 105  DC_ratio 100 dodinit[9][0] Iavg:-6249,dis[0 0 0],ncar[-37970],dlpt_sd[0], dynamic_cv[0], dynamic_gauge0[0],select_zcv[0]
elo 08 15:59:54 JollaPhone2026 kernel: mt6685-rtc mt6685-rtc: rtc_field_read: rg:0x56, val:0x90
elo 08 15:59:54 JollaPhone2026 kernel: mt6685-rtc mt6685-rtc: rtc_field_read: rg:0x56, val:0x8f
elo 08 15:59:54 JollaPhone2026 kernel: fgauge:[oam] zcv_get MT6720 GAUGE BATSNS ZCV (pchr):adc_result_reg=19092, adc_result=42882
elo 08 15:59:54 JollaPhone2026 kernel: mt6685-rtc mt6685-rtc: rtc_field_read: rg:0x56, val:0x8f
elo 08 15:59:54 JollaPhone2026 kernel: mt6685-rtc mt6685-rtc: rtc_field_read: rg:0x56, val:0x8f
elo 08 15:59:54 JollaPhone2026 kernel: mt6375-auxadc 11282000.i2c:mt6720@34:auxadc: mt6375_auxadc_check_vbat_event, There are no events related to vbat
elo 08 15:59:54 JollaPhone2026 kernel: mt6375-auxadc 11282000.i2c:mt6720@34:auxadc: auxadc_irq_thread, handle auxadc irq (reg: 0x81C, bit: 4)
elo 08 15:59:54 JollaPhone2026 kernel: mt6379-gauge 11282000.i2c:mt6720@34:mtk-gauge: battery_temperature_adc_get, MT6720 GAUGE baton(bat_temp) val:385, ret=0
elo 08 15:59:54 JollaPhone2026 kernel: soc_handler:479 soc and temperature are all the same
elo 08 15:59:54 JollaPhone2026 healthd: battery l=15 v=3562 t=37.4 h=2 st=3 c=-561900 fc=3760000 cc=22 chg=
elo 08 15:59:54 JollaPhone2026 mce[1968]: modules/battery-udev.c: mcebat_update(): battery_level : 16 -> 15
4 Likes

It happens on my device as well. Quite annoying, but not as annoying as the volume down button issue.

I would really like for Jolla to acknowledge this and fix it. I’m also encountering this on JP26 with SFOS 5.2.0.17.

1 Like

WHAT ON EARTH…? this bug is CRAZY BAD, how is this not the most shouted-on-the-mountain issue?

i would also like to add that camera applications also cannot work the flash. it’s like the bulb is disconnected when the battery is under 15%.

2 Likes

I noticed the absence of flashlight on other devices too. I thought it was a feature to preserve the battery…

So the kernel message sais pt_trigger.

And there’s this:

nemo@PGJolla26-I:/sys/class/flashlight_core/flashlight $ cat flashlight_pt
[LOW_VOLTAGE] [LOW_BATTERY] [OVER_CURRENT] [PT_STRICT]
0 1 0 1

I wonder if you could somehow set that LOW_BATTERY to 0, assuming that is what controls this?

 # echo '0 0 0 1' > flashlight_pt

does change the reading, no idea if it changes anything.

3 Likes

On JP26 I have the following values at 15% battery:

# cat /sys/class/flashlight_core/flashlight/flashlight_pt

[LOW_VOLTAGE] [LOW_BATTERY] [OVER_CURRENT] [PT_STRICT]
1 2 0 1

The 2 here means that high level of throttling is applied to the flashlight and that’s why it doesn’t turn on. This is coming from the MediaTek kernel driver. I found source code available from LineageOS (android_kernel_xiaomi_mt6768/drivers/misc/mediatek/flashlight/flashlight-core.c at lineage-23.2 · LineageOS/android_kernel_xiaomi_mt6768 · GitHub), but I would love to see Jolla’s source code.

And yes, doing echo '1 0 0 1' > /sys/class/flashlight_core/flashlight/flashlight_pt indeed fixes the issue with the flashlight, but this is a hackfix and will most probably need to be done every time the phone charges above 15% and then reaches 15% again.

Edit: setting the value to 1 1 0 1 doesn’t change the brightness of the flashlight as I initially suspected. Even though the value 1 should mean to apply some amount of throttling to the voltage sent to the flashlight, it shines the same way as when setting the value to 0.

Edit 2: After reaching 10%, I had to again set the value. Since I hadn’t checked between 15% and 10%, my current assumption is that after each battery percent drop, it sets the value for the kernel param. I’ll test again after it reaches 9% and if I observe something else, I’ll edit my post again.
Edit 2.5: At 9% my flashlight worked, so I suppose the kernel param change is triggered only at specific OS events - 15% (low battery), 10% (my currently set threshold to activate battery saving mode)

@Jolla, can we please get a proper solution to this?

4 Likes

So weird, I’m also on a JP26, and my tunables are 0101 per default, not 1201…

Is this at 15% or lower battery, or above? I think it gets set to 2 at 15% and lower.