V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
leky
V2EX  ›  问与答

macbook retina 外接 2k 显示器如何设置?

  •  
  •   leky · 2015-06-07 20:59:16 +08:00 · 3534 次点击
    这是一个创建于 3547 天前的主题,其中的信息可能已经有所发展或是发生改变。
    刚入手了dell u2515h,用dp接上我的本本后,发现在2560x1440的分辨率下字体太小了,而且有点模糊,试过
    #!/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"
    elsif displays.length == 0
    puts "No display data found! Are any external displays connected?"
    puts "\nNote: Apple Silicon (arm64) devices are currently unsupported, as the standard"
    puts "method of retrieving display information does not work."
    end
    displays.each do |disp|
    # Retrieve monitor model from EDID display descriptor
    i = disp["edid_hex"].index('000000fc00')
    if i.nil?
    monitor_name = "Display"
    else
    # The monitor name is stored in (up to) 13 bytes of text following 00 00 00 fc 00.
    # If the name is shorter than 13 bytes, it is terminated with a newline (0a) and then padded with spaces.
    monitor_name = [disp["edid_hex"][i + 10, 26].to_s].pack("H*")
    monitor_name.rstrip! # remove trailing newline/spaces
    end
    puts "Found display '#{monitor_name}': vendor ID=#{disp["vendorid"]} (0x%x), product ID=#{disp["productid"]} (0x%x)" %
    [disp["vendorid"], disp["productid"]]
    puts "Raw EDID data:\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
    filename = "DisplayVendorID-%x/DisplayProductID-%x" % [disp["vendorid"], disp["productid"]]
    puts "Output file: #{Dir.pwd}/#{filename}"
    f = File.open(filename, '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
    view raw patch-edid.rb hosted with ❤ by GitHub
    这个方案后,原来连接类型Television模式变成 DisplayPort,但没任何提升。

    下面是几张截图:
    https://www.dropbox.com/s/9hpt8f2ogtc3smw/%E5%B1%8F%E5%B9%95%E5%BF%AB%E7%85%A7%202015-06-07%2020.45.13.png?dl=0

    https://www.dropbox.com/s/ky5wppfsc774v4u/%E5%B1%8F%E5%B9%95%E5%BF%AB%E7%85%A7%202015-06-07%2020.46.15.png?dl=0

    https://www.dropbox.com/s/a17vdbzeb4mh1go/%E5%B1%8F%E5%B9%95%E5%BF%AB%E7%85%A7%202015-06-07%2020.46.54.png?dl=0

    https://www.dropbox.com/s/vlxwg1c1ia15zt2/%E5%B1%8F%E5%B9%95%E5%BF%AB%E7%85%A7%202015-06-07%2020.47.38.png?dl=0
    4 条回复    2015-06-09 12:21:53 +08:00
    tamarix666
        1
    tamarix666  
       2015-06-08 09:47:20 +08:00
    下载一个RDM软件,把分辨率调到1280*720HiDPI,有惊喜。
    leky
        2
    leky  
    OP
       2015-06-08 19:14:31 +08:00 via iPhone
    @tamarix666 这个软件我也试过,奇怪的是就这个分辨率我无法选上
    tamarix666
        3
    tamarix666  
       2015-06-09 08:42:46 +08:00
    @leky 我也是相同的问题,只能选1280*800Hidpi,导致两侧有黑边。如果问题解决了告知一声啊,多谢!
    leky
        4
    leky  
    OP
       2015-06-09 12:21:53 +08:00 via iPhone
    @tamarix666 貌似是比例的问题 mbp是16:10 显示器是16:9
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1056 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 19:06 · PVG 03:06 · LAX 11:06 · JFK 14:06
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.