mvaisakh / Asus-X505ZA-Ryzen-Hackintosh

Asus Vivobook 15 X505ZA Hackintosh | NO GRAPHICS ACCELERATION YET
39 stars 0 forks source link

Hardware Graphics Acceleration on Vega 8 #1

Closed mvaisakh closed 1 year ago

mvaisakh commented 4 years ago

Vega 8 Graphics is not supported by Apple, but most of the init code and code needed to get acceleration working is already present in their kexts. Also being an integrated GPU and new kind of architechture it makes it a challenge to get this working.

Since this laptop is not shipped with a dedicated GPU (if there was one, it would have been a lot easier to hackintosh!), it lags and becomes unusable for day to day tasks. To get it to work, I first need to fix HW Acceleration on Radeon Vega 8. This thread can be used for discussing about other Ryzen APUs as well.

Any help is appreciated!

pmnlla commented 3 years ago

How's that been going? I'd love to see where this goes and even help you guys test whatever you need on physical hardware.

Evangelio34 commented 3 years ago

Hi i was enter to this tread i have a Dell Inspirion 5485 2 in 1 with AMD Ryzen 5 3500U with vega 8 graphics and 12 gb on ram and i want to know if i can create a hackintosh with my specs that works almost to see videos or use software

Evangelio34 commented 3 years ago

i need some efi driver to use vega 8 or installing Big Sur all is done to create my hackintosh?

pmnlla commented 3 years ago

as a ryzen 3500u owner,. i wish.

pmnlla commented 3 years ago

also, 12g of ram and 3500u seem to be quite a common combination. wonder why that is...

Evangelio34 commented 3 years ago

also, 12g of ram and 3500u seem to be quite a common combination. wonder why that is...

yeah but do you know if i can make a hackintosh with my pc that works good? and can i have contact with you on email or something ?

nift4 commented 2 years ago

You can't as of now.

artefvck commented 2 years ago

https://github.com/acidanthera/OpenCorePkg/commit/412c705cf66f4003e3fd275d0e44f70e464599e9 maybe ?

NayamAmarshe commented 2 years ago

Any update on this?

VisualEhrmanntraut commented 2 years ago

@NayamAmarshe We've gotten the X6000HWServices kext to attach, but acceleration fails with "[VRAM] mapMemorySpace() !!! Failed to get descriptor for ROM Base."

Kyariko commented 2 years ago

Hi I'm new, and looked for hardware acceleration and saw this, I saw there was some issues, even now and wanted to know if making to work vega 8 is the same process as vega 11 ? Because I'm a owner of a 3400g and didn't found anything yet, so if vega 8 graphics works I want to know if it will work with my apu. Thanks.

VisualEhrmanntraut commented 2 years ago

@DydyWasTaken When did we say we got acceleration working

Kyariko commented 2 years ago

@

@DydyWasTaken When did we say we got acceleration working

Never said it was working, just asked if it works the method to get it working would be the same for vega 11 graphics

VisualEhrmanntraut commented 2 years ago

@DydyWasTaken We don't know

MiddlemanTM commented 2 years ago

So it's been a while since I last posted. Just thought to share some insights I made recently with my builds.

So I made two discoveries recently with regards to hardware acceleration. Not sure if some of you know but what I found that's interesting is both AMD and Intel kexts in macOS /S/L/E I found share the same IOMatchCategory values under the kexts which is IOAcceleration. Unique to Intel is the IntelAccelerator IOClass which can be found in the AppleIntelSKLGraphics and AppleIntelICLGraphics kexts. I am quite sure with the info we've found so far it is possible to create a SSDT or even kext driver of sorts. We just need to figure out how to designate the AMD Vega properly as an internal IGPU.

Secondly (on a fairly related note of injecting AMD codes for acceleration), I managed to recently successfully boot up a RX6600 card in a Z590 system under Catalina. As we know the RX6600 isn't supported until Monterey, but I managed to fill in the required gaps in the Apple AMD kexts (AMDRadeonX6000Controller and AMDFramebuffer) by adding a Navi 23 class and the RX6600 device-id. I was totally amazed it booted up. This means it is totally possible to add the Vega 8 for acceleration.

VisualEhrmanntraut commented 2 years ago

So it's been a while since I last posted. Just thought to share some insights I made recently with my builds.

So I made two discoveries recently with regards to hardware acceleration. Not sure if some of you know but what I found that's interesting is both AMD and Intel kexts in macOS /S/L/E I found share the same IOMatchCategory values under the kexts which is IOAcceleration. Unique to Intel is the IntelAccelerator IOClass which can be found in the AppleIntelSKLGraphics and AppleIntelICLGraphics kexts. I am quite sure with the info we've found so far it is possible to create a SSDT or even kext driver of sorts. We just need to figure out how to designate the AMD Vega properly as an internal IGPU.

