{"slug": "my-battery-charging-limit-fix-for-mechrevo-wujie-14xa", "title": "My battery charging limit fix for MECHREVO Wujie 14XA", "summary": "A developer fixed the battery charging limit function on the MECHREVO Wujie 14XA laptop by reverse-engineering the EC firmware with help from Codex and GPT-5.6 Sol. The bug occurs because the EC firmware always disables charging limit control due to invalid stored limit values. The workaround involves writing to live limit and state registers to enable the limit.", "body_md": "This write-up documents how I fixed the Battery Charging Limit function on the MECHREVO Wujie 14XA (also known as the `MechRevo Forza 14X`\n\n). I did this with the help of Codex and GPT-5.6 Sol.\n\nA bug in the charge-limit control logic was [partially fixed](https://gist.github.com/w568w/b2fc5f9d1f4dff13efe751abec27b396?permalink_comment_id=6254723#gistcomment-6254723) in EC firmware version 2.08.\n\nHowever, even with the \"latest\" firmware, the charging limit still often fails to take effect on many models. EC versions 2.12 and 2.08 are bundled with BIOS versions `N.1.14MRO50`\n\nand `N.1.14MRO19`\n\n, respectively.\n\nWith Codex's help, I disassembled the [EC firmware images](https://github.com/minortex/GX4HRXL-firmware) and identified several important addresses in the controller:\n\n| Address | Meaning | Writable via ACPI Calls |\n|---|---|---|\n`0x07B9` |\nThe effective Live Limit, ranging from 1 to 100 percent | Yes |\n`0x087F` |\nThe Stored Limit | No; it is above `0x07FF` |\n`0x0742[2]` |\nThe enable gate for the charging limit | Yes |\n`0x07C3` and `0x0770` |\nState values that may have various effects, which are still unknown to us | Yes |\n\nIt seems that we should be able to control the limit simply by writing to `0x07B9`\n\n, right?\n\n**No!** There is a caveat. The charging routine in the EC firmware works roughly as follows:\n\n```\nbool state_is(uint8_t value)\n{\n    return xram[0x07C3] == value ||\n           xram[0x0770] == value;\n}\n\n// The following code is executed once per second.\n\nbool limit_enabled = state_is(4) || state_is(5);\n\nif (!limit_enabled) {\n    uint8_t stored_limit = xram[0x087F] & 0x7f;\n\n    if (stored_limit == 0 || stored_limit > 100) {\n        disable_control();\n        return;\n    }\n}\n\nenable_control(); // Enable control using the Live Limit.\nstore_limit();    // Save the Live Limit as the Stored Limit.\n```\n\nFor this laptop model, or at least for my unit, `limit_enabled`\n\nis unfortunately always `false`\n\n. The EC therefore checks `stored_limit`\n\n, which is also an invalid value.\n\nAs a result, the EC always executes `disable_control()`\n\nand returns. **The Live Limit register is never read, which is why writing to 0x07B9 has no effect at all.**\n\nWe seem to be stuck here because we cannot change the Stored Limit directly. Its address is greater than `0x07ff`\n\n, so it cannot be written through an ACPI call.\n\nSo, how can we fix this? The workaround is actually quite intuitive: we can change the State values!\n\nHere is my plan:\n\n- Upgrade the BIOS/EC firmware to the latest version. Either\n`N.1.14MRO50`\n\nor`N.1.14MRO19`\n\nshould work. - Write a value to the Live Limit. For example, set it to 60% with\n`xram[0x07B9] <- 0x3C`\n\n. - Overwrite the State value with\n`4`\n\nby setting`xram[0x07C3] <- 0x04`\n\n, so that`limit_enabled`\n\nbecomes`true`\n\n. - Optionally, wait for a second or so to allow the EC to execute\n`store_limit()`\n\n. Then restore the original value of`0x07C3`\n\n. - Read\n`0x087F`\n\nto verify whether the workaround worked.\n\nThis worked on my unit:\n\n``` bash\n$ upower -i /org/freedesktop/UPower/devices/battery_BAT0\n  native-path:          BAT0\n  vendor:               OEM\n  model:                standard\n  serial:               00001\n  power supply:         yes\n  updated:              Wed Jul 15 02:34:42 2026 (6 seconds ago)\n  has history:          yes\n  has statistics:       yes\n  battery\n    present:             yes\n    rechargeable:        yes\n    state:               fully-charged\n    warning-level:       none\n    energy:              76.8768 Wh\n    energy-empty:        0 Wh\n    energy-full:         80.08 Wh\n    energy-full-design:  80.08 Wh\n    voltage-min-design:  15.4 V\n    capacity-level:      Normal\n    energy-rate:         0 W\n    voltage:             16.232 V\n    charge-cycles:       N/A\n    percentage:          96%\n    capacity:            100%\n    technology:          lithium-ion\n    icon-name:          'battery-full-charged-symbolic'\n\n$ cat /sys/class/power_supply/BAT0/current_now\n0\n```\n\nThe battery is at 96% but is still reported as fully charged. The reported current is also zero.\n\nThe attachment is a simple script that automates this process. ⚠️ Review it carefully before running it!\n\nThis finding also explains something else. There are [reports](https://gist.github.com/w568w/b2fc5f9d1f4dff13efe751abec27b396?permalink_comment_id=6254573#gistcomment-6254573) that flashing BIOS/EC firmware from another OEM with the same motherboard can resolve the issue. Those BIOS versions include a menu option for configuring the Stored Limit, which naturally breaks the deadlock.\n\nIn short, the root cause is that **Mechrevo initializes the Stored Limit to an invalid value. And because of the EC's control logic, this leaves the system trapped in a state where writes to the Live Limit are effectively ignored**.\n\nWhether their engineers fully understand the hardware and firmware they are shipping is quite an interesting question.", "url": "https://wpnews.pro/news/my-battery-charging-limit-fix-for-mechrevo-wujie-14xa", "canonical_source": "https://gist.github.com/w568w/957976b59906e0ce5d6c13ad342e1593", "published_at": "2026-07-14 18:38:54+00:00", "updated_at": "2026-07-25 03:57:21.415741+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["MECHREVO", "Wujie 14XA", "MechRevo Forza 14X", "Codex", "GPT-5.6 Sol"], "alternates": {"html": "https://wpnews.pro/news/my-battery-charging-limit-fix-for-mechrevo-wujie-14xa", "markdown": "https://wpnews.pro/news/my-battery-charging-limit-fix-for-mechrevo-wujie-14xa.md", "text": "https://wpnews.pro/news/my-battery-charging-limit-fix-for-mechrevo-wujie-14xa.txt", "jsonld": "https://wpnews.pro/news/my-battery-charging-limit-fix-for-mechrevo-wujie-14xa.jsonld"}}