Skip to content

Commit

Permalink
feat: disable DisplayEnhancementService on desktops
Browse files Browse the repository at this point in the history
  • Loading branch information
Xyueta committed Sep 18, 2023
1 parent f2e07fa commit a927ae0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/playbook/Configuration/atlas/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ actions:
# DsSvc 4 < can cause issues with Snip & Sketch
# icssvc 4 < breaks mobile/Wi-Fi hotspot
# IKEEXT 4 < causes Teredo not to work
# DisplayEnhancementService 4 < breaks brightness slider on laptops
# iphlpsvc 4 < causes Teredo not to work
# KeyIso 4 < causes issues with NVCleanstall's driver telemetry tweak
# SharedAccess 4 < breaks mobile/Wi-Fi hotspot
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ for /f "delims=:{}" %%a in ('wmic path Win32_SystemEnclosure get ChassisTypes ^|
set "DEVICE_TYPE=PC"
for %%a in (8 9 10 11 12 13 14 18 21 30 31 32) do if "!CHASSIS!" == "%%a" (set "DEVICE_TYPE=LAPTOP")

if "%DEVICE_TYPE"=="LAPTOP" (
if "!DEVICE_TYPE!"=="LAPTOP" (
echo WARNING: You are on a laptop, disabling power saving features will cause faster battery drainage and increased heat output.
echo If you use your laptop on battery, certain power saving features will enable, but not all.
echo It's NOT recommended to disable power saving on laptops in general.
Expand Down
10 changes: 10 additions & 0 deletions src/playbook/Executables/FINALIZE.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -220,3 +220,13 @@ if "!diskDrive!" == "SSD" (
rem Disable SysMain (Superfetch and Prefetch)
reg add "HKLM\SYSTEM\CurrentControlSet\Services\SysMain" /v "Start" /t REG_DWORD /d "4" /f > nul
)

:: Detect if user uses laptop device or personal computer
for /f "delims=:{}" %%a in ('wmic path Win32_SystemEnclosure get ChassisTypes ^| findstr [0-9]') do set "CHASSIS=%%a"]
set "DEVICE_TYPE=PC"
for %%a in (8 9 10 11 12 13 14 18 21 30 31 32) do if "!CHASSIS!" == "%%a" (set "DEVICE_TYPE=LAPTOP")

:: Disable laptop-related services on PC
if "!DEVICE_TYPE!"=="PC" (
call %windir%\AtlasModules\Scripts\setSvc.cmd DisplayEnhancementService 4
)
2 changes: 1 addition & 1 deletion src/playbook/playbook.conf
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
</Options>
<BottomLine Text="Learn more" Link="https://docs.atlasos.net/getting-started/post-installation/security/#core-isolation"/>
</RadioPage>
<CheckboxPage IsRequired="true" Description="Select the miscellaneous options that you would like to use, which you can change later.">
<CheckboxPage IsRequired="true" Description="Select the miscellaneous options you would like to use, which you can change later.">
<Options>
<CheckboxOption>
<Text>Remove Microsoft Edge</Text>
Expand Down

0 comments on commit a927ae0

Please sign in to comment.