Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

M1 series SoCs not supported #2

Open
gautamg795 opened this issue Nov 3, 2021 · 18 comments
Open

M1 series SoCs not supported #2

gautamg795 opened this issue Nov 3, 2021 · 18 comments

Comments

@gautamg795
Copy link

Existing DDC control utilities on macOS no longer work on M1 SoCs, presumably due to the different GPU architecture.
More details on the changes (and required fixes) are here.

I may take a stab at this myself in the next week, but creating an issue to track progress anyhow.

@gautamg795
Copy link
Author

note: I wasn't sure if you'd prefer this issue under display-switch; this library seemed more directly tied to the issue.

@haimgel
Copy link
Owner

haimgel commented Nov 5, 2021

This is the perfect place for such a ticket, thank you! The link is also very helpful. I plan to get an M1, but I currently don't have one, so I cannot test/hack any of this. Any help is most welcome!

@gautamg795
Copy link
Author

Making very slow progress trying to understand the code from https:/alin23/Lunar and port it to Rust. this seems totally doable, just not something that will get done quickly.

I've found a short-term workaround though — Lunar contains a CLI utility that can send DDC commands even on M1 machines. Using the external command feature of display-switch, it's possible to restore input-switching functionality by calling out to lunar. Might be worth noting in the main repo for any users having issues on M1.

@sgade
Copy link

sgade commented Dec 28, 2021

I sadly am unable to contribute to the translation effort but would be willing to help test.

@stevegore
Copy link

Making very slow progress trying to understand the code from https:/alin23/Lunar and port it to Rust. this seems totally doable, just not something that will get done quickly.

I've found a short-term workaround though — Lunar contains a CLI utility that can send DDC commands even on M1 machines. Using the external command feature of display-switch, it's possible to restore input-switching functionality by calling out to lunar. Might be worth noting in the main repo for any users having issues on M1.

Where is this CLI? There's ddcctl in the bin directory but that doesn't seem to support the M1. There's a Lunar binary inside the package contents of the app itself but it doesn't seem to take command line parameters that I can see. What did you work out?

@gautamg795
Copy link
Author

The Lunar binary itself does some inspection of argv to determine if it should run in CLI mode. If I recall correctly, @ as the first argument causes it to run in CLI mode? (It's easiest to just put a shell script in ~/bin or something which calls Lunar.app with @ as the first argument and passes the remaining arguments)

and just FYI regarding my earlier comment, I'm not actively working on the M1 translation at the moment either. I switched to a monitor which doesn't seem to support DDC at all (ugh) so I'm not as motivated to get it working unfortunately

@stevegore
Copy link

Thank you. I ended up getting my PC (second computer) to run display-switch and that works just as well it turns out.

@haimgel
Copy link
Owner

haimgel commented Jan 10, 2022

Thanks guys, I've got my MBP M1 at work, will gather some courage to dive into this, and will try to fix.

@rajohns08
Copy link

@haimgel, any updates? I love this project!

@haimgel
Copy link
Owner

haimgel commented Aug 13, 2022

Unfortunately, I didn't have the time to tackle this yet. Life got in the way :-(

@KushleshKumar
Copy link

bumping to say that I am interested in the solve as well.

@icepie
Copy link

icepie commented Oct 19, 2022

https:/waydabber/m1ddc

maybe this project can help us

@grooveborg
Copy link

grooveborg commented Dec 18, 2022

Thanks for the tip @icepie, got display-switch working on my M1:

usb_device = "<DEVICE_ID>"
on_usb_connect_execute = "/usr/local/bin/m1ddc display <UUID> set input <n>"
on_usb_disconnect_execute = "/usr/local/bin/m1ddc display <UUID> set input <n>"

I'm not familiar with Rust so I just commented out the error-checking bits in display_control.rs and compiled it. External commands won't run if no DDC-compatible displays are found.

@sylveon
Copy link

sylveon commented Feb 21, 2023

Unfortunately I can't use this workaround on my M2 Mac Mini: DDC only works over USB-C, not HDMI :(

@findNextStep
Copy link

here are some information that maybe helpful https://alinpanaitiu.com/blog/journey-to-ddc-on-m1-macs/

lazywei added a commit to lazywei/display-switch that referenced this issue Feb 12, 2024
This is based on haimgel/ddc-macos-rs#2 (comment).
A futher improvement can be made to use `m1ddc` as external command to gather display info.
@jglamine
Copy link

jglamine commented Apr 9, 2024

I was able to get display-switch working with this workaround on my M2 mac. Used Lunar instead of m1ddc as I already have Lunar installed.

Applied the changes from the above PR: haimgel/display-switch#137

Used these lunar commands in my config:

usb_device = "1a40:0101"

on_usb_connect_execute = "lunar displays external input displayport1"
on_usb_disconnect_execute = "lunar displays external input hdmi1"

@Dentrax
Copy link

Dentrax commented May 7, 2024

What's the latest status on this issue?

@brendenehlers
Copy link

Also looking for updates on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests