# Laptop Gaming Slow? - Overcoming CPU Throttling
筆電玩遊戲速度慢?可能是你的電腦CPU沒有全速運轉!
> 吳一宏
## DDx 鑑別診斷
* Overheating
* CPU throttling
* RAM issues
* GPU issues
## CPU throttling 降頻
* CPU throttling是電腦為了降低功耗以克服核心溫度過高的方式之一,但也因此會造成遊戲到一半幀數突然降低的現象。
* 我們為了提高遊戲時的速度,可能需要將電腦本身的這個功能關閉以盡可能利用電腦的效能,這時我們可以怎麼做呢?
### Set Maximum processor state to 100%
1. Press Windows Key+R to launch Run, and copy and paste the following and hit Enter:
```
control.exe powercfg.cpl,,3
```

2. Now, in the Power Options window, scroll down and expand “Processor power management” and then expand "Maximum processor state".
3. Click on the box beside “Settings” and set the value to "100".

4. After that, expand the “System cooling policy” just above the ‘Maximum processor state’.
5. Click on “Settings” to expand it and set it as “Active“.
6. Then, finally, click on “Apply” and “OK” to save the changes.

7. 重啟電腦
### Disable Intelppm registry in Registry Editor
You can set your CPU to work at its full capacity all time by changing the value of the ‘start’ key of the ‘Intelppm’ registry. To change the value of ‘Start’ key follow these steps-
1. At first, press the Windows key from your keyboard and then start to type “Registry“.
2. Then, click on the “Registry Editor” in the search result.

The Registry Editor window will open.
3. On the left pane of Registry Editor, navigate to this location-
`HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\intelppm`
4. Now, on the right pane double click on “Start“.

5. Set the Value data to “4“. Click on “OK” to change the value of the registry.
6. 以上這步驟可以將降頻的驅動程式關閉,這樣CPU就會一直在最高速運轉狀態。
> 各種數值代表不同的驅動程式預設設定:
| Value | Start Type | Value Descriptions for Start Entries|
|---|---|---|
|0 |Boot |Specifies a driver that is loaded (but not started) by the boot loader. If no errors occur, the driver is started during kernel initialization prior to any non-boot drivers being loaded.|
|1 |System |Specifies a driver that loads and starts during kernel initialization after drivers with a Start value of 0 have been started.|
|2| Auto Load| Specifies a driver or service that is initialized at system startup by Session Manager (Smss.exe) or the Services Controller (Services.exe).|
|3 |Load on Demand |Specifies a driver or service that the Service Control Manager (SCM) will start only on demand. These drivers have to be started manually by calling a Win32 SCM application programming interface (API), such as the Services snap-in.|
|4 |Disable| Specifies a disabled (not started) driver or service.|
|5 |Delayed Start |Specifies that less-critical services will start shortly after startup to allow the operating system to be responsive to the user sooner. This start type was first introduced in Windows Vista.|
:::warning
Bug:bug:
* 我將數值設為4後,會遇到開機後CPU被「系統」及antimalware service executable佔用到100%的情況!

* 如果將數值設為2,代表讓CPU能夠在需要的時候用到全速,不會被降頻,可以解決「系統」佔CPU到100%的情況。至於antimalware則以以下方式解決。
方法 1. 更改 Windows Defender 計畫選項
防火牆實時運行的特性導致磁碟的使用率大幅提升,更改 Windows Defender 計畫選項對於修正Antimalware Service Executable 占用記憶體和CPU的問題又很大的幫助。
1. 同時按住 Windows鍵 + R ,打開執行視窗。
2. 輸入 taskschd.msc 後按 Enter。
3. 雙擊點開 工作排程器程式庫 > Microsoft > Windows 。

4. 雙擊 Windows Defender > Windows Defender Scheduled Scan 。
5. 取消勾選優先執行(Run with highest privileges)。
6. 取消勾選條件裡的所有項目後點擊確認。
完成上述步驟後,你的問題應該能順利解決了。如果問題依舊存在,請參考Solution 2。
方法 2. 將antimalware service executable 添加到 Windows Defender 的排除列表中
1. 同時按住 Windows鍵+ I ,打開設定視窗。
2. 點擊 更新&安全性。

3. 點擊 Windows安全性,點擊添加排除項目。
4. 點擊排除.exe, .com, .scr 程序。
5. 輸入 MsMpEng.exe (ProgramFiles/WindowsDefense/MsMpEng.exe) ,點擊 OK。
:::