Display sleep doesn't blank the monitor: the last frame stays on screen, frozen (NVRMFB setPowerState / kConnectionPower are no-ops)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Read kexts/NVRMFB/fb/nvrm-fb.cpp and compare its setPowerState and setAttributeForConnection paths with kexts/NVRM/fb/nvrm-fb.cpp. Trace how these paths reach NVKMS, then test display sleep and wake on a DisplayPort monitor. Done means the monitor enters standby or goes dark on power state 0 and restores on power state 1.
Written by the indexing model from the issue text.
Description
When macOS puts the display to sleep (System Settings → Lock Screen → "Turn display off when inactive"), the monitor does not go dark or into standby. It keeps showing the last frame, frozen: the menu-bar clock stops at the time the display "slept". Moving the mouse brings it back normally.
Setup
- RTX 5080 (
10de:2c02), Ryzen 9 9900X, macOS 26.7.1 (25G241), one 5K display (Kuycon G27P, 5120×2880) on DP, OpenCore 1.0.9 - NullMoth 1.4.0 kexts (NVRMFB
0935a3a0…) with the rebuiltkexts/26/NVAccel; official 1.4.0NVMTLDriver pmset:displaysleep 1for the test,sleep 0
What happens (sampled every 30 s with ioreg and pmset -g assertions; log from log show)
- HID idle time counts up normally and nothing resets it (it reached 431 s in an earlier run), so no input source is keeping the display awake.
- At 1 min idle, the whole chain runs at the same millisecond:
powerd:Display state: OffWindowServer(CoreDisplay):displayWillSleepWithImageskernel (NVRMFB):NVRM-fb: setPowerState 0
IODisplayWranglerCurrentPowerStatethen goes 4 → 2 → 1 → 0.- The monitor stays lit and keeps showing the last frame. The clock in the menu bar stays at 20:11 for 8 minutes.
- On mouse movement:
powerd:Display state: On,NVRM-fb: setPowerState 1, and the screen updates again. Wake works. - The screen saver never starts either. With the default settings the display goes to sleep first, and after that nothing is drawn.
Cause, from the source (kexts/NVRMFB/fb/nvrm-fb.cpp at v1.9.0)
IOReturn NVRMNVDAFramebuffer::setPowerState(unsigned long ordinal, IOService *device)
{
FBLOG("setPowerState %lu", (unsigned long)ordinal);
if (ordinal) handleEvent(kIOFBNotifyDidPowerOn);
else handleEvent(kIOFBNotifyWillPowerOff);
return kIOPMAckImplied;
}
and in setAttributeForConnection:
if (attribute == kConnectionPower) { FBLOG("setAFC '%s' POWER %lu -> success", _s, (unsigned long)value); return kIOReturnSuccess; }
Neither path turns the head or the DP link off (no DPMS / head disable through NVKMS), so scanout continues from the last framebuffer contents while WindowServer has stopped drawing. The same code is in kexts/NVRM/fb/nvrm-fb.cpp.
Expected: on power state 0, blank the output or put the link into DPMS off (so the monitor goes to standby), and restore it on power state 1.
Workaround for now: set "Turn display off when inactive" to Never; use the monitor's power button.
I can test a build.
中文版(Chinese version, same content)
macOS 讓螢幕休眠時(系統設定 → 鎖定畫面 →「閒置時關閉顯示器」),螢幕不會變黑也不會進入待機,而是一直顯示最後一格畫面、凍住不動:選單列的時鐘停在螢幕「休眠」那一刻。動一下滑鼠就恢復正常。
環境
- RTX 5080(
10de:2c02)、Ryzen 9 9900X、macOS 26.7.1(25G241)、一台 5K 螢幕(Kuycon G27P,5120×2880)接 DP、OpenCore 1.0.9 - NullMoth 1.4.0 kext(NVRMFB
0935a3a0…),kexts/26/NVAccel重編;NVMTLDriver為官方 1.4.0 pmset:測試時displaysleep 1、sleep 0
現象(用 ioreg 和 pmset -g assertions 每 30 秒取樣;記錄來自 log show)
- HID 閒置時間正常累加,沒有被任何東西歸零(之前一次累積到 431 秒),所以不是有輸入裝置讓螢幕保持喚醒。
- 閒置 1 分鐘時,整條流程在同一毫秒發生:
powerd:Display state: OffWindowServer(CoreDisplay):displayWillSleepWithImageskernel (NVRMFB):NVRM-fb: setPowerState 0
- 之後
IODisplayWrangler的CurrentPowerState從 4 → 2 → 1 → 0。 - 螢幕仍然亮著,持續顯示最後一格畫面。 選單列時鐘停在 20:11 達 8 分鐘。
- 動滑鼠時:
powerd:Display state: On、NVRM-fb: setPowerState 1,畫面恢復更新。喚醒正常。 - 螢幕保護程式也從未啟動。預設設定下螢幕會先休眠,之後就不再繪製任何東西。
原因(原始碼)(kexts/NVRMFB/fb/nvrm-fb.cpp,v1.9.0):setPowerState 只送出 kIOFBNotifyWillPowerOff/kIOFBNotifyDidPowerOn 通知;setAttributeForConnection 收到 kConnectionPower 直接回成功。兩條路都沒有關閉 head 或 DP 連線(沒有經 NVKMS 做 DPMS/停用 head),所以 WindowServer 停止繪製後,掃描輸出仍繼續送出 framebuffer 裡最後的內容。kexts/NVRM/fb/nvrm-fb.cpp 裡也是同樣的寫法。
預期:電源狀態 0 時讓輸出變黑,或讓連線進入 DPMS off(螢幕進待機);電源狀態 1 時恢復。
暫時做法:「閒置時關閉顯示器」設為「永不」,用螢幕本身的電源鍵關螢幕。
有測試版我可以幫忙測。
- Dominant language
- Rust
- Stars
- 2.5k
- Forks
- 233
- 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 nullmoth/nvidia-macos-driver
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nullmoth/nvidia-macos-driver#141 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
nullmoth/nvidia-macos-driver#126 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
nullmoth/nvidia-macos-driver#108 · 6 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
nullmoth/nvidia-macos-driver#28 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
nullmoth/nvidia-macos-driver#170 ·
Maintainers usually reply within 1 day
All issues in nullmoth/nvidia-macos-driver
Similar issues
-
proxy: SQL-over-HTTP turns empty arrays into [""] or [false], or HTTP 500 for int and float arraysOpen
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
neondatabase/neon#12965 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
goauthentik/authentik#26867 ·
Maintainers usually reply within 1 day
-
api bug macos maintainer-needed p2 triaged
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
area::tern difficulty::easy good first issue kind::cleanup triage::ready
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
eclipse-zenoh/zenoh#2842 · 2 comments ·
Maintainers usually reply within 1 day