Code Monkey home page Code Monkey logo

m1ddc's People

Contributors

aasmith avatar bil0u avatar dremin avatar jmechnich avatar mikecarlton avatar stonkol avatar tenderlove avatar waydabber 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

m1ddc's Issues

What's the current status of supportting the built-in HDMI port of M1 and M2 Macs? Any blockers?

I just tested this tool with M2 Pro Mac using Type-C and I able to switch to HDMI source. Works like a charm. Thanks for such a great tool!


As this already pointed out in the README as a Warning, I was wondering if there are any updates about HDMI support for M1/M2 Macs:

Please note that this tool does not support the built-in HDMI port of M1 and entry level M2 Macs. This tool does not support Intel Macs. You can use BetterDisplay for free DDC control on all Macs and all ports.

I noticed maintainer @waydabber has dropped a comment on issue #27:

m1ddc does not support the HDMI port of M1 Macs only USB-C. m1ddc is just a very simple app made for testing initially while HDMI support for M1 macs is a bit more complex and not open sourced at this time. BetterDisplay has support as you mentioned and input switching is free.

Questions:

  1. Does it support HDMI port with M2 Pro?
  2. What do you mean by saying "not open sourced"? Closed source by Apple?
  3. Is there any way that we can contribute? How can we add this feature here?
  4. I could have download BetterDisplay but don't know if it does provide a CLI like what this simple tool does. I'd like to switch display sources using scripts, not GUI. I found betterdisplaycli but it requires BetterDisplay running in the background. I haven't tested it yet.
  5. Do you know any alternate tools that support this? I found ddc_hi library and also ddc-macos-rs but those are written in Rust.

Thanks in advance.

C Library that can be incorporated into other apps

Thanks for the logic. I wanted to incorporate this as part of another app, so I removed all the CLI parsing parts from the monolithic main function to get something more library like. I think I also made sure to handle iokit free... Maybe this can be useful to someone.

#import <Foundation/Foundation.h>
#import <IOKit/IOKitLib.h>



typedef CFTypeRef IOAVServiceRef;
extern IOAVServiceRef IOAVServiceCreate(CFAllocatorRef allocator);
extern IOAVServiceRef IOAVServiceCreateWithService(CFAllocatorRef allocator, io_service_t service);
extern IOReturn IOAVServiceReadI2C(IOAVServiceRef service, uint32_t chipAddress, uint32_t offset, void* outputBuffer, uint32_t outputBufferSize);
extern IOReturn IOAVServiceWriteI2C(IOAVServiceRef service, uint32_t chipAddress, uint32_t dataAddress, void* inputBuffer, uint32_t inputBufferSize);

#define LUMINANCE 0x10
#define CONTRAST 0x12
#define VOLUME 0x62
#define MUTE 0x8D
#define INPUT 0x60
#define STANDBY 0xD6
#define RED 0x16 // VCP Code - Video Gain (Drive): Red
#define GREEN 0x18 // VCP Code - Video Gain (Drive): Green
#define BLUE 0x1A // VCP Code - Video Gain (Drive): Blue

#define MUTE_ON 1
#define MUTE_OFF 2

#define DDC_WAIT 10000 // depending on display this must be set to as high as 50000
#define DDC_ITERATIONS 2 // depending on display this must be set higher

void free_ioobject(io_object_t *value) { if (*value != NULL) {IOObjectRelease(*value);} }
void free_cftype(CFTypeRef *value) { if (*value != NULL) {CFRelease(*value);} }

NSArray* getDisplayList() {
    NSMutableArray *ret = [NSMutableArray array];

    __attribute__((cleanup(free_ioobject))) io_iterator_t iter;
    __attribute__((cleanup(free_ioobject))) io_service_t service = 0;
    __attribute__((cleanup(free_ioobject))) io_registry_entry_t root = IORegistryGetRootEntry(kIOMainPortDefault);
    kern_return_t kerr = IORegistryEntryCreateIterator(root, "IOService", kIORegistryIterateRecursively, &iter);
    
    if (kerr != KERN_SUCCESS) {
        return NULL;
    }

    int i=1;
    
    while ((service = IOIteratorNext(iter)) != MACH_PORT_NULL) {
        io_name_t name;
        IORegistryEntryGetName(service, name);
        if ( !strcmp(name, "AppleCLCD2") ) {
            
            NSString *edidUUID =  (__bridge_transfer NSString*) IORegistryEntrySearchCFProperty(service, kIOServicePlane, CFSTR("EDID UUID"), kCFAllocatorDefault, kIORegistryIterateRecursively);
            
            if ( !(edidUUID == NULL) ) {
                CFDictionaryRef displayAttrs = (CFDictionaryRef) IORegistryEntrySearchCFProperty(service, kIOServicePlane, CFSTR("DisplayAttributes"), kCFAllocatorDefault, kIORegistryIterateRecursively);
                
                if (displayAttrs ) {
                    NSDictionary* displayAttrsNS = (__bridge NSDictionary*) displayAttrs;
                    NSDictionary* productAttrs = [displayAttrsNS objectForKey:@"ProductAttributes"];
                    if (productAttrs) {
                        [ret addObject: [NSString stringWithFormat:@"%d %@ %@", i, [productAttrs objectForKey:@"ProductName"], edidUUID]];
                    }
                    CFRelease(displayAttrs);
                }
                i++;
            }
        }
    }
    return ret;
}



