Git Product home page Git Product logo

winddcutil's Introduction

winddcutil

Windows implementation of the ddcutil Linux program for querying and changing monitor settings, such as brightness and color levels. Uses the VESA Monitor Control Command Set (MCCS) over the Display Data Channel Command Interface Standard (DDC-CI).

News

Release [2.0.0] - 2023-09-15

  • Good news, winddcutil has been ported to Python! We use the API provided by the monitorcontrol Python package.
  • See the CHANGELOG for additional details.

Usage

The dist\winddcutil.exe is a standalone executable that can be run without installing a Python interpreter.

usage: winddcutil [-h] {detect,capabilities,setvcp,getvcp} ...

Windows implementation of the ddcutil Linux program for querying and changing monitor settings

positional arguments:
  {detect,capabilities,setvcp,getvcp}
    detect              Detect monitors
    capabilities        Query monitor capabilities
    setvcp              Set VCP feature value
    getvcp              Get VCP feature value

options:
  -h, --help            show this help message and exit

Development

This Python package is built with Python 3.11.5. Get Python here.

Useful commands

Initialize Python virtual environment

py -3 -m venv --upgrade-deps .venv
.venv\Scripts\activate.bat
pip install -r requirements.txt

Build standalone distributable [dist\winddcutil.exe]

pyinstaller cli.py --name winddcutil --onefile

Run tests

pytest test

Run pre-commit checks on all files

pre-commit run --all

Bug fixes and enhancement contributions via PRs are welcome!

License

MIT License

Issues

If you find a bug or have a feature request, please file an issue using the issue tracker on GitHub.

winddcutil's People

Contributors

jtai avatar scottaxcell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

winddcutil's Issues

capabilities returns an empty string

Hello,
my desktop PC is connected via VGA to a Samsung C27F396. I'm able to retrieve and set all the VPC features through DDC using other tools like "ControlMyMonitor". For example, I can switch the input source (60). Using the latest pre-compiled binary of winddcutil, however, the capabilities command just returns 0 and prints nothing to stdout. Also, directly changing a VCP feature through the "set" command seems to have no effect at all. How can I troubleshoot this?

swap pbp / switch usb input

Hi,
for my DELL U4924DW monitor I wrote a small script to swap pbp and switch usb input:

@echo off
set DDCUTIL=C:\bin\winddcutil.exe
set MONITOR=0

%DDCUTIL%" setvcp %MONITOR% 0xe5 0xf000
timeout /t 1 /nobreak
"%DDCUTIL%" getvcp %MONITOR% 0xe5
timeout /t 4 /nobreak
"%DDCUTIL%" setvcp %MONITOR% 0xe7 0xff00
timeout /t 1 /nobreak
"%DDCUTIL%" getvcp %MONITOR% 0xe7

The timeouts are necessary, because otherwise the following command isn't accecpted, because the monitor seems to be still working on the command before.
In general this script works as expected, but sometimes the command to switch usb does something completely different, i.e. it switches the usb devices to a different input (HDMI1, ...). The problem also occurs, when swapping pbp is commented out, so it is not a problem with the order of commands. Swapping pbp always works as expected.
When the problem occurs, getvcp 0xe7 returns "VCP 0xe7 0", while "VCP 0xe7 1500" is shown, if the command succeeds.

The problem doesn't occur with ddcutil on Linux.

Cant get/set/capabilities with my monitor

Hi, I have MSI Optix G24C and I cant get or set values.
The problem monitor have id 2. Monitor with id 1 successfully change input source

PS C:\Dev\winddcutil-main\x64\Release> .\winddcutil.exe help
Usage: winddcutil command [<arg> ...]
Commands:
        help                                           Display help
        detect                                         Detect monitors
        capabilities <display-id>                      Query monitor capabilities
        getvcp <display-id> <feature-code>             Report VCP feature value
        setvcp <display-id> <feature-code> <new-value> Set VCP feature value
PS C:\Dev\winddcutil-main\x64\Release> .\winddcutil.exe detect
Display 0:      Generic PnP Monitor
Display 1:      Generic PnP Monitor
Display 2:      Generic PnP Monitor
PS C:\Dev\winddcutil-main\x64\Release> .\winddcutil.exe capabilities 0
Failed to get capabilities string length
PS C:\Dev\winddcutil-main\x64\Release> .\winddcutil.exe getvcp 0 60
VCP 60 5
PS C:\Dev\winddcutil-main\x64\Release> .\winddcutil.exe setvcp 0 60 5
PS C:\Dev\winddcutil-main\x64\Release> .\winddcutil.exe capabilities 1
Failed to get capabilities string length
PS C:\Dev\winddcutil-main\x64\Release> .\winddcutil.exe getvcp 1 60
Failed to get the vcp code value
PS C:\Dev\winddcutil-main\x64\Release> .\winddcutil.exe setvcp 1 60 3
Failed to set vcp feature

Is that trouble with my monitor?

Program unusable when having more than one physical monitor

C:\Program Files\<some-folder>\vesa-utils>winddcutil.exe detect
Traceback (most recent call last):
  File "cli.py", line 6, in <module>
  File "winddcutil\__main__.py", line 10, in main
  File "winddcutil\winddcutil.py", line 10, in detect
  File "monitorcontrol\monitorcontrol.py", line 84, in __enter__
  File "monitorcontrol\vcp\vcp_windows.py", line 55, in __enter__
monitorcontrol.vcp.vcp_abc.VCPError: more than one physical monitor per hmonitor
[3636] Failed to execute script 'cli' due to unhandled exception!

I have two physical monitors (Desktop + Beamer), both showing the same desktop (duplicate).

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.