Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I just got a KVM switch box and when plugging my monitor on that box, MacOSX doesn't recognize all possible resolutions, esp. not the native resolution which is very annoying.

Is there any way I can fix this?

Is there any way I can force MacOSX to let me specify any possible resolution?

share|improve this question
add comment

3 Answers 3

up vote 0 down vote accepted

I'm not sure if it still works, but you might give the cscreen command-line tool a try. It's been abandoned by its original author, but it still available from the macosxhints forum (posting #6 here).

share|improve this answer
add comment

Take a look at SwitchResX.

SwitchResX is a tool designed to manage resolutions of all your monitors. Here's a quick summary:

As standard features: it gives you access to most of your monitor settings within its customizable menus (in the Menu Bar or with a Contextual Menu Plugin [also on Snow Leopard] on the Finder Desktop). SwitchResX incorporates features relative to the Monitor Resolution, Color Depth, Video Mirroring, Display Rotation, Display Overscan into one single utility. Other useful features include saving desktop layout, ie positions of the icons on the desktop and positions of the windows of all open applications, and restore them automatically when the resolution is changed or when you plug or unplug an external monitor. You can disable or deactivate a monitor without having to physically unplug it, allowing you to use a laptop in clamshell mode with external monitor, keyboard and mouse Specialized features allow you to link your monitor settings with system events: Key shortcut pressed, Apple Scripts, Application launched.

Advanced features lets you create and enable new resolutions for your monitor, HDTV, Plasma or LCD screen or Video Projector. This advanced feature is very powerful for users requesting complete control over their display resolution.

share|improve this answer
    
It's not free. I wont pay any money for such trivial basic function. –  Albert Jul 31 '12 at 23:36
add comment

Thanks Gordon for the link to the Macworld forum. There is this code which might be able to do what I want:

/*
* main.c
* newscreen
*
* Created by Jeffrey Osterman on 10/30/07.
* Copyright 2007 Jeffrey Osterman. All rights reserved. 
* PROVIDED AS IS AND WITH NO WARRANTIES WHATSOEVER
*/

#include <ApplicationServices/ApplicationServices.h>

void MyDisplaySwitchToMode (CGDirectDisplayID display, CFDictionaryRef mode);

int main (int argc, const char * argv[]) {

int h; //horizontal resolution
int v; //vertical resolution
CFDictionaryRef switchMode; //mode to swich to
CGDirectDisplayID mainDisplay; //ID of main display


if (argc != 5)
{
printf("Expected 4 inputs, but only received %i\n", argc-1);
return 0;
}

if (!strcmp(argv[1],"-h"))
h=strtol(argv[2], NULL, 0);
else if (!strcmp(argv[1],"-v"))
v=strtol(argv[2], NULL, 0);
else {
printf("Error! Expected first argument to be -h or -v\n");
return 0;
}


if (!strcmp(argv[3],"-h"))
h=strtol(argv[4], NULL, 0);
else if (!strcmp(argv[3],"-v"))
v=strtol(argv[4], NULL, 0);
else {
printf("Error! Expected third argument to be -h or -v");
return 0;
}

mainDisplay = CGMainDisplayID();
switchMode = CGDisplayBestModeForParameters(mainDisplay, 32, h, v, NULL);
MyDisplaySwitchToMode (mainDisplay, switchMode);
return 0;

}



void MyDisplaySwitchToMode (CGDirectDisplayID display, CFDictionaryRef mode)
{
CGDisplayConfigRef config; // 1
CGBeginDisplayConfiguration (&config); // 2
CGConfigureDisplayMode (config, display, mode); // 3

CGCompleteDisplayConfiguration (config, kCGConfigureForSession ); // 5
}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.