IOAVServiceRef getAvService(int display) {
    
    if (display == 0) {
        return IOAVServiceCreate(kCFAllocatorDefault);
    }
    
    IOAVServiceRef ret;
    __attribute__((cleanup(free_ioobject))) io_iterator_t iter;
    __attribute__((cleanup(free_ioobject))) io_service_t service = 0;
    __attribute__((cleanup(free_ioobject))) io_registry_entry_t root = IORegistryGetRootEntry(kIOMainPortDefault);
    kern_return_t kerr = IORegistryEntryCreateIterator(root, "IOService", kIORegistryIterateRecursively, &iter);
    
    if (kerr != KERN_SUCCESS) {
        return NULL;
    }
    
    int i=1;
    bool noMatch = true;
    
    while ((service = IOIteratorNext(iter)) != MACH_PORT_NULL) {
        io_name_t name;
        IORegistryEntryGetName(service, name);
        if ( !strcmp(name, "AppleCLCD2") ) {
            
            CFStringRef edidUUID = (CFStringRef) IORegistryEntrySearchCFProperty(service, kIOServicePlane, CFSTR("EDID UUID"), kCFAllocatorDefault, kIORegistryIterateRecursively);
            
            if ( !(edidUUID == NULL) ) {
                if ( display == i ) {
                    while ((service = IOIteratorNext(iter)) != MACH_PORT_NULL) {
                        io_name_t name;
                        IORegistryEntryGetName(service, name);
                        if ( !strcmp(name, "DCPAVServiceProxy") ) {
                            
                            ret = IOAVServiceCreateWithService(kCFAllocatorDefault, service);
                            CFStringRef location = (CFStringRef) IORegistryEntrySearchCFProperty(service, kIOServicePlane, CFSTR("Location"), kCFAllocatorDefault, kIORegistryIterateRecursively);
                            
                            if ( !( location == NULL || !ret || CFStringCompare(CFSTR("External"), location, 0) ) ) {
                                noMatch = false;
                                break;
                            }
                            CFRelease(location);
                        }
                    }
                }
                
                i++;
                CFRelease(edidUUID);
                
            }
        }
    }
     if ( noMatch ) {
        printf("The specified display does not exist. Use 'display list' to list displays and use it's number (1, 2...) to specify display!\n");
        return NULL;
    }
    return ret;
}

IOReturn readDDC(IOAVServiceRef avService, UInt8 action, signed char *curValue, signed char *maxValue) {
    // Get ready for DDC operations
    
    UInt8 data[256];
    memset(data, 0, sizeof(data));
    data[2] = action;

    *curValue=-1;
    *maxValue=-1;
    
    data[0] = 0x82;
    data[1] = 0x01;
    data[3] = 0x6e ^ data[0] ^ data[1] ^ data[2] ^ data[3];
    
    IOReturn err;
    for (int i = 0; i < DDC_ITERATIONS; ++i) {
        
        usleep(DDC_WAIT);
        err = IOAVServiceWriteI2C(avService, 0x37, 0x51, data, 4);
        
        if (err) {
            NSLog(@"%@", [NSString stringWithFormat:@"I2C communication failure: %s\n", mach_error_string(err)]);
            return err;
        }
        
    }
    
    char i2cBytes[12];
    memset(i2cBytes, 0, sizeof(i2cBytes));
    
    usleep(DDC_WAIT);
    err = IOAVServiceReadI2C(avService, 0x37, 0x51, i2cBytes, 12);
    
    if (err) {
        NSLog(@"%@", [NSString stringWithFormat:@"I2C communication failure: %s\n", mach_error_string(err)]);
        return err;
    }
    
    NSData *readData = [NSData dataWithBytes:(const void *)i2cBytes length:(NSUInteger)11];
    
    NSRange maxValueRange = {7, 1};
    NSRange currentValueRange = {9, 1};
    
    [[readData subdataWithRange:maxValueRange] getBytes:maxValue length:sizeof(1)];
    [[readData subdataWithRange:currentValueRange] getBytes:curValue length:sizeof(1)];
    return 0;
}

