Need to reset resolution -- from terminal!

hiendohar

Registered
This weekend I picked up a bargain copy of "Railroad Tycoon II" and decided I would put it to the test in the Classic environment. The install went okay, as did the Intro quicktime movie after a reboot of Classic. At the end of the movie, RTII switched resolutions -- and here is where my trouble begins.

My monitor cannot display the resolution/scan rate that it selected, so that the screen went black and stayed that way. Rebooting was no help, nor was resetting the PRAM. As a matter of fact, the startup resolution is fine: I see the happy mac for a little while, then when it goes to show me the OS X startup dialog, the screen goes black again.

Running the Monitors control panel is not an option, and unlike previous versions of the OS, you can't boot from the install CD -- you just get the installer. I have tried reinstalling to no avail. It would break my heart to have to make a clean install just to change the resolution.

I am running an SSH server and can get into the server that way. Does anyone know where the resolution/scan rate might be stored? Failing that, would anybody be willing to change their own resolution and then use Sherlock or unix find to look for altered files?

Many thanks,

--Riley
 
What method is commonly used to reset the display resolution when it is accidentally set incorrectly for your monitor? It was modified to an invalid setting that the monitor doesn't support. I only have network access, and I can ssh in to modify whatever is needed. What files can I modify to get the display back?

Thanks!
 
looks like you found the file... but anyway, if you haven't done so already, move or remove the file from there and reboot... that should work..
 
I've tried renaming/removing with no success.

After 'reboot', the file is created again. I wonder where the actual values are stored - I fear in some ldap repository.

I removed all com.apple.windowserver.plist files.
 
I solved this by replacing /Library/Preferences/com.apple.windowserver.plist with an empty file and write protecting it. Once rebooted, I made the file writable again by root.

sudo su -
echo > /Library/Preferences/com.apple.windowserver.plist
chmod 444 /Library/Preferences/com.apple.windowserver.plist
reboot
 
Doesn't quite work. Looking in dmesg the kernel still tries to initilize the video card as the wrong resolution.

Also, Even making the com.apple.windowserver.plist file read only by root does not stop the system from overwriting it. I am on UFS so I can't lock the file using HFS+ locks. So unless we can find where the info in com.apple.windowserver.plist is comming from, I need to reinstall.

Also, does anyone know where the kernel stores its parameters? I checked the OpenFirmware and it doesn't store the resolution of the Vid card that I could see. Also resetting the pram does reset the resolution in OS 9 so I assume that the kernel stores its parameters some where on the fs.
 
Try making a directory named com.apple.windowserver.plist - the system shouldn't overwrite a directory with a file, then rebooting and resetting the PRAM. Or, if you think your monitor may be "remembering" the settings, you could try leaving it unplugged for a little while, that should make it "forget".
 
Originally posted by i82much
I solved this by replacing /Library/Preferences/com.apple.windowserver.plist with an empty file and write protecting it. Once rebooted, I made the file writable again by root.

sudo su -
echo > /Library/Preferences/com.apple.windowserver.plist
chmod 444 /Library/Preferences/com.apple.windowserver.plist
reboot

I didn't actually re chmod the file on that last step - it was recreated automatically. Not knowing any better, I'd say that the screen res is stored in netinfo. nicl is cli tool. I could be way wrong though.
 
I would say that netinfo is probalby the culprit too. Problem is I can't seem to find where in the NetInfo db this is stored. Also after I looked at the dmesg output in the terminal I noticed that it seems like the Rage_128 kernel module is setting my resolution to the wrong value too, so it must be stored some place that the kernel can see it too, unless I am wrong and kernel modules have access to Netinfo early on in the boot process.

Either way its looking like it might be time for a clean install, atleast I can still ssh in and back files up onto another drive before I do.
 
I solved this by replacing /Library/Preferences/com.apple.windowserver.plist with an empty file and write protecting it. Once rebooted, I made the file writable again by root.

sudo su -
echo > /Library/Preferences/com.apple.windowserver.plist
chmod 444 /Library/Preferences/com.apple.windowserver.plist
reboot
So, after 22 Years, you saved me: twice.
Your comment is now in my personal notes to save me whenever MacOS goofed.

Thank you, stranger, you did well 22 years ago; I hope you're ok.
I had issues with my Samsung Odissey 49, it kept resetting the frequency: by blocking the writing from system and giving a blank file, it solved it.
 
Back
Top