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
443 stars 18 forks source link

165hz Monitors not going back to 165hz when selecting Default profile #33

Closed stringfieldmark closed 3 years ago

stringfieldmark commented 3 years ago

Describe the bug I have two display profiles, a Default (4x Individual screens) and a triple screen profile(3xscreens in NVidia surround and 1xscreen as a second screen). Switching between profiles works perfectly apart from one thing.

When switching to my 3 x surround and 1 x second screen the 3 x surround screens always, correctly, default to the 165hz refresh rate (as it was set up). However, no matter how I set the default profile up, the 3 x screens always default back to 60hz.

To Reproduce In order to reproduce, you must have 3xscreens that run at an alternate refresh rate to 60hz, preferably 165hz monitors. Steps to reproduce the behaviour:

  1. Open DisplayMagician
  2. Delete the default profile (3 x single screen profile)
  3. Close DisplayMagician
  4. Open NVidia control panel
  5. Click on Change resolution
  6. Change the refresh rate for each of the monitors to, in my case, 165hz and click apply
  7. Click yes, at the "Apply Settings" dialogue box
  8. Open DisplayMagician
  9. Click on "DisplayProfiles"
  10. Click on "View Current Display"
  11. Save current display as "Default" or whatever name you choose
  12. Select the triple screen (NVidia Surround) profile
  13. Click "Apply"
  14. Check monitors are running at the 165Hz refresh rate (Mine do, so all good up to this point)
  15. In the, still open, DisplayMagician - Display Profiles page, select the "Default" profile
  16. Click "Apply"
  17. Monitors are now running at a 60Hz refresh rate

Expected behaviour When setting up the profile the profile should remember the refresh rate set in the NVidia Control Panel setting, in my case, always 165Hz.

Screenshots N/A (I can do a video if needed)

Reporting Logs N/A - if required let me know and I'll get the logs attached

Environment (please complete the following information):

Additional context This is the first time I have noticed this issue, else would have reported it a lot earlier. I could never figure out why, when enabling vsync, my frames ended up being capped at 60fps and with vsync turned off, the fps was well over 165fps (single screen FPS games). I decided to do a lot of testing and found the above.

Please do let me know if there is any further info you'd like, I'd be more than happy to provide it.

Hopefully, this is an easy fix as I am absolutely loving DisplayMagician.

terrymacdonald commented 3 years ago

Hi @stringfieldmark,

Thanks for the excellent bug report as usual. I always know exactly what the issue is thanks to your excellent documentation.

I think this might be something I have to fix with the new NVIDIA video library I've been writing. The current NVIDIA video library doesn't record all the available settings. But you're in luck!

I just finished a new version of NVIDIAInfo last night. NVIDIAInfo is a little test program I've written to test out a brand new scratch built NVIDIA library I created. NVIDIAInfo is designed to save display config settings and swap between them, and I made it so I could ensure the NVIDIA library was working before I integrated it with DisplayMagician.

Can you please test out the latest version of NVIDIAInfo and see if it works? I'm currently staying to integrate the new library into DisplayMagician v2.0.0, so your testing of your complex screen layout would really help me.

You can download NVIDIAInfo from https://github.com/terrymacdonald/NVIDIAInfo/releases/latest

Please report any issues here, and upload the NVIDIAInfo.log here too.

Thanks Terry

On Sun, 22 Aug 2021, 03:08 stringfieldmark, @.***> wrote:

Assigned #33 https://github.com/terrymacdonald/DisplayMagician/issues/33 to @terrymacdonald https://github.com/terrymacdonald.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/terrymacdonald/DisplayMagician/issues/33#event-5189909797, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLU5LBZAA5V75W6AKAKV2LT566PDANCNFSM5CR525MA . 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&utm_campaign=notification-email .

stringfieldmark commented 3 years ago

Hi Terry,

As usual, thanks for all the immense effort you are putting into this and for the prompt reply.

