tylernguyen / x1c6-hackintosh

READMEs, OpenCore configurations, patches, and notes for the Thinkpad X1 Carbon 6th Gen 2018 Hackintosh
https://tylernguyen.github.io/x1c6-hackintosh/
The Unlicense
634 stars 109 forks source link

UHD 4K external graphics (not working) #40

Closed parndt closed 4 years ago

parndt commented 4 years ago

Using a 20KH machine with 2560x1440 panel, i7-8550U and 16GB RAM, on 10.15 Catalina, when I plug an external display through a USB-C to DisplayPort adapter, I get a maximum option of 2560x1440:

image

The same configuration works out of the box on Fedora 31 or with Windows 10. A 2016 12" MacBook using the same adapter and 4K display sees all resolution options including 3840x2160 retina @ 1920x1080 ⚡️

This is as of commit 67affba3c48e0f598a76c99a2342576f8ab9a265 with no changes: image

Has anyone run into the same issue, or has worked around it? Thanks!

AutinMitra commented 4 years ago

4K will not work unless you patch the bios to increase DVMT-prealloc.

DVMT Xiaomi Mi Pro

parndt commented 4 years ago

Thanks!

AutinMitra commented 4 years ago

Thanks!

Also, do not attempt using the patch from that repo, it WILL BRICK THE X1C6. You have to extract the bios and fiddle with it to find the DVMT option

velaar commented 4 years ago

Bios on X1C6 is NOT editable. Even if you can program it directly to the chip. It is both signed and checksummed and the key never leaked.

Sorry.

On Mar 15, 2020, at 9:40 AM, Autin Mitra notifications@github.com wrote:

Thanks!

Also, do not attempt using the patch from that repo, it WILL BRICK THE X1C6. You have to extract the bios and fiddle with it to find the DVMT option

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tylernguyen/x1c6-hackintosh/issues/40#issuecomment-599211897, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA67YFTBF6UWLNDLVWFSPQTRHTLDLANCNFSM4LEWQFHA.

parndt commented 4 years ago

Maybe if this pans out: https://www.reddit.com/r/thinkpad/comments/ffqqx5/currently_testing_skyra1n/

tylernguyen commented 4 years ago

@parndt Like others have said, it is not possible until a BIOS exploit is out. In the mean time, please stay put and do not update your BIOS.

parndt commented 4 years ago

👍 thanks everyone. It's nice that the conclusion I came to is the same as everyone else's. I would hate to think there was a way to make it work that I just didn't know. For now, eGPU works fine.

tylernguyen commented 4 years ago

Closed for now. I will re-open once skyra1n or another BIOS exploit for the x1c6 is released.

benbender commented 4 years ago

A solution (with minor culprints) without patching the bios is outlined here: https://github.com/tylernguyen/x1c6-hackintosh/issues/28#issuecomment-649107190

parndt commented 4 years ago

Thanks @benbender - I'll give that a go when I get a chance.

tylernguyen commented 4 years ago

@parndt I tried this patch but wasn't able to get 4K to work. Could you confirm?

parndt commented 4 years ago

@parndt I tried this patch but wasn't able to get 4K to work. Could you confirm?

yeah, I haven't had any chance to do this yet, I'll report back when I know 😄

benbender commented 4 years ago

@tylernguyen set misc -> target -> logging to file and see in the oc boot-log if the patch is applied.

If not, try to apply it with framebuffer-stolenmem active and do "sudo kextcache -i / && sudo kextcache -system-prelinked-kernel" once booted.

If that doesn't work, I would be surprised and there would be a factor in the game, I'm not aware of.

It's at least possible: :) IMG_20200625_025001

tylernguyen commented 4 years ago

@benbender @parndt sudo kextcache -i / && sudo kextcache -system-prelinked-kernel and clearing NVRAM fixed it.

Screenshot_2020-06-24 19 57 28_NdNBfD

Max out is 4096x2150 though. Sadly I do not have the hardware to test that. Though I suppose there's no reason it shouldn't work.

@benbender This is great! I will update the repo with this patch on the next update. I cannot thank you enough!

benbender commented 4 years ago

You're welcome. Sharing is caring ;)

BTW: If your samsung tv has some sort of "settings -> general -> external devices -> advanced/extended input signal" or similar in settings and reattach the hdmi/dp-plug to refresh the edid-cache, you should be getting 4k/60hz and hdmi 2.0. It took me quite a while to figure this one out for mine ;)

