ArcadeRenegade / SidebarDiagnostics

A simple sidebar for Windows desktop that displays hardware diagnostic information.
GNU General Public License v3.0
2.26k stars 201 forks source link

Bug: Sidebar confused / not displaying if a UHD and FHD displays are used together #420

Open tryallthethings opened 1 year ago

tryallthethings commented 1 year ago

1. Is this a feature request? No

2. Your Operating System Windows 10 21H2

3. App Version Latest - 3.6.3

4. Any Relevant Settings None, that I'm aware of. However: image image

5. Steps to Reproduce

  1. Have 2 displays. One capable of UHD (3840 × 2160) and one only FHD (1920 x 1080). UHD is center display, FHD is left display.
  2. While running both in 1080p, Sidebar Diagnostics works just fine. I have mine pinned to the left side of the left display.
  3. Set main (center) display to UHD and keep the left in FHD
  4. After the next reboot, Sidebar Diagnostics is still reserving the space on the left display, but not showing anymore. image

Additionally, when I right-click the taskbar icon to get into the settings, the context menu is not shown at the mouse cursor position but at the FHD position. image

Temporary fix The only temporary fix I found so far was this:

  1. Set Dock position to right on screen 2 / FHD display. So we end up like this: image
  2. Set Dock position back to left. This moves the dock to the correct position on the left side, reserves the space and shows the information.

This has to be done after every reboot to make Sidebar Diagnostics work and show information.

duckth commented 1 year ago

Having this problem too. Main display is UHD, secondary is QHD. Not displaying until I do the same temporary fix mentioned in the issue.

Tib0b commented 1 year ago

Same problem for me

tryallthethings commented 1 year ago

I did some digging on this issue today, and I think I found the issue. It seems to be related to DPI settings and scaling. My main monitor (4K resolution) is set to 125% scaling, while my other (FHD resolution) is set to 100%. When I set both to 100% Sidebar Diagnostics seems to display just fine. I created a pull request with a potential fix that works for me. If somebody else wants to give it a go, I'll attach the .exe with the changes. Just rename your existing SidebarDiagnostics.exe in C:\Users\Username\AppData\Local\SidebarDiagnostics\app-3.6.3, copy mine there instead and give it a go. SidebarDiagnostics_Issue420.zip

tryallthethings commented 1 year ago

For the tray icon context menu: The function TrayIcon_TrayContextMenuOpen in App.xaml.cs https://github.com/ArcadeRenegade/SidebarDiagnostics/blob/8893ef75ca25511c2d5431eb1741c246413017e9/SidebarDiagnostics/App.xaml.cs#LL219C15-L219C15 adjusts the position and takes the scaling factor into account. But isn't the default windows behavior to display the context menu at the mouse cursors position, regardless of DPI settings / scaling? So why would this be necessary? Removing the function shows the context menu in the correct position. (at least on my setup). Attached is an updated .exe with this and the previously mentioned change if anyone wants to test this as well. SidebarDiagnostics_Issue420_2.zip

Tib0b commented 12 months ago

Hey,

Thank you. I just tested but I have an error at launch :

Application : SidebarDiagnostics.exe Version du Framework : v4.0.30319 Description : le processus a été arrêté en raison d'une exception non gérée. Informations sur l'exception : System.IO.FileNotFoundException à SidebarDiagnostics.App+d0.MoveNext() à System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start[[SidebarDiagnostics.App+d0, SidebarDiagnostics, Version=3.6.3.0, Culture=neutral, PublicKeyToken=null]](d0 ByRef) à SidebarDiagnostics.App.OnStartup(System.Windows.StartupEventArgs) à System.Windows.Application.<.ctor>b1_0(System.Object) à System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32) à System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate) à System.Windows.Threading.DispatcherOperation.InvokeImpl() à MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object) à System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) à System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) à System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) à MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object) à System.Windows.Threading.DispatcherOperation.Invoke() à System.Windows.Threading.Dispatcher.ProcessQueue() à System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef) à MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef) à MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object) à System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32) à System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate) à System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32) à MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr) à MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef) à System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame) à System.Windows.Application.RunDispatcher(System.Object) à System.Windows.Application.RunInternal(System.Windows.Window) à SidebarDiagnostics.App.Main()

And this :

Nom de l’application défaillante SidebarDiagnostics.exe, version : 3.6.3.0, horodatage : 0x64786222 Nom du module défaillant : KERNELBASE.dll, version : 10.0.22621.1928, horodatage : 0xe9af6ed4 Code d’exception : 0xe0434352 Décalage d’erreur : 0x0000000000064b2c ID du processus défaillant : 0x0x7D8 Heure de début de l’application défaillante : 0x0x1D9BEB198027259 Chemin d’accès de l’application défaillante : C:\Users\user\AppData\Local\SidebarDiagnostics\SidebarDiagnostics.exe Chemin d’accès du module défaillant: C:\WINDOWS\System32\KERNELBASE.dll ID de rapport : fbaded92-59b2-4402-b8d4-287673e63b17 Nom complet du package défaillant : ID de l’application relative au package défaillant :

reanopp commented 9 months ago

I did some digging on this issue today, and I think I found the issue. It seems to be related to DPI settings and scaling. My main monitor (4K resolution) is set to 125% scaling, while my other (FHD resolution) is set to 100%. When I set both to 100% Sidebar Diagnostics seems to display just fine. I created a pull request with a potential fix that works for me. If somebody else wants to give it a go, I'll attach the .exe with the changes. Just rename your existing SidebarDiagnostics.exe in C:\Users\Username\AppData\Local\SidebarDiagnostics\app-3.6.3, copy mine there instead and give it a go. SidebarDiagnostics_Issue420.zip

Brilliant thank you - this at least lets me dock it on the left on my second screen (1080p FHD with 100% scaling). However, when I try dock it on the right of that screen, it actually goes to the middle of the 2 screens with a half on each.