diff --git a/RadeonResetBugFixService/Constants.cs b/RadeonResetBugFixService/Constants.cs
index 6a7d25b..3402328 100644
--- a/RadeonResetBugFixService/Constants.cs
+++ b/RadeonResetBugFixService/Constants.cs
@@ -5,5 +5,7 @@
static class Constants
{
public static TimeSpan ServiceTimeout { get; } = TimeSpan.FromMinutes(5);
+
+ public static string BasicDisplayRegistryKey { get; } = @"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BasicDisplay";
}
}
diff --git a/RadeonResetBugFixService/MainHandler.cs b/RadeonResetBugFixService/MainHandler.cs
index c4ec2f1..d8eb37a 100644
--- a/RadeonResetBugFixService/MainHandler.cs
+++ b/RadeonResetBugFixService/MainHandler.cs
@@ -49,6 +49,7 @@
logger,
new ITask[]
{
+ new EnableBasicDisplayStartupTask(),
new SleepTask(TimeSpan.FromSeconds(20)),
new DisableVirtualVideoTask(this.StartupDevicesStatus),
new EnableAmdVideoTask(this.StartupDevicesStatus),
@@ -88,6 +89,7 @@
new EnableVirtualVideoTask(this.ShutdownDevicesStatus),
new LastResortDevicesRestoreTask(this.StartupDevicesStatus),
new LastResortDevicesRestoreTask(this.StartupDevicesStatus), // just in case
+ new DisableBasicDisplayStartupTask(),
});
}
}
diff --git a/RadeonResetBugFixService/RadeonResetBugFixService.csproj b/RadeonResetBugFixService/RadeonResetBugFixService.csproj
index 0a1e988..a8a232b 100644
--- a/RadeonResetBugFixService/RadeonResetBugFixService.csproj
+++ b/RadeonResetBugFixService/RadeonResetBugFixService.csproj
@@ -73,6 +73,8 @@
+
+
diff --git a/RadeonResetBugFixService/Tasks/DisableBasicDisplayStartupTask.cs b/RadeonResetBugFixService/Tasks/DisableBasicDisplayStartupTask.cs
new file mode 100644
index 0000000..6953bd1
--- /dev/null
+++ b/RadeonResetBugFixService/Tasks/DisableBasicDisplayStartupTask.cs
@@ -0,0 +1,17 @@
+namespace RadeonResetBugFixService.Tasks
+{
+ using Microsoft.Win32;
+ using Contracts;
+
+ class DisableBasicDisplayStartupTask : ITask
+ {
+ string ITask.TaskName => "Disabling basic display automatic start";
+
+ void ITask.Run(ILogger logger)
+ {
+ var originalValue = Registry.GetValue(Constants.BasicDisplayRegistryKey, "Start", -1);
+ logger.Log($"Original start value {originalValue}");
+ Registry.SetValue(Constants.BasicDisplayRegistryKey, "Start", 4);
+ }
+ }
+}
diff --git a/RadeonResetBugFixService/Tasks/EnableBasicDisplayStartupTask.cs b/RadeonResetBugFixService/Tasks/EnableBasicDisplayStartupTask.cs
new file mode 100644
index 0000000..b3b3809
--- /dev/null
+++ b/RadeonResetBugFixService/Tasks/EnableBasicDisplayStartupTask.cs
@@ -0,0 +1,17 @@
+namespace RadeonResetBugFixService.Tasks
+{
+ using Microsoft.Win32;
+ using Contracts;
+
+ class EnableBasicDisplayStartupTask : ITask
+ {
+ string ITask.TaskName => "Enabling basic display automatic start";
+
+ void ITask.Run(ILogger logger)
+ {
+ var originalValue = Registry.GetValue(Constants.BasicDisplayRegistryKey, "Start", -1);
+ logger.Log($"Original start value {originalValue}");
+ Registry.SetValue(Constants.BasicDisplayRegistryKey, "Start", 3);
+ }
+ }
+}