NVidiaInfo works like a charm and is super quick to change to the various configs.

I saved 3 scenarios:

  1. 4x60hz(Singles).cfg (which is what DisplayMagician incorrectly sets all monitors to when going back to non-surround)
  2. 1x60hz(Single)_3x165hz(Surround).cfg (which DisplayMagician correctly sets monitors to when going to surround)
  3. 1x60hz(Single)_3x165hz(Singles).cfg (which is what I would expect DisplayMagician to set when going back to non-surround)

All three above do what the file name suggests when running the load feature of NVidiaInfo, so spot on!

I have now created a shortcut on my desktop to call number 3 above to reset to the 165Hz as an interim workaround :)

If there is anything else you'd like me to test, let me know.

Regards,

Mark

terrymacdonald commented 3 years ago

@stringfieldmark This is great news. I've started integrating NVIDIALibrary and WinLibrary (both used in NVIDIAInfo) into DisplayMagician and I now have a working test version. I still have quite a bit of AMD Library development to complete as well as various bugs and enhancements to add into the codebase, but I expect to have something ready to test in the next month or so.

Would you be interested in performing some early 'alpha' testing for me?

Thanks Terry

stringfieldmark commented 3 years ago

Hi Terry,

Yes, this was great news and I'd be more than happy to do some 'alpha' testing for you.

Regards,

Mark

terrymacdonald commented 3 years ago

And another update. This has been a monster challenge, but I think I'm nearing the end of the NVIDIA chapter at least. Things that the new DisplayMagician can do:

Swap between surround and non-surround profiles within about 14 seconds Handle surround and non-surround screens together Works with NVIDIA mosaic cards now Uses the PCI video card vendor ID to recognise NVIDIA and AMD vendors, and sets it's driver mode accordingly Can be 'forced' to use a different video card mode if needed (unlikely to be used, but hey, why not) Can set/clear a Desktop Background per profile if you want Stores and applies Windows HDR and NVIDIA HDR settings Records all settings provided by the NVIDIA driver and windows drivers under Windows 10, meaning that you display refresh settings are stored and set, as are bezel distances, or any other weird and wonderful settings you creative users are able to configure :) But at present there are still bits I have to finish before I can craft any sort of production ready release:

It is very slow to load. I've identified this is due to DisplayMagician keeping on calling the video card libraries. I need to implement some caching to ensure that the video detection is only run at programme launch and when screen layout changes in some way. I need to add AMD library support. This is the core reason why I started this journey, so it seems a little disingenuous to release DisplayMagician without this! I need to add a nice message that popups when an old DisplayMagician file is detected, that informs the user that this is a new version of DisplayMagician that uses a brand new DisplayProfile format that will require them to create a brand new set of Display Profile layouts. I need to test, and to provide my beta testers an early release of the software so that I iron out any bugs before a general release. I need to add the ability to test the upgrade mechanism without upgrading the production upgrade functionality. This is needed so I can iron out any issues before a general release. Very important as DisplayMagician now has over 1500 users! And I think that's about it!

Some cool things to come for sure, and it's taken a lot of hard work to get this close. Another little while and we're hopefully good to go!

Thanks Terry

terrymacdonald commented 3 years ago

@stringfieldmark,

I finally have an test version of DisplayMagician v2.0.0 to share, and I'd be honoured if you'd do some testing for me.

I've attached DisplayMagician v2.0.0-alpha1.msi to this issue, and I'm really interesting to find out if it works on your system. This version of DisplayMagician uses two completely new display manipulation libraries that I created (one for NVIDIA and one for Windows CCD) so it needs some proper testing. Please feel free to test complicated setups like 2 screens in a Surround screen with another two screens next to it, or with different refresh rates, or HDR on only some of the screens. I really want to know if it will break.