IOReturn setDDC( IOAVServiceRef avService, UInt8 action, int setValue) {
    UInt8 data[256];

    
    data[0] = 0x84;
    data[1] = 0x03;
    data[2] = action;
    data[3] = (setValue) >> 8;
    data[4] = setValue & 255;
    data[5] = 0x6E ^ 0x51 ^ data[0] ^ data[1] ^ data[2] ^ data[3] ^ data[4];
    
    IOReturn err;
    for (int i = 0; i <= DDC_ITERATIONS; i++) {
        
        usleep(DDC_WAIT);
        err = IOAVServiceWriteI2C(avService, 0x37, 0x51, data, 6);
        
        if (err) {
            NSLog(@"%@", [NSString stringWithFormat:@"I2C communication failure: %s\n", mach_error_string(err)]);
            return err;
            
        }
        
    }
    return 0;
}

int main(int argc, char** argv) {
    NSLog(@"%@", getDisplayList());
    IOAVServiceRef ref = getAvService(1);
    signed char current = 0;
    signed char max = 0;
//  readDDC(ref, VOLUME, &current, &max);
//  printf("Current %d %d\n", current, max);
//  setDDC(ref, VOLUME, 10);
    readDDC(ref, VOLUME, &current, &max);
    printf("Current %d %d\n", current, max);
    CFRelease(ref);
}

Failing to make on M1 mac running Monterey

clang -fmodules -o m1ddc m1ddc.m
m1ddc.m:84:63: warning: 'kIOMasterPortDefault' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
            io_registry_entry_t root = IORegistryGetRootEntry(kIOMasterPortDefault);
                                                              ^~~~~~~~~~~~~~~~~~~~
                                                              kIOMainPortDefault
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:123:19: note: 'kIOMasterPortDefault' has been explicitly marked deprecated here
const mach_port_t kIOMasterPortDefault

Switching to USB C dosent work Asus Pro Art

I ma using m1ddc to try to switch between my USB C and DP setup.
I have currently installed m1ddc in my DP setup
when running the command.

m1ddc display 06B36827-0000-0000-291F-0104B53C2278 set input 27 // for USB C nothing happens

Not sure what is missing here the only thing i can switch is HDMI 1 and 2. rest DP and USB C DP dosent work . Please help


 m1ddc set contrast 5          - Sets contrast to 5
 m1ddc get luminance           - Returns current luminance
 m1ddc set red 90              - Sets red gain to 90
 m1ddc chg volume -10          - Decreases volume by 10
 m1ddc display list            - Lists displays
 m1ddc display 1 set volume 50 - Sets volume to 50 on Display 1

Commands:

 set luminance n         - Sets luminance (brightness) to n, where n is a number between 0 and the maximum value (usually 100).
 set contrast n          - Sets contrast to n, where n is a number between 0 and the maximum value (usually 100).
 set (red,green,blue) n  - Sets selected color channel gain to n, where n is a number between 0 and the maximum value (usually 100).
 set volume n            - Sets volume to n, where n is a number between 0 and the maximum value (usually 100).
 set input n             - Sets input source to n, common values include:
                           DisplayPort 1: 15, DisplayPort 2: 16, HDMI 1: 17 HDMI 2: 18, USB-C: 27.

 set mute on             - Sets mute on (you can use 1 instead of 'on')
 set mute off            - Sets mute off (you can use 2 instead of 'off')

 get luminance           - Returns current luminance (if supported by the display).
 get contrast            - Returns current contrast (if supported by the display).
 get (red,green,blue)    - Returns current color gain (if supported by the display).
 get volume              - Returns current volume (if supported by the display).

 max luminance           - Returns maximum luminance (if supported by the display, usually 100).
 max contrast            - Returns maximum contrast (if supported by the display, usually 100).
 max (red,green,blue)    - Returns maximum color gain (if supported by the display, usually 100).
 max volume              - Returns maximum volume (if supported by the display, usually 100).

 chg luminance n         - Changes luminance by n and returns the current value (requires current and max reading support).
 chg contrast n          - Changes contrast by n and returns the current value (requires current and max reading support).
 chg (red,green,blue) n  - Changes color gain by n and returns the current value (requires current and max reading support).
 chg volume n            - Changes volume by n and returns the current value (requires current and max reading support).

 display list            - Lists displays.
 display n               - Chooses which display to control (use number 1, 2 etc.)

