Skip to content

Instantly share code, notes, and snippets.

@remlapmot
Last active May 6, 2024 17:22
Show Gist options
  • Save remlapmot/37072dcc38f4f3d27c7ff02ca60e46e1 to your computer and use it in GitHub Desktop.
Save remlapmot/37072dcc38f4f3d27c7ff02ca60e46e1 to your computer and use it in GitHub Desktop.
Windows 10 registry entry setting which fixes PrimSurfSize.cx, PrimSurfSize.cy, and Stride values for a 4K monitor, so windows do not resize after sleep (an issue which seems to affect some Dell computers)
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration\NOEDID_8086_3E98_00000000_00020000_31063^9B5CF2A2AB5D52EABA55D3D249C48521]
"SetId"="NOEDID_8086_3E98_00000000_00020000_31063"
"Timestamp"=hex(b):7c,f5,a9,74,7f,f1,d5,01
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration\NOEDID_8086_3E98_00000000_00020000_31063^9B5CF2A2AB5D52EABA55D3D249C48521\00]
"PrimSurfSize.cx"=dword:00000f00
"PrimSurfSize.cy"=dword:00000870
"Stride"=dword:00003c00
"PixelFormat"=dword:00000015
"ColorBasis"=dword:00000002
"Position.cx"=dword:00000000
"Position.cy"=dword:00000000
"CcdDbVersion"=dword:00000003
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration\NOEDID_8086_3E98_00000000_00020000_31063^9B5CF2A2AB5D52EABA55D3D249C48521\00\00]
"Flags"=dword:00830b8f
"VideoStandard"=dword:000000ff
"ActiveSize.cx"=dword:00000400
"ActiveSize.cy"=dword:00000300
"VSyncFreq.Numerator"=dword:03d239c8
"VSyncFreq.Denominator"=dword:00104dc0
"HSyncFreq.Numerator"=dword:0000ba54
"HSyncFreq.Denominator"=dword:00000001
"PixelRate"=dword:03d239c8
"ScanlineOrdering"=dword:00000001
"Scaling"=dword:00000004
"Rotation"=dword:00000001
"PrimSurfSize.cx"=dword:00000f00
"PrimSurfSize.cy"=dword:00000870
"Stride"=dword:00003c00
"PixelFormat"=dword:00000015
"ColorBasis"=dword:00000002
"DwmClipBox.left"=dword:00000000
"DwmClipBox.top"=dword:00000000
"DwmClipBox.right"=dword:00000400
"DwmClipBox.bottom"=dword:00000300
@Tomblarom
Copy link

Tomblarom commented May 6, 2024

What is the Stride and how to "calculate" it? I have a 3440x1440.

@remlapmot
Copy link
Author

See this answer for the formula https://superuser.com/a/1334787.

So I think you'd want: ((3440 * 32 + 7) / 8) = 13760 (ignoring the .88)

@remlapmot
Copy link
Author

So hopefully 35c0 in hex for the dword value.

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