无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站投放广告、加入VIP会员,请联系 微信:wuyouceo
查看: 4267|回复: 12
打印 上一主题 下一主题

[讨论] 【抛砖引玉】已安装显卡驱动的PE下调整笔记本内置显示屏亮度的方法

[复制链接]
跳转到指定楼层
1#
发表于 2022-10-24 15:14:15 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 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
注册表项目为:
  1. [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\DisplayEnhancementService]
  2. "Description"="@%SystemRoot%\\System32\\Microsoft.Graphics.Display.DisplayEnhancementService.dll,-1001"
  3. "DisplayName"="@%SystemRoot%\\System32\\Microsoft.Graphics.Display.DisplayEnhancementService.dll,-1000"
  4. "ErrorControl"=dword:00000001
  5. "FailureActions"=hex:80,51,01,00,00,00,00,00,00,00,00,00,03,00,00,00,14,00,00,\
  6.   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
  7. "ImagePath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
  8.   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,\
  9.   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,\
  10.   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,\
  11.   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,\
  12.   69,00,63,00,74,00,65,00,64,00,20,00,2d,00,70,00,00,00
  13. "ObjectName"="LocalSystem"
  14. "RequiredPrivileges"=hex(7):53,00,65,00,43,00,68,00,61,00,6e,00,67,00,65,00,4e,\
  15.   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,\
  16.   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,\
  17.   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,\
  18.   00,00,00,00
  19. "ServiceSidType"=dword:00000001
  20. "Start"=dword:00000002
  21. "Type"=dword:00000020

  22. [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\DisplayEnhancementService\Parameters]
  23. "ServiceDll"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,\
  24.   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,\
  25.   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,\
  26.   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,\
  27.   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,\
  28.   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,\
  29.   63,00,65,00,2e,00,64,00,6c,00,6c,00,00,00
  30. "ServiceDllUnloadOnStop"=dword:00000001
  31. "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
  1. [DriverDatabase\DeviceIds\*PNP09FF]
  2. "monitor.inf"=hex:01,ff,00,00

  3. [DriverDatabase\DriverFiles\monitor.sys]
  4. @="monitor.inf"

  5. [DriverDatabase\DriverInfFiles\monitor.inf]
  6. @=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,\
  7.   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,\
  8.   63,00,64,00,36,00,30,00,32,00,31,00,32,00,66,00,32,00,31,00,00,00,00,00
  9. "Active"="monitor.inf_amd64_95fb16cd60212f21"
  10. "Configurations"=hex(7):4e,00,6f,00,6e,00,50,00,6e,00,50,00,4d,00,6f,00,6e,00,\
  11.   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,\
  12.   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,\
  13.   6e,00,73,00,74,00,61,00,6c,00,6c,00,00,00,00,00

  14. [DriverDatabase\DriverPackages\monitor.inf_amd64_95fb16cd60212f21]
  15. "Version"=hex:ff,ff,09,00,00,00,00,00,6e,e9,36,4d,25,e3,ce,11,bf,c1,08,00,2b,\
  16.   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,\
  17.   00,00
  18. "Provider"="Microsoft"
  19. "SignerScore"=dword:0d000003
  20. "FileSize"=hex(b):fc,ef,0d,00,00,00,00,00
  21. "StatusFlags"=dword:80000012
  22. @="monitor.inf"

  23. [DriverDatabase\DriverPackages\monitor.inf_amd64_95fb16cd60212f21\Configurations]

  24. [DriverDatabase\DriverPackages\monitor.inf_amd64_95fb16cd60212f21\Configurations\NonPnPMonitor.Install]
  25. "Service"="monitor"
  26. "ConfigScope"=dword:00000005
  27. "ConfigFlags"=dword:00000000

  28. [DriverDatabase\DriverPackages\monitor.inf_amd64_95fb16cd60212f21\Configurations\NonPnPMonitor.Install\Driver]
  29. "MODES"=hex(100000):
  30. "MaxResolution"=hex(200000):
  31. "DPMS"=hex(200000):
  32. "ICMProfile"=hex(200000):

  33. [DriverDatabase\DriverPackages\monitor.inf_amd64_95fb16cd60212f21\Configurations\NonPnPMonitor.Install\Driver\MODES]

  34. [DriverDatabase\DriverPackages\monitor.inf_amd64_95fb16cd60212f21\Configurations\NonPnPMonitor.Install\Driver\MODES\640,480]
  35. @=""

  36. [DriverDatabase\DriverPackages\monitor.inf_amd64_95fb16cd60212f21\Configurations\PnPMonitor.Install]
  37. "Service"="monitor"
  38. "ConfigScope"=dword:00000005
  39. "ConfigFlags"=dword:00000000

  40. [DriverDatabase\DriverPackages\monitor.inf_amd64_95fb16cd60212f21\Configurations\PnPMonitor.Install\Driver]
  41. "MaxResolution"="1600,1200"
  42. "DPMS"="1"
  43. "MODES"=hex(100000):
  44. "ICMProfile"=hex(200000):

  45. [DriverDatabase\DriverPackages\monitor.inf_amd64_95fb16cd60212f21\Configurations\PnPMonitor.Install\Driver\MODES]

  46. [DriverDatabase\DriverPackages\monitor.inf_amd64_95fb16cd60212f21\Configurations\PnPMonitor.Install\Driver\MODES\1600,1200]
  47. @=""

  48. [DriverDatabase\DriverPackages\monitor.inf_amd64_95fb16cd60212f21\Descriptors]

  49. [DriverDatabase\DriverPackages\monitor.inf_amd64_95fb16cd60212f21\Descriptors\*PNP09FF]
  50. "Configuration"="PnPMonitor.Install"
  51. "Manufacturer"="%generic%"
  52. "Description"="%pnpmonitor.devicedesc%"

  53. [DriverDatabase\DriverPackages\monitor.inf_amd64_95fb16cd60212f21\Descriptors\Monitor]

  54. [DriverDatabase\DriverPackages\monitor.inf_amd64_95fb16cd60212f21\Descriptors\Monitor\Default_Monitor]
  55. "Configuration"="NonPnPMonitor.Install"
  56. "Manufacturer"="%generic%"
  57. "Description"="%nonpnpmonitor.devicedesc%"

  58. [DriverDatabase\DriverPackages\monitor.inf_amd64_95fb16cd60212f21\Strings]
  59. "nonpnpmonitor.devicedesc"="Generic Non-PnP Monitor"
  60. "pnpmonitor.devicedesc"="Generic PnP Monitor"
  61. "generic"="(Standard monitor types)"
