Hoshi Yamazaki Posted October 5, 2018 Share Posted October 5, 2018 Hi, I want to rename VID to IGPU on my ThinkPad X220 to use brightness control. I'm not very familiar with DSDT/SSDT patching, and I don't want to use ready solution because I want fully stable system and I learn things by myself (just actually I don't have time for debugging custom DSDT created by myself). I tried Rehabman patches on DSDT, they don't work. I use High Sierra. Any help? Link to comment Share on other sites More sharing options...
foskvs Posted October 6, 2018 Share Posted October 6, 2018 Open DSDT with MaciASL and use search function (command+F) search for VID and replace with IGPU. Keep in mind that integrated gpu (VID) might also be defined elsewhere (one ore more SSDTs) so you need to patch them too. You can also apply the rename from config.plist (VID_ -> IGPU). You just need to convert those two ASCII strings to HEX. Link to comment Share on other sites More sharing options...
Hoshi Yamazaki Posted October 6, 2018 Author Share Posted October 6, 2018 (edited) Ok, so RehabMan ready patches are not working: Indeed I must do it different way. I will try to rename with Clover. Edited October 6, 2018 by Hoshi Yamazaki Include img Link to comment Share on other sites More sharing options...
Hoshi Yamazaki Posted October 6, 2018 Author Share Posted October 6, 2018 (edited) Naah, Clover change does not work either. I tried to remove overwrite lines in patch, but it didn't helpt. EDIT: Another question - I need AppleBacklightInjector.kext in /L/E or it can remains in Clover EFI? Because I have it there. Edited October 6, 2018 by Hoshi Yamazaki Link to comment Share on other sites More sharing options...
foskvs Posted October 6, 2018 Share Posted October 6, 2018 (edited) Attach original ACPI tables. You are clearly doing something wrong with renaming VID to IGPU. Compiler errors refer to _SB.PCI0.PEG.IGPU, but iGPU should be at _SB.PCI0 (so _SB.PCI0.IGPU). Edit: I have no clue of what are your hardware specs, so i hope you are trying to patch integrated GPU... Edited October 6, 2018 by foskvs Link to comment Share on other sites More sharing options...
Hoshi Yamazaki Posted October 6, 2018 Author Share Posted October 6, 2018 (edited) Yeah, yeah. I used ready patches from Rehabman thinking it will work on the fly - it was mistake. This happens if I use RenameDevices in Clover (_SB.PCI0.VID -> IGPU). I said I use Thinkpad X220 with i5 Sandy Bridge and Intel HD 3000 graphics origin.zip EDIT: Included ACPI origin tables. Edited October 6, 2018 by Hoshi Yamazaki Link to comment Share on other sites More sharing options...
foskvs Posted October 6, 2018 Share Posted October 6, 2018 HD 3000 in used both in DSDT and in SSDT-0, you need to apply the rename to them and drop the original SSDT-0 (table-id TP-SSDT2). Look at those files attached for correct renaming. DSDT.dsl.zip SSDT-0-TP-SSDT2.dsl.zip Link to comment Share on other sites More sharing options...
Hoshi Yamazaki Posted October 6, 2018 Author Share Posted October 6, 2018 It's working - and I patched it by myself (I consider it as hobby as many of you, but people on reddit still can use mutlibeast and ready ACPI tables). My problem is I used ready patches and considered PEG.VID.* as the same as VID object. Yeah I know programming since I'm webdeveloper, but whatever, my stupidy. Anyway thanks and have nice night Link to comment Share on other sites More sharing options...
foskvs Posted October 7, 2018 Share Posted October 7, 2018 12 hours ago, Hoshi Yamazaki said: It's working - and I patched it by myself Very good. Using tony's tools is bad, because they seem to be a good shortcut, but won't be able to fix probems if you don't apply patches by yourself. Downloading ACPI tables without knowing exactly what they do is even worse... 12 hours ago, Hoshi Yamazaki said: My problem is I used ready patches and considered PEG.VID.* as the same as VID object. Yeah I know programming since I'm webdeveloper, but whatever, my stupidy. It happens sometimes... Link to comment Share on other sites More sharing options...
Hoshi Yamazaki Posted October 7, 2018 Author Share Posted October 7, 2018 Ok, only one thing: I want to get brightness keys to work. My X220 uses PS2 for keyboard control - I used ioio from RehabMan to check what keys I press (ioio -s ApplePS2Keyboard LogScanCodes 1): https://github.com/RehabMan/OS-X-Voodoo-PS2-Controller/wiki/How-to-Use-Custom-Keyboard-Mapping https://github.com/RehabMan/OS-X-ioio But if I press Fn + Key, I can't get one key press in Console Utility. So how I should connect two key presses ID to one key code? Is there utility for that? Even if I want to patch ACPI, I too need one key code for two combo. This is last question, thanks! Link to comment Share on other sites More sharing options...
foskvs Posted October 7, 2018 Share Posted October 7, 2018 In your case brightness hotkeys generate ACPI events. Looking into your DSDT you can see that _Q14 Method increases brightness (calls _SB.PCI0.IGPU.LCD0 0x86) and _Q15 Method decreases brightness (calls _SB.PCI0.IGPU.LCD0 0x87). I say that from personal experience, so you should check if it's correct by debugging your DSDT (look for ACPIDebug.kext and read the instructions). I would apply this patch (replacing your actual _Q14 and _Q15 Methods): Method (_Q14, 0, NotSerialized) // _Qxx: EC Query { Notify(\_SB.PCI0.LPCB.KBD, 0x0406) //Brightness up } Method (_Q15, 0, NotSerialized) // _Qxx: EC Query { Notify(\_SB.PCI0.LPCB.KBD, 0x0405) //Brightness down } I'm not completely sure about this. Do the debugging process and check if it is correct. Link to comment Share on other sites More sharing options...
Recommended Posts