IMPORTANT: DisplayMagician v2.0.0 uses a completely new Display Profile format. This means that you will need to create brand new Display Profiles when you first start DisplayMagician v2.0.0, and you will then need to edit your Game Shortcuts to use those new Display Profiles.

How to install this version of DisplayMagician:

Then now please start using DisplayMagician v2.0.0 and see what breaks!

If you find a bug, please log it as a new issue at https://github.com/terrymacdonald/DisplayMagician/issues/new/choose

Thanks Terry DisplayMagicianSetup-v2.0.0-alpha1.zip

stringfieldmark commented 3 years ago

Hi Terry,

This is great news and well done for reaching this milestone.

I look forward to testing all sorts of scenarios and reporting back my findings.

Regards,

Mark

On Thu, 9 Sept 2021 at 22:32, terrymacdonald @.***> wrote:

@stringfieldmark https://mailtrack.io/trace/link/bf532d4b8df626de6e0e21f47f9002e7d40bc147?url=https%3A%2F%2Fgithub.com%2Fstringfieldmark&userId=4383430&signature=63e397efe55433b6 ,

I finally have an test version of DisplayMagician v2.0.0 to share, and I'd be honoured if you'd do some testing for me.

I've attached DisplayMagician v2.0.0-alpha1.msi to this issue, and I'm really interesting to find out if it works on your system. This version of DisplayMagician uses two completely new display manipulation libraries that I created (one for NVIDIA and one for Windows CCD) so it needs some proper testing. Please feel free to test complicated setups like 2 screens in a Surround screen with another two screens next to it, or with different refresh rates, or HDR on only some of the screens. I really want to know if it will break.

IMPORTANT: DisplayMagician v2.0.0 uses a completely new Display Profile format. This means that you will need to create brand new Display Profiles when you first start DisplayMagician v2.0.0, and you will then need to edit your Game Shortcuts to use those new Display Profiles.

