terrymacdonald / DisplayMagician

DisplayMagician is an open source tool for automatically configuring your displays and sound for a game or application from a single Windows Shortcut.
https://displaymagician.littlebitbig.com
GNU General Public License v3.0
424 stars 17 forks source link

Profile switching fails #316

Open karljs opened 2 months ago

karljs commented 2 months ago

Describe the bug

I have 3 screens total (2 LG, 1 Samsung which makes me wonder if https://github.com/terrymacdonald/DisplayMagician/issues/312 could possible be the same issue). I tried to set up 2 profiles, one that uses a single screen and another that uses the other 2. Switching between them causes some activity on the monitors (various LEDs blink, they come to life if asleep) but ultimately the actual display configuration is not switched over and it reverts to the previous setting.

To Reproduce Steps to reproduce the behaviour:

  1. Create two profiles
  2. Be in profile 1 and apply profile 2, note that nothing happens and screen configuration appears as if in profile 1
  3. Apply profile 1 again, the screen flashes, and remains in the same profile 1 configuration it's been in the whole time.

Expected behaviour A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Reporting Logs DisplayMagician-Support-20240626-1225.zip DisplayMagician(1).log

Enviroment (please complete the following information):

terrymacdonald commented 2 months ago

Hi @karljs,

Hmmmm. I can't really see anything in the logs specifically, other than one of your monitors is being detected as a 0x0 sized screen. I can't tell why this is being detected this way though unfortunately. I'll try looking through your config in more detail when I get a chance.

I also can't tell if its related to #316, as the person who logged that hasn't provided any logs, making troubleshooting impossible.

Another avenue you can try to to test the new pre-alpha version of DisplayMagician v2.6.0.38073 which I just released last night. It fixes a lot of bugs, and some of those fixes may help your situation. Please be warned though - it uses a new file format, and I'm currently still adjusting the file format, so you will NEED to recreate your DM config from scratch, and you will NEED to do it again when I release the final version of DM v2.6.0.

You can get the latest pre-alpha DM from here: DisplayMagicianSetup-v2.6.0.38073.zip

Thanks Terry

karljs commented 2 months ago

Thanks for taking a look. Unfortunately that pre-alpha version doesn't fix my issue. I've included a new log just in case there are any changes that might make it more helpful, but I guess for now I'll have to do this the hard way. DisplayMagician-2024-06-30-2155.log

karljs commented 2 months ago

Small anecdote that might be helpful as a direction: I tried using Monitor Profile Switcher as an alternative and it had the same problem. However, what I noticed is that if I switch my profile a second time in quick succession with that tool, it works the second time. So it seems it has something to do with the monitor not being fully woken up on the first attempt. DisplayMagician doesn't let me switch to the same profile repeatedly (which admittedly doesn't make sense under normal circumstances) so I can't try it.

terrymacdonald commented 2 months ago

Hi Karl,

Sounds like it could be either the hardware, or the NVIDIA driver to me based on what you're describing. If it's happening with Monitor Profile Switcher then that calls the same NVIDIA NvAPI and Windows CCD API calls that I use. This effectively eliminates DisplayMagician from being the problem.

In order to nail down what the issue is, you could try NVIDIAInfo. NVIDIAInfo is a small program that I wrote to test out the NVIDIALibrary that I wrote. I've recently found some bugs with it, and I've been trialling some new tests after copying code from Soroush Falahati's awesome NVAPIWrapper ..net project. So you could do some testing using that as it may help point to where the problem lies.

You can get the latest test NVIDIAInfo from here: https://github.com/user-attachments/files/16048338/NVIDIAInfo-v2.0.0-alphatest.zip

Instructions on how to use the application are here: https://github.com/terrymacdonald/NVIDIAInfo/releases

This should allow you to apply the same config twice to see if that works or not. This also uses a completely new NVIDIALibrary, so that might possibly help things. My gut feel though is that it's something hardware or driver related, in which NVIDIAInfo won't help.

Thanks

Terry

Message ID: @.*** com>

terrymacdonald commented 2 months ago

Weirdly, I've got another user who is having issues with a Samsung Odyssey screen showing up as a 0x0 screen as well. I wonder if there is a hardware issue with Samsung Odyssey monitors? I'll have to do some more digging.

Park0h commented 1 month ago

Weirdly, I've got another user who is having issues with a Samsung Odyssey screen showing up as a 0x0 screen as well. I wonder if there is a hardware issue with Samsung Odyssey monitors? I'll have to do some more digging.

Hi, It seems I also may have this problem. any updates on why this could be happening?

terrymacdonald commented 1 month ago

Not at this stage. I am currently trying to rush v2.6.0 out the door as that fixes an upcoming Steam client change, but will work on testing the new NVIDIALibrary to see if we can figure out what's happening once that new version is released.

My gut feel is that the Samsung Odyssey screen may be reporting incorrect information when it's being queried, or that there is a bug in the way that screen sizes are being pulled from that data using the EDID library. That whole video controlling library needs some fixing, and it will be an absolute pain to get it right as there are always edge cases with the random collection of hardware that people have in their computers :).

Thanks Terry

chris023 commented 1 month ago

I've got the same issue using an earlier model Odyssey G9. Switching back to the G9 from my rig triples fails the first time, but succeeds on the second attempt as long as I leave DisplayMagician open between attempts. Trying to switch using a generated .lnk fails indefinitely if DisplayMagician isn't running. The G9 has issues waking from sleep, I had to upgrade my firmware on the monitor a year or two ago to get it to start waking up from sleep consistently. Possibly related to that issue

chris023 commented 1 month ago

Here's my workaround in an ahk2 script that lets me switch profiles with one button press still image