Skip to content

Support OLED EC firmware 0x1100 and show the current charge limit - #227

Open
Bigisoft wants to merge 2 commits into
ayufan:mainfrom
Bigisoft:charge-limit-oled-fw-1100
Open

Bigisoft wants to merge 2 commits into
ayufan:mainfrom
Bigisoft:charge-limit-oled-fw-1100

Conversation

@Bigisoft

Copy link
Copy Markdown

Problem

On a Steam Deck OLED running current EC firmware, the Charge Limit menu is inert: it shows a placeholder, selecting a value does nothing, and the battery charges past the limit.

Two independent causes:

1. The device isn't in deviceVersions. My unit reports PDFV = 0x1100, XBID = 0x05. The table only has 0x1050 / 0x5 for OLED, so SupportedDevice is null and both GetMaxBatteryCharge() and SetMaxBatteryCharge() return early without doing anything.

2. BatteryChargeLimit never reads the live value. It defines only ApplyValue and hardcodes ActiveOption = "?". Unlike Brightness and RefreshRate, it has no CurrentValue delegate, so MenuItemWithOptions.Update() has nothing to call. This is not model-specific - as far as I can tell no Steam Deck has ever displayed its actual charge limit in this menu; it only shows a value after you set one in that session, and reverts to ? on restart.

Evidence that the register is unchanged

Rather than assume the offset, I read the device's own ACPI DSDT via GetSystemFirmwareTable (no driver or elevation needed) and parsed the AML field definitions:

--- ALL fields in region XECB (base 0xFE700B00) ---
   +0x090 CRLO   width=8    phys=0xFE700B90
   +0x091 CRHI   width=8    phys=0xFE700B91
   ...
   +0x09F MCBL   width=8    phys=0xFE700B9F
   ...
   +0x0BC LONR   width=8    phys=0xFE700BBC
   +0x0BF LEPM   width=8    phys=0xFE700BBF

MCBL sits at 0xFE700B00 + 0x9F, exactly where the existing constant points. The layout did not move between 0x1050 and 0x1100, so adding the version is sufficient - no address changes are needed.

Hardware verification

With the entry added, writing MCBL takes effect immediately and reversibly. Plugged in at 83%:

MCBL Charging ChargeRate
80 (baseline) False 0 mW
90 (+13s) True 18,493 mW
90 (+117s) True 17,775 mW
80 (restored) False 0 mW

Reported capacity rose 43,743 → 44,294 mWh while the limit was 90, and froze when it went back to 80. Before the change, the same battery charged from 16% to 87% straight through 80% without pausing.

Note the LED goes green when the cap is reached - that is "on AC, not charging", not a fault.

Changes

  • CommonHelpers/Vlv0100.cs - add Firmware = 0x1100, BoardID = 0x5 alongside 0x1050 rather than replacing it, so existing devices are unaffected.
  • PowerControl/Options/BatteryChargeLimit.cs - add a CurrentValue delegate following the existing Brightness / RefreshRate pattern.

Testing

Built from this branch and running on the device:

  • Steam Deck OLED (Valve "Galileo"), BIOS F7G0114, EC PDFV 0x1100 / XBID 0x05
  • Windows 11 Pro 26100, .NET SDK 6.0.428, net6.0-windows
  • Charge Limit menu now both sets and displays the live value; verified against direct reads of 0xFE700B9F
  • FanControl, PerformanceOverlay, SteamController all still start and run normally with the rebuilt CommonHelpers

I only have an OLED unit on this firmware, so the LCD paths are unchanged-by-construction rather than tested.

🤖 Generated with Claude Code

Bigisoft added 2 commits July 29, 2026 18:16
Steam Deck OLED units on current EC firmware report PDFV 0x1100 with
BoardID 0x5. That combination is absent from deviceVersions, so
SupportedDevice is null and both GetMaxBatteryCharge() and
SetMaxBatteryCharge() return early - the Charge Limit menu is inert
and silently does nothing.

The register layout is unchanged from 0x1050. Verified against the
device's own ACPI DSDT, which declares OperationRegion XECB at base
0xFE700B00 with field MCBL at +0x9F (phys 0xFE700B9F) - exactly the
address MCBL already targets.

Confirmed on hardware: with the entry added, writing 90 to MCBL starts
charging within 13s at ~18.5W from 83%, and writing 80 stops it within
10s.

Added alongside 0x1050 rather than replacing it, so existing devices
are unaffected.
BatteryChargeLimit defines only ApplyValue and hardcodes
ActiveOption = "?", so the menu never queries the live value. It shows
a placeholder until the user sets a value in that session, and returns
to the placeholder on every restart.

This is not model-specific - no Steam Deck displays its actual charge
limit today.

Add a CurrentValue delegate following the same pattern as Brightness
and RefreshRate, so MenuItemWithOptions.Update() populates the active
option from Vlv0100.GetMaxBatteryCharge().

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant