Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
productids=data.scan(/DisplayProductID.*?([0-9]+)/i).flatten
displays = []
edids.each_with_index do |edid, i|
disp = { "edid_hex"=>edid, "vendorid"=>vendorids[i].to_i, "productid"=>productids[i].to_i }
displays.push(disp)
end
# Process all displays
if displays.length > 1
puts "Found %d displays! You should only install the override file for the one which" % displays.length
puts "is giving you problems.","\n"
end
displays.each do |disp|
# Retrieve monitor model from EDID data
monitor_name=[disp["edid_hex"].match(/000000fc00(.*?)0a/){|m|m[1]}.to_s].pack("H*")
if monitor_name.empty?
monitor_name = "Display"
end
puts "found display '#{monitor_name}': vendorid #{disp["vendorid"]}, productid #{disp["productid"]}, EDID:\n#{disp["edid_hex"]}"
bytes=disp["edid_hex"].scan(/../).map{|x|Integer("0x#{x}")}.flatten
puts "Setting color support to RGB 4:4:4 only"
bytes[24] &= ~(0b11000)
puts "Number of extension blocks: #{bytes[126]}"
puts "removing extension block"
bytes = bytes[0..127]
bytes[126] = 0
bytes[127] = (0x100-(bytes[0..126].reduce(:+) % 256)) % 256
puts
puts "Recalculated checksum: 0x%x" % bytes[127]
puts "new EDID:\n#{bytes.map{|b|"%02X"%b}.join}"
Dir.mkdir("DisplayVendorID-%x" % disp["vendorid"]) rescue nil
f = File.open("DisplayVendorID-%x/DisplayProductID-%x" % [disp["vendorid"], disp["productid"]], 'w')
f.write '<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">'
f.write "
<dict>
<key>DisplayProductName</key>
<string>#{monitor_name} - forced RGB mode (EDID override)</string>
<key>IODisplayEDID</key>
<data>#{Base64.encode64(bytes.pack('C*'))}</data>
<key>DisplayVendorID</key>
<integer>#{disp["vendorid"]}</integer>
<key>DisplayProductID</key>
<integer>#{disp["productid"]}</integer>
</dict>
</plist>"
f.close
puts "\n"
end # displays.each
@enr00ted

This comment has been minimized.

Show comment
Hide comment
@enr00ted

enr00ted Dec 27, 2013

Thank you very much for this. I think this somehow solved some of the problems I had with an HP 23xi IPS external monitor.

enr00ted commented Dec 27, 2013

Thank you very much for this. I think this somehow solved some of the problems I had with an HP 23xi IPS external monitor.

@thunderstruck90

This comment has been minimized.

Show comment
Hide comment
@thunderstruck90

thunderstruck90 Jan 17, 2014

Thank you very much.. This worked perfectly with my Dell S2440L monitor on my Mac Mini (late 2012 model).

thunderstruck90 commented Jan 17, 2014

Thank you very much.. This worked perfectly with my Dell S2440L monitor on my Mac Mini (late 2012 model).

@newbie01

This comment has been minimized.

Show comment
Hide comment
@newbie01

newbie01 Jan 28, 2014

Awesome. I was getting ready to fork out for a Mac Display. Mac pro, Mavericks, Dell U2713H. Thanks

newbie01 commented Jan 28, 2014

Awesome. I was getting ready to fork out for a Mac Display. Mac pro, Mavericks, Dell U2713H. Thanks

@newbie01

This comment has been minimized.

Show comment
Hide comment
@newbie01

newbie01 Jan 28, 2014

Could this work also for projectors ? The Mac often displays miserably bad compared to PCs

newbie01 commented Jan 28, 2014

Could this work also for projectors ? The Mac often displays miserably bad compared to PCs

@adaugherity

This comment has been minimized.

Show comment
Hide comment
@adaugherity

adaugherity Feb 25, 2014

Thanks everyone, but I didn't create this; I just enhanced it to work with multiple displays and use the monitor name. Credit for the original script goes to Andreas Schwarz, which I discovered via Mathew Inkson's blog post.

It wouldn't hurt to try on your projector, or even a TV -- if the device supports both RGB and YPbPr, your Mac will probably display better in RGB mode.

Owner

adaugherity commented Feb 25, 2014

Thanks everyone, but I didn't create this; I just enhanced it to work with multiple displays and use the monitor name. Credit for the original script goes to Andreas Schwarz, which I discovered via Mathew Inkson's blog post.

It wouldn't hurt to try on your projector, or even a TV -- if the device supports both RGB and YPbPr, your Mac will probably display better in RGB mode.

@deg0nz

This comment has been minimized.

Show comment
Hide comment
@deg0nz

deg0nz Apr 13, 2014

I have a no-name display (AMW X2210WAS) plugged to my macbook. When i run your script, there's no output in the Terminal and no folder created.

I figured out, that the output of the ioreg -l -d0 -w 0 -r -c AppleDisplay -command doesn't contain a IODisplayEDID part, which is required in your script via the "edids" variable.

Do you have any ideas for this problem?

deg0nz commented Apr 13, 2014

I have a no-name display (AMW X2210WAS) plugged to my macbook. When i run your script, there's no output in the Terminal and no folder created.

I figured out, that the output of the ioreg -l -d0 -w 0 -r -c AppleDisplay -command doesn't contain a IODisplayEDID part, which is required in your script via the "edids" variable.

Do you have any ideas for this problem?

@vriesk

This comment has been minimized.

Show comment
Hide comment
@vriesk

vriesk Apr 25, 2014

Thanks Andrew, it saved the usability of my Asus PA279.

However, while it works fine with native resolution via miniDP-DP connection, when I connect it with HDMI cable, I get maximum resolution of 1920x1080. Is there some magic encoded in EDID that would cause this? Prior to running the script and setting the override, it was possible to achieve 2560x1440 via the HDMI cable, of course with horrible fonts.

P.S. The mere existence of this software is a complete PITA of Apple.

vriesk commented Apr 25, 2014

Thanks Andrew, it saved the usability of my Asus PA279.

However, while it works fine with native resolution via miniDP-DP connection, when I connect it with HDMI cable, I get maximum resolution of 1920x1080. Is there some magic encoded in EDID that would cause this? Prior to running the script and setting the override, it was possible to achieve 2560x1440 via the HDMI cable, of course with horrible fonts.

P.S. The mere existence of this software is a complete PITA of Apple.

@ralexx

This comment has been minimized.

Show comment
Hide comment
@ralexx

ralexx May 10, 2014

Thanks to you and the original author. This is a big help.

ralexx commented May 10, 2014

Thanks to you and the original author. This is a big help.

@Zen-X

This comment has been minimized.

Show comment
Hide comment
@Zen-X

Zen-X Jun 11, 2014

Hello everyone,

this is my first post and sorry for my English.

I bought the Dell U2414H and hooked it up with my MacBook Pro Mid 2009. It has the Nvidia GeForce 9400M inside. In near future the display will be connected with a 2012 Mac mini with the Intel HD4000 inside.

My question is: how do I recognize that my setup suffers under the problem that is discussed here? By now, I can give you following details.

On the monitor side:

  • I own the revision A00
  • I use the original Display Port to Mini Display Port cable
  • When I first connected the monitor with my MacBook Pro the Display Port Mode 1.2 was automatically disabled
  • The Dell OSD menu tells me that the monitor is running with RGB input format, Mac Gamma and sRGB mode
  • For my eyes, everything looks fine

On the MacBook side:

  • I runs OS X 10.8.5
  • "About this Mac > Monitor" tells me that I'm using "Monitor: Dell U2414H"
  • "About this Mac > System > Grafik/Monitor" tells me "TV: Yes"
  • "System Preferences > Monitor > Colours > Open Profile" tells me "Colour Room: RGB"

Thank you very very much in advance,
Martin

Zen-X commented Jun 11, 2014

Hello everyone,

this is my first post and sorry for my English.

I bought the Dell U2414H and hooked it up with my MacBook Pro Mid 2009. It has the Nvidia GeForce 9400M inside. In near future the display will be connected with a 2012 Mac mini with the Intel HD4000 inside.

My question is: how do I recognize that my setup suffers under the problem that is discussed here? By now, I can give you following details.

On the monitor side:

  • I own the revision A00
  • I use the original Display Port to Mini Display Port cable
  • When I first connected the monitor with my MacBook Pro the Display Port Mode 1.2 was automatically disabled
  • The Dell OSD menu tells me that the monitor is running with RGB input format, Mac Gamma and sRGB mode
  • For my eyes, everything looks fine

On the MacBook side:

  • I runs OS X 10.8.5
  • "About this Mac > Monitor" tells me that I'm using "Monitor: Dell U2414H"
  • "About this Mac > System > Grafik/Monitor" tells me "TV: Yes"
  • "System Preferences > Monitor > Colours > Open Profile" tells me "Colour Room: RGB"

Thank you very very much in advance,
Martin

@goyal

This comment has been minimized.

Show comment
Hide comment
@goyal

goyal Dec 2, 2014

Thanks so much. This works perfectly!

goyal commented Dec 2, 2014

Thanks so much. This works perfectly!

@NikolausDemmel

This comment has been minimized.

Show comment
Hide comment
@NikolausDemmel

NikolausDemmel Jan 7, 2015

After reading a lot of posts about LCD font smoothing and what not to fix blurry fonts on external monitors, this is the first thing that seems to fix it.

It even works together with a fix using SwitchResX to get HiDPI working (manually merge the plist files from switchresx and from patch-edid.rb) on my 27'' Acer B276HUL with 2560x1440 and now it finally looks acceptable.

I'm still switching between 1680x1080 and 1920x1080 HiDPI. It is not as crisp as the retina of my MBP, but of course that internal screen has a lot more pixel per inch, so I guess the remaining blurriness is my eyes being used to the retina display.

Thanks for sharing!

NikolausDemmel commented Jan 7, 2015

After reading a lot of posts about LCD font smoothing and what not to fix blurry fonts on external monitors, this is the first thing that seems to fix it.

It even works together with a fix using SwitchResX to get HiDPI working (manually merge the plist files from switchresx and from patch-edid.rb) on my 27'' Acer B276HUL with 2560x1440 and now it finally looks acceptable.

I'm still switching between 1680x1080 and 1920x1080 HiDPI. It is not as crisp as the retina of my MBP, but of course that internal screen has a lot more pixel per inch, so I guess the remaining blurriness is my eyes being used to the retina display.

Thanks for sharing!

@bdemers

This comment has been minimized.

Show comment
Hide comment
@bdemers

bdemers Feb 3, 2015

Worked great for my Dell U2413
Thanks!

bdemers commented Feb 3, 2015

Worked great for my Dell U2413
Thanks!

@jconroy

This comment has been minimized.

Show comment
Hide comment
@jconroy

jconroy Feb 17, 2015

Thanks! Worked for me on Yosemite with two Dell U2414H's (Connected via display port they were fine but HDMI wouldn't do RGB. Now they are both RGB)

jconroy commented Feb 17, 2015

Thanks! Worked for me on Yosemite with two Dell U2414H's (Connected via display port they were fine but HDMI wouldn't do RGB. Now they are both RGB)

@gbaudoin

This comment has been minimized.

Show comment
Hide comment
@gbaudoin

gbaudoin Mar 4, 2015

Worked great for my Philips 247ELH on a Macbook Pro Retina, thanks !

gbaudoin commented Mar 4, 2015

Worked great for my Philips 247ELH on a Macbook Pro Retina, thanks !

@skaneria

This comment has been minimized.

Show comment
Hide comment
@skaneria

skaneria Mar 26, 2015

Thanks much. This was the only thing that worked amongst all other solutions.

Macbook pro late 2011, 17inc, AMD on Acer B276HUL

skaneria commented Mar 26, 2015

Thanks much. This was the only thing that worked amongst all other solutions.

Macbook pro late 2011, 17inc, AMD on Acer B276HUL

@lcat

This comment has been minimized.

Show comment
Hide comment
@lcat

lcat Apr 13, 2015

patch-edid.rb:9:in `<main>': undefined method `[]' for nil:NilClass (NoMethodError)
lcat:~ lcat$ ioreg -l -w0 -d0 -r -c AppleDisplay
+-o AppleDisplay  <class AppleDisplay, id 0x10000066e, registered, matched, active, busy 0 (0 ms), retain 8>
    {
      "IOClass" = "AppleDisplay"
      "CFBundleIdentifier" = "com.apple.iokit.IOGraphicsFamily"
      "IOProviderClass" = "IODisplayConnect"
      "DisplayProductID" = 1815
      "IOPowerManagement" = {"CapabilityFlags"=49152,"MaxPowerState"=3,"CurrentPowerState"=3}
      "IODisplayPrefsKey" = "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/IGPU@2/AppleIntelFramebuffer@2/display0/AppleDisplay-756e6b6e-717"
      "IODisplayParameters" = {"bgsc"={"min"=0,"max"=65536,"value"=65536},"rgsc"={"min"=0,"max"=65536,"value"=65536},"cmod"={"min"=0,"max"=4096,"value"=1},"ggsc"={"min"=0,"max"=65536,"value"=65536},"cyuv"={"min"=0,"max"=268435456,"value"=268435456},"vblm"={"min"=0,"max"=196608,"value"=65536},"gsc "={"min"=0,"max"=65536,"value"=65536},"colr"={"min"=0,"max"=18446744073709551615,"value"=257}}
      "IOProbeScore" = 2000
      "IOMatchCategory" = "IODefaultMatchCategory"
      "IODisplayConnectFlags" = <00000000>
      "DisplayVendorID" = 1970170734
      "DisplaySerialNumber" = 0
    }

lcat commented Apr 13, 2015

patch-edid.rb:9:in `<main>': undefined method `[]' for nil:NilClass (NoMethodError)
lcat:~ lcat$ ioreg -l -w0 -d0 -r -c AppleDisplay
+-o AppleDisplay  <class AppleDisplay, id 0x10000066e, registered, matched, active, busy 0 (0 ms), retain 8>
    {
      "IOClass" = "AppleDisplay"
      "CFBundleIdentifier" = "com.apple.iokit.IOGraphicsFamily"
      "IOProviderClass" = "IODisplayConnect"
      "DisplayProductID" = 1815
      "IOPowerManagement" = {"CapabilityFlags"=49152,"MaxPowerState"=3,"CurrentPowerState"=3}
      "IODisplayPrefsKey" = "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/IGPU@2/AppleIntelFramebuffer@2/display0/AppleDisplay-756e6b6e-717"
      "IODisplayParameters" = {"bgsc"={"min"=0,"max"=65536,"value"=65536},"rgsc"={"min"=0,"max"=65536,"value"=65536},"cmod"={"min"=0,"max"=4096,"value"=1},"ggsc"={"min"=0,"max"=65536,"value"=65536},"cyuv"={"min"=0,"max"=268435456,"value"=268435456},"vblm"={"min"=0,"max"=196608,"value"=65536},"gsc "={"min"=0,"max"=65536,"value"=65536},"colr"={"min"=0,"max"=18446744073709551615,"value"=257}}
      "IOProbeScore" = 2000
      "IOMatchCategory" = "IODefaultMatchCategory"
      "IODisplayConnectFlags" = <00000000>
      "DisplayVendorID" = 1970170734
      "DisplaySerialNumber" = 0
    }

@tachijuan

This comment has been minimized.

Show comment
Hide comment
@tachijuan

tachijuan Jun 4, 2015

thank you! Worked well with my 2010 27" iMac and an Acer B276HUL on Yosemite. Finally!

tachijuan commented Jun 4, 2015

thank you! Worked well with my 2010 27" iMac and an Acer B276HUL on Yosemite. Finally!

@abm0

This comment has been minimized.

Show comment
Hide comment
@abm0

abm0 Aug 3, 2015

Thanks a lot, man! I've been seeking solution for a long time and this is first solution, that worked for me.

abm0 commented Aug 3, 2015

Thanks a lot, man! I've been seeking solution for a long time and this is first solution, that worked for me.

@coffy

This comment has been minimized.

Show comment
Hide comment
@coffy

coffy Oct 5, 2015

kudos! This is only 'upgrade' script I have to run every time I update OS X 👍

coffy commented Oct 5, 2015

kudos! This is only 'upgrade' script I have to run every time I update OS X 👍

@mmleif

This comment has been minimized.

Show comment
Hide comment
@mmleif

mmleif Oct 10, 2015

Thank you so much! It worked for my Samsung S27D850T, however afterward I saw the display frequency changed to 59Hz instead of 60Hz, it looked a bit strange. Is there anyway to force it to stick on 60Hz?

mmleif commented Oct 10, 2015

Thank you so much! It worked for my Samsung S27D850T, however afterward I saw the display frequency changed to 59Hz instead of 60Hz, it looked a bit strange. Is there anyway to force it to stick on 60Hz?

@xteelps

This comment has been minimized.

Show comment
Hide comment
@xteelps

xteelps Oct 13, 2015

Despite trying all kind of solutions my Mac Mini (El Capitan) still inverts it's colours on the HDMI connected Philips LED TV.
Maybe a stupid question for the experts: Does it matter what name you give to the folder in 'Overrides'?
Furthermore: Should I copy-paste the entire text patch-edid.rb at the top of this thread from line 1 to line 67?
Thanks in advance!

xteelps commented Oct 13, 2015

Despite trying all kind of solutions my Mac Mini (El Capitan) still inverts it's colours on the HDMI connected Philips LED TV.
Maybe a stupid question for the experts: Does it matter what name you give to the folder in 'Overrides'?
Furthermore: Should I copy-paste the entire text patch-edid.rb at the top of this thread from line 1 to line 67?
Thanks in advance!

@jkgeyti

This comment has been minimized.

Show comment
Hide comment
@jkgeyti

jkgeyti Oct 16, 2015

Doesn't seem to work for me, despite working on yosemite.

With my laptop lid down, and the external display connected, a single folder is created by the script, and the display name of the monitor is correct (see below for file content). However, no folder of the same name exists in /System/Library/Displays/Contents/Resources/Overrides, and simply copying the generated folder has to there, has no effect.

I've tried various combinations of restarting with and without "rootless" mode enabled, unhooking and reseating hdmi cable, tried changing ownership of the produced folder and file to root:wheel like the rest of the folders in .../Overrides, but nothing seems to work.

I've further tried looking for files in the overrides folder containing the same vendor/productid (cat DisplayVendorID-*/* | grep 2245), but nothing's found, so it doesn't look like the display even has a current config file.

Command output

$ ruby patch-edid.rb
found display 'Philips 272P4?Lc': vendorid 16652, productid 2245, EDID:
00ffffffffffff00410cc5083005000011170103803c22782a8e05ad4f33b0260d5054bd4b00d100d1c08180950f9500b30081c0a940565e00a0a0a029503020350055502100001e000000ff0041553431333137303031333238000000fc005068696c697073203237325034000000fd00174c0f631e000a2020202020200139020324744f010203050607101112131415161f04230907078301000067030c001000983c023a80d072382d40102c9680565021000018011d8018711c1620582c250056502100009e011d80d0721c1620102c258056502100009e011d00bc52d01e20b828554056502100001e8c0ad090204031200c40550056502100001800ae
Setting color support to RGB 4:4:4 only
Number of extension blocks: 1
removing extension block

Recalculated checksum: 0x42
new EDID:
00FFFFFFFFFFFF00410CC5083005000011170103803C2278228E05AD4F33B0260D5054BD4B00D100D1C08180950F9500B30081C0A940565E00A0A0A029503020350055502100001E000000FF0041553431333137303031333238000000FC005068696C697073203237325034000000FD00174C0F631E000A2020202020200042

Content of DisplayVendorID-410c/DisplayProductID-8c5

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>DisplayProductName</key>
  <string>Philips 272P4?Lc - forced RGB mode (EDID override)</string>
  <key>IODisplayEDID</key>
  <data>AP///////wBBDMUIMAUAABEXAQOAPCJ4Io4FrU8zsCYNUFS9SwDRANHAgYCV
D5UAswCBwKlAVl4AoKCgKVAwIDUAVVAhAAAeAAAA/wBBVTQxMzE3MDAxMzI4
AAAA/ABQaGlsaXBzIDI3MlA0AAAA/QAXTA9jHgAKICAgICAgAEI=
</data>
  <key>DisplayVendorID</key>
  <integer>16652</integer>
  <key>DisplayProductID</key>
  <integer>2245</integer>
</dict>
</plist>%

jkgeyti commented Oct 16, 2015

Doesn't seem to work for me, despite working on yosemite.

With my laptop lid down, and the external display connected, a single folder is created by the script, and the display name of the monitor is correct (see below for file content). However, no folder of the same name exists in /System/Library/Displays/Contents/Resources/Overrides, and simply copying the generated folder has to there, has no effect.

I've tried various combinations of restarting with and without "rootless" mode enabled, unhooking and reseating hdmi cable, tried changing ownership of the produced folder and file to root:wheel like the rest of the folders in .../Overrides, but nothing seems to work.

I've further tried looking for files in the overrides folder containing the same vendor/productid (cat DisplayVendorID-*/* | grep 2245), but nothing's found, so it doesn't look like the display even has a current config file.

Command output

$ ruby patch-edid.rb
found display 'Philips 272P4?Lc': vendorid 16652, productid 2245, EDID:
00ffffffffffff00410cc5083005000011170103803c22782a8e05ad4f33b0260d5054bd4b00d100d1c08180950f9500b30081c0a940565e00a0a0a029503020350055502100001e000000ff0041553431333137303031333238000000fc005068696c697073203237325034000000fd00174c0f631e000a2020202020200139020324744f010203050607101112131415161f04230907078301000067030c001000983c023a80d072382d40102c9680565021000018011d8018711c1620582c250056502100009e011d80d0721c1620102c258056502100009e011d00bc52d01e20b828554056502100001e8c0ad090204031200c40550056502100001800ae
Setting color support to RGB 4:4:4 only
Number of extension blocks: 1
removing extension block

Recalculated checksum: 0x42
new EDID:
00FFFFFFFFFFFF00410CC5083005000011170103803C2278228E05AD4F33B0260D5054BD4B00D100D1C08180950F9500B30081C0A940565E00A0A0A029503020350055502100001E000000FF0041553431333137303031333238000000FC005068696C697073203237325034000000FD00174C0F631E000A2020202020200042

Content of DisplayVendorID-410c/DisplayProductID-8c5

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>DisplayProductName</key>
  <string>Philips 272P4?Lc - forced RGB mode (EDID override)</string>
  <key>IODisplayEDID</key>
  <data>AP///////wBBDMUIMAUAABEXAQOAPCJ4Io4FrU8zsCYNUFS9SwDRANHAgYCV
D5UAswCBwKlAVl4AoKCgKVAwIDUAVVAhAAAeAAAA/wBBVTQxMzE3MDAxMzI4
AAAA/ABQaGlsaXBzIDI3MlA0AAAA/QAXTA9jHgAKICAgICAgAEI=
</data>
  <key>DisplayVendorID</key>
  <integer>16652</integer>
  <key>DisplayProductID</key>
  <integer>2245</integer>
</dict>
</plist>%
@jkgeyti

This comment has been minimized.

Show comment
Hide comment
@jkgeyti

jkgeyti Oct 16, 2015

I just realised what the problem was for me. I hope this will be useful for others.

Opening the produced config file in nano showed the device name has a bunch of "unsupported" characters (<string>Philips 272P4^@^@^@�^@^WL^Oc^^^@ - forced RGB mode (EDID override)</string>). I replaced it with Philips 272P4 - forced RGB mode (EDID override), saved, unplugged and reseated the hdmi cable, and success!

Maybe it was worth adding a line to the script that strips all non-alphanumeric characters from the display name?

jkgeyti commented Oct 16, 2015

I just realised what the problem was for me. I hope this will be useful for others.

Opening the produced config file in nano showed the device name has a bunch of "unsupported" characters (<string>Philips 272P4^@^@^@�^@^WL^Oc^^^@ - forced RGB mode (EDID override)</string>). I replaced it with Philips 272P4 - forced RGB mode (EDID override), saved, unplugged and reseated the hdmi cable, and success!

Maybe it was worth adding a line to the script that strips all non-alphanumeric characters from the display name?

@Bokajip1

This comment has been minimized.

Show comment
Hide comment
@Bokajip1

Bokajip1 Oct 20, 2015

Is it possible that I have done something wrong? The script dosen't seems to work, even though the screen settings says otherwise?

skaermbillede 2015-10-20 kl 15 14 41

skaermbillede 2015-10-20 kl 15 18 11

Bokajip1 commented Oct 20, 2015

Is it possible that I have done something wrong? The script dosen't seems to work, even though the screen settings says otherwise?

skaermbillede 2015-10-20 kl 15 14 41

skaermbillede 2015-10-20 kl 15 18 11

@tnavarroschroeder

This comment has been minimized.

Show comment
Hide comment
@tnavarroschroeder

tnavarroschroeder Oct 24, 2015

I encounter this problem: The ruby script doesn't write out a folder (or file) on El Capitan 10.11.1 despite disabling SIP. The script is located in my home (~) folder. From there I execute it (e.g. 'sudo ruby patch-edid.rb') without any error message. Any ideas?

tnavarroschroeder commented Oct 24, 2015

I encounter this problem: The ruby script doesn't write out a folder (or file) on El Capitan 10.11.1 despite disabling SIP. The script is located in my home (~) folder. From there I execute it (e.g. 'sudo ruby patch-edid.rb') without any error message. Any ideas?

@TaiSHiNet

This comment has been minimized.

Show comment
Hide comment
@TaiSHiNet

TaiSHiNet Oct 26, 2015

@tnavarroschroeder the file is created on the same folder you're running the script from, you have to move it after to the Override directory

TaiSHiNet commented Oct 26, 2015

@tnavarroschroeder the file is created on the same folder you're running the script from, you have to move it after to the Override directory

@tiny-kittyfeet

This comment has been minimized.

Show comment
Hide comment
@tiny-kittyfeet

tiny-kittyfeet Oct 27, 2015

Hi, I encounter the same problem as “tnavarroschroeder : The script doesn't generate anything, neither a file nor a folder. Any help here is much appreciated!

tiny-kittyfeet commented Oct 27, 2015

Hi, I encounter the same problem as “tnavarroschroeder : The script doesn't generate anything, neither a file nor a folder. Any help here is much appreciated!

@tigranpetrossian

This comment has been minimized.

Show comment
Hide comment
@tigranpetrossian

tigranpetrossian Oct 27, 2015

Didn't work on El Capitan Asus MS238, although settings are applied (shows up in display info). Can it be that some vendors are just not supported?

tigranpetrossian commented Oct 27, 2015

Didn't work on El Capitan Asus MS238, although settings are applied (shows up in display info). Can it be that some vendors are just not supported?

@Nakilon

This comment has been minimized.

Show comment
Hide comment
@Nakilon

Nakilon Oct 28, 2015

I've generated folder with file for my Dell P2416D, moved them where I had to, chowned to root:wheel.
When I reboot, I see in monitor settings window to have the title "EDID overrided", so the file probably works, but 1920 is still the largest resolution I can choose even with Option key, while it has to support 2560.

Nakilon commented Oct 28, 2015

I've generated folder with file for my Dell P2416D, moved them where I had to, chowned to root:wheel.
When I reboot, I see in monitor settings window to have the title "EDID overrided", so the file probably works, but 1920 is still the largest resolution I can choose even with Option key, while it has to support 2560.

@alexMmKoenig

This comment has been minimized.

Show comment
Hide comment
@alexMmKoenig

alexMmKoenig Nov 3, 2015

Thanks to @jkgeyti this totally helped with Philips 272C4.

alexMmKoenig commented Nov 3, 2015

Thanks to @jkgeyti this totally helped with Philips 272C4.

@Jusung

This comment has been minimized.

Show comment
Hide comment
@Jusung

Jusung Nov 5, 2015

Hi, I encounter the same problem as @tnavarroschroeder and @tiny-kittyfeet : The script doesn't generate anything, neither a file nor a folder. Any help here is much appreciated!

Jusung commented Nov 5, 2015

Hi, I encounter the same problem as @tnavarroschroeder and @tiny-kittyfeet : The script doesn't generate anything, neither a file nor a folder. Any help here is much appreciated!

@majorsl

This comment has been minimized.

Show comment
Hide comment
@majorsl

majorsl Nov 18, 2015

Works great on an Acer K272HUL. For those stuck in 1920x1080 you might have to go HDMI to HDMI (Mac mini Late 2014 like me) or for a MacBook/Older mini with just Thunderbolt you'll probably need Mini DisplayPort to HDMI (no adapter in between).

majorsl commented Nov 18, 2015

Works great on an Acer K272HUL. For those stuck in 1920x1080 you might have to go HDMI to HDMI (Mac mini Late 2014 like me) or for a MacBook/Older mini with just Thunderbolt you'll probably need Mini DisplayPort to HDMI (no adapter in between).

@djacobow

This comment has been minimized.

Show comment
Hide comment
@djacobow

djacobow Nov 25, 2015

You're a hero. Worked no problem with Dell U3014 on 10.10.5.

djacobow commented Nov 25, 2015

You're a hero. Worked no problem with Dell U3014 on 10.10.5.

@ye

This comment has been minimized.

Show comment
Hide comment
@ye

ye Dec 11, 2015

I have an Acer K272HUL 27inch WQHD (2560x1440) monitor and it suffered the same issue that OS X couldn't auto detect it as a monitor rather to consider it as a TV right out of the box.

This script worked wonders before (OS X Yosemite 10.10 and worked OS X El Capitan 10.11 El Capitan). After the OS X El Capitan 10.11.2, the screen degraded back to the YCbCr color space (TV mode). So I had to run this script again following the updated guide Force RGB mode in Mac OS X to fix the picture quality of an external monitor, the only real differences this time were to turn off System Integrity Protection, aka SIP, rootless mode before move the generated display profile and move it to a different path.

And it worked perfectly this time as well!
screen shot 2015-12-11 at 10 23 20 am

ye commented Dec 11, 2015

I have an Acer K272HUL 27inch WQHD (2560x1440) monitor and it suffered the same issue that OS X couldn't auto detect it as a monitor rather to consider it as a TV right out of the box.

This script worked wonders before (OS X Yosemite 10.10 and worked OS X El Capitan 10.11 El Capitan). After the OS X El Capitan 10.11.2, the screen degraded back to the YCbCr color space (TV mode). So I had to run this script again following the updated guide Force RGB mode in Mac OS X to fix the picture quality of an external monitor, the only real differences this time were to turn off System Integrity Protection, aka SIP, rootless mode before move the generated display profile and move it to a different path.

And it worked perfectly this time as well!
screen shot 2015-12-11 at 10 23 20 am

@yinghaochan

This comment has been minimized.

Show comment
Hide comment
@yinghaochan

yinghaochan Dec 26, 2015

is it possible to patch the EDID to only use RGB limited?

I have a display that looks like this:
image

yinghaochan commented Dec 26, 2015

is it possible to patch the EDID to only use RGB limited?

I have a display that looks like this:
image

@gordonfolio

This comment has been minimized.

Show comment
Hide comment
@gordonfolio

gordonfolio Jan 14, 2016

I am considering purchasing an Acer K272HUL, or a Dell UltraSharp U2715H. From what i have read, it would seem that both of these would require the forced rgb script to work properly. I have 2 questions. If i am using a dvi dual link to connect the monitor to the computer, will i still need to force rgb? ALSO, if i run this script would i be able to go back to an apple monitor, or is there some special thing that needs to be done to undo the changes made by the script?

gordonfolio commented Jan 14, 2016

I am considering purchasing an Acer K272HUL, or a Dell UltraSharp U2715H. From what i have read, it would seem that both of these would require the forced rgb script to work properly. I have 2 questions. If i am using a dvi dual link to connect the monitor to the computer, will i still need to force rgb? ALSO, if i run this script would i be able to go back to an apple monitor, or is there some special thing that needs to be done to undo the changes made by the script?

@nos1609

This comment has been minimized.

Show comment
Hide comment
@nos1609

nos1609 Feb 6, 2016

If anybody is planning using this patch in combination with pixel-clock patch one has to keep in mind, that prior using pixel-clock there is the need to remove any previous RGB patches.
Otherwise, you'll face a bootloop like this one
713224782_8838113412488990893

nos1609 commented Feb 6, 2016

If anybody is planning using this patch in combination with pixel-clock patch one has to keep in mind, that prior using pixel-clock there is the need to remove any previous RGB patches.
Otherwise, you'll face a bootloop like this one
713224782_8838113412488990893

@jgarcia

This comment has been minimized.

Show comment
Hide comment
@jgarcia

jgarcia Feb 19, 2016

I can finally the display at work 😻 , Thanks a lot for this !

jgarcia commented Feb 19, 2016

I can finally the display at work 😻 , Thanks a lot for this !

@narulasanam

This comment has been minimized.

Show comment
Hide comment
@narulasanam

narulasanam Mar 10, 2016

I am having the same problem as tnavarroschroeder. The script does not generate anything. I am trying this on HP 21.5 IPS display and OS X El Capitan version 10.11.3

narulasanam commented Mar 10, 2016

I am having the same problem as tnavarroschroeder. The script does not generate anything. I am trying this on HP 21.5 IPS display and OS X El Capitan version 10.11.3

@royrico

This comment has been minimized.

Show comment
Hide comment
@royrico

royrico Mar 12, 2016

Worked Great for me! Thank you

royrico commented Mar 12, 2016

Worked Great for me! Thank you

@jamphel

This comment has been minimized.

Show comment
Hide comment
@jamphel

jamphel Mar 20, 2016

Hi, Need help here, i have connected my Macbook Pro 13in to AOC desktop, but the contents displayed on the desktop is not standard, it looks stretched, I am not able to find the folder (DisplayVendorID-****), after executing ruby patch-edid.rb command in terminal. Tried sudo open /System/Library/Displays/Overrides, however the below message is displayed again.
The file /System/Library/Displays/Overrides does not exist. I really appreciate if anybody can find a solution and share it here.

jamphel commented Mar 20, 2016

Hi, Need help here, i have connected my Macbook Pro 13in to AOC desktop, but the contents displayed on the desktop is not standard, it looks stretched, I am not able to find the folder (DisplayVendorID-****), after executing ruby patch-edid.rb command in terminal. Tried sudo open /System/Library/Displays/Overrides, however the below message is displayed again.
The file /System/Library/Displays/Overrides does not exist. I really appreciate if anybody can find a solution and share it here.

@neuweiler

This comment has been minimized.

Show comment
Hide comment
@neuweiler

neuweiler Apr 2, 2016

Was able to copy the monitor file in El Capitan in recovery mode, no need to switch off SIP.
Found my Samsung Syncmaster 2494HS and also displays "forced RGB mode" but the picture still looks the same.. I checked before I applied the script output, the monitor was already in RGB mode.

neuweiler commented Apr 2, 2016

Was able to copy the monitor file in El Capitan in recovery mode, no need to switch off SIP.
Found my Samsung Syncmaster 2494HS and also displays "forced RGB mode" but the picture still looks the same.. I checked before I applied the script output, the monitor was already in RGB mode.

@nlpjoe

This comment has been minimized.

Show comment
Hide comment
@nlpjoe

nlpjoe Apr 5, 2016

Hi, I encounter the same problem as @tnavarroschroeder , @tiny-kittyfeet, @narulasanam and @Jusung : The script doesn't generate anything, neither a file nor a folder.I am trying this on SUMSUNG S24D590PL display and OS X El Capitan version 10.11.3 Any help here is much appreciated!

nlpjoe commented Apr 5, 2016

Hi, I encounter the same problem as @tnavarroschroeder , @tiny-kittyfeet, @narulasanam and @Jusung : The script doesn't generate anything, neither a file nor a folder.I am trying this on SUMSUNG S24D590PL display and OS X El Capitan version 10.11.3 Any help here is much appreciated!

@narulasanam

This comment has been minimized.

Show comment
Hide comment
@narulasanam

narulasanam May 13, 2016

I used HDMI and the picture quality is far better than VGA .

narulasanam commented May 13, 2016

I used HDMI and the picture quality is far better than VGA .

@bitbut

This comment has been minimized.

Show comment
Hide comment
@bitbut

bitbut Jun 3, 2016

Hi, i have the same problem of @tnavarroschroeder, @tiny-kittyfeet, @narulasanam and @Jusung , anyone can help me to fix ? :)

bitbut commented Jun 3, 2016

Hi, i have the same problem of @tnavarroschroeder, @tiny-kittyfeet, @narulasanam and @Jusung , anyone can help me to fix ? :)

@kuchlous

This comment has been minimized.

Show comment
Hide comment
@kuchlous

kuchlous Jun 7, 2016

I have connected a retina MBP 13'' to a Dell U2414H. Even after making changes suggested above the fonts look fuzzy, certainly compared to the iMAC and the same monitor connected to a windows machine. I have verified that the correct profile is being used and that the color profile is RGB but still no luck. Anything else I can try..

kuchlous commented Jun 7, 2016

I have connected a retina MBP 13'' to a Dell U2414H. Even after making changes suggested above the fonts look fuzzy, certainly compared to the iMAC and the same monitor connected to a windows machine. I have verified that the correct profile is being used and that the color profile is RGB but still no luck. Anything else I can try..

@Rapoli

This comment has been minimized.

Show comment
Hide comment
@Rapoli

Rapoli Jun 26, 2016

@BiggerGao @bitbut @tnavarroschroeder, @tiny-kittyfeet, @narulasanam and @Jusung
To all those having problem where no folder is created, I finally found the folder in my User folder as in /Users/[Account Username]
Seems that my terminal opens with that as default directory and so the folder was created there rather than in the root directory. Hope this helps for you too.

Rapoli commented Jun 26, 2016

@BiggerGao @bitbut @tnavarroschroeder, @tiny-kittyfeet, @narulasanam and @Jusung
To all those having problem where no folder is created, I finally found the folder in my User folder as in /Users/[Account Username]
Seems that my terminal opens with that as default directory and so the folder was created there rather than in the root directory. Hope this helps for you too.

@steveluoxin

This comment has been minimized.

Show comment
Hide comment
@steveluoxin

steveluoxin Jun 28, 2016

Hi! I also have the same problem as @tnavarroschroeder, my OSX is 10.11.4. Any help?

steveluoxin commented Jun 28, 2016

Hi! I also have the same problem as @tnavarroschroeder, my OSX is 10.11.4. Any help?

@steveluoxin

This comment has been minimized.

Show comment
Hide comment
@steveluoxin

steveluoxin Jun 28, 2016

@Rapoli
Isn't /Users/[Account Username] the same directory as home(~)? I tried to access it using Terminal, and it turned out to be the exactly same directory. Any hint? Thanks

steveluoxin commented Jun 28, 2016

@Rapoli
Isn't /Users/[Account Username] the same directory as home(~)? I tried to access it using Terminal, and it turned out to be the exactly same directory. Any hint? Thanks

@Mikii67

This comment has been minimized.

Show comment
Hide comment
@Mikii67

Mikii67 Jul 26, 2016

This works fine with my Viera Panasonic TV connected to a mini display port to HDMI adapter. However, the patch does not "hold", and after a couple of reboots I have to install it again. Any suggestions or ideas why?

Thank you!

Mikii67 commented Jul 26, 2016

This works fine with my Viera Panasonic TV connected to a mini display port to HDMI adapter. However, the patch does not "hold", and after a couple of reboots I have to install it again. Any suggestions or ideas why?

Thank you!

@cheynewallace

This comment has been minimized.

Show comment
Hide comment
@cheynewallace

cheynewallace Sep 7, 2016

I've used this script on a few different machines with success in the past, but im having a hard time trying to get it working with my ACER Predator XB271HU. I run the script, place the files in the right path and reboot, my machine starts and the colors look much better, how ever the resolution is off. I get a max res of 1024x768. When I try to change the resolution or force one with SwitchResX the screen goes black and I have to reboot my machine in safe mode to reset it. The only resolution it can display is 1024x768. My screen is a 1440p screen.

I remove the override, reboot and my resolution comes back but my colors and contrast suck again. So, it LOOKS like the script is working, but its doing something to the resolution options.

Does anyone know how to fix this at all?

cheynewallace commented Sep 7, 2016

I've used this script on a few different machines with success in the past, but im having a hard time trying to get it working with my ACER Predator XB271HU. I run the script, place the files in the right path and reboot, my machine starts and the colors look much better, how ever the resolution is off. I get a max res of 1024x768. When I try to change the resolution or force one with SwitchResX the screen goes black and I have to reboot my machine in safe mode to reset it. The only resolution it can display is 1024x768. My screen is a 1440p screen.

I remove the override, reboot and my resolution comes back but my colors and contrast suck again. So, it LOOKS like the script is working, but its doing something to the resolution options.

Does anyone know how to fix this at all?

@fransheemskerk

This comment has been minimized.

Show comment
Hide comment
@fransheemskerk

fransheemskerk Sep 12, 2016

Hello, this script has helped me wonderfully for two years on Yosemite. Now I upgraded to El Capitain 10.11.6 and reinstalling it gives me problems. The terminal gives an error after entering ruby patch-edid.rb.

Last login: Mon Sep 12 13:39:03 on console
Franss-Mac-mini:~ FransMacMini$ ruby patch-edid.rb
patch-edid.rb:1: invalid multibyte char (UTF-8)
Franss-Mac-mini:~ FransMacMini$ ruby patch-edid.rb
patch-edid.rb:9:in scan': invalid byte sequence in UTF-8 (ArgumentError) from patch-edid.rb:9:in

'

No file is created. Can anyone help me with this? Many thanks, Frans

fransheemskerk commented Sep 12, 2016

Hello, this script has helped me wonderfully for two years on Yosemite. Now I upgraded to El Capitain 10.11.6 and reinstalling it gives me problems. The terminal gives an error after entering ruby patch-edid.rb.

Last login: Mon Sep 12 13:39:03 on console
Franss-Mac-mini:~ FransMacMini$ ruby patch-edid.rb
patch-edid.rb:1: invalid multibyte char (UTF-8)
Franss-Mac-mini:~ FransMacMini$ ruby patch-edid.rb
patch-edid.rb:9:in scan': invalid byte sequence in UTF-8 (ArgumentError) from patch-edid.rb:9:in

'

No file is created. Can anyone help me with this? Many thanks, Frans

@fransheemskerk

This comment has been minimized.

Show comment
Hide comment

fransheemskerk commented Sep 12, 2016

@fransheemskerk

This comment has been minimized.

Show comment
Hide comment
@fransheemskerk

fransheemskerk Sep 12, 2016

Hi,

I thought I would share my experience and solution now that I have been through this several times. I have even got it working on Mavericks and El Capitan.
My solution is for El Capitan. It is a combination of several things I have found on the internet. All I know is that it worked for me. Hopefully it will work for you as well. I am no fan of mucking about with security settings, but it was the only way I found that allowed me to copy the folder to the right directory. Please note that in El Capitan the folder is different to the original "recipe".

  1. Shut down the MAC
  2. Start up the MAC holding the keys Command-R until the apple appears
  3. When possible go to menu Utilities and select Terminal
  4. In the Terminal window type csrutil disable -This disables the apple protection of system files and folders (normally NOT recommended!)
  5. Reboot
  6. Download http://www.mediafire.com/?fdz29bgsg3zm653
  7. Unarchive it
  8. In the Finder, go to (using cmd-shift-G) the directory /System/Library/Displays/Contents/Resources/Overrides - (note - this is for El Capitan!)
  9. Place the entire directory you unarchived in step 6 (DisplayVendorID-410c) in the directory /System/Library/Displays/Contents/Resources/Overrides
  10. Shut down
  11. Start up the MAC holding the keys Command-R until the apple appears
  12. When possible go to menu Utilities and select Terminal
  13. In the Terminal window type csrutil enable This enables apple protection - DON'T FORGET THIS STEP!
  14. Reboot
  15. Hopefully enjoy non-inverted viewing...

I really hope I haven't forgotten anything. Please use these steps at your own risk. I am no expert. This has worked for me, that's all...

fransheemskerk commented Sep 12, 2016

Hi,

