Repository navigation
Conversation
Surface Laptop Studio devices with a discrete NVIDIA GPU have an ACPI "Surface IHV GPU Power Controller" device (MSHW0216). On Windows, a Microsoft driver activates it via _DSM function 7. On Linux nothing does, and while it is inactive, the power resource of the dGPU sends NVIDIA D-notify 0xD5 to the GPU on every D3cold exit. This locks the GPU to a 10 W power limit after its first runtime suspend. Activate the controller on probe and on resume. This sends D-notify 0xD1 (no limit) once and stops the 0xD5 notifications. Activation also turns off Dynamic Boost in the NVPCF parameters reported to the GPU driver, so re-enable it via _DSM function 1, which is the firmware default. Tested on a Surface Laptop Studio (RTX A2000 Laptop GPU): the GPU keeps its 35 W rated limit across runtime suspend, s2idle, AC and battery, instead of dropping to 10 W. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Danylo Dermenzhy <dvaderfun@gmail.com> Patchset: surface-gpu-power
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On the Surface Laptop Studio the NVIDIA dGPU is locked to 10 W after its first runtime suspend (D3cold).
It is fine right after boot. Known issue: wiki,
linux-surface/linux-surface#2185 (same on SLS2). Current workarounds cost battery (Runtime D3 off, 35 W only) or
require an old driver (525).
Cause
The firmware has a "Surface IHV GPU Power Controller",
\_SB.SGPC(_HID MSHW0216,_DSMa99df1bb-b888-42b7-9ced-12810bfe9d90).Windows activates it (
_DSMfunc 7 = 1). On Linux nothing binds to it, so it stays inactive, and the dGPU powerresource sends NVIDIA D-notify
0xD5on every D3cold exit:Direct proof on hardware: calling func 7 = 0 (sends
0xD5) drops the limit to 10 W instantly; func 7 = 1 (sends0xD1) restores 35 W instantly, and afterwards_ONno longer sends0xD5.Fix
surface_gpu_power, a platform driver bound to ACPIMSHW0216. In the acpidumps this device exists on the SLS 1,SLS 2 and Surface Book 3; the SB3 one has no
_DSM, and the driver does not bind without_DSMfunc 7._DSMfunc 7 = 1 (activate), then func 1 = 1. Activation setsENBL = 0, which makes the NVPCFparameters report Dynamic Boost as disabled; func 1 = 1 restores the firmware default.
AC 35 W (max 50 W), DC 30 W (max 35 W)on SLS1.New patchset
surface-gpu-power; config is enabled in linux-surface/linux-surface#2315.Testing
Surface Laptop Studio (RTX A2000 Laptop GPU, UEFI 33.104.143), Fedora 44, kernels 7.2.11 (Fedora) and
7.2.11-1.surface, NVIDIA 615.71.09 (open modules), Runtime D3 enabled (
DynamicPowerManagement=3).Builds without warnings (
W=1);checkpatchreports no code issues.Not covered
_PSR, which Surface devices don't have, so it applies its battery policy. Fixed on the NVIDIA side innv-acpi: Get AC state from power_supply when there is no _PSR NVIDIA/open-gpu-kernel-modules#1468. With that patch and this driver the SLS matches Windows: 50 W on AC
("Best performance" mode, same measured draw under the same load) and 35 W on battery.
_DSMfunc 2/3). Not implemented; Linuxbehaves like "Best performance".
_ONlogic (spec 60 W rated / 80 W max) but is untested here.Proposed wiki update
GitHub wikis can't take pull requests, so here is the replacement for the "NVIDIA GPU locked at 10W power limit"
section of the SLS page, to apply once
this is released:
Markdown
🤖 Generated with Claude Code