-
-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What script disables the night light settings? #54
Comments
Hi @AdamJel , glad to hear that you're happy and thanks for the bug report. Would you be able to specify your OS version? Did you run standard/script or something customized? Could you upload the script if it was something customized? |
@undergroundwires luckily, I am able to catch on your message editing going on :)
|
Hi, sorry for the inconsistent replies, I was testing meanwhile and getting different result 😅 Thanks for the all information. I tested it on 20H1 but could not reproduce, however I could reproduce it using 20H2 and "Strict" template after rebooting. Behavior is unintended and I'm not sure what script is causing it. 🤔 |
I suspect this is caused by disabling a service that interacts with the night light settings in an undocumented way. #55 (comment) by @mikhoul might solve it. Please share if anyone can find out what's the cause here, so we can unrecommend or document the script. |
There are 3 Windows services necessary for night lighting to work properly:
If the "Connected Devices Platform Service" and "Network Connection Broker" services have the "disabled" start type, the "night lighting" functionality in the "Settings" application does not work, if we click on the button for the activate, nothing happens. For the night lighting setting to work, these services can be configured with the "manual" or "automatic" start type with the service management console (services.msc). The "Connected Devices Platform User Service" service must be configured with the "automatic" start type for night lighting to work. This service (called "template service") create a secondary service (called "Per-user service") with the same name followed by a random hexadecimal number (ex: Connected Devices Platform User Service_253cb) when a user log in (source: https://docs.microsoft.com/en-us/windows/application-management/per-user-services-in-windows). This service cannot be configured with services.msc, so you must modify its configuration with the Windows registry by executing these commands in Administrator: reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CDPUserSvc" /v Start /t REG_DWORD /d 2 /f reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CDPUserSvc" /v UserServiceFlags /t REG_DWORD /d 3 /f Setting the value "Start" to 2 configures the type of start to "Automatic". Setting the value "UserServiceFlags" to 3 allows the creation of the service per user. When a user log in, the created per-user service inherits the configuration parameters from the service template. So, if the value "Start" of the template service is 2, the service per user created will have the same value "Start" to 2. After applying these settings, restart the computer and test the night lighting again. |
Hello @mikhoul I am having this issue after running Standard with some modifications. I have removed EDGE, MS Edge, OneNote & One Drive. There may be one other thing I allowed it wanted to remove that I cannot recall. I am on 20H2 with Build 19042.906 and Windows Feature Experience Pack 120.2212.551.0. After running the script, I restarted my system. Then I happened to notice that Night Light was broken. (I use it famously on all of my systems.) Via your instructions above, searched the services.msc and found both of the aforementioned "Connected Devices Platform Service (CDPSvc)" which was set to Automatic (Delayed Start) and "Network Connection Broker" was set to Manual (Trigger Start). Both were currently Running. "Connected Devices Platform User Service" was set to Automatic and it was Running. I went back into check what they were showing in service.msc and found that "Connected Devices Platform User Service" was no longer even present in any way. At this point I opened cmd in admin and ran the two lines one at a time just as you posted above. Both ran successfully. services.msc still does not show "Connected Devices Platform User Service" at all. Could you provide any other suggestions? It is strange because I have run a very similar script on work devices and while I left OneNote, Drive and Edge enabled, there are no other differences in these two scripts. Work machines are not losing Night Light. |
Make sure that the CDPUserSvc.dll file exists in the %WinDir%\System32 folder. If this file is missing you can try to restore it from your Windows 10 installation media. |
Verify that the DDL is registred: https://helpdeskgeek.com/how-to/register-dll-file-in-windows/ Once registered set the service to automatic and reboot so see if the service is started. |
Thank you. I did this and then it disappeared again after reboot. I ended up running sfc /scannow and it restored my Night Light. Searching through the logs.. Unsure so far, but I am wondering if this enabled my telemetry back as well though? @AdamJel you may want to try this if you are still without your Night Light. |
I found this out after some extensive testing. It's Also breaks on Windows 10 21H1 and Windows 11 - 21H2. I don't know why night light setting would require Azure Active Directory connection. High likely that some data collection is involved. |
That is very interesting! I've been experimenting with Win 11 some but have
not used your debloating scripts with it yet.
Thank you for looking into it further and for letting me know of your
findings!
…--
*Nick*
***@***.***
On Fri, Nov 19, 2021 at 10:50 AM undergroundwires ***@***.***> wrote:
I found this out after some extensive testing. It's Microsoft AAD Broker
Plugin script. Uninstalling it breaks night light settings after reboot.
Reverting the script and rebooting solves the issue.
Also breaks on Windows 10 21H1 and Windows 11 - 21H2.
I don't know why night light setting would require Azure Active Directory
connection. High likely that some data collection is involved.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#54 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANJDLRN5BC4G7KG46YFMJGLUMZW4DANCNFSM4XBHEUEA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Closing this as the setting is now unrecommended and documented. Feel free to create new issues for further problems/ideas. |
Hello,
I used this script generator to harden privacy on my Win machine. I also tried to remove as much bloatware as possible. I am overall happy except for one thing. The Windows settings of night light is inaccessible.
Do you know, which script could have disabled this feature and what would be his reverse form?
Thank you
The text was updated successfully, but these errors were encountered: