Jump to content
Sign in to follow this  
Followers 0
newapple4g

Help with patching DSDT

29 posts in this topic

Recommended Posts

Advertisement

First I try to disassemble Dsdt and Ssdt located at Clover\ACPI\Origin ,but iasl gives error. Then I try Dsdt created from linux but dissembled dsdt have errors that I can't fix. Please help me ?

With Linux DSDT.dsl, use ACPI 4.0. Remove the (two) lines causing the errors.

Share this post


Link to post
Share on other sites

Done 0 errors . But will this dsdt work without those lines ?

I apply Brightness fix(Haswell) patch and get 2 errors and lots of warnings. Can it be caused by deleting two lines ? 

19652, 4064, Object does not exist (\_SB.PCI0.IGPU.BAR1)

19717, 4065, Object not found or not accessible from scope (^^PCI0.IGPU._DOS)

Share this post


Link to post
Share on other sites

Done 0 errors . But will this dsdt work without those lines ?

Yes. The two lines are not necessary (bug in iasl disassembler).

 

I apply Brightness fix(Haswell) patch and get 2 errors and lots of warnings. Can it be caused by deleting two lines ? 

19652, 4064, Object does not exist (\_SB.PCI0.IGPU.BAR1)

19717, 4065, Object not found or not accessible from scope (^^PCI0.IGPU._DOS)

You're applying to the wrong file. GFX0 device is defined in ssdt4.dsl:

Speedy-ML:Linux ACPI Tables RehabMan$ grep Device.*GFX0 *.dsl
ssdt4.dsl:        Device (GFX0)

Share this post


Link to post
Share on other sites

Yes. The two lines are not necessary (bug in iasl disassembler).

 

 

You're applying to the wrong file. GFX0 device is defined in ssdt4.dsl:

Speedy-ML:Linux ACPI Tables RehabMan$ grep Device.*GFX0 *.dsl
ssdt4.dsl:        Device (GFX0)

 

 

Apply to this file but same errors.

Share this post


Link to post
Share on other sites

Apply to this file but same errors.

No problem here... Make sure you apply "Rename GFX0 to IGPU" as it is pre-req for "Brightness Fix (Haswell)". Always a good idea to read the comments in the patch :-)

Share this post


Link to post
Share on other sites

I modify ssdt.aml to ssdt-1.aml and modified patched one to ssdt-2.aml and install acpibacklight kext on boot brightness apear on display settings but not work.

Share this post


Link to post
Share on other sites

I modify ssdt.aml to ssdt-1.aml and modified patched one to ssdt-2.aml on boot brightness apear on display settings but not work

You probably forgot to drop OEM SSDT tables.

 

Post ioreg with IORegistryExplorer v2.1.

Share this post


Link to post
Share on other sites

Do you mean this file ?

 

Do you mean this file ?

You need to disable nvidia. In SSDT5 you find _INI and _OFF for your nvidia...

 

        Method (_INI, 0, NotSerialized)  // _INI: Initialize
        {
            Store (Zero, \_SB.PCI0.PEG0.PEGP._ADR)
            Store (NVSD, \_SB.PCI0.PEG0.PEGP.NVID)
            _OFF() //added to turn nvidia off
        }

Make sure "Rename GFX0 to IGPU" on all SSDTs you're including (renames must be balanced across all files).

Share this post


Link to post
Share on other sites

I will try. What means "renames must be balanced across all files" and does need rename on dsdt ?

It means if you use "Rename GFX0 to IGPU", you must use it for DSDT or any SSDT that contains references to GFX0.

 

Like an algebraic equation, you must apply any rename equally to all files which contain references to the object being renamed.

Share this post


Link to post
Share on other sites

If i have intel hd 4600 and when i click patch for it says 2 patches 0 changes and apply button not enabled i cant click on it

Share this post


Link to post
Share on other sites

If i have intel hd 4600 and when i click patch for it says 2 patches 0 changes and apply button not enabled i cant click on it

What patch are you referring to?

And for patching gpu i must patch ssdt4.dsl ?

ssdt4 had your GFX0 (IGPU) definition. It gets rename+brightness fix.

Share this post


Link to post
Share on other sites

Intel hd 4400/4600 patch. P.S. brightness works, battery works but not showing correct time , and when pc boot ups there is a big scratches on screen but when log on there disappears , and how to check if nvidia graphics are disabled