(I'm not quite sure about the naming of the options because mine has german settings, but you got the idea)

parndt commented 4 years ago

This is excellent news!!!!! I'm so excited to try this now.

benbender commented 4 years ago

Oh, and one last tipp: remove and reapply one-key-hidpi. The patches gave me 1920x1080 hidpi (scaled by 2) for my 2560x1440panel in crystal clear sharpness. without the patch, I was limited to a max fb of 2560 without hidpi and a blurry image on 1920x0180.

zacharysalvatore commented 4 years ago

@benbender @tylernguyen This news saves me a lot. I returned my eGPU at once. I can't thank you enough! CleanShot 2020-06-25 at 11 39 24@2x

velaar commented 4 years ago

@zacharysalvatore I wonder why built-in display reports 30 bit colour for you. Mine shows 24 bit, all else the same.

I wonder if missing GuC firmware can cause lower performance on video decoding. Can somebody confirm working HW codecs?

tylernguyen commented 4 years ago

@zacharysalvatore I wonder why built-in display reports 30 bit colour for you. Mine shows 24 bit, all else the same.

I wonder if missing GuC firmware can cause lower performance on video decoding.

Can somebody confirm working HW codecs?

Mine is showing 30bit as well. Not sure why yours is limited to 24 other than the hardware. Video decoding should work, see https://github.com/tylernguyen/x1c6-hackintosh/blob/master/docs/assets/img/videoproc.png

zacharysalvatore commented 4 years ago

It’s hard to say why yours limited to 24-bit for now.

zacharysalvatore commented 4 years ago

@tylernguyen I find that I couldn't play any video format after enabling 4k. Could you please confirm it is my own issue or not.

benbender commented 4 years ago

@velaar it depends on your (patched?) EDID-Data. Have a look on the real data available on your machine with: http://resxtreme.com/

EDID: I just checked and I'm at 24bit myself. I applied onekey-hidpi and suspect that those patched edid is fixed to 24bit. Could both of you (@tylernguyen and @velaar) confirm my theory by stating if you applied one-key-hidpi?

The "better"-way should be to do edid-injection on booting via Whatevergreen anyway, because it should solve gfx glitches while booting and is always present on genuine macs. I intended to fix this myself anyways with an upcoming reinstall to have a clean state to start from.

benbender commented 4 years ago

@zacharysalvatore Video-Playback depends on Whatevergreen and Firmware-initialisation. It doesn't depend on the available framebuffer-size. To debug, have a look at the framebuffer config and what has changed there. Have a look at your system log and, potentially, boot with whatevergreen's DEBUG-build and -wegdbg as boot-arg to get a clue what's going on.

zacharysalvatore commented 4 years ago

Solved! Thx a lot. @benbender

velaar commented 4 years ago

@benbender I did use one-key-hidpi. But without its EDID patching functionality. Proper WEG/EDID injection would have been nice though

@tylernguyen the hardware is identical to yours I think.8650U + 16GB +WQHD HDR Which colour profile do you use?

tylernguyen commented 4 years ago

@velaar My color profile is unchanged from the default one. I'll gonna get an EDID dump from Linux and try to create a WEG EDID patch.

AutinMitra commented 4 years ago

When I still had my HDR X1C6, display was reporting 8-bit. Perhaps Lenovo is using multiple vendors for display?

velaar commented 4 years ago

@AutinMitra this is the one I have: http://www.panelook.com/B140QAN02.0_AUO_14.0_LCM_parameter_37246.html

To the best of my knowledge, no other HDR display was ever used. I guess we'll have to wait for @tylernguyen 's update to see if we are missing something in patches/config. But I don't think it matters much though. There is no true HDR on this display anyway.

@tylernguyen Notebookcheck has an icc file for this display here: https://www.notebookcheck.net/uploads/tx_nbc2/B140QAN02_0.icm

parndt commented 4 years ago

@tylernguyen @benbender yes, I finally got time to try, and this did work for me 😄 4K@60Hz and looking great!

tylernguyen commented 4 years ago

Implemented into the repo as of a985053 Thanks again @benbender

parndt commented 4 years ago

Thanks @tylernguyen your work maintaining this repo is a huge help 😄

zacharysalvatore commented 4 years ago

I just upgraded system to 10.15.6. Here's the steps for who don't know how. Not doing these will end up failure, kernel failure, while upgrading or doing recover your system as this https://github.com/tylernguyen/x1c6-hackintosh/issues/63 You'd better make a notice of this for who don't read issues at all beforehand. @tylernguyen

  1. Disable UHD kernel patches.
  2. Revert DeviceProperties to previous one. ie
    <key>DeviceProperties</key>
    <dict>
        <key>Add</key>
        <dict>
            <key>PciRoot(0x0)/Pci(0x2,0x0)</key>
            <dict>
                <key>AAPL,ig-platform-id</key>
                <data>
                BAAnWQ==
                </data>
                <key>device-id</key>
                <data>
                FlkAAA==
                </data>
                <key>enable-hdmi20</key>
                <data>
                AQAAAA==
                </data>
                <key>framebuffer-con1-enable</key>
                <data>
                AQAAAA==
                </data>
                <key>framebuffer-con1-type</key>
                <data>
                AAgAAA==
                </data>
                <key>framebuffer-fbmem</key>
                <data>
                AACQAA==
                </data>
                <key>framebuffer-patch-enable</key>
                <data>
                AQAAAA==
                </data>
                <key>framebuffer-stolenmem</key>
                <data>
                AAAwAQ==
                </data>
            </dict>
        </dict>
        <key>Block</key>
        <dict/>
    </dict>
  3. Terminal
    sudo kextcache -i / && sudo kextcache -system-prelinked-kernel
  4. Reboot 'Clear NVRAM'
  5. Upgrade system to Newest.
  6. Enable our Kernel patches.
  7. Change DeviceProperties to our newest commit of this repo.
  8. Repeat step 3 & 4.
  9. Reboot.
tylernguyen commented 4 years ago

@zacharysalvatore I will. What I'm thinking is that I should revert to the previous config for the repo default so that it's easier for upgrades. And those who need external 4k will can manually enable the patch themselves.

benbender commented 4 years ago

From my experience: Step 2. and 4. above can be skipped.

But there is also no guarantee that those patches work after an update if the Framebuffer.kext is changing between updates.

benbender commented 4 years ago

Just to let you know: I've just flashed my T480 with a skyra1n-patched BIOS and now I'm having access to a trillion advanced options inkl. DVMT-size and cfg-lock. So it's possible on modern Thinkpads, but one needs to flash with an external programmer. No easy way from within the system afaik atm.

velaar commented 4 years ago

Is there an image for X1C6? I can get a programmer.

Sent from my iPhone

On Jul 18, 2020, at 1:36 PM, Benjamin Bender notifications@github.com wrote:

 Just to let you know: I've just flashed my T480 with a skyra1n-patched BIOS and now I'm having access to a trillion advanced options inkl. DVMT-size and cfg-lock. So it's possible on modern Thinkpads, but one needs to flash with an external programmer. No easy way from within the system afaik atm.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

tylernguyen commented 4 years ago

Just to let you know: I've just flashed my T480 with a skyra1n-patched BIOS and now I'm having access to a trillion advanced options inkl. DVMT-size and cfg-lock. So it's possible on modern Thinkpads, but one needs to flash with an external programmer. No easy way from within the system afaik atm.

@benbender I thought skyra1in hasn't been released yet? I'm also interested if you could provide a link.

EDIT: If you're speaking of the pin I'm thinking of, as far as I can tell, there are only patches for T-line Thinkpads, unless I'm missing something?

benbender commented 4 years ago

@tylernguyen there is no variant to patch via bootable image like ivyra1n. The patches to patch your own bios-backup and reflash it, are here: http://paranoid.anal-slavery.com/biosmods.html (sorry for the domain-name...). Its available at this strange Thinkpad-Discord.

@velaar I have a T480, so I don't have done anything for the X1C6. But I assume the patches should work for you too.

Basically it's this:

"This is a guide on how to mod the bios of all skylake thinkpads(xx60 onwards)

Step Zero: Dump your bios, I suggest using a ch341a and flashrom Step One: Download the right patches from here Step Two: Download UEFIPatch from here Step Three: Download your hex editor of choice Step Four: run the command ./UEFIPatch bios.rom patches.txt Step Five: Open your Hex editor and replace 4C 4E 56 42 42 53 45 43 FB with 4C 4E 56 42 42 53 45 43 FF on the previously patched bios. Step Six: Flash it

I hope you enjoyed this method, if you feel like it or simply have problems join at https://discord.gg/7dSZ6VY and donate BTC: bc1q9seqcf29eyamacty2l677qwg6dwmjda0d9t3ws"

tylernguyen commented 4 years ago

@benbender Thanks for the link. The t480p and the x1c6 should be similar enough. I'll try that patch out and hopefully not brick anything.

benbender commented 4 years ago

I suggest to dump your bios two times before patching and do a bitwise comparison beforehand (diff dump1.rom dump2.rom). This way you can always flash back your original bios. But there is surely a risk - but no risk, no fun ;)

Btw: my only problem was that I initially dumped the wrong rom-chip. The rest was smooth...

zacharysalvatore commented 4 years ago

Definitely a good news to know!

benbender commented 4 years ago

I've played around with the new options for the last hours and "bricked" my laptop several times by testing options. The "advanced menu" is definitely not for the light hearted ;) But, as I said before, the good news is: You can simply flash your patched bios again and are back at start. There is a risk, but, at least for me, it's worth the effort.

tylernguyen commented 4 years ago

@zacharysalvatore @parndt @velaar Confirmed working on the x1c6. From now on, use this issue for bios mod discussion: https://github.com/tylernguyen/x1c6-hackintosh/issues/68

Thanks again @benbender for bringing this to my attention.

Hochiss commented 4 years ago

@benbender @tylernguyen @zacharysalvatore

I have eaxctly same issue as OP for LG4K & LG5K.... Could this patch be used with Clover? or anyhow with some changes? Sorry not yet overhaul to OC and no BIOS mod yet. Thanks!

I just upgraded system to 10.15.6. Here's the steps for who don't know how. Not doing these will end up failure, kernel failure, while upgrading or doing recover your system as this #63 You'd better make a notice of this for who don't read issues at all beforehand. @tylernguyen

1. Disable UHD kernel patches.

