Coder Social home page Coder Social logo

Comments (29)

terrymacdonald avatar terrymacdonald commented on May 20, 2024

Woah this looks complicated :). I'll have a look at this after I've managed to get DisplayMagician v2.1.0 released and working reliably. There may be a few big fixes I'll need to do before I can even look at it, but to be truthful....it's kinda scaring me :).

No promises, but I'll do some research to see how feasible it is.

Thanks
Terry

from displaymagician.

S4b0tage avatar S4b0tage commented on May 20, 2024

Thats what I meant last time 😂
No rush please, I think thats a long term project and other things probably have to be done first.
Would be a nice thing to have though in the future.

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

@S4b0tage Just to be clear, is this something provided by Windows natively, or is it a special NVIDIA setting available only through the NVIDIA Control panel?

from displaymagician.

S4b0tage avatar S4b0tage commented on May 20, 2024

That is provided by nvidia control panel only.
It's an option that works only for specific generations of cards, like the rtx and some gtx series.
But I think all rtx series supports these natively already and gtx from 10xx series on

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

from displaymagician.

S4b0tage avatar S4b0tage commented on May 20, 2024

Don't get too crazy about it if it doesn't work, it's a nice to have but not super mandatory.
If it works, that's awesome though, Im sure a lot of people in the ets2 community most probably will love that since performance tweaks like integer scaling for lower resolution is kind of a big deal there.

Btw, how's the 2.1.0 release looking?
Right now I'm using the temporary version you gave me lastly but the game shortcuts don't work.
But I need the refreshrate switching more so I stick with that temporary version for now, no big deal 😂

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

from displaymagician.

S4b0tage avatar S4b0tage commented on May 20, 2024

Sounds brilliant, thanks for the insight :)

from displaymagician.

S4b0tage avatar S4b0tage commented on May 20, 2024

Hey Terry,

Just wanted to let you know that, that the ETS2 community really appreciates your work ;)
They added your tool on recommendation in several guides, hope that was okay for you.
So in behalf of all users once again: Thanks a lot for your work and time and effort put into that project, keep up the good work 💪

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

from displaymagician.

S4b0tage avatar S4b0tage commented on May 20, 2024

Sure, this is one of the guides which has some redirected links to the forum entries:
https://roextended.ro/forum/viewtopic.php?f=23&t=1563&p=20460#p20460
JHTrucker and a1337Cookie are like the performance gurus there and kinda a big deal 😂
You can´t bypass AA settings in ETS2 without their names being involved.
I´ve had some PN´s about your tool after those posts so i redirected them here

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

@S4b0tage thanks for the links. Appreciate seeing things like this. Helps keep me motivated :).

Ok I took a little while to try and track down where the NVIDIA integer scaling settings are accessed, as the NVAPI is a large library and has a lot of places it could be hiding. Annoyingly, I though they were in the Custom Display part of the API, so I implemented the logic to store and apply those, but.... it's not there :(. That's a day wasted.

After a little more searching it seems they have been added to the Display Config part of the API. This is pretty bad news, as I tried adding DisplayConfig functionality in the past, and got stuck with the P/Invoke structures required to interface with the nvapi DLL. The specific NVAPI_DISP_GetDisplayConfig function is a really tricky one, as it wants to be run 3 times, each time with me providing a little more information to the function, before it provides all the information I need. I have managed to get the function working once, but the second call is failing.

As you can expect, what I'm working on is a pretty niche issue, so online resources to troubleshoot this are pretty hard to find. All and all this is proving a difficult problem to solve. I don't think I'll be able to add it to v2.1.0, but I'm planning on at least adding a space for it in the config file format so that we'll be able to add the functionality in the future without breaking everyone's display profiles for a third time :)

Anyway, just wanted you to know I'm chipping away at it, but it could be a while before I solve it.

Thanks
Terry

from displaymagician.

S4b0tage avatar S4b0tage commented on May 20, 2024

Oh well, no worries, like I said, its nothing too important.
Whenever you feel like working on it its fine and if its getting too complicated then better drop it, no need to get crazy over it ;)
The other issues are more important and when the official release of 2.1.0 is coming im already happy with whats implemented until now :)

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

An update! I've been pottering along, and managed to geta little further along. I've now added a spot in the config file format for the DisplayConfig results. This will be released with DisplayMagician v2.1.0 so that I don't need to revise the DisplayProfile file format a 3rd time. I think people will yell at me if I have to do that again :).

In addition to that, I've been troubleshooting the issues I have using the NVAPI_DISP_GetDisplayConfig function. I've successfully managed to get it to perform the second pass (took 5 days!) but now I'm stuck at the third and final pass. I'm having to write my own memory marshalling code to handle the variable responses from the NVAPI DLL and then populate the returned structures so that they're valid for the next submission to the DLL. It's not fun. Try something in C#, watch how the memory works, then compare that against the sample code provided in C++ (which works), and then try to figure out how to make my memory structure more like the sample code.... it takes a while.

I am definitely learning more about memory and how C# managed code is structured within memory, so that part is good. I'm also learning more about NVAPI and where all the bits live, and how to handle P/Invoke which is also good.

