When I connect a monitor or TV to my Mac. Usually I have an overscan slider in the Display Preferences. However sometimes, it's not there. Ironically, this always seems to happen when the screen needs overscan adjustment.
Thankfully it's not impossible to fix the issue.
I haven't found much useful information on this, the difficulty level is quite high, we will need to use the terminal. Open spotlight and type Terminal
, press enter and you'll get an imposing Terminal window, with a flashing cursor and not much else. We'll come back to that in a moment or two.
First we need to identify the screen in the Mac config files. This file is also buried away at /private/var/db/.com.apple.iokit.graphics
There's really nothing in this file which will give you a solid idea of which screen we're dealing with. If you've connected to a few different screens during the Mac's lifetime the list will be quite long and that really doesn't help.
The simplest way I can think of to identify the screen is to take a copy of the file. Then modify the Display (change the scale / resolution) Then make a comparison between the copied file and the config file.
Try this, enter into the terminal..:
cp /private/var/db/.com.apple.iokit.graphics ~/screens
Now make a change to the Display settings. Change the resolution of the display we want to find.
Close Displays preferences.
Now compare the two files...
diff ~/screens /private/var/db/.com.apple.iokit.graphics
We should have something like...
27,29c29,31
< AAAAAAAAAIAAEACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
< AAAAEPdsBAAAAAAQ92wEAAAAABD3bAQAAAAAAAUAAHIBAABuAAAAKAAAANAC
< AAAeAAAABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAA
---
> AAAAAAAAAIACUACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
> AAAAIO7ZCAAAAAAg7tkIAAAAACDu2QgAAAAAgAcAABgBAABYAAAALAAAADgE
> AAAtAAAABAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAA
If you've never used diff
. Basically it's saying there's a change from lines 27 to 29.
I'll look at my ~/screens
file using cat -n ~/screens
(here's the part we want around lines 27-29... )
19 <key>IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/IGPU@2-2e83-3200-b9834aec5adac5ff</key>
20 <dict>
21 <key>cyuv</key>
22 <integer>268435456</integer>
23 <key>pscn</key>
24 <integer>10000</integer>
25 <key>startup-timing</key>
26 <data>
27 AAAAAAAAAIAAEACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
28 AAAAEPdsBAAAAAAQ92wEAAAAABD3bAQAAAAAAAUAAHIBAABuAAAAKAAAANAC
29 AAAeAAAABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAA
30 AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
31 </data>
32 <key>version</key>
33 <integer>2</integer>
34 </dict>
We'll need to modify (or add) a key in here called <key>pscan</key>
. The default value is 10000
.
If your screen is cutting off the sides of your display, you need to underscan (reduce pscn value). If the screen shows the Mac display with a black border, you need to overscan (increase pscn value).
Setting the correct value is a bit trial and error. For me setting pscn
to 9611
worked well.
Play around until you get the right value. A restart is required to see the change.
The file /private/var/db/.com.apple.iokit.graphics
is protected so you need to use sudo
to make the change.
Try:
sudo nano /private/var/db/.com.apple.iokit.graphics
Find the lines that diff
located for you.
GNU nano 2.0.6 File: screens
AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
</data>
<key>version</key>
<integer>2</integer>
</dict>
<key>IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/IGPU@2-2e83-3200-b9834aec5adac5ff</key>
<dict>
<key>cyuv</key>
<integer>268435456</integer>
<key>pscn</key>
<integer>10000</integer> <!-- we meed to change this value. -->
<key>startup-timing</key>
<data>
AAAAAAAAAIAAEACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAEPdsBAAAAAAQ92wEAAAAABD3bAQAAAAAAAUAAHIBAABuAAAAKAAAANAC
AAAeAAAABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAA
AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
</data>
<key>version</key>
<integer>2</integer>
</dict>
<key>IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/IGPU@2-2e83-5500-e83acf96613fbec</key>
<dict>
<key>cyuv</key>
<integer>268435456</integer>
<key>pscn</key>
<integer>10000</integer>
^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where Is ^V Next Page ^U UnCut Text ^T To Spell
Change the value of pscn
, like so...
GNU nano 2.0.6 File: screens
AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
</data>
<key>version</key>
<integer>2</integer>
</dict>
<key>IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/IGPU@2-2e83-3200-b9834aec5adac5ff</key>
<dict>
<key>cyuv</key>
<integer>268435456</integer>
<key>pscn</key>
<integer>9611</integer> <!-- changed to 9611 -->
<key>startup-timing</key>
<data>
AAAAAAAAAIAAEACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAEPdsBAAAAAAQ92wEAAAAABD3bAQAAAAAAAUAAHIBAABuAAAAKAAAANAC
AAAeAAAABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAA
AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
</data>
<key>version</key>
<integer>2</integer>
</dict>
<key>IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/IGPU@2-2e83-5500-e83acf96613fbec</key>
<dict>
<key>cyuv</key>
<integer>268435456</integer>
<key>pscn</key>
<integer>10000</integer>
^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where Is ^V Next Page ^U UnCut Text ^T To Spell
If pscn
isn't inside the same pair of <dict></dict>
tags, you'll need to add them.
<key>pscn</key>
<integer>9611</integer>
To save, press Ctrl+X and then answer Y
to save. You'll need to restart the mac to see the change.`
As I mentioned before, 9611
worked for me. You may need to experiment.
Hopefully this helped.
it's not great that we still have to add images to gists like this.