post-1408813-14134834515141_thumb.jpg Scratches like this

Share this post


Link to post
Share on other sites

Intel hd 4400/4600 patch.

Most just use bootloader config.

 

P.S. brightness works, battery works but not showing correct time , and when pc boot ups there is a big scratches on screen but when log on there disappears , and how to check if nvidia graphics are disabled

attachicon.gifImageUploadedByTapatalk1413483451.109736.jpg Scratches like this

Battery status generally requires DSDT patches and a kext... (such as my version of ACPIBatteryManager.kext).

 

You can look in ioreg or System Information to see if nvidia is disabled. If your brightness controls started working after applying the patch to turn it off, then it is very likely turned off.

 

You could try a few more things (for 'scratches'):

- set bootloader resolution to native resolution

- try different ig-platform-id values (0xa260006, 0xa260005, 0xa260000, 0xa160000, 0xa2e0008)

- set slide=0 kernel flag

- set a color profile

- inject EDID

- login/logout/login

- rollback Azul/HD5000 kexts to 10.9.1

- patch framebuffer... (requires much research)

Share this post


Link to post
Share on other sites

Changin profile works thanks. Last questions after sleep it says usb not injected properly and there is an error at clover boot " no interval found for . Using 800000"

Share this post


Link to post
Share on other sites

...Last questions after sleep it says usb not injected properly

Probably 'ejected'... Eject/remove the USB device before sleep.

 

and there is an error at clover boot " no interval found for . Using 800000"

Normal.

Share this post


Link to post
Share on other sites

Thanks for your help i am totally new on dsdt patching. I will try patch intel hd4400/4600 patch on ssdt. For other problems i know where to ask . Thanks a lot.

Share this post


Link to post
Share on other sites

RehabMan do you have dsdt patch for correct initialyzing keyboard. my keyboards alt becomes command fn not working and other f1-f12 not working too.

Share this post


Link to post
Share on other sites

RehabMan do you have dsdt patch for correct initialyzing keyboard. my keyboards alt becomes command fn not working and other f1-f12 not working too.

Most laptops' Fn does not generate a scan code (My Lenovo u430 is an exception, and I used it in the custom keyboard profile in my VoodooPS2 driver).

 

F1-F12 should work fine (to generate F1-F12), but the Fn+F1...F12 is a different story. Some BIOS switch the function of Fn+F1..F12 and F1..F12. You should be clear about whether you're talking about F1..F12 or Fn+F1..F12.

 

Using Alt as Command is consistent with the physical layout of Apple keyboards.

Share this post


Link to post
Share on other sites