How to install this version of DisplayMagician:

  • Download and run the DisplayMagicianSetup-v2.0.0-alpha1.msi installer
  • Once installed, run DisplayMagician v2.0.0
  • Go straight to 'Settings' on the main screen
  • Change the Logging Level to 'Full application trace'
  • Click 'Back'
  • Click the 'Display Profiles' button
  • Setup the Display Profiles that you want to use (e.g. open up Windows Setup or NVIDIA Setup and change your display configuration until it's the way you want it, then swap back to DisplayMagician and save the DisplayProfile).
  • Edit your Game Shortcuts to use the new Display Profiles you just set up.

Then now please start using DisplayMagician v2.0.0 and see what breaks!

If you find a bug, please log it as a new issue at https://github.com/terrymacdonald/DisplayMagician/issues/new/choose https://mailtrack.io/trace/link/4818a2e3f2b969dcd62719657babd0ac38a277e2?url=https%3A%2F%2Fgithub.com%2Fterrymacdonald%2FDisplayMagician%2Fissues%2Fnew%2Fchoose&userId=4383430&signature=f3064379dd3ecc1c

Thanks Terry DisplayMagicianSetup-v2.0.0-alpha1.zip https://mailtrack.io/trace/link/88904056ed2e4cbe7d5b4b4b4e7b2873feb01989?url=https%3A%2F%2Fgithub.com%2Fterrymacdonald%2FDisplayMagician%2Ffiles%2F7139873%2FDisplayMagicianSetup-v2.0.0-alpha1.zip&userId=4383430&signature=595499ea53990cec

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://mailtrack.io/trace/link/65de309e17b61046b119848c0c1b2f8f7701d514?url=https%3A%2F%2Fgithub.com%2Fterrymacdonald%2FDisplayMagician%2Fissues%2F33%23issuecomment-916452271&userId=4383430&signature=6beee69b27cf60ba, or unsubscribe https://mailtrack.io/trace/link/b7a214ef146bdf7d57e9fecc01b5f5b907b8be2c?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAHDAC7UIWNAOBCC4XTZMIHLUBERXVANCNFSM5CR525MA&userId=4383430&signature=374502877fc37ac6 . Triage notifications on the go with GitHub Mobile for iOS https://mailtrack.io/trace/link/bd054ce1faf8be025ab85e88f67f807cd53423db?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&userId=4383430&signature=186c16ceb554b7f8 or Android https://mailtrack.io/trace/link/dc5c4b7827a6fc0e6003b7666bf385d7571fcc2b?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&userId=4383430&signature=a5ddbe6ae1b04642.

terrymacdonald commented 3 years ago

Thanks Mark!

One thing I forgot to mention is that it currently won't work on any system that has an AMD video card. I've not finished the AMD library, yet AMD detection is already plumbed into DisplayMagician, which means that DisplayMagician will attempt to use the non-existent AMD library if an AMD video card is detected, and it will just crash.

Thanks Terry

stringfieldmark commented 3 years ago

Hi Terry,

I have done some initial testing, and I'm afraid I cannot get DM to work as expected.

Firstly, on install, I got [image: image.gif]a dll failed to register error with the option to cancel, retry or ignore (screenshot attached). Cancel stops the install, retry pops the same message up, and ignore continues the install, which I eventually chose. After "successfully" installing, I set up the display profiles, one for 4xsingles and one for 3xtriples and 1xsingle as previously done in 1.1.4. I then updated my ACC shortcut to use the newly created 3xtriple and 1xsingle profile.

Now here things got me baffled. On launching the shortcut for ACC, the screen profile changed (in super quick time), but nothing then started. No set programs nor the game and no second tray icon appeared to monitor the termination of a specific executable.

I then deleted all profiles, display and game, rebooted and set everything up from scratch. I set up two display profiles, one for single and one for triples. I saved those and tested those on their own. They worked fine, and switching was super quick. I then set up one game profile, ACC, with it set to launch the triples profile but no other programs and everything else at default. The screen changes profile, but the game fails to launch.

I have attached various trace logs and can see at the end of each one where a game is set to launch, an error stating "Cannot apply '165Hz Triples (HDR Off)' Display Profile" is logged. Also attached, in case they may be helpful, are the DisplayProfiles_2.0.json and Shortcuts_1.0.json files.

Hopefully, there is something here that you can use. If there is anything else you'd like me to test, please do let me know. For now, 2.0.0 is uninstalled, and 1.1.4 is reinstalled.

Regards,

Mark

On Fri, 10 Sept 2021 at 06:29, terrymacdonald @.***> wrote:

Thanks Mark!

One thing I forgot to mention is that it currently won't work on any system that has an AMD video card. I've not finished the AMD library, yet AMD detection is already plumbed into DisplayMagician, which means that DisplayMagician will attempt to use the non-existent AMD library if an AMD video card is detected, and it will just crash.

Thanks Terry

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://mailtrack.io/trace/link/11b2aeb95be95a084978352c7c5489f69aba44ef?url=https%3A%2F%2Fgithub.com%2Fterrymacdonald%2FDisplayMagician%2Fissues%2F33%23issuecomment-916642434&userId=4383430&signature=e84150107e9e54c7, or unsubscribe https://mailtrack.io/trace/link/9cd247e424b2927a8e3fa0e4b16fb20622187b0f?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAHDAC7U2ND2J2JOGOIZ244LUBGJURANCNFSM5CR525MA&userId=4383430&signature=fe42d0c428d09e1b . Triage notifications on the go with GitHub Mobile for iOS https://mailtrack.io/trace/link/509aad2f78cd5f0bf66fb8cb9e1116e5d44e1892?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&userId=4383430&signature=9b8dc4877251d18c or Android https://mailtrack.io/trace/link/142b59dd6c17f3e91a4e55b787cd08c23a99536a?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&userId=4383430&signature=d0b4c258f4b69ab0.

terrymacdonald commented 3 years ago

Hmmmm. I unfortunately didn't get the image showing the dll in the issue. Are you able to upload the picture again please? I did a bit removing of DLLs to make things smaller, and I think I may have gone too far! I'll do some more testing and see if I can figure out what's missing.

I made an 'improvement' to the process monitoring code and it looks like ti won't actually work on some games. So you may strike that soon. I'll do some more troubleshooting and will try to fix over the next week or two. I think that bit of the code needs some proper love, as I've never really fixed it up properly. It's always felt a bit too cobbled together. I'll take a look at that after I do a bit more on the AMDLibrary.

The great news here is that the most complicated part of the whole thing (the new NVIDIA Display Profiles) actually works ok so far! I've had two people say that part works well. I'll take that win right at the moment :).