I'll keep pottering along and see if I can unlock the structure that will just provide the data to me. I think that if I can get GetDisplayConfig to give up all the data, then I can just submit that data straight back to SetDisplayConfig when applying a config and then magic will happen!

Another little thought I had was that the DisplayConfig parts of the API are designed to interact with Windows... it seems to handle the Windows CCD interface itself, potentially upsetting the order that the rendering needs to happen from DisplayMagician's perspective, and even possibly stopping me having to use the WinLibrary when setting the windows settings. If I do manage to get this code finished there will be quite a bit of testing needed if I'm modifying the way that the core libraries interoperate.

That's a lot to think about, so I'd best get back to tinkering. If an when I get anything interesting to report, I'll drop it in this issue.

Thanks
Terry

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

An update. I've been spending time on bug squashing over the last month and a half. There were some issues with multiple adapters and USB display devices that I needed to sort out, and I'm coming to the end of that. Still some final bugs to squash in the UI as well, but in the new year, after the bug-fixing has settled down, I'll start work on DM v2.2.0, and I'll see whether this feature will fit in there.

I haven't forgotten about it :)

Thanks
Terry

from displaymagician.

S4b0tage avatar S4b0tage commented on May 20, 2024

Hey Terry,
no worries about that. Integer scaling seems to change anyway as per last news by NVIDIA.
So its good to wait a little longer i guess :)
Im quite busy with work atm as well and a new bike which I just bought, so dont worry, I haven´t forgotten about you either.

Nice christmas to you

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

@S4b0tage I've been keeping an eye on movements with Integer Scaling. The latest NVIDIA driver v511.23 release notes unfortunately specifically say that:

image

I read this as do not apply Image Scaling/Integer Scaling to the desktop. I think I might wait a while until the Integer Scaling thing becomes more commonly used and supported by NVIDIA before I'll add support for it.

Thanks
Terry

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

@S4b0tage I may have some good news. I've been working the last month to add in the GetDisplayConfig and SetDisplayConfig support into the NVIDIALibrary, which as I understand it will store and set Image Scaling. I've tested it myself and the setting is set successfully. This should hopefully add in the functionality you're looking for.

I've only tested it on my system so far, and I need your help to test it. It uses NVIDIAInfo, a little app that I wrote specifically to test the NVIDIALibrary that I wrote. Because I want to only test the video manipulation works, we will only use that for testing this. Once we can confirm that it all works then I'll roll it into DisplayMagician.

Can you please download and extract this NVIDIAInfo zip file to a folder on your computer:
NVIDIAInfo-v1.7.0.zip

Open a PowerShell window, and change to the same folder that you extracted NVIDIAInfo into.

IMPORTANT - These instructions are likely to fail, so I need you to save/rename the NVIDIAInfo.log file as shown below. Each run of NVIDIAInfo overwrites the previous NVIDIAInfo.log, so I need you to rename it each time so it doesn't get overwritten. I need to see the log file entries to know what is broken.

Please complete the following instructions in this specific order:

Create your display layout with some of your screens but leave it set to no scaling:

  • Save the first config as NVIDIAInfo save noscale.cfg
  • Rename the NVIDIAInfo.log file to Rename-Item -Path "NVIDIAInfo.log" -NewName "NVIDIAInfo-noscale-save.log"
  • Check if the first windows display config is equal with NVIDIAInfo equal noscale.cfg (we want it to be equal)

Next create a second windows display layout, this time with your integer scaling on:

  • Create a display layout with your integer scaling on
  • Save the second windows display as NVIDIAInfo save scale.cfg
  • Rename the NVIDIAInfo.log file to Rename-Item -Path "NVIDIAInfo.log" -NewName "NVIDIAInfo-scale-save.log"
  • Check if the second windows display config is equal with NVIDIAInfo equal scale.cfg (we want it to be equal)
  • Check if the first windows display config is NOT equal with NVIDIAInfo equal noscale.cfg (we want it to NOT be equal)

Next swap back to the noscale display layout:

  • Load the first windows display as NVIDIAInfo load noscale.cfg
  • Rename the NVIDIAInfo.log file to Rename-Item -Path "NVIDIAInfo.log" -NewName "NVIDIAInfo-noscale-reload.log"
  • Check if the first windows display config is equal with NVIDIAInfo equal noscale.cfg (we want it to be equal)
  • Save a copy of the current display config for me to compare: NVIDIAInfo save noscale-reload.cfg
  • Make sure the second windows display config is NOT equal with NVIDIAInfo equal scale.cfg (we DO NOT want it to be equal)

Next swap back to the scale display layout again:

  • Load the second windows display as NVIDIAInfo load scale.cfg
  • Rename the NVIDIAInfo.log file to Rename-Item -Path "NVIDIAInfo.log" -NewName "NVIDIAInfo-scale-reload.log"
  • Check if the second windows display config is equal with NVIDIAInfo equal scale.cfg (we want it to be equal)
  • Save a copy of the current display config for me to compare: NVIDIAInfo save scale-reload.cfg
  • Make sure the first windows display config is NOT equal with NVIDIAInfo equal noscale.cfg (we DO NOT want it to be equal)