Secondly (on a fairly related note of injecting AMD codes for acceleration), I managed to recently successfully boot up a RX6600 card in a Z590 system under Catalina. As we know the RX6600 isn't supported until Monterey, but I managed to fill in the required gaps in the Apple AMD kexts (AMDRadeonX6000Controller and AMDFramebuffer) by adding a Navi 23 class and the RX6600 device-id. I was totally amazed it booted up. This means it is totally possible to add the Vega 8 for acceleration.

The first part has no meaning, IOAcceleration classes and co are all common classes shared between graphics drivers as those are generic interfaces to graphics functions like metal acceleration and Framebuffer (display in memory) access However, the 2nd part sounds interesting. If what you're saying is true, why don't you disclose some information to help us? I've just today made a Lilu kernel extension that patches the amd firmware table and we are now stuck at the following. IMAGE 2022-04-14 19:23:16

MiddlemanTM commented 2 years ago

Alright, that's good going - it might work for my Atari VCS. And thanks for the explanation about the IOAcceleration.

With regards to the RX6600 Catalina solution, well this is what I did:

1) Made an external USB SSD install of Catalina. Disabled SIP from Recovery mode and Gatekeeper for both Monterey and Catalina (from separate installs). 2) Made a copy of the following Catalina kext files onto Catalina Desktop, plus from Monterey Beta in separate folder: AMDRadeonX6000.kext AMDRadeonX6000Framebuffer.kext AMDRadeonX6000HWServices.kext

3) Reading the equivalent Monterey files, edited the Info.plist of Catalina kext files by transferring over missing sections of the AMD Info.plist (cutting and pasting) in the kexts, with particular regards to the Navi23 IOKitPersonality details and then added the FF731002 device-id to the end of it under IOPCIMatch. Saved the edited Info.plists. 4) Copied the files over into S/L/E, renabled Gatekeeper and SIP and then rebooted with RX6600.

Pinghigh commented 2 years ago

how can i get into the telegram group?

mvaisakh commented 2 years ago

how can i get into the telegram group?

I'm posting this as a file to avoid bots flooding into the group, because we previously had a lot of bots flooding in.

telegram-link.txt

MiddlemanTM commented 2 years ago

Just thought to leave this interesting link I found on an open source Vulkan driver. Maybe some of you would be willing to use it to figure out how the AMD card interacts with macOS considering its Linux based > https://github.com/GPUOpen-Drivers/AMDVLK

VisualEhrmanntraut commented 2 years ago

@MiddlemanTM No comment.

Allen050329 commented 2 years ago

No comment.

SomeName6 commented 2 years ago

No comment.

RGarrido03 commented 2 years ago

No comment.

Leeonardoo commented 2 years ago

Just thought to leave this interesting link I found on an open source Vulkan driver. Maybe some of you would be willing to use it to figure out how the AMD card interacts with macOS considering its Linux based > https://github.com/GPUOpen-Drivers/AMDVLK

You really don't get it, do you?

MiddlemanTM commented 2 years ago

FYI I apologise if I've 'misled' anyone here. That was not the intention. IMHO I'm not a programmer, but I've been using computers long enough to know how to get it all going. Is 35 years of computing (on multiple platforms) good enough for you? I mean I did my first hackintoshes way back over 13 years ago (with no support from any sites whatsover other than my own instincts) and one of my first successes was a HP 1101 Mini running on Snow Leopard with Intel Atom chipsets.

Of course I know Vulkan is a different system, one which Apple does not support on macOS. My initial reasoning for the post was - if we are to trying to solve the issue, at least we need to try to be on the same page, how the device drivers work/talks to the system/kernel etc. I guess what I should have pointed towards is Apple IOKit documentation.

If there's any consolation, over this last weekend I've just been helping someone with a Legion 5 Ryzen 5800H & RX6600M laptop. We have managed to successfully install and boot into Big Sur and only having problems now with Monterey - something to do with the AMD CPU not being fully recognised by macOS. SSDT-CPUR has already been used (and adjusted for the correct number of cores which is 8) as has AppleMCEReporterDisabler. AppleACPICPU shows up as ProcessorId=15 but the system is not booting to the login screen.

https://forum.amd-osx.com/index.php?threads/amd-rayon-r7-5800h-install-monterey-kernel-panic.2725/

I've also been doing a bit of reading up on the Apple IOKit documention. And I found one thing that may interest you guys. If you go to Terminal, type in ioclasscount. It will show you which of the drivers/extensions in your current setup have been loaded.

On my 2013 Macbook Air running High Sierra (on Intel i5 IGPU), I did this and found a very interesting set of classes:

Screen Shot 2022-04-18 at 10 46 14 PM

If you look at AppleGraphicsDeviceControl it shows 3 and AppleGraphicsDeviceControlClient shows 6. I am thinking that's one of the reasons maybe why the card's not getting full acceleration.

I did the same for my Atari VCS running Big Sur and all I got was AppleGraphicsDeviceControl = 1 and AppleGraphicsDeviceControlClient = 1. I also noticed none of the AMD kexts were loaded - and that there is also an AMDRyzenCPUUserClient class (which means macOS has likely NATIVE AMD Ryzen support!). I enclose a copy of the VCS IOClass loadup in case anyone's interested.

AtariVCS-ioclasscount.zip

VisualEhrmanntraut commented 2 years ago

@MiddlemanTM 1. AMDRyzenCPUUserClient comes from SMCAMDProcessor

  1. How many times a class is being used means nothing
  2. Linux and FreeBSD drivers have A WHOLE DIFFERENT DRIVER STRUCTURE PHILOSOPHY than IOKit/DriverKit

--MOD-EDITED--

nift4 commented 2 years ago

why is this turning toxic now :/

VisualEhrmanntraut commented 2 years ago

@nift4 No toxicity here; I’m just counter arguing. This is owner-encouraged behaviour: if you don’t like the fact we’re disproving Middleman’s claims, please shoo. I have way more information than them, I’m just not disclosing it into these GitHub issues; if you want to see real work, then join the telegram group and look for yourself

VisualEhrmanntraut commented 2 years ago

Oh, and I'm an administrator/developer in that group as well. Just thought I'd mention

MiddlemanTM commented 2 years ago

@MiddlemanTM 1. AMDRyzenCPUUserClient comes from SMCAMDProcessor 2. How many times a class is being used means nothing 3. Linux and FreeBSD drivers have A WHOLE DIFFERENT DRIVER STRUCTURE PHILOSOPHY than IOKit/DriverKit 5. Ok boomer

1) Yes I was about to say (5 minutes after I posted this and found it in the project ha!). 2) & 3) Agreed. But thanks.

nift4 commented 2 years ago

@nift4 No toxicity here; I’m just counter arguing. This is owner-encouraged behaviour: if you don’t like the fact we’re disproving Middleman’s claims, please shoo. I have way more information than them, I’m just not disclosing it into these GitHub issues; if you want to see real work, then join the telegram group and look for yourself

Ok boomer is no argument lol

VisualEhrmanntraut commented 2 years ago

@nift4 ‘Twas a joke, based on the fact he said he has been working with computers for 35 years, yet, doesn’t understand the inner workings of an operating system. If you can’t handle such simple joke, what can I say. We’re all laughing at the stupidity of this entire situation in the telegram group, you’re contributing nothing to this; the only thing you’re doing is misinterpreting my inputs on the topic because you have hopes that Middleman is going to somehow magically get such complicated task done with such simplistic solutions such as creating custom IOKit personalities, and pushing me, the person doing actual reverse engineering work, to the side, telling me and the others that we are becoming toxic, when in reality, it’s all just fun and jokes, and no harm is intended.

MiddlemanTM commented 2 years ago

Ok boomer is no argument lol

@nift4 It's alright nift, I can take it. 😄

mvaisakh commented 2 years ago

@MiddlemanTM you should really check for what we already have in our hands before posting here. We have done a lot of research around this, well atleast for the last one year atleast. We have been decompiling several kexts, and with the amazing help and involvement from @VisualDevelopment we were able to make greater progress that I would have needed years to decode.

@nift4 nobody is trying to be toxic, it's just that MiddleManTM hasn't read the previous comments in this thread, and is discovering things that we already have known for a while.

I don't intend to offend anyone in any way, and let's hope nobody else does that either. I don't want people thinking that members were being toxic in this thread. I'm going to hide those comments to avoid future arguments in this regard.

Also on our telegram group, we have made a lot of progress since it's an (occassionally) active group chat. Progress will be posted here soon.

Let's have a healthy discussion and have hopes to get this working some day!

Allen050329 commented 2 years ago

Hope we can join forces!

FabriicioMelo commented 2 years ago

Any updates?

SsNiPeR1 commented 2 years ago

any updates?

mvaisakh commented 2 years ago

For everyone wondering what's happening, @ChefKissInc and @NyanCatTW1 are actively working on a kext that patches X6000 kext using Lilu, but we're trying to figure out some parts. Accelerator kext does start (but it crashes), and yes it's a major milestone that they've achieved with their kext. You can find their work at https://github.com/NootInc/WhateverRed

So to summarise: Accelerator is starting, but there is no display because PowerPlay is failing to initialise as of the day of posting this message.

I can't keep posting each and every update as it happens as it would become spam. A lot of progress has been made over the past few months. Kudos to them and the very good team of testers in our Telegram Group .

If you want to participate in testing and/or helping please join the telegram group, from linked comment above, where we're actively working on their kext.

MiddlemanTM commented 2 years ago

Sorry for the late reply. It's great to hear the progress you guys have made recently. I look forward to testing the new kext sometime over the next few weeks.

I wanted to also mention to you we've had some great success over our end too with AMD IGPUs. Over at AMD-OSX we have a handful of users have recently successfully booted their Lenovo Legion 5 laptops running on Ryzen 5800H with the RX6600M chipset on Monterey. Some on 5800H with Vega 3s have also managed to boot Big Sur but without acceleration (so we are finally getting somewhere).

One thing about the new WhateverRed kext not showing the display - have any of you looked at if the 1st GPU has been loaded under AGPM Controller? As Pavo has mentioned before that if it doesn't it means it requires a AGPMInjector.kext added as that allows the AGPM control over the gpu. AGPMInjector.kext can be created using the OC-Gen-X app using your SMBIOS and GPU details.

Allen050329 commented 2 years ago

@MiddlemanTM , the guy with a 5800H+ 6600M probably uses the 6600M for display output, and it was always possible to install without acceleration, though it's hard to get right

VisualEhrmanntraut commented 2 years ago

@MiddlemanTM Dear Middleman, AMD mobile dGPUs were always working with WhateverGreen. An iGPU is an internal GPU that’s inside an APU, and steals System RAM to operate, unlike mobile dGPUs, that have their own dedicated RAM, just like a desktop dGPU. Also, like Allen mentioned, running macOS unaccelerated in AMD laptops is certainly not new. In fact, we got the newer Ryzen laptops working by ourselves, not with the help of AMD OS X, if that was implied. Next, the AGPM. Do you even know what that does? The reason that we have a black screen is because Navi uses Graphics Core 10 while Raven uses Graphics Core 9, so the Acceleration command engine failed to initialise We have been trying to combine the GFX 9 and GFX 10 kexts to bring the GFX 9 engines to GFX 10, this is our current issue (IOGraphicsAccelerator2::start failing). Lastly, please do not test my kext and then make issues about it not working, because it’s not working (see aforementioned issue). Moral of the story: If you do not know what you’re talking about, refrain from making comments, please. Thanks.

AMDfanatic commented 2 years ago

Hey! So I don't mean to be a bother, but I am having my own AMD vega 8 APU related issue. My issue is that I am unable to get any output from my APU at all. I can't find any place that gives information on how to get it to work baring this line from the Opencore guide "While possible to get a display out with some work, graphics acceleration is basically impossible." So what work do I have to do? Any help to point me in the right direction is appreciated and I totally understand if you get upset for me asking a probably stupid question in this thread that is only vaguely related to this topic.

4techguns commented 1 year ago

Good news - apparently the WhateverRed kext has reached a state where hardware acceleration works on Raven/Raven2-based APUs, and I've managed to achieve full acceleration on my Picasso (Ryzen 3 3250U) laptop with it!

Here are some screenshots: Screen Shot 2023-03-05 at 3 28 29 PM Screen Shot 2023-03-05 at 3 52 51 PM Screen Shot 2023-03-05 at 3 55 32 PM

VisualEhrmanntraut commented 1 year ago

@4techguns We know. The ownership of the telegram group associated with this repository has been transferred to me

Wilson0427 commented 1 year ago

@4techguns Just put the Lilu 1.6.4 kext folder into OC EFI?

SsNiPeR1 commented 1 year ago

@Wilson0427 and (obviously) do OC snapshot using ProperTree

Wilson0427 commented 1 year ago

@Wilson0427 and (obviously) do OC snapshot using ProperTree

How?

Wilson0427 commented 1 year ago

@Wilson0427 and (obviously) do OC snapshot using ProperTree

I tried replacing Lilu 1.6.4 kext into the old EFI but nothing happens.

mvaisakh commented 1 year ago

Integrated Vega GPUs are now finally working!

So a major milestone has been achieved by @ChefKissInc and @NyanCatTW1 and a team of testers, who achieved the so called impossible task of achieving full GPU acceleration with their kext WhateverRed which basically patches the needed kext in MacOS itself to get Vega Integrated GPUs working.

Yes it is a huge milestone and it still needs a bit of work for it to be usable for the general public. Please refrain from asking on how to install it and wait till the author publishes it for everyone. Until then it is in best interest to avoid spam in this discussion.

Keep your eyes on https://github.com/NootInc/WhateverRed for the kext, but again do not spam there as to how to use the kext, when will it be ready etc. It shall be released when they confirm everything is good.