在开机后会显示Main battery低的警告框,当这个框还没有完全显示完后,系统就调用OEMPoweroff()关机了.
后来我觉得可能是[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\Timeouts]下的几个超时时间设置不对,于是我就改为:
"ACUserIdle"=dword:0 ; in seconds
"ACSystemIdle"=dword:0 ; in seconds
"ACSuspend"=dword:0 ; in seconds
"BattUserIdle"=dword:0 ; in seconds
"BattSystemIdle"=dword:0 ; in seconds
"BattSuspend"=dword:0 ; in seconds
"ACUserIdle"=dword:0 ; in seconds
"ACSystemIdle"=dword:0 ; in seconds
"ACSuspend"=dword:0 ; in seconds
"BattUserIdle"=dword:0 ; in seconds
"BattSystemIdle"=dword:0 ; in seconds
"BattSuspend"=dword:0 ; in seconds
如上设置后系统不可能再进入到systemidle模式也就不可能调用OEMIdle(),开机时进控制面板设置电源管理都设成从不试试
These DWORD values are stored in the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\Timeouts registry key. A value of 0 indicates that no time-out will occur. The sample implementation does not provide a method for bypassing OS power states; however, OEMs may choose to do so.
刚才把超时值改为:
"ACUserIdle"=dword:FFFFFFFF ; in seconds
"ACSystemIdle"=dword:FFFFFFFF ; in seconds
"ACSuspend"=dword:FFFFFFFF ; in seconds
"BattUserIdle"=dword:FFFFFFFF ; in seconds
"BattSystemIdle"=dword:FFFFFFFF ; in seconds
"BattSuspend"=dword:FFFFFFFF ; in seconds
你的注册表是Hive Based Registry,如果不是你开机后改是不会重新设置电源管理时间的,可以肯定的告诉你进入oemidle确实是上述参数控制的,电源管理驱动加载时会从注册表读取上述参数,要不进idle很简单周期调用 SetSystemPowerState(NULL, POWER_STATE_ON,POWER_FORCE);
回xunjingzhpu兄:
在我的OSdesignView中的File systems and Data Store 下只加了RAM and ROM File system 和FAT FIle system 组件,并没有添加HIVE-Based Registry和RAM based Registry,另外那个
BIT-BASED 和COUNT-BASED也没加,不知这样是否是这个原因??
引用 9 楼 kkkcxf1981 的回复:
回xunjingzhpu兄:
在我的OSdesignView中的File systems and Data Store 下只加了RAM and ROM File system 和FAT FIle system 组件,并没有添加HIVE-Based Registry和RAM based Registry,另外那个
BIT-BASED 和COUNT-BASED也没加,不知这样是否是这个原因??