Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sending MCCS commands on Cocoa

Tags:

cocoa

gpu

iokit

I am trying to write a simple Cocoa App for the Mac for one simple purpose: switching my Dell monitor input to another one (so I can switch between PC and MAC). I already found an application for Windows that does that (mControl by entechtaiwan), and they explain what they do in there:

"To switch inputs via software you use the VESA MCCS command 60h. To send that command to the monitor, you'll need to read and write to the GPU I/O pads that connect to the monitor. Ditto on the Mac."

Does anyone know how can I send such a command from a Cocoa app? Maybe there's a library for that...shouldn't it be quite simple?

like image 582
Martí Gascó Avatar asked Apr 21 '13 13:04

Martí Gascó


1 Answers

there seems to be an implementation for Linux at: http://ddccontrol.sourceforge.net

it uses the <sys/msg.h> api. There seems to be no man-pages for that api but it's available on the mac. I haven't tried to compile the ddccontrol tool, but looks like the closest you can get and it should be a good starting point.

like image 197
Karsten Avatar answered Oct 04 '22 12:10

Karsten