复制代码

电源服务如果被砍了,需要补回:
  1. [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Power]
  2. "Description"="@%SystemRoot%\\system32\\umpo.dll,-101"
  3. "DisplayName"="@%SystemRoot%\\system32\\umpo.dll,-100"
  4. "ErrorControl"=dword:00000001
  5. "FailureActions"=hex:00,00,00,00,00,00,00,00,00,00,00,00,03,00,00,00,14,00,00,\
  6.   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
  7. "Group"="Plugplay"
  8. "ImagePath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
  9.   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,\
  10.   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,\
  11.   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,\
  12.   00,2d,00,70,00,00,00
  13. "MitigationFlags"=dword:00000032
  14. "ObjectName"="LocalSystem"
  15. "RequiredPrivileges"=hex(7):53,00,65,00,54,00,63,00,62,00,50,00,72,00,69,00,76,\
  16.   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,\
  17.   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,\
  18.   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,\
  19.   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,\
  20.   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,\
  21.   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,\
  22.   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,\
  23.   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,\
  24.   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,\
  25.   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,\
  26.   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,\
  27.   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,\
  28.   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,\
  29.   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,\
  30.   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,\
  31.   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,\
  32.   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,\
  33.   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,\
  34.   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,\
  35.   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,\
  36.   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,\
  37.   69,00,6c,00,65,00,67,00,65,00,00,00,00,00
  38. "ServiceSidType"=dword:00000001
  39. "Start"=dword:00000002
  40. "Type"=dword:00000020

  41. [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Power\Parameters]
  42. "ServiceDll"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,\
  43.   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,\
  44.   75,00,6d,00,70,00,6f,00,2e,00,64,00,6c,00,6c,00,00,00
  45. "ServiceMain"="UmpoMain"