Thanks Terry

stringfieldmark commented 3 years ago

Hi Terry,

I've embedded it into this email and reattached it, just in case.

Hopefully, you get this one through.

Thanks again for all the work you are putting into this and I'm looking forward to doing more testing.

Regards,

Mark

[image: dll Failed to register.png]

On Sat, 11 Sept 2021 at 10:34, terrymacdonald @.***> wrote:

Hmmmm. I unfortunately didn't get the image showing the dll in the issue. Are you able to upload the picture again please? I did a bit removing of DLLs to make things smaller, and I think I may have gone too far! I'll do some more testing and see if I can figure out what's missing.

I made an 'improvement' to the process monitoring code and it looks like ti won't actually work on some games. So you may strike that soon. I'll do some more troubleshooting and will try to fix over the next week or two. I think that bit of the code needs some proper love, as I've never really fixed it up properly. It's always felt a bit too cobbled together. I'll take a look at that after I do a bit more on the AMDLibrary.

The great news here is that the most complicated part of the whole thing (the new NVIDIA Display Profiles) actually works ok so far! I've had two people say that part works well. I'll take that win right at the moment :).

Thanks Terry

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://mailtrack.io/trace/link/820c9e395c18271e64d3daef85a9eeb41517e6ac?url=https%3A%2F%2Fgithub.com%2Fterrymacdonald%2FDisplayMagician%2Fissues%2F33%23issuecomment-917375883&userId=4383430&signature=b79fa25a9c2a2327, or unsubscribe https://mailtrack.io/trace/link/c0c785d464dda33a8c9cb104e7dde05fa16326d6?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAHDAC7Q5KT5O7PKZXTTRTMLUBMPBZANCNFSM5CR525MA&userId=4383430&signature=0158f7170f9eca1f . Triage notifications on the go with GitHub Mobile for iOS https://mailtrack.io/trace/link/fe78f769743225cce035ff676c1fa54e0cc9bae0?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&userId=4383430&signature=25e0e683c3ea5697 or Android https://mailtrack.io/trace/link/02afe9f70d33a5c12b5fa612b07df086245ea3c1?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&userId=4383430&signature=3c83db1c495c3c82.

terrymacdonald commented 3 years ago

@stringfieldmark Great news. I've got another DisplayMagican v2 build to test. This one has had a lot of local testing, and I've fixed a lot of bugs that I've found. And now I think it's ready for another round of testing.

I'd really love it if you could test this out for me. To install DisplayMagician v2.0.0-alpha2:

Hopefully it goes well for you and does everything it should, but if you do find any issues, please log them as new issues here: https://github.com/terrymacdonald/DisplayMagician/issues/new?assignees=terrymacdonald&labels=bug&template=bug_report.md&title=

Thanks Terry

DisplayMagicianSetup-v2.0.0-alpha2.zip

terrymacdonald commented 3 years ago

Great news! DisplayMagician v2.0.1 has been released, and fixes this very issue. Please test it out, and if you still have any issues please log a new issue.

I'm closing this issue as the fix is in DisplayMagician v2.0.1, and I need to clear out the completed issues so I am able to work on the new issues that come in.

Thanks Terry