I found your hp envy dsdt patch and some file for dsdt errors fix then i change acpi to 5.0 and apply that patch to dsdt and everything works can this mean that my dsdt use acpi5.0 version ?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By DoZe
      Hi :0)
       
      Hope As usual a perfect matching DSDT for this good Laptop.
       
      Regards, Ray
       
       
      SendMeStudiMac.zip
    • By MaLd0n
      --Donations via PayPal--
      https://tinyurl.com/r2bvzm7
       
      --Original Topic--
      https://www.olarila.com/topic/6874-olarila-hackbook-lenovo-ideapad-s145-mojave-catalina-full-dsdt-patches/
       

       
      -Perfect HackBook, HDMI Audio/Video, Bluetooth, AirPlay, Sleep, Lid Sleep, Auto Sleep, Audio, etc!
      -Wifi card has been replaced with Dell DW1560!
      -I'm using a S145-15IWL Model with Intel Core i5 8265u / Intel UHD Graphics 620
      -Update bios/uefi to last version
       
      --Installation--
      https://www.olarila.com/topic/5794-guide-install-macos-with-olarila-image-step-by-step-install-and-post-install-windows-or-mac/
       
      --Clover Folder--
      Just paste EFI folder inside EFI partition
      https://www.olarila.com/files/Clover.Folder/Lenovo IdeaPad S145.zip
      Notebooks with ELAN trackpad use it with my folder above
      IdeaPad S145 ELAN.zip
       
      Bluetooth Broadcom
      Bluetooth Broadcom.zip
       
      CPUFriend for i5-8265U
      CPUFriend i5-8265U.zip
       
      --Full DSDT Patches--
      -My DSDT
      DSDT Lenovo IdeaPad S145.zip
       
      This DSDT work on S145-14IWL, S145-15IWL, V14-IWL, V15-IWL models
      -Patches
      -FIX ERRORS AND WARNINGS -REMOVE UNUSED SCOPES / DEVICES -HIGH PRECISION EVENT TIMER -SATA SERIE 11 ID -DMAC -REMOVE LINES, PROBLEMATIC and UNUSED -SLPB -DARWIN / WINDOWS 2015 -XHCI -PLUGIN TYPE -HDAS to HDEF -HDEF -REAL TIME CLOCK -ARTC -IRQs -SBUS -BUS1 -MCHC -ALS0 -SHUTDOWN -FWHD -USBX -PMCR -PPMC -XSPI -GMM -IMEI -EC -PRWs -_DSMs -PNLF -BRIGHTNESS KEYS -I2C -NATIVE USB -ARPT -GFX0 -DTGP -kUSBCompanionIndex -io-device-location -FULL RENAMED DEVICES   --IGPU Patch--
      Video solution with HDMI Audio and Video
      <key>PciRoot(0x0)/Pci(0x2,0x0)</key> <dict> <key>AAPL,GfxYTile</key> <data> AQAAAA== </data> <key>AAPL,ig-platform-id</key> <data> CQClPg== </data> <key>device-id</key> <data> pT4AAA== </data> <key>enable-hdmi20</key> <data> AQAAAA== </data> <key>framebuffer-con0-alldata</key> <data> AAAIAAIAAACYAAAA </data> <key>framebuffer-con0-enable</key> <integer>1</integer> <key>framebuffer-con1-alldata</key> <data> AQEJAAAIAADHAQAA </data> <key>framebuffer-con1-enable</key> <integer>1</integer> <key>framebuffer-con2-alldata</key> <data> AgYKAAAEAADHAQAA </data> <key>framebuffer-con2-enable</key> <integer>1</integer> <key>framebuffer-fbmem</key> <data> AACQAA== </data> <key>framebuffer-patch-enable</key> <data> AQAAAA== </data> <key>framebuffer-stolenmem</key> <data> AAAwAQ== </data> <key>framebuffer-unifiedmem</key> <data> AAAAgA== </data> <key>hda-gfx</key> <string>onboard-1</string> <key>model</key> <string>Intel Corporation, Cannon Point-LP Iris Plus Graphics 655</string> </dict>   --Native USB Fix for Notebooks - No Injector/Kext Required--
      https://www.olarila.com/topic/6878-guide-native-usb-fix-for-notebooks-no-injectorkext-required/
      https://www.olarila.com/topic/6181-guide-native-usb-fix-for-desktops-no-injectorkext-required-skylake/
       
       
      -ScreenShots

































      -Links
       
       
      Clover https://github.com/CloverHackyColor/CloverBootloader
      AirportBrcmFixup.kext https://github.com/acidanthera/AirportBrcmFixup
      AppleALC.kext https://github.com/acidanthera/AppleALC
      Brcm Bluetooth https://github.com/acidanthera/BrcmPatchRAM
      Lilu.kext https://github.com/acidanthera/Lilu
      SystemProfilerMemoryFixup.kext https://github.com/Goldfish64/SystemProfilerMemoryFixup
      VirtualSMC.kext https://github.com/acidanthera/VirtualSMC
      VoodooI2C.kext https://github.com/alexandred/VoodooI2C
      VoodooPS2Controller.kext https://github.com/acidanthera/VoodooPS2
      WhateverGreen.kext https://github.com/acidanthera/WhateverGreen
      MaciASL - https://github.com/acidanthera/MaciASL
      acpica - https://github.com/acpica/acpica
      AptioMemoryFix.efi https://github.com/acidanthera/AptioFixPkg
      ApfsDriverLoader.efi https://github.com/acidanthera/AppleSupportPkg
      HFSPlus.efi https://github.com/JrCs/CloverGrowerPro/blob/master/Files/HFSPlus/X64/HFSPlus.efi?raw=true
      Hackintool https://github.com/headkaze/Hackintool
       
      -Credits and thanks to the old and new people in the community who developed patches, kexts and bootloaders!
       
      Slice, Kabyl, usr-sse2, jadran, Blackosx, dmazar, STLVNUB, pcj, apianti, JrCs, pene, FrodoKenny, skoczy, ycr.ru, Oscar09, xsmile, SoThOr, RehabMan, Download-Fritz, Zenit432, cecekpawon, Intel, Apple, Oracle, Chameleon Team, crazybirdy, Mieze, Mirone, Oldnapalm, netkas, Elconiglio, artut-pt, ErmaC, Pavo, Toleda, Master Chief and family, bcc9, The King, PMheart, Sherlocks, Micky1979, vit9696, vandroiy2013, Voodoo Team, Pike R. Alpha, lvs1974, Austere.J, CVad, Sampath007, onemanosx, erroruser, Jenny David, Olarila Facebook Community, Hackintosh Facebook Community and many others!
       
      We're all here to have fun and learn from each other!
    • By kevin_1351
      tl;dr: VirtualSMC causes me a flood of log messages and correlated cpu spikes. FakeSMC doesn't.
       
      Hi, I have almost finalized my Huawei Matebook X Pro Opencore setup and everything is working very well besides wifi/bt ofc (which is about to change).
       
      However, I noticed how the cpu usage sometimes went up a little and when looking at the Console I could see a never-ending flood of:
      default 14:05:05.983292+0100 loginwindow clamshellStateChanged | Clamshell state changed: closed=0, shouldSleepWhenClosed=2 default 14:05:05.982975+0100 kernel PMRD: clamshell closed 0, disabled 0, desktopMode 0, ac 0 sleepDisabled 0 default 14:05:05.982996+0100 kernel PMRD: clamshell closed 0, disabled 0, desktopMode 0, ac 0 sleepDisabled 0 default 14:05:06.985932+0100 kernel PMRD: clamshell closed 0, disabled 0, desktopMode 0, ac 0 sleepDisabled 0 default 14:05:06.985949+0100 kernel PMRD: clamshell closed 0, disabled 0, desktopMode 0, ac 0 sleepDisabled 0 default 14:05:06.986134+0100 loginwindow clamshellStateChanged | Clamshell state changed: closed=0, shouldSleepWhenClosed=2 default 14:05:39.426574+0100 kernel PMRD: clamshell closed 0, disabled 0, desktopMode 0, ac 0 sleepDisabled 0 default 14:05:39.426729+0100 loginwindow clamshellStateChanged | Clamshell state changed: closed=0, shouldSleepWhenClosed=2 default 14:05:39.426585+0100 kernel PMRD: clamshell closed 0, disabled 0, desktopMode 0, ac 0 sleepDisabled 0 default 14:05:41.431085+0100 kernel PMRD: clamshell closed 0, disabled 0, desktopMode 0, ac 0 sleepDisabled 0 default 14:05:41.431097+0100 kernel PMRD: clamshell closed 0, disabled 0, desktopMode 0, ac 0 sleepDisabled 0 default 14:05:41.431246+0100 loginwindow clamshellStateChanged | Clamshell state changed: closed=0, shouldSleepWhenClosed=2 default 14:05:42.433068+0100 kernel PMRD: clamshell closed 0, disabled 0, desktopMode 0, ac 0 sleepDisabled 0 default 14:05:42.433227+0100 loginwindow clamshellStateChanged | Clamshell state changed: closed=0, shouldSleepWhenClosed=2 default 14:05:42.433078+0100 kernel PMRD: clamshell closed 0, disabled 0, desktopMode 0, ac 0 sleepDisabled 0 default 14:05:43.434453+0100 kernel PMRD: clamshell closed 0, disabled 0, desktopMode 0, ac 0 sleepDisabled 0 default 14:05:43.434465+0100 kernel PMRD: clamshell closed 0, disabled 0, desktopMode 0, ac 0 sleepDisabled 0 default 14:05:43.434622+0100 loginwindow clamshellStateChanged | Clamshell state changed: closed=0, shouldSleepWhenClosed=2 default 14:05:44.436155+0100 kernel PMRD: clamshell closed 0, disabled 0, desktopMode 0, ac 0 sleepDisabled 0 default 14:05:44.436166+0100 kernel PMRD: clamshell closed 0, disabled 0, desktopMode 0, ac 0 sleepDisabled 0  
      As you can see, multiple of these per second. Another guy with the same computer is also having this issue and posted a dsdt change to fix it. This fix didn't solve anything though
      He tried to limit the Notify call by implementing a state change requirement before calling Notify.
       
      Here is the original acpi:
      Scope (_SB) { Device (LID) { Name (_HID, EisaId ("PNP0C0D") /* Lid Device */) // _HID: Hardware ID Method (_LID, 0, NotSerialized) // _LID: Lid Status { Local0 = One Local0 = ^^PCI0.LPCB.EC0.RPIN (0x05, 0x06) If ((Local0 == 0x55)) { Local0 = Zero } Else { Local0 = One } ^^PCI0.GFX0.CLID = Local0 Return (Local0) } } Device (PWRB) { Name (_HID, EisaId ("PNP0C0C") /* Power Button Device */) // _HID: Hardware ID Method (_STA, 0, NotSerialized) // _STA: Status { Return (0x0B) } } } Scope (_SB.PCI0.LPCB.EC0) { Method (_Q81, 0, NotSerialized) // _Qxx: EC Query, xx=0x00-0xFF { Local0 = ^^^^LID._LID () If ((Local0 == Zero)) { ADBG ("LID-OFF") SGOV (0x02030009, Zero) SGOV (0x02060000, Zero) } Else { ADBG ("LID-ON") SGOV (0x02030009, One) SGOV (0x02060000, One) Notify (ALSD, 0x80) // Status Change } Notify (LID, 0x80) // Status Change } } Which he changed to: 
      Scope (_SB) { Device (LID) { Name (_OLD, One) // assuming everything else.. the lid should start open? Name (_HID, EisaId ("PNP0C0D") /* Lid Device */) // _HID: Hardware ID Method (_LID, 0, NotSerialized) // _LID: Lid Status { Local0 = One Local0 = ^^PCI0.LPCB.EC0.RPIN (0x05, 0x06) If ((Local0 == 0x55)) { Local0 = Zero } Else { Local0 = One } Return (Local0) } } Device (PNLF) { Name (_HID, EisaId ("APP0002")) // _HID: Hardware ID Name (_CID, "backlight") // _CID: Compatible ID Name (_UID, 0x0A) // _UID: Unique ID Name (_STA, 0x0B) // _STA: Status } Device (PWRB) { Name (_HID, EisaId ("PNP0C0C") /* Power Button Device */) // _HID: Hardware ID Method (_STA, 0, NotSerialized) // _STA: Status { Return (0x0B) } } } Scope (_SB.PCI0.LPCB.EC0) { Method (_Q81, 0, NotSerialized) // _Qxx: EC Query, xx=0x00-0xFF { Local0 = ^^^^LID._LID () If ((Local0 == Zero)) { ADBG ("LID-OFF") SGOV (0x02030009, Zero) SGOV (0x02060000, Zero) } Else { ADBG ("LID-ON") SGOV (0x02030009, One) SGOV (0x02060000, One) Notify (ALSD, 0x80) // Status Change } If ((^^^^LID._OLD != Local0)) { Notify (LID, 0x80) // Status Change ^^^^LID._OLD = Local0 } } } Besides me not seeing any reason to declare _OLD in LID. The idea itself shouldn't be too bad right? Well, as I said, his fix didn't work.
       
      In fact, to prove that Method _Q81 doesn't have anything to do with the issue at all, I created a Clover/Opencore patch to change _Q81 to XQ81. This resulted in my lid not working at all of course, but the log flooding still persisted!
      So _Q81 doesn't have anything to do with the issue afaik.
       
      Now, further Google searches led me to a chinese post where he tied the issue to VirtualSMC. And indeed, by migrating to FakeSMC the issue is no more.
       
      Unfortunately, I'm very fond of VirtualSMC for various reasons. So I would very much like to keep it. If not I'd have to implement the old way of doing Battery monitoring etcetc. Which isn't very elegant and update proof as it requires DSDT patching.
       
      So, I do believe that the issue may very well be in the DSDT code, perhaps in the ambient light part. I'm not very skilled at this and just started studying the ACPI spec 3 days ago.
       
      Could someone please help me out? Thanks a lot in advance
       
       
      origin.zip
      OC.zip
×