复制代码



2023-08-04:给slore大佬的WinXShell的亮度调整界面增加了调整方式选项。选择硬件控制时调用X:\Windows\System32\nircmd.exe设置亮度。不符合前述条件(两个驱动+两个服务)的环境下使用不会报错,但调整也不会生效。有兴趣的自取:https://pan.baidu.com/s/1jqvonGWJjTMvvpbsZjPn3A?pwd=ic7k








2#
发表于 2022-10-24 15:21:27 | 只看该作者
有显卡驱动的话,直接有API可以设置。
PE来说显卡驱动大,很多情况不需要安装。没驱动的话,API没法调节,
所以采用遮罩更通用,当然遮罩方式也有些瑕疵,只能说凑合用。

点评

大佬好! 又做了些测试,果然是我乌龙了,我能调是因为我装了显卡驱动。之前以为跟显卡驱动没关系的。 请教下在有显卡驱动的前提下,用什么API可以直接调节?最好是简单粗暴的  详情 回复 发表于 2022-10-24 15:52
回复

使用道具 举报

3#
 楼主| 发表于 2022-10-24 15:52:34 | 只看该作者
本帖最后由 hua_wuxin 于 2022-10-24 18:51 编辑
slore 发表于 2022-10-24 15:21
有显卡驱动的话,直接有API可以设置。
PE来说显卡驱动大,很多情况不需要安装。没驱动的话,API没法调节, ...

大佬好!

又做了些测试,果然是我乌龙了,我能调是因为我装了显卡驱动。之前以为跟显卡驱动没关系的。

请教下:在有显卡驱动的前提下,PE下Windows移动中心里的显示器亮度滑块不起作用,大佬会不会正好有解决方法?

回复

使用道具 举报

4#
发表于 2022-10-24 18:12:59 | 只看该作者
支持一下
回复

使用道具 举报

5#
发表于 2022-10-24 19:58:05 | 只看该作者
亮度不需要显卡驱动,pe里用winxshell自带亮度调节

点评

那个有点小问题:鼠标指针和StartIsBack界面调不到,总是最亮的。  详情 回复 发表于 2022-10-24 20:03
回复

使用道具 举报

6#
 楼主| 发表于 2022-10-24 20:03:52 | 只看该作者
sairen139 发表于 2022-10-24 19:58
亮度不需要显卡驱动,pe里用winxshell自带亮度调节

那个有点小问题:鼠标指针和StartIsBack界面调不到,总是最亮的。
回复

使用道具 举报

7#
发表于 2022-10-24 20:08:08 | 只看该作者
感谢分享
回复

使用道具 举报

8#
发表于 2022-10-24 20:57:46 | 只看该作者

点评

谢谢,我还是直接用nircmd.exe成品了。希望最终能有Windows移动中心的解决方案。  发表于 2022-10-24 21:20
回复

使用道具 举报

9#
发表于 2023-5-31 05:50:35 来自手机 | 只看该作者
按楼主方法补上相应文件,启动显示增强服务还是报相应模块没启动啊

点评

在有问题的PE下用CFF Explorer检查Microsoft.Graphics.Display.DisplayEnhancementService.dll的依赖文件  详情 回复 发表于 2023-5-31 12:24
回复

使用道具 举报

10#
 楼主| 发表于 2023-5-31 12:24:04 | 只看该作者
aklncg 发表于 2023-5-31 05:50
按楼主方法补上相应文件,启动显示增强服务还是报相应模块没启动啊

在有问题的PE下用CFF Explorer检查Microsoft.Graphics.Display.DisplayEnhancementService.dll的依赖文件
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2024-11-22 15:37

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表