Windows + AMD GPU: GPU stats polling runs amd-smi, which triggers repeated UAC prompts for diskpart.exe
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Root cause is pinned to marimo/_server/api/endpoints/health.py: _is_gpu_available() (~line 471) detects amd-smi.exe on PATH, and the /api/usage handler (~line 614) then shells out to it every poll. Read both spots plus the existing tests around host/GPU stats under tests/_server/api/endpoints/ to see how the platform check and mocking are done. Add a sys.platform != "win32" guard (or equivalent) so the AMD branch is never taken on Windows, then run those tests and confirm CPU/memory stats still return with GPU absent. Done means no amd-smi invocation on Windows and a test covering the skipped path.
Written by the indexing model from the issue text.
Description
Describe the bug
On Windows with an AMD GPU, opening any notebook makes Windows show a UAC prompt ("Do you want to allow this app to make changes to your device?") for diskpart.exe. The prompt comes back again and again while the notebook is open. Closing it does not help.
This only happens on main. The amd-smi code path was added in #11568 (merged 2026-11-02), and the latest release (0.25.2) does not include it yet. So it should start for all Windows + AMD users with the next release.
What I found
- The footer polls
/api/usageevery 10 seconds (machine-stats.tsx#L25). - On this machine,
_is_gpu_available()findsamd-smiand returns"amd"(health.py#L471). The AMD Windows driver installsamd-smi.exeinC:\Windows\System32, so it is always onPATH. - Every
/api/usagecall then runsamd-smi monitor --vram-usage --jsonandamd-smi static --json(health.py#L614). - The Windows build of
amd-smi.exerunspowershell -Command diskpart /?internally.diskpart.exeneeds administrator rights, so Windows shows a UAC prompt each time.
I confirmed this by watching new processes while a notebook was open. Each UAC prompt (consent.exe) showed up right after the marimo server process started amd-smi.exe. The string powershell -Command diskpart /? is also in the amd-smi.exe binary.
Workaround
Making _is_gpu_available() return False stops the prompts completely. The rest of the footer stats (CPU, memory) keep working.
Possible fix
One option is to skip amd-smi on Windows (sys.platform == "win32"). The Windows amd-smi does not seem safe to call in the background. Another option is to only collect GPU stats when the user asks for them.
Will you submit a PR?
- Yes
Environment
{
"marimo": "0.25.2",
"editable": true,
"OS": "Windows",
"OS Version": "11",
"Processor": "AMD64 Family 26 Model 36 Stepping 0, AuthenticAMD",
"Python Version": "3.12.16",
"Locale": "English_United States",
"Binaries": {
"Browser": "158.0.8127.37",
"Node": "v24.22.3",
"uv": "0.13.9 (x86_64-pc-windows-msvc)"
},
"Dependencies": {
"click": "8.2.1",
"docutils": "0.23",
"itsdangerous": "2.2.0",
"jedi": "0.20.1",
"markdown": "3.11.3",
"narwhals": "2.28.0",
"packaging": "25.0",
"psutil": "7.2.2",
"pygments": "2.19.2",
"pymdown-extensions": "11.0.2",
"pyyaml": "6.0.2",
"starlette": "0.47.2",
"tomlkit": "0.15.2",
"typing-extensions": "4.14.1",
"uvicorn": "0.35.0",
"websockets": "15.0.1"
},
"Optional Dependencies": {
"duckdb": "2.0.0",
"openai": "3.51.0",
"pyarrow": "26.0.1",
"pytest": "8.4.1",
"ruff": "0.17.5",
"sqlglot": "30.31.0"
},
"Experimental Flags": {
"cache_panel": true,
"multi_column": true,
"isolate_apps": true,
"debugger": false,
"line_timing": false,
"execution_type": "relaxed"
}
}
- marimo installed from source at commit
9d1efaf43(main, 2026-11-21). The version string still says 0.25.2. - OS: Windows 11 Pro, build 26300
- GPU: AMD Radeon(TM) 890M Graphics, driver 32.0.21025.33002 (2026-07-06)
Code to reproduce
No special code is needed. Any notebook works:
import marimo
app = marimo.App()
@app.cell
def _():
return
if __name__ == "__main__":
app.run()
- Use a Windows machine with an AMD GPU and the AMD driver installed (so
amd-smi.exeis inC:\Windows\System32). - Install marimo from
main(any commit after #11568). - Run
marimo edit notebook.pyand open the notebook in the browser. - Within a few seconds, a UAC prompt for
diskpart.exeappears. It keeps coming back while the notebook is open.
- Dominant language
- Python
- Stars
- 22.9k
- Forks
- 1.3k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 380
Getting set up
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 marimo-team/marimo
-
"Clamp all outputs" leaves cells without output marked `expand_output: true`Possibly taken @marthacryan claimed this 12 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
marimo-team/marimo#11768 · 1 assignee ·
Maintainers usually reply within 1 day
-
Cell referencing a variable from a "cancelled" cell runs and raises NameError instead of being blockedMay be free again @dmadisetti claimed this 33 days ago, and no pull request is open. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
marimo-team/marimo#11307 · 1 assignee ·
Maintainers usually reply within 1 day
-
molab
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
marimo-team/marimo#11298 · 1 comment ·
Maintainers usually reply within 1 day
-
Theme change does not affect terminal colorsMay be free again @CloudCorpRecords claimed this 36 days ago, and no pull request is open. Openneeds discussion
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
marimo-team/marimo#11244 · 4 comments ·
Maintainers usually reply within 1 day
-
enhancement needs discussion
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
marimo-team/marimo#10960 · 4 comments ·
Maintainers usually reply within 1 day
All issues in marimo-team/marimo
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
public-apis/public-apis#9330 · 1 reaction ·
Maintainers usually reply within 12 days
-
approved author-page correction move-papers
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
acl-org/acl-anthology#11043 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
trezor/trezor-firmware#8357 ·
Maintainers usually reply within 2 days
-
A visiting liaison's death is announced as CITIZEN_DEATH and the scorer counts it as a citizen deathOpen
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Layr-Labs/arena-fortress#241 ·
Maintainers usually reply within 1 day