Comments (2)
Hey Steven,
First, you need to create an array of PathInfo
instances for the configurations you want. Keep in mind that each PathInfo
represents a logical display and each contains one or more physical displays that are configured and recognized by a PathTargetInfo
instance (accessible from the PathInfo.TargetsInfo
property as an array) - these physical displays are cloned and all going to show the same output as they all representations of one logical display.
After creating a PathInfo
for each logical display and configured its properties including all physical displays represented by PathTargetInfo
instances, you need to ask NVidia Driver to try to apply this configuration by calling PathInfo.SetDisplaysConfig()
static method. This is because if every change happens instantly, you can't apply major changes to the display profile unless you manually take each display out and then in again which is not convenient; so, instead, you change all settings and apply it once.
You can also take the currently active configuration using the PathInfo.GetDisplaysConfig()
static method and change it to your likings and then apply it.
To change the display profile, however, I don't actually recommend using this library as it is limited to NVidia GPUs, following repo contains the code that allows you to easily change display settings for any brand of GPU using Windows API:
https://github.com/falahati/WindowsDisplayAPI/
API is very similar to this, you are still going to have the PathInfo
class (with the same name) and the PathTargetInfo
class (named PathTargetDisplay
), the only significant difference is a specific class for logical displays named PathSourceDisplay
and therefore PathInfo
acts as of a connection between one PathSourceDisplay
and multiple PathTargetDisplay
s.
One of the goodies provided by the WindowsDisplayAPI library is the fact that it can give you supported resolutions for a display device. As far as I remember this isn't the case with this library and to get this information you need to extract them from the Display EDID. If you want to follow this path tho, you can use the following library:
https://github.com/falahati/EDIDParser
You can also check the source code of the following program as a better and more complete sample (comparing to the sample project included in this repo) for all mentioned libraries above as well as this one (in fact all these project are created so I can make this app):
https://github.com/falahati/HeliosDisplayManagement
from nvapiwrapper.
Wow thanks for the detailed reply. I will try those suggestions asap. You have a great set of tools here. 👍
from nvapiwrapper.
Related Issues (20)
- Set fan speed to automatic HOT 2
- Overclocking
- How to set custom resolution? HOT 7
- Available settings by display HOT 3
- Scale and layout settings HOT 1
- Reading EDID? HOT 2
- Accessing locations of each display in a Mosaic mode
- Recent nvidia GPU fans aren't able to be controlled HOT 3
- GPU sensor lost after driver update
- Geforce MX150 HOT 4
- Virtual custom resolution: reported and real refresh rate don't match HOT 4
- evga 3080 xc3 black inconsistent RPM
- SetThermalPoliciesStatus does not accept reduced values
- Unable to edit existing profiles of existing applications
- per process usage? HOT 2
- Issue with Intel A750 GPU HOT 1
- Change DSR Smoothnes factor HOT 1
- Compatibility with latest Nvidia drivers? (re: age of project?) HOT 1
- Which API can I use to modify the brightness, I can't seem to find it, can someone tell me? Thanks!~~~ HOT 4
- Convert frequency from kHz to mHz HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvapiwrapper.