本帖最后由 hua_wuxin 于 2024-1-13 12:57 编辑
我目前折腾结果的总结:
1、显卡驱动基本确定是必须的,Microsoft 基本显示适配器不行。
2、补上显示增强服务。对于常见的没有过分精简的PE,要补充的文件为:
Windows
└─System32
│ Microsoft.Graphics.Display.DisplayEnhancementService.dll
│ mscms.dll
│ SensorsNativeApi.dll
│ SensorsUtilsV2.dll
│ WppRecorderUM.dll
└─zh-CN
Microsoft.Graphics.Display.DisplayEnhancementService.dll.mui
mscms.dll.mui
SensorsUtilsV2.dll.mui
注册表项目为:
- [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\DisplayEnhancementService]
- "Description"="@%SystemRoot%\\System32\\Microsoft.Graphics.Display.DisplayEnhancementService.dll,-1001"
- "DisplayName"="@%SystemRoot%\\System32\\Microsoft.Graphics.Display.DisplayEnhancementService.dll,-1000"
- "ErrorControl"=dword:00000001
- "FailureActions"=hex:80,51,01,00,00,00,00,00,00,00,00,00,03,00,00,00,14,00,00,\
- 00,01,00,00,00,60,ea,00,00,01,00,00,00,c0,d4,01,00,00,00,00,00,00,00,00,00
- "ImagePath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
- 74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,\
- 00,76,00,63,00,68,00,6f,00,73,00,74,00,2e,00,65,00,78,00,65,00,20,00,2d,00,\
- 6b,00,20,00,4c,00,6f,00,63,00,61,00,6c,00,53,00,79,00,73,00,74,00,65,00,6d,\
- 00,4e,00,65,00,74,00,77,00,6f,00,72,00,6b,00,52,00,65,00,73,00,74,00,72,00,\
- 69,00,63,00,74,00,65,00,64,00,20,00,2d,00,70,00,00,00
- "ObjectName"="LocalSystem"
- "RequiredPrivileges"=hex(7):53,00,65,00,43,00,68,00,61,00,6e,00,67,00,65,00,4e,\
- 00,6f,00,74,00,69,00,66,00,79,00,50,00,72,00,69,00,76,00,69,00,6c,00,65,00,\
- 67,00,65,00,00,00,53,00,65,00,49,00,6d,00,70,00,65,00,72,00,73,00,6f,00,6e,\
- 00,61,00,74,00,65,00,50,00,72,00,69,00,76,00,69,00,6c,00,65,00,67,00,65,00,\
- 00,00,00,00
- "ServiceSidType"=dword:00000001
- "Start"=dword:00000002
- "Type"=dword:00000020
- [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\DisplayEnhancementService\Parameters]
- "ServiceDll"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,\
- 00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,\
- 4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,74,00,2e,00,47,00,72,00,61,\
- 00,70,00,68,00,69,00,63,00,73,00,2e,00,44,00,69,00,73,00,70,00,6c,00,61,00,\
- 79,00,2e,00,44,00,69,00,73,00,70,00,6c,00,61,00,79,00,45,00,6e,00,68,00,61,\
- 00,6e,00,63,00,65,00,6d,00,65,00,6e,00,74,00,53,00,65,00,72,00,76,00,69,00,\
- 63,00,65,00,2e,00,64,00,6c,00,6c,00,00,00
- "ServiceDllUnloadOnStop"=dword:00000001
- "SvcHostSplitDisable"=dword:00000001
复制代码
3、PE启动后,把显示增强服务启动起来:net start DisplayEnhancementService
4、用nircmd.exe设置亮度。例:nircmd.exe setbrightness 45
注:即使满足1、2、3时,Windows移动中心里的显示器亮度滑块仍旧不起作用。如果有坛友知道如何解决,望赐教。
2023-07-31补充:显示器驱动(系统自带的monitor.inf)和电源服务也是必须的。以Charei1028发布的Win11 22631.3078 PE为例:
显示器驱动相关文件Windows\INF\monitor.inf、Windows\System32\drivers\monitor.sys和Windows\System32\DriverStore\FileRepository\monitor.inf_amd64_95fb16cd60212f21文件夹都在,但注册表项目被砍了需要补回。这段注册表有点特殊,是存在Windows\System32\config\DRIVERS配置单元里的。推荐使用offlinereg.exe离线导入,命令行示例:offlinereg-win64.exe D:\temp\Windows\System32\config\DRIVERS " " import D:\XXX.reg
- [DriverDatabase\DeviceIds\*PNP09FF]
- "monitor.inf"=hex:01,ff,00,00
- [DriverDatabase\DriverFiles\monitor.sys]
- @="monitor.inf"
- [DriverDatabase\DriverInfFiles\monitor.inf]
- @=hex(7):6d,00,6f,00,6e,00,69,00,74,00,6f,00,72,00,2e,00,69,00,6e,00,66,00,5f,\
- 00,61,00,6d,00,64,00,36,00,34,00,5f,00,39,00,35,00,66,00,62,00,31,00,36,00,\
- 63,00,64,00,36,00,30,00,32,00,31,00,32,00,66,00,32,00,31,00,00,00,00,00
- "Active"="monitor.inf_amd64_95fb16cd60212f21"
- "Configurations"=hex(7):4e,00,6f,00,6e,00,50,00,6e,00,50,00,4d,00,6f,00,6e,00,\
- 69,00,74,00,6f,00,72,00,2e,00,49,00,6e,00,73,00,74,00,61,00,6c,00,6c,00,00,\
- 00,50,00,6e,00,50,00,4d,00,6f,00,6e,00,69,00,74,00,6f,00,72,00,2e,00,49,00,\
- 6e,00,73,00,74,00,61,00,6c,00,6c,00,00,00,00,00
- [DriverDatabase\DriverPackages\monitor.inf_amd64_95fb16cd60212f21]
- "Version"=hex:ff,ff,09,00,00,00,00,00,6e,e9,36,4d,25,e3,ce,11,bf,c1,08,00,2b,\
- e1,03,18,00,80,8c,a3,c5,94,c6,01,ca,09,5d,58,00,00,0a,00,00,00,00,00,00,00,\
- 00,00
- "Provider"="Microsoft"
- "SignerScore"=dword:0d000003
- "FileSize"=hex(b):fc,ef,0d,00,00,00,00,00
- "StatusFlags"=dword:80000012
- @="monitor.inf"
- [DriverDatabase\DriverPackages\monitor.inf_amd64_95fb16cd60212f21\Configurations]
- [DriverDatabase\DriverPackages\monitor.inf_amd64_95fb16cd60212f21\Configurations\NonPnPMonitor.Install]
- "Service"="monitor"
- "ConfigScope"=dword:00000005
- "ConfigFlags"=dword:00000000
- [DriverDatabase\DriverPackages\monitor.inf_amd64_95fb16cd60212f21\Configurations\NonPnPMonitor.Install\Driver]
- "MODES"=hex(100000):
- "MaxResolution"=hex(200000):
- "DPMS"=hex(200000):
- "ICMProfile"=hex(200000):
- [DriverDatabase\DriverPackages\monitor.inf_amd64_95fb16cd60212f21\Configurations\NonPnPMonitor.Install\Driver\MODES]
- [DriverDatabase\DriverPackages\monitor.inf_amd64_95fb16cd60212f21\Configurations\NonPnPMonitor.Install\Driver\MODES\640,480]
- @=""
- [DriverDatabase\DriverPackages\monitor.inf_amd64_95fb16cd60212f21\Configurations\PnPMonitor.Install]
- "Service"="monitor"
- "ConfigScope"=dword:00000005
- "ConfigFlags"=dword:00000000
- [DriverDatabase\DriverPackages\monitor.inf_amd64_95fb16cd60212f21\Configurations\PnPMonitor.Install\Driver]
- "MaxResolution"="1600,1200"
- "DPMS"="1"
- "MODES"=hex(100000):
- "ICMProfile"=hex(200000):
- [DriverDatabase\DriverPackages\monitor.inf_amd64_95fb16cd60212f21\Configurations\PnPMonitor.Install\Driver\MODES]
- [DriverDatabase\DriverPackages\monitor.inf_amd64_95fb16cd60212f21\Configurations\PnPMonitor.Install\Driver\MODES\1600,1200]
- @=""
- [DriverDatabase\DriverPackages\monitor.inf_amd64_95fb16cd60212f21\Descriptors]
- [DriverDatabase\DriverPackages\monitor.inf_amd64_95fb16cd60212f21\Descriptors\*PNP09FF]
- "Configuration"="PnPMonitor.Install"
- "Manufacturer"="%generic%"
- "Description"="%pnpmonitor.devicedesc%"
- [DriverDatabase\DriverPackages\monitor.inf_amd64_95fb16cd60212f21\Descriptors\Monitor]
- [DriverDatabase\DriverPackages\monitor.inf_amd64_95fb16cd60212f21\Descriptors\Monitor\Default_Monitor]
- "Configuration"="NonPnPMonitor.Install"
- "Manufacturer"="%generic%"
- "Description"="%nonpnpmonitor.devicedesc%"
- [DriverDatabase\DriverPackages\monitor.inf_amd64_95fb16cd60212f21\Strings]
- "nonpnpmonitor.devicedesc"="Generic Non-PnP Monitor"
- "pnpmonitor.devicedesc"="Generic PnP Monitor"
- "generic"="(Standard monitor types)"
复制代码
电源服务如果被砍了,需要补回:- [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Power]
- "Description"="@%SystemRoot%\\system32\\umpo.dll,-101"
- "DisplayName"="@%SystemRoot%\\system32\\umpo.dll,-100"
- "ErrorControl"=dword:00000001
- "FailureActions"=hex:00,00,00,00,00,00,00,00,00,00,00,00,03,00,00,00,14,00,00,\
- 00,02,00,00,00,60,ea,00,00,02,00,00,00,60,ea,00,00,02,00,00,00,60,ea,00,00
- "Group"="Plugplay"
- "ImagePath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
- 74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,\
- 00,76,00,63,00,68,00,6f,00,73,00,74,00,2e,00,65,00,78,00,65,00,20,00,2d,00,\
- 6b,00,20,00,44,00,63,00,6f,00,6d,00,4c,00,61,00,75,00,6e,00,63,00,68,00,20,\
- 00,2d,00,70,00,00,00
- "MitigationFlags"=dword:00000032
- "ObjectName"="LocalSystem"
- "RequiredPrivileges"=hex(7):53,00,65,00,54,00,63,00,62,00,50,00,72,00,69,00,76,\
- 00,69,00,6c,00,65,00,67,00,65,00,00,00,53,00,65,00,53,00,65,00,63,00,75,00,\
- 72,00,69,00,74,00,79,00,50,00,72,00,69,00,76,00,69,00,6c,00,65,00,67,00,65,\
- 00,00,00,53,00,65,00,41,00,73,00,73,00,69,00,67,00,6e,00,50,00,72,00,69,00,\
- 6d,00,61,00,72,00,79,00,54,00,6f,00,6b,00,65,00,6e,00,50,00,72,00,69,00,76,\
- 00,69,00,6c,00,65,00,67,00,65,00,00,00,53,00,65,00,54,00,61,00,6b,00,65,00,\
- 4f,00,77,00,6e,00,65,00,72,00,73,00,68,00,69,00,70,00,50,00,72,00,69,00,76,\
- 00,69,00,6c,00,65,00,67,00,65,00,00,00,53,00,65,00,4c,00,6f,00,61,00,64,00,\
- 44,00,72,00,69,00,76,00,65,00,72,00,50,00,72,00,69,00,76,00,69,00,6c,00,65,\
- 00,67,00,65,00,00,00,53,00,65,00,42,00,61,00,63,00,6b,00,75,00,70,00,50,00,\
- 72,00,69,00,76,00,69,00,6c,00,65,00,67,00,65,00,00,00,53,00,65,00,52,00,65,\
- 00,73,00,74,00,6f,00,72,00,65,00,50,00,72,00,69,00,76,00,69,00,6c,00,65,00,\
- 67,00,65,00,00,00,53,00,65,00,49,00,6d,00,70,00,65,00,72,00,73,00,6f,00,6e,\
- 00,61,00,74,00,65,00,50,00,72,00,69,00,76,00,69,00,6c,00,65,00,67,00,65,00,\
- 00,00,53,00,65,00,41,00,75,00,64,00,69,00,74,00,50,00,72,00,69,00,76,00,69,\
- 00,6c,00,65,00,67,00,65,00,00,00,53,00,65,00,43,00,68,00,61,00,6e,00,67,00,\
- 65,00,4e,00,6f,00,74,00,69,00,66,00,79,00,50,00,72,00,69,00,76,00,69,00,6c,\
- 00,65,00,67,00,65,00,00,00,53,00,65,00,55,00,6e,00,64,00,6f,00,63,00,6b,00,\
- 50,00,72,00,69,00,76,00,69,00,6c,00,65,00,67,00,65,00,00,00,53,00,65,00,44,\
- 00,65,00,62,00,75,00,67,00,50,00,72,00,69,00,76,00,69,00,6c,00,65,00,67,00,\
- 65,00,00,00,53,00,65,00,53,00,79,00,73,00,74,00,65,00,6d,00,45,00,6e,00,76,\
- 00,69,00,72,00,6f,00,6e,00,6d,00,65,00,6e,00,74,00,50,00,72,00,69,00,76,00,\
- 69,00,6c,00,65,00,67,00,65,00,00,00,00,00
- "ServiceSidType"=dword:00000001
- "Start"=dword:00000002
- "Type"=dword:00000020
- [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Power\Parameters]
- "ServiceDll"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,\
- 00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,\
- 75,00,6d,00,70,00,6f,00,2e,00,64,00,6c,00,6c,00,00,00
- "ServiceMain"="UmpoMain"
复制代码
2023-08-04:给slore大佬的WinXShell的亮度调整界面增加了调整方式选项。选择硬件控制时调用X:\Windows\System32\nircmd.exe设置亮度。不符合前述条件(两个驱动+两个服务)的环境下使用不会报错,但调整也不会生效。有兴趣的自取:https://pan.baidu.com/s/1jqvonGWJjTMvvpbsZjPn3A?pwd=ic7k
|