2. Revert DeviceProperties to previous one. ie
<key>DeviceProperties</key>
  <dict>
      <key>Add</key>
      <dict>
          <key>PciRoot(0x0)/Pci(0x2,0x0)</key>
          <dict>
              <key>AAPL,ig-platform-id</key>
              <data>
              BAAnWQ==
              </data>
              <key>device-id</key>
              <data>
              FlkAAA==
              </data>
              <key>enable-hdmi20</key>
              <data>
              AQAAAA==
              </data>
              <key>framebuffer-con1-enable</key>
              <data>
              AQAAAA==
              </data>
              <key>framebuffer-con1-type</key>
              <data>
              AAgAAA==
              </data>
              <key>framebuffer-fbmem</key>
              <data>
              AACQAA==
              </data>
              <key>framebuffer-patch-enable</key>
              <data>
              AQAAAA==
              </data>
              <key>framebuffer-stolenmem</key>
              <data>
              AAAwAQ==
              </data>
          </dict>
      </dict>
      <key>Block</key>
      <dict/>
  </dict>
1. Terminal
sudo kextcache -i / && sudo kextcache -system-prelinked-kernel
1. Reboot 'Clear NVRAM'

2. Upgrade system to Newest.

3. Enable our Kernel patches.

4. Change DeviceProperties to our newest commit of this repo.

5. Repeat step 3 & 4.

6. Reboot.
benbender commented 4 years ago

@Hochiss Technically it should be adaptable to Clover. But I haven't used Clover in years - so no support possible from my side.

Hochiss commented 4 years ago

@benbender Thanks for the encouraging. Yes I just adapted it to Clover and now it works: Screenshot 2020-09-24 at 18 32 23 (Now LG4K as 2K HiDPI and native LCD as FHD also HiDPI :-)

pentium0 commented 1 year ago

Should the external 4k patch for work for Ventura? Latest Ventura at the moment is 13.5. I have a X1C6 with FHD touchscreen, on Ventura 13.5, applied external 4k kernel patches and deviceproperties, reset NVRAM, but still no external 4k either DP or HDMI.

My deviceproperties and kernel patch I'm using from the repo:

Screenshot 2023-08-07 at 11 36 06 AM

Screenshot 2023-08-07 at 11 39 06 AM