Once that series of tests are done, please include the following files in a ZIP file, and upload the ZIP to this github issue through your web browser (click and drag the file from your File explorer into Github and it will upload):

  • scale.cfg
  • scale-reload.cfg
  • NVIDIAInfo-scale-save.log
  • NVIDIAInfo-scale-reload.log
  • noscale.cfg
  • noscale-reload.cfg
  • NVIDIAInfo-noscale-save.log
  • NVIDIAInfo-noscale-reload.log

This will give me all the information I need to know whether it worked!

I really hope it does as this has been a TON of work :)

Thanks
Terry

from displaymagician.

S4b0tage avatar S4b0tage commented on May 20, 2024

Hey Terry,

sorry for the late reply, had quite a lot to do at work, IT-infrastructure is currently undergoing a huge change with our customer, but I took the time now to test as mentioned by you, everything seems to work just fine as of my point of view.
Attached are the logs and cfg files. ;)

NVIDIAInfo-v1.6.1-log.zip

Oh, small sidenote, I had to change the commands from "NVIDIAInfo [...]" to ".\NVIDIAInfo [...]".
Some security measure by Microsoft as it seems, most probably due to using PS within the Downloads folder.

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

Hi @S4b0tage

I've just finished DisplayMagician v2.3.0.35 which is hopefully the next big release of DisplayMagician. It has a lot of improvements and bug fixes to the NVIDIALibrary, and it's possible that it will solve the issues that you've been experiencing. NVIDIALibrary can now handle multiple physical adapters in a logical group, dvi-d and earlier connections, USB connected displays, adaptive sync, image scaling, cloned displays and more.

DisplayMagicianSetup-v2.3.0.35.zip

Can you please download and install DisplayMagician v2.3.0.35, and then do the following two steps:

  • Delete your old Display Profiles
  • Create new Display Profiles
  • Update your Game Shortcuts to use the new Display Profiles

If you have any issues, please create a Support ZIP File (main screen > Settings > Create Support ZIP File) and upload it here through your web browser. I'll then be able to use that for any bug fixing.

Thanks
Terry

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

Sorry! We just found an issue with some botched Display Profile upgrade logic :(. Now fixed.

Please do the following:

  • Delete C:\Users\<Username>\AppData\Local\Displaymagician\Profiles\DisplayProfiles_2.3.json if it exists.
  • Install this new DisplayMagician version:
    DisplayMagicianSetup-v2.3.0.36.zip
  • Run DisplayMagician
  • Create your Display Profiles again the way you want them
  • Update your Game Shortcuts to use the new Display Profiles
  • Have fun with your games!

Hopefully it should work this time. Please log a new issue at https://github.com/terrymacdonald/DisplayMagician/issues/new/choose if you experience any new bugs that you've not seen before, and I'll get right on fixing them.

Thanks
Terry

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

@S4b0tage New build time! I think I've fixed the issues you've experienced.

I've completely changed the way that display profile layout images have are created, and it's a lot simpler, so should avoid some of the issues that you would have experienced. I've also found some bugs with the rebuild of the ShortcutForm and ShortcutItem that I did in v2.3 and fixed those, so that should stop some of the issues that occurred when creating new Game Shortcuts.

DisplayMagicianSetup-v2.3.0.50.zip

So can you please download and install DisplayMagician v2.3.0.50 from here and give it a test? If you find any issues please create a Support ZIP File and upload to this issue.

Thanks!
Terry

from displaymagician.

S4b0tage avatar S4b0tage commented on May 20, 2024

Hey Terry,

It´s looking very good right now, switching seems to work exactly as expected, awesome work once again.
I only experienced one minor issue though, when using the context menu on the desktop I cant access my saved profiles.
From the Icon Taskbar it works just fine.
image

DisplayMagician-Support-20220414-1509.zip

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

@S4b0tage Can you please download and test this version? The Desktop context menu should be working again now.
DisplayMagicianSetup-v2.3.1.1.zip

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

@S4b0tage Actually here is an even later version. I found a bug that only happens during cloned screens that means the display layout image is incorrect when a display profile contains a cloned display. This version fixes that issue. I can't find any more bugs today based on all my testing. We might be close to a proper release!

DisplayMagicianSetup-v2.3.1.7.zip

Thanks
Terry

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

Also, I'm going to close this issue as it should be fixed in DisplayMagician v2.3.1.7 which will be released within the couple of days. I'm closing this case so I can keep track of which issues are outstanding.

If you still have the same problem once DisplayMagician v2.3.1.7 is released, please feel free to reopen this issue. If you have a new issue please open a NEW issue so I can track that prolem separately.

Thanks
Terry

from displaymagician.

S4b0tage avatar S4b0tage commented on May 20, 2024

Sorry Terry, was sleeping otherwise I would´ve tested this earlier (Was already midnight in germany) 😂
But yeah its working perfectly now, thanks a lot again, im happy that integer scaling is also working now, thats a huge step for the ETS2 community.

from displaymagician.

terrymacdonald avatar terrymacdonald commented on May 20, 2024

from displaymagician.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.