MTK on Kobo FW 6.0: bd71827_bat renamed to battery, so cable sensing never sees a plug-in
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- c, linux
- Domain
- backend, embedded-iot
Research direction
Start in the MTK branch where MTK_BATT_STATUS_SYSFS, MTK_CHARGER_TYPE_SYSFS, and MTK_BATT_CAP_SYSFS are used for cable and battery detection. Check how those paths are defined and how missing nodes are handled, then compare with the existing /sys/class/power_supply/battery/{status,capacity,charger_type} nodes described here. Done when USBMS detects the cable on FW 6.0 and the existing MTK behavior still works.
Written by the indexing model from the issue text.
Description
Device: Kobo Clara Colour (spaKoboColour, N367), FW 6.0.279225, KOReader kobov5 v2026.07.1 (bundled usbms).
On 6.0 the bd71827 power supply is exposed as battery instead of bd71827_bat; the driver is the same:
/sys/class/power_supply/ac -> .../1-004b/bd71827-power.4.auto/power_supply/ac
/sys/class/power_supply/battery -> .../1-004b/bd71827-power.4.auto/power_supply/battery
/sys/class/power_supply/battery/charger_type: NONE (unplugged)
On MTK, usbms reads MTK_BATT_STATUS_SYSFS (/sys/class/power_supply/bd71827_bat/status) for cable sensing. The file doesn't exist, so sysfs_is_usb_plugged() always returns false: usbms stays on "Waiting to be plugged in…" even with the cable in, and KOReader then logs "KoboUSBMS failed to setup an USBMS session". MTK_CHARGER_TYPE_SYSFS and MTK_BATT_CAP_SYSFS point to the same missing node.
PLATFORM is correct (mt8113t-ntx) and the gadget is named kobo, so neither the platform check nor the custom-gadget check is involved.
Confirmed locally: wrapping usbms so that, for the session only, a directory with the existing nodes plus bd71827_bat -> battery is bind-mounted over /sys/class/power_supply makes USBMS work normally (the drive shows up on the PC).
Suggested fix: in the is_mtk branch, fall back to /sys/class/power_supply/battery/{status,capacity,charger_type} when bd71827_bat is missing. KOReader has the same fallback for its own battery reading in koreader/koreader#16423.
- Dominant language
- C
- Stars
- 25
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from koreader/KoboUSBMS
-
Difficulty 2/5 1-3 hours Newbie friendliness 30/100
-
Difficulty 4/5 3-5 days Newbie friendliness 68/100
-
FR: 12 Hour Clock?May be free again @NiLuJe claimed this 516 days ago, and no pull request is open. Open
All issues in koreader/KoboUSBMS
Similar issues
-
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
lem-project/lem#2525 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
jaff-chemistry/jaff#231 ·
-
CF_CFDP_S_SendFileData computes the file checksum from the SB buffer after CFE_SB_TransmitBufferOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
389ds/389-ds-base#8251 ·
Maintainers usually reply within 1 day
-
ColumnDecimal::Append(Int128) stores a value outside the Decimal(P, S) range with no error: cut to 32/64 bits, or with too many digitsPossibly taken @RUSHIT305 claimed this today. Openbug data-types
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
ClickHouse/clickhouse-cpp#645 · 1 comment ·
Maintainers usually reply within 1 day