You can also use 'l', 'v' instead of 'luminance', 'volume' etc.
panda@Rahuls-MacBook-Pro ~ % m1ddc display list                                             
1 - ASUS PA279 (06B36827-0000-0000-291F-0104B53C2278)
panda@Rahuls-MacBook-Pro ~ % m1ddc display 06B36827-0000-0000-291F-0104B53C2278 set input 15
panda@Rahuls-MacBook-Pro ~ % m1ddc disp```

Display identification based on `EDID UUID` is not reliable

Hi there !

I was planning to use your work to automate display input switching alongside display-switch but i faced an issue:

I have two identical displays, same vendor, same model, bought at the same time. It seems that some vendors populate many monitors in batch using the same EDID UUID, which leads to some displays not properly recognized (I think issue #35 is related)

m1ddc/m1ddc.m

Line 108 in e22065e

CFStringRef edidUUIDKey = CFStringCreateWithCString(kCFAllocatorDefault, "EDID UUID", kCFStringEncodingASCII);

I researched a bit and looked on how Better Display and others are performing display discovery, and while exploring IORegistry is a good option, the only way i could find to have real (different) UUIDs is by doing this

CGDisplayCount getOnlineDisplayInfos(DisplayInfos* displayInfos) {
    CGDisplayCount screenCount;
    CGDirectDisplayID screenList[MAX_DISPLAYS];
    // Retrieving connected displays IDs and count
    CGGetOnlineDisplayList(MAX_DISPLAYS, screenList, &screenCount);

    for (int i = 0; i < (int)screenCount; i++) {
        DisplayInfos *currDisplay = displayInfos + i;
        currDisplay->id = screenList[i];
        // Retrieving display info dictionnary using a private symbol from CoreDisplay Framework
        CFDictionaryRef displayInfos = CoreDisplay_DisplayCreateInfoDictionary(currDisplay->id);
        // Reading actual UUID used by the system, that is persistent across reboots
        currDisplay->uuid = CFDictionaryGetValue(displayInfos, CFSTR("kCGDisplayUUID"));
    }
    return screenCount;
}

This is some sample code from the fork i made.

I will open a PR that includes a fix, a code refactor and some extra bonuses !

Happy to discuss about it if needed ๐Ÿ™‚

Cheers !

Standby Values

More a question than an issue, but can't see a better way to ask...

I know the standby settings are not documented, but curious about them.

m1ddc set standby 1 -- wakes the display up
m1ddc set standby 2 -- puts the display to sleep / suspends it
m1ddc set standby 5 -- turns the display off

However, the values of 3 and 4 seem to do the same things as 2, at least on my Dell display. From the scant documentation of DDC and the 0xD6 signal I've found, I can't tell if there's meant to be a difference between 2, 3, and 4. Any idea on this?

(I've seen reports with other tools about monitors getting bricked with inappropriate use of the DPMS stuff, which I imagine is at least part of the reason you've left this undocumented... but also the reason I want to be cautious in my own use of it. :) )

input-alt 208 or 144 don't work on LG 32GR93U-B (but they work in BetterDisplay)

./m1ddc display list [1] LG ULTRAGEAR+ (439C3715-A46E-42DB-A084-8BEB5B1A0ACC) [2] (null) (37D8832A-2D66-02CA-B9F7-8F30A301B230) [3] DELL P2415Q (7E2D5E25-701E-4C73-AB99-BB90C97A70E1)

then running:

./m1ddc display 439C3715-A46E-42DB-A084-8BEB5B1A0ACC set input-alt 208

doesn't do anything. These codes do work throught he LG-alt input switch in BetterDisplay

get luminance doesn't always return the correct number

Hi, I am using two display for MacStudio, one is LG 27UP850 (display 1), another one is LG 27UP650. I am trying to combine Hammerspoon and m1ddc together. I want to know the current brightness before I change it, however, the command

m1ddc display 1 get luminance

doesn't always return the current brightness (which is 50 during my test), sometimes it returns 0 and I see one time it returns a negative number, as you can see from the image

image

For get volume I have the same problem too..

KVM usb switch?

Hello and thank you for this amazing project!

I have a S3423DWC monitor, which have KVM ability. From Windows, the DDPM tool allow switch the attached USBs to different inputs (when I use PIP/PBP). Is this possible to do with m1ddcl?

Let me know if I can do some tests/debugs to make that functionality possible.

BR,
Valentin

Ability to specify display by GUID

First off, thank you so much for this tool--it's fantastic! I'm currently using it in conjunction with Shortcuts to automate switching display inputs between my various machines.

I have three displays, and I'm finding that the display "number" changes from time to time, breaking my scripts. I noticed that when using m1ddc display list, each display also has a GUID, and this seems to stay consistent over time. It would be great if this GUID could be specified to m1ddc display ... rather than the display number to ensure consistent operation with multiple displays.

Thanks!

Issues Setting/Getting Values with macOS 13

I've been using m1ddc for some time now to automate switching inputs on my monitor, but I discovered after upgrading to macOS 13 that it does not perform as expected. I'm running m1ddc on an M2 MacBook Air, previously on macOS 12, and now on macOS 13.0.1. My monitor is connected via DisplayPort over a USB-C to DisplayPort adapter, which worked with macOS 12.

On macOS 12, the following command resulted in an input change (switching to the HDMI input on my monitor):
m1ddc display 1 set input 5

However, the same command now fails silently on macOS 13. I made sure to rebuild m1ddc after the OS upgrade.

Running m1ddc display list still shows the display as it has before.

I also noticed that getting values using m1ddc display 1 get [x] (where [x] can be input, luminance, etc) returns erratic values that fluctuate when called repeatedly. For example, running m1ddc display 1 get input repeatedly returns 0 most of the time, but sometimes -1, -124, or 16, even if no parameters are modified (either through m1ddc or externally via the monitor's controls). Unfortunately, I didn't get a chance to experiment extensively with get on macOS 12 to have a useful baseline for comparison, but intuitively, the fluctuating values aren't consistent with expected behavior.

Power Command

Will you be implanting the power/standby command?

ddccdl isn't working on M1 Macs

Not able to set input

I am using M1 MAC Air to connect monitor LG 27UN880 with DP USB-C.
I am able to use most of commands such as to get/chg volume, contrast but failed to set input.
The monitor will flash and back to current view after I execute set input 17.
Switch input is working if I use the physical button on the monitor.
Could you please advise if you have any insight into my problem?

Can't control the monitor connect directly to the MBP M1 port.

HI,

I have an M1 MBP using two HDMI outputs to connect to a DELL Monitor. (One from the laptop itself and another one from a USB-C)

I have previously tested using BetterDisplay, and I can change the input from HDMI to DisplayPort on both monitors.
But I want to use this in a script to change the monitors and USB switch with a single button. I first tried the ddcutil, and it didn't work. Then I found m1ddc, which worked partially.

The issue is that I can only change the monitor connected to the via HDMI on the USB-C dock. Even if only the MBP HDMI port is connected, I can't change it. This only happens on m1ddc since this work on BetterDisplay.

I believe that m1ddc may need to include something to make this work.

Curiosity, both monitors show the same UUID on the m1ddc display list

1 - DELL S2721DGF (10ACDB41-0000-0000-0320-0103803C2278)
2 - DELL S2721DGF (10ACDB41-0000-0000-0320-0103803C2278)

get input randomly returns 110

The get input method doesn't appear particularly reliable: I randomly see 110 when calling the method on two different monitors from two different vendors.

Screenshot 2023-09-30 at 05 20 37

I2C communication failure

I'm running macOS 12.4 on an M1 Mini with a Dell P3222QE. I get

I2C communication failure: (iokit/?) unknown subsystem error

in response to every m1ddc command.

This is a bit beyond my pay grade - should I assume the problem is with the display?

No recognized display on Mac Mini M2 Pro

I have a brand new Mac Mini 2023 with M2 Pro and Venture 13.2.1 pre-installed.
I discovered this app earlier today and tried to set it up so that I can switch to my desktop PC when I'm off work.
The displays in question are 2x LG UN880, both connected through USB-C/TB4. They appear to be recognized by the application (as evidenced in #6) and are fairly recent as well (so they shouldn't require firmware upgrade AFAIK), so I'm guessing it's either caused by the hardware (M2 instead of M1) or the software (Ventura).

The thing is I also tried another app (ddcctl) and both displays are recognized but it does not offer input switching features.

Anything I can do to help debug this ?

I2C communication failure: (iokit/?) unknown subsystem error

It worked perfectly until the last week.

Now when i send the command
m1ddc set input 17

I always get:
I2C communication failure: (iokit/?) unknown subsystem error

I can do other commands but i cant run the set input command somehow. :(

any idea how to debug?

thanks & best M

Request control

Your program work perfectly, but Im facing a little issue with a special setup.

Error:

I2C communication failed: (iokit/?) unknown subsystem error

Probblem description

I have a monitor plug with input 18 on a Windows machine, and input 17 on a macbook pro m1 2020.

While being on the mac, if I do m1ddc display 1 set input 18, everything is fine, and the control of the screen is sent to the Windows machine. But if I try on the mac do request the control of the monitor using m1ddc display 1 set input 17, while the windows machine having it.

Note that I have a similar program as m1ddc on windows, and it can request the control of the screen even if the mac has it, so it seems to be feasible, but might also be an apple restriction, i dont know.

Can DisplayLink connected monitors work?

Not really an issue. More of a question. Is there any hope for monitors connected via DisplayLink drivers to an M2 Air?

I have two external monitors and m1ddc works great from my work M1 Pro MBP (directly connected).

But on my private M2 Air sitting beside with DisplayLink and the two monitors connected via a Dell DS6000 hub then m1ddc does not seem to see any monitors at all. I assume it is the DisplayLink which seems to be a really weird beast?

error: use of undeclared identifier 'kIOMainPortDefault'

I get the following error when running "make" on a brand new Apple Studio M1 ultra on 12.4:

clang -fmodules -o m1ddc m1ddc.m
m1ddc.m:84:63: error: use of undeclared identifier 'kIOMainPortDefault'
io_registry_entry_t root = IORegistryGetRootEntry(kIOMainPortDefault);
^
1 error generated.
make: *** [all] Error 1

Failing to make on 12.1

I'm getting the following error on 12.1
clang -fmodules -o m1ddc m1ddc.m m1ddc.m:84:63: error: use of undeclared identifier 'kIOMainPortDefault' io_registry_entry_t root = IORegistryGetRootEntry(kIOMainPortDefault); ^ 1 error generated. make: *** [all] Error 1

I see you switched from kIOMasterPortDefault to k10MainPortDefault in #7

Won't change input on LG 32UN880-B

Hello,

I can change luminance, but when trying to switch input, the screen goes black for 1 second, and it does nothing.

Any idea on what to do?

Thx
Pierre-Louis

Mac mini m1 - HMDI port

Hello,

Thanks for your work, it helps me a lot !

I'm trying to make this package work with the mac mini m1 hdmi port, do you plan to work on it ? If not, can you please give me some advices/tracks that i can work on ?

THANKS !

Request: add turn off display or other monitor power options

hi!
Before going to Apple Silicon M2 Mac mini, I was using ddcctl which had extra option to edit monitor power options: turn off, sleep,...

I guess I'd like to know if that is also possible to implement in m1ddc?
Thank you for your work, I really appreciate what you've done.

Can not switch back after a while but can swith back immediately

Hi,

My monitor is PHL 271S7Q, macbook is air m1 and PC system is win10.
I use "m1ddc display 1 set input 15"(operation A) to convert the monitor to the PC and use "m1ddc display 1 set input 17"(operation B) to convert the monitor to the macbook.
When I do operation A and do operation B immediately, the monitor converted from the macbook to the PC then from the PC to macbook successfully.
However, when I do operation A, wait for 5 seconds (or longer) then do operation B, the monitor converted from the macbook to the PC then stayed at the PC, couldn't swith back to macbook through operation B.

Do you have any idea what may account for this phenomenon?

THX

Controlling monitor when not on same input

I have 2 monitors - a Dell and a TCL. Changing inputs, adjust volume/brightness all work fine as long as Mac is being viewed on Dell (connected via USBC). If I switch the dell to another input (through CLI or otherwise) I can no longer have the Dell change inputs to get back to Mac input. None of the controls work. The display is still enumerated as display 2, it's still connected via USBC but can no long control it when you switch inputs.

[Feature request] Ability to turn on/off a display

It is possible in Lunar to send a "turn off" signal to a display. Would be great to have the same one in m1ddc, together with "turn on", which I hope should work at least on my Dell U2515H, as it correctly reports its settings via DDC when being turned off.

Add this to homebrew

Homebrew is the package manager of the mac. It would be easier to install & update if this came via homebrew. Thanks in advance.

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.