I thought I would share my experience and solution now that I have been through this several times. I have even got it working on Mavericks and El Capitan.
My solution is for El Capitan. It is a combination of several things I have found on the internet. All I know is that it worked for me. Hopefully it will work for you as well. I am no fan of mucking about with security settings, but it was the only way I found that allowed me to copy the folder to the right directory. Please note that in El Capitan the folder is different to the original "recipe".

  1. Shut down the MAC
  2. Start up the MAC holding the keys Command-R until the apple appears
  3. When possible go to menu Utilities and select Terminal
  4. In the Terminal window type csrutil disable -This disables the apple protection of system files and folders (normally NOT recommended!)
  5. Reboot
  6. Download http://www.mediafire.com/?fdz29bgsg3zm653
  7. Unarchive it
  8. In the Finder, go to (using cmd-shift-G) the directory /System/Library/Displays/Contents/Resources/Overrides - (note - this is for El Capitan!)
  9. Place the entire directory you unarchived in step 6 (DisplayVendorID-410c) in the directory /System/Library/Displays/Contents/Resources/Overrides
  10. Shut down
  11. Start up the MAC holding the keys Command-R until the apple appears
  12. When possible go to menu Utilities and select Terminal
  13. In the Terminal window type csrutil enable This enables apple protection - DON'T FORGET THIS STEP!
  14. Reboot
  15. Hopefully enjoy non-inverted viewing...

I really hope I haven't forgotten anything. Please use these steps at your own risk. I am no expert. This has worked for me, that's all...

@fjwillemsen

This comment has been minimized.

Show comment
Hide comment
@fjwillemsen

fjwillemsen Sep 21, 2016

Sadly, the release version os macOS Sierra doesn't seem to work with this method @fransheemskerk. I just updated and followed your steps, but my display is still identified as a television (Acer S277HK). Any ideas?

fjwillemsen commented Sep 21, 2016

Sadly, the release version os macOS Sierra doesn't seem to work with this method @fransheemskerk. I just updated and followed your steps, but my display is still identified as a television (Acer S277HK). Any ideas?

@neilcoplin

This comment has been minimized.

Show comment
Hide comment
@neilcoplin

neilcoplin Sep 21, 2016

screen shot 2016-09-21 at 4 19 05 pm
@fjwillemsen - Check the file that it generates (inside the folder) to see if there is any malformed strings. I just went through it with Sierra and had to remove some non-standard characters from inside the XML tags to get the file to be read properly. It really doesn't matter what you change it to, as it's just the name of the monitor profile that is in that tag. Though once I did that, it follows the same instructions as above for El Capitan.

neilcoplin commented Sep 21, 2016

screen shot 2016-09-21 at 4 19 05 pm
@fjwillemsen - Check the file that it generates (inside the folder) to see if there is any malformed strings. I just went through it with Sierra and had to remove some non-standard characters from inside the XML tags to get the file to be read properly. It really doesn't matter what you change it to, as it's just the name of the monitor profile that is in that tag. Though once I did that, it follows the same instructions as above for El Capitan.

@keirthomas

This comment has been minimized.

Show comment
Hide comment
@keirthomas

keirthomas Sep 26, 2016

To download the script on Sierra, click the RAW button at the top right. Then highlight everything, and copy it. In terminal, type

pbaste > script

Then to run the script after you've disabled system protection, type

ruby script

keirthomas commented Sep 26, 2016

To download the script on Sierra, click the RAW button at the top right. Then highlight everything, and copy it. In terminal, type

pbaste > script

Then to run the script after you've disabled system protection, type

ruby script

@JohnPrall

This comment has been minimized.

Show comment
Hide comment
@JohnPrall

JohnPrall Sep 26, 2016

@keirthomas - I followed your instructions above with Sierra and it didn't work for me. It is limiting the monitor to 1280x1024, basically half of it's resolution. Any thoughts on why this might be happening?

JohnPrall commented Sep 26, 2016

@keirthomas - I followed your instructions above with Sierra and it didn't work for me. It is limiting the monitor to 1280x1024, basically half of it's resolution. Any thoughts on why this might be happening?

@bjornerstedt

This comment has been minimized.

Show comment
Hide comment
@bjornerstedt

bjornerstedt Oct 10, 2016

Everything worked util I upgraded to Sierra. Now I get the the same results as @JohnPrall.

bjornerstedt commented Oct 10, 2016

Everything worked util I upgraded to Sierra. Now I get the the same results as @JohnPrall.

@krs013

This comment has been minimized.

Show comment
Hide comment
@krs013

krs013 Oct 27, 2016

Same as the last two comments--it works, but at half the resolution. There might be an additional setting in the bytes that gives the resolution of the screen, but the default values must have changed since Sierra. Reverting for now, but I'll keep an eye on this.

krs013 commented Oct 27, 2016

Same as the last two comments--it works, but at half the resolution. There might be an additional setting in the bytes that gives the resolution of the screen, but the default values must have changed since Sierra. Reverting for now, but I'll keep an eye on this.

@DClark5218

This comment has been minimized.

Show comment
Hide comment
@DClark5218

DClark5218 Nov 22, 2016

I've done this before on my old laptop and it worked perfectly. Now, after buying the new Macbook Pro with Sierra, I am getting the same issue as @JohnPrall and subsequent people. If anyone finds a fix, please let us know!

DClark5218 commented Nov 22, 2016

I've done this before on my old laptop and it worked perfectly. Now, after buying the new Macbook Pro with Sierra, I am getting the same issue as @JohnPrall and subsequent people. If anyone finds a fix, please let us know!

@DClark5218

This comment has been minimized.

Show comment
Hide comment
@DClark5218

DClark5218 Nov 23, 2016

Yo guys on Sierra. Fixed it. Go here: https://comsysto.github.io/Display-Override-PropertyList-File-Parser-and-Generator-with-HiDPI-Support-For-Scaled-Resolutions/ add in your monitor resolution to the generated file. Works like a charm! 👍

DClark5218 commented Nov 23, 2016

Yo guys on Sierra. Fixed it. Go here: https://comsysto.github.io/Display-Override-PropertyList-File-Parser-and-Generator-with-HiDPI-Support-For-Scaled-Resolutions/ add in your monitor resolution to the generated file. Works like a charm! 👍

@LockonS

This comment has been minimized.

Show comment
Hide comment
@LockonS

LockonS Nov 23, 2016

@DClark5218 - I followed the instructions on the page you provided. But actually nothing changed when I place the generated file in the target directory. I am using Sierra 10.12.1 and the monitor is Dell U2525H.

LockonS commented Nov 23, 2016

@DClark5218 - I followed the instructions on the page you provided. But actually nothing changed when I place the generated file in the target directory. I am using Sierra 10.12.1 and the monitor is Dell U2525H.

@igorescodro

This comment has been minimized.

Show comment
Hide comment
@igorescodro

igorescodro Nov 24, 2016

@LockonS - I found this another gist and it worked in macOS Sierra (MBP Late 2012) with my Dell 2317H.
https://gist.github.com/mauricerkelly/d7d3a0ca3049e9f24415
Get that "patch-edid.rb" and run it in similar way of this in this gist (only external monitor connected).
Hope it work for you all!

igorescodro commented Nov 24, 2016

@LockonS - I found this another gist and it worked in macOS Sierra (MBP Late 2012) with my Dell 2317H.
https://gist.github.com/mauricerkelly/d7d3a0ca3049e9f24415
Get that "patch-edid.rb" and run it in similar way of this in this gist (only external monitor connected).
Hope it work for you all!

@carlditzler

This comment has been minimized.

Show comment
Hide comment
@carlditzler

carlditzler Dec 27, 2016

Confirmed script works with Sierra and an ASUS MX259; followed suggestions from Marcus to not disable SIP

carlditzler commented Dec 27, 2016

Confirmed script works with Sierra and an ASUS MX259; followed suggestions from Marcus to not disable SIP

@allankikkas

This comment has been minimized.

Show comment
Hide comment
@allankikkas

allankikkas Jan 8, 2017

Sierra users - to run this ruby script please make sure that your ruby is actually working. Coming from behind 4 osx upgrades my ruby did not, so this script did not work, nor give out any meaningful errors withing 5 minutes of looping. Just type in terminal "ruby -v" to see if it respons. If not, reinstall/fix ruby and it will work.

allankikkas commented Jan 8, 2017

Sierra users - to run this ruby script please make sure that your ruby is actually working. Coming from behind 4 osx upgrades my ruby did not, so this script did not work, nor give out any meaningful errors withing 5 minutes of looping. Just type in terminal "ruby -v" to see if it respons. If not, reinstall/fix ruby and it will work.

@NotEnigma

This comment has been minimized.

Show comment
Hide comment
@NotEnigma

NotEnigma Jan 12, 2017

How I can modify the script to keep the refresh rate at 144hz ?

NotEnigma commented Jan 12, 2017

How I can modify the script to keep the refresh rate at 144hz ?

@bakoushin

This comment has been minimized.

Show comment
Hide comment
@bakoushin

bakoushin May 16, 2017

Works like a charm with MacBook Air (13-inch, Mid 2011), El Capitan 10.11.6, DELL U2410
Thank you!

bakoushin commented May 16, 2017

Works like a charm with MacBook Air (13-inch, Mid 2011), El Capitan 10.11.6, DELL U2410
Thank you!

@dorienh

This comment has been minimized.

Show comment
Hide comment
@dorienh

dorienh Sep 4, 2017

This did not generate anything on my Sierra.

I ran the first command of the file and I noticed there isn't an IODisplayEID in there. Wonder if that has anything to do with it:

ioreg -l -d0 -w 0 -r -c AppleDisplay

+-o AppleDisplay  <class AppleDisplay, id 0x1000007b0, registered, matched, active, busy 0 (0 ms), retain 8>
    {
      "IOClass" = "AppleDisplay"
      "CFBundleIdentifier" = "com.apple.iokit.IOGraphicsFamily"
      "IOProviderClass" = "IODisplayConnect"
      "DisplayProductID" = 1815
      "IOPowerManagement" = {"CapabilityFlags"=49152,"MaxPowerState"=3,"CurrentPowerState"=3}
      "IODisplayPrefsKey" = "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/IGPU@2/AppleIntelFramebuffer@1/display0/AppleDisplay-756e6b6e-717"
      "IODisplayParameters" = {"bgsc"={"min"=0,"max"=65536,"value"=65536},"rgsc"={"min"=0,"max"=65536,"value"=65536},"cmod"={"min"=0,"max"=4096,"value"=1},"ggsc"={"min"=0,"max"=65536,"value"=65536},"cyuv"={"min"=0,"max"=268435456,"value"=268435456},"vblm"={"min"=0,"max"=196608,"value"=65536},"gsc "={"min"=0,"max"=65536,"value"=65536},"colr"={"min"=0,"max"=18446744073709551615,"value"=257}}
      "IOProbeScore" = 2000
      "IOMatchCategory" = "IODefaultMatchCategory"
      "IODisplayConnectFlags" = <00000000>
      "DisplayVendorID" = 1970170734
      "DisplaySerialNumber" = 0
    }
    

dorienh commented Sep 4, 2017

This did not generate anything on my Sierra.

I ran the first command of the file and I noticed there isn't an IODisplayEID in there. Wonder if that has anything to do with it:

ioreg -l -d0 -w 0 -r -c AppleDisplay

+-o AppleDisplay  <class AppleDisplay, id 0x1000007b0, registered, matched, active, busy 0 (0 ms), retain 8>
    {
      "IOClass" = "AppleDisplay"
      "CFBundleIdentifier" = "com.apple.iokit.IOGraphicsFamily"
      "IOProviderClass" = "IODisplayConnect"
      "DisplayProductID" = 1815
      "IOPowerManagement" = {"CapabilityFlags"=49152,"MaxPowerState"=3,"CurrentPowerState"=3}
      "IODisplayPrefsKey" = "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/IGPU@2/AppleIntelFramebuffer@1/display0/AppleDisplay-756e6b6e-717"
      "IODisplayParameters" = {"bgsc"={"min"=0,"max"=65536,"value"=65536},"rgsc"={"min"=0,"max"=65536,"value"=65536},"cmod"={"min"=0,"max"=4096,"value"=1},"ggsc"={"min"=0,"max"=65536,"value"=65536},"cyuv"={"min"=0,"max"=268435456,"value"=268435456},"vblm"={"min"=0,"max"=196608,"value"=65536},"gsc "={"min"=0,"max"=65536,"value"=65536},"colr"={"min"=0,"max"=18446744073709551615,"value"=257}}
      "IOProbeScore" = 2000
      "IOMatchCategory" = "IODefaultMatchCategory"
      "IODisplayConnectFlags" = <00000000>
      "DisplayVendorID" = 1970170734
      "DisplaySerialNumber" = 0
    }
    
@hsleep

This comment has been minimized.

Show comment
Hide comment
@hsleep

hsleep Sep 26, 2017

This script works well in High Sierra.

Used model:

  • DELL U2913WM + MacBook Pro (15-inch, 2016)

hsleep commented Sep 26, 2017

This script works well in High Sierra.

Used model:

  • DELL U2913WM + MacBook Pro (15-inch, 2016)
@mb21

This comment has been minimized.

Show comment
Hide comment
@mb21

mb21 Oct 21, 2017

Worked for me as well in High Sierra for HP LP2475w by adding the generated file to the folder (not replacing the folder):

  1. Copy patch-edid.rb to your home directory and run in. This should generate a new directory in your home dir.

  2. Boot into recovery mode (Command+R). If your disk is encrypted, mount in using the already opened Disk Utility GUI.
    Then start Terminal from the Utilities menu. Your root drive will be mounted under /Volumes/Macintosh HD in writeable mode even without System Integrity Protection disabled.

  3. Copy contents of generated directory over (maybe back up existing directory if it exists, or create it if it doesn't):

     cp ~/DisplayVendorId-22f0/* /Volumes/ Macintosh\ HD/System/Library/Displays/Contents/Resources/Overrides/
    
  4. Reboot.

mb21 commented Oct 21, 2017

Worked for me as well in High Sierra for HP LP2475w by adding the generated file to the folder (not replacing the folder):

  1. Copy patch-edid.rb to your home directory and run in. This should generate a new directory in your home dir.

  2. Boot into recovery mode (Command+R). If your disk is encrypted, mount in using the already opened Disk Utility GUI.
    Then start Terminal from the Utilities menu. Your root drive will be mounted under /Volumes/Macintosh HD in writeable mode even without System Integrity Protection disabled.

  3. Copy contents of generated directory over (maybe back up existing directory if it exists, or create it if it doesn't):

     cp ~/DisplayVendorId-22f0/* /Volumes/ Macintosh\ HD/System/Library/Displays/Contents/Resources/Overrides/
    
  4. Reboot.

@chrisk1

This comment has been minimized.

Show comment
Hide comment
@chrisk1

chrisk1 Nov 20, 2017

Worked for me again in High Sierra (the update from Sierra reset my previously working settings) - thank you very much. Good extra instructions from @mb21 about mounting the encrypted drive in Disk Utility.

chrisk1 commented Nov 20, 2017

Worked for me again in High Sierra (the update from Sierra reset my previously working settings) - thank you very much. Good extra instructions from @mb21 about mounting the encrypted drive in Disk Utility.

@mathiasqvist

This comment has been minimized.

Show comment
Hide comment
@mathiasqvist

mathiasqvist Dec 3, 2017

High Sierra here, still don't work for me, and I followed @mb21 instructions too. Wondering if I should return my screen, or maybe try a displayport cabel?
I really can't get used to these blurred fonts, looks horrible in generel, especially in Facebook chats and smaller text etc. Every time i reboot, my mac also starts the "ColorSync help", anyone knows what to do?

Got the 2016 mbp, and dell u2417h.

mathiasqvist commented Dec 3, 2017

High Sierra here, still don't work for me, and I followed @mb21 instructions too. Wondering if I should return my screen, or maybe try a displayport cabel?
I really can't get used to these blurred fonts, looks horrible in generel, especially in Facebook chats and smaller text etc. Every time i reboot, my mac also starts the "ColorSync help", anyone knows what to do?

Got the 2016 mbp, and dell u2417h.

@fuzunspm

This comment has been minimized.

Show comment
Hide comment
@fuzunspm

fuzunspm Dec 5, 2017

my monitor is capable of 10-bit color space but after this patch it says it's on 24-Bit Color (ARGB8888). How do i fix it?

fuzunspm commented Dec 5, 2017

my monitor is capable of 10-bit color space but after this patch it says it's on 24-Bit Color (ARGB8888). How do i fix it?

@littlewey

This comment has been minimized.

Show comment
Hide comment
@littlewey

littlewey Dec 13, 2017

mid 2014 rMBP with Dell u2417h worked like a charm.
@mathiasqvist
Try as below.

  1. make your macOS rootless off: reboot macOS with Command+R pressed, thus to enter recovery mode, open terminal from Utilities, give command csrutil disable , you will see Successfully disabled System Integrity Protection
  2. Run this ruby script, got generated folder
  3. sudo cp -R DisplayVendorID-* /System/Library/Displays/Contents/Resources/Overrides/
  4. unplug the cable, replug it.
    Wa-lah~~

littlewey commented Dec 13, 2017

mid 2014 rMBP with Dell u2417h worked like a charm.
@mathiasqvist
Try as below.

  1. make your macOS rootless off: reboot macOS with Command+R pressed, thus to enter recovery mode, open terminal from Utilities, give command csrutil disable , you will see Successfully disabled System Integrity Protection
  2. Run this ruby script, got generated folder
  3. sudo cp -R DisplayVendorID-* /System/Library/Displays/Contents/Resources/Overrides/
  4. unplug the cable, replug it.
    Wa-lah~~
@andsimakov

This comment has been minimized.

Show comment
Hide comment
@andsimakov

andsimakov Dec 30, 2017

Unfortunately does not work with macOS 10.13.2 + MacBook Pro MPTV2 USB-C > Dell U2718Q DP. :( Still 30-Bit Color (ARGB2101010). Same is for internal display. Is it normal?

UPD. After discovering Macrumors it seems 30 bit as ARGB2101010 is obviously better than 32-Bit Color as ARGB8888. 30 bit does not takes alpha into account. Thus it does not need override.

andsimakov commented Dec 30, 2017

Unfortunately does not work with macOS 10.13.2 + MacBook Pro MPTV2 USB-C > Dell U2718Q DP. :( Still 30-Bit Color (ARGB2101010). Same is for internal display. Is it normal?

UPD. After discovering Macrumors it seems 30 bit as ARGB2101010 is obviously better than 32-Bit Color as ARGB8888. 30 bit does not takes alpha into account. Thus it does not need override.

@joelmartin

This comment has been minimized.

Show comment
Hide comment
@joelmartin

joelmartin Jan 3, 2018

Works on mbpro late 2016 touch bar and dell u2410 connected via apple dongle(usb-c,hdmi,usb3) -> hdmi, but after upgrade to high sierra and re-applying now computer gets stuck rebooting if the monitor is plugged in during reboot. not the worst hassle of all but it didn't have that issue under sierra

joelmartin commented Jan 3, 2018

Works on mbpro late 2016 touch bar and dell u2410 connected via apple dongle(usb-c,hdmi,usb3) -> hdmi, but after upgrade to high sierra and re-applying now computer gets stuck rebooting if the monitor is plugged in during reboot. not the worst hassle of all but it didn't have that issue under sierra

@levivel

This comment has been minimized.

Show comment
Hide comment
@levivel

levivel Jan 8, 2018

In case anyone was looking for this, I believe that this script's permissions can be modified if you wanted. And I think, also, Mac OS X's or macOS's System Integrity Protection is supposed to be disabled by entering from the Terminal of the system's or internet's Recovery Mode (CMD+R or CMD+OPT+R) with 'csrutil disable; reboot;' -- which can be confirmed with 'csrutil status'.
I'm not sure, but I think 'chmod +x ~/patch-edid.rb' were the permissions you'd enter if you wanted it to become an executable script. Also, for what it's worth I believe this script as of Jan. 6 2018 wouldn't work due to a newer macOS naming or directory conventions for the DisplayVendorID portions of this script.

levivel commented Jan 8, 2018

In case anyone was looking for this, I believe that this script's permissions can be modified if you wanted. And I think, also, Mac OS X's or macOS's System Integrity Protection is supposed to be disabled by entering from the Terminal of the system's or internet's Recovery Mode (CMD+R or CMD+OPT+R) with 'csrutil disable; reboot;' -- which can be confirmed with 'csrutil status'.
I'm not sure, but I think 'chmod +x ~/patch-edid.rb' were the permissions you'd enter if you wanted it to become an executable script. Also, for what it's worth I believe this script as of Jan. 6 2018 wouldn't work due to a newer macOS naming or directory conventions for the DisplayVendorID portions of this script.

@doplumi

This comment has been minimized.

Show comment
Hide comment
@doplumi

doplumi Jan 13, 2018

@levivel seems like it can be easily patched. Care to elaborate on what the changes have been?

doplumi commented Jan 13, 2018

@levivel seems like it can be easily patched. Care to elaborate on what the changes have been?

@rogercrocha

This comment has been minimized.

Show comment
Hide comment
@rogercrocha

rogercrocha Jan 21, 2018

I was unable to get my ASUS XB241YU working with the script. Not only do I get less resolution options shown, but the "1920 x 1080" that used to work as "1080p" doesn't work now. Can somebody help me? Here's the EDID report from my monitor I exported using SwitchResX.

rogercrocha commented Jan 21, 2018

I was unable to get my ASUS XB241YU working with the script. Not only do I get less resolution options shown, but the "1920 x 1080" that used to work as "1080p" doesn't work now. Can somebody help me? Here's the EDID report from my monitor I exported using SwitchResX.

@jtnix

This comment has been minimized.

Show comment
Hide comment
@jtnix

jtnix Jan 31, 2018

This version absolutely does not work for my ViewSonic VX2270 widescreen monitor. Using a modified script from this thread on embdev.net fixes it for me perfectly. Script is at this particular link: Dell U2713H on Mac: forcing RGB mode instead of YCbCr

If anyone is having problems with this or any other patch-edid.rb derivative, I recommend trying the script at that link before buying a new cable.

Note that if you are on El Capitan 10.11.6 or greater, you will be overwriting an existing DisplayProduct-* file for this model monitor in the /System/Library/Display/Contents/Resources/Overrides folder for the ViewSonic specific DisplayVendorID.

jtnix commented Jan 31, 2018

This version absolutely does not work for my ViewSonic VX2270 widescreen monitor. Using a modified script from this thread on embdev.net fixes it for me perfectly. Script is at this particular link: Dell U2713H on Mac: forcing RGB mode instead of YCbCr

If anyone is having problems with this or any other patch-edid.rb derivative, I recommend trying the script at that link before buying a new cable.

Note that if you are on El Capitan 10.11.6 or greater, you will be overwriting an existing DisplayProduct-* file for this model monitor in the /System/Library/Display/Contents/Resources/Overrides folder for the ViewSonic specific DisplayVendorID.

@earik87

This comment has been minimized.

Show comment
Hide comment
@earik87

earik87 Feb 13, 2018

I have an early 2015 macbook pro with High Sierra OS. I recently purchased AOC 24 inch full hd monitor and have got this blurry font problem. However, this script doesn't look up to date.

Can someone revise it or help me to find a up to date script?

Thanks!

earik87 commented Feb 13, 2018

I have an early 2015 macbook pro with High Sierra OS. I recently purchased AOC 24 inch full hd monitor and have got this blurry font problem. However, this script doesn't look up to date.

Can someone revise it or help me to find a up to date script?

Thanks!

@halforange

This comment has been minimized.

Show comment
Hide comment
@halforange

halforange Mar 19, 2018

Thanks for the this. Is there a way to force the latest Macbook Pro models to ARGB8888 rather than ARGB2101010, for HDMI output to displays that don't support 10 bit depth?

halforange commented Mar 19, 2018

Thanks for the this. Is there a way to force the latest Macbook Pro models to ARGB8888 rather than ARGB2101010, for HDMI output to displays that don't support 10 bit depth?

@sadrian80

This comment has been minimized.

Show comment
Hide comment
@sadrian80

sadrian80 Apr 27, 2018

I tried this with an LG 38UC99 connected to a MacPro 6,1 via Displayport.

After applying the patch, the override seems to be loading. In System Profiler the Display shows the "forced TGB …" in the name and the Framebuffer Depth is schon as 30bit ARGB210101010, but – it is still recognised as a TV, thus rendering frequency settings or NightShift useless. Font rendering is also way too soft.

Is there a way/modification of the script to force recognition as a display rather than a TV?

screenshot 2018-04-27 11 42 30

sadrian80 commented Apr 27, 2018

I tried this with an LG 38UC99 connected to a MacPro 6,1 via Displayport.

After applying the patch, the override seems to be loading. In System Profiler the Display shows the "forced TGB …" in the name and the Framebuffer Depth is schon as 30bit ARGB210101010, but – it is still recognised as a TV, thus rendering frequency settings or NightShift useless. Font rendering is also way too soft.

Is there a way/modification of the script to force recognition as a display rather than a TV?

screenshot 2018-04-27 11 42 30

@tinycg

This comment has been minimized.

Show comment
Hide comment
@tinycg

tinycg May 24, 2018

I have the exact same scenario as Sadrian80 and not sure how to go about fixing it. It looks better, but font aliasing is still a bit weird... shows as 'forced RGB mode...' but also 'Television: yes'... anyone have any thoughts?

tinycg commented May 24, 2018

I have the exact same scenario as Sadrian80 and not sure how to go about fixing it. It looks better, but font aliasing is still a bit weird... shows as 'forced RGB mode...' but also 'Television: yes'... anyone have any thoughts?

@cron13

This comment has been minimized.

Show comment
Hide comment
@cron13

cron13 Jun 17, 2018

hi, it is possible to make script like this one, that enable 5.1 sound and 120hz/200hz mode on external tv that connected via hdmi?

cron13 commented Jun 17, 2018

hi, it is possible to make script like this one, that enable 5.1 sound and 120hz/200hz mode on external tv that connected via hdmi?

@SlyLaM

This comment has been minimized.

Show comment
Hide comment
@SlyLaM

SlyLaM Jul 5, 2018

Hi !
I won't detail my reasons here but I need to do exactly the contrary ...
Is it possible to force YCbCr ??

Thanks

SlyLaM commented Jul 5, 2018

Hi !
I won't detail my reasons here but I need to do exactly the contrary ...
Is it possible to force YCbCr ??

Thanks

@ultrasiq

This comment has been minimized.

Show comment
Hide comment
@ultrasiq

ultrasiq Aug 31, 2018

This worked for my Asus VG248QE but I'm locked at 60Hz. Like @NotEnigma said I'd also like to use the 144Hz option.

ultrasiq commented Aug 31, 2018

This worked for my Asus VG248QE but I'm locked at 60Hz. Like @NotEnigma said I'd also like to use the 144Hz option.

@eleganteuni

This comment has been minimized.

Show comment
Hide comment
@eleganteuni

eleganteuni Sep 8, 2018

this doesn't work on 10.13.6 with an hp 25er 1080p resolution. You can get it to display force rgb, but it doesn't affect the font rendering. have tried all the scripts out there.

any ideas?

eleganteuni commented Sep 8, 2018

this doesn't work on 10.13.6 with an hp 25er 1080p resolution. You can get it to display force rgb, but it doesn't affect the font rendering. have tried all the scripts out there.

any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment