- Joined
- Aug 7, 2018
- Messages
- 114
- Motherboard
- Asus TUF FX504GE (Clover)
- CPU
- i7-8750H/HM370
- Graphics
- UHD 630, Nvidia 1050ti, 1920x1080
- Mobile Phone
Maybe the update I just did to SSDT-PNLF.dsl helps...
Tested it.
Got the following stall.
Maybe the update I just did to SSDT-PNLF.dsl helps...
Tested it.
Got the following stall.
"Problem Reporting" files are incomplete.
Read FAQ, "Problem Reporting" again. Carefully. Attach all requested files/output.
https://www.tonymacx86.com/threads/faq-read-first-laptop-frequent-questions.164990/
Use the gen_debug.sh tool mentioned in the FAQ, that way it is less likely you'll omit something.
Had to drop the SSDT-PNLF.aml for this. Everything is as it is.
Remove the kernel flag for the WEG fix.
I'll tell you how I got the backlight slider working for my system but I still recommend you follow RehabMan's directions as he's far more experienced in this area than me.
1. Download and install RehabMan's version of MaciASL from here
2. Run MaciASL
3. Choose Preferences from the MaciASL menu bar
4. Select Sources
5. Click the [+] button
6. Give it a name (eg. "Laptop Patches")
7. Type the following URL: http://raw.github.com/RehabMan/Laptop-DSDT-Patch/master
8. Copy your DSDT.aml file to /EFI/CLOVER/ACPI/patched and then open it in MaciASL
9. Click the "Patch" icon and select "[igpu] Brightness fix (ACPI 100)" from the list
10. It should say "4 Patches, 1 Change, 0 Rejects"
11. Click Apply button
12. Click the Compile button
13. You will get several errors Eg. "Object not found or not accessible from scope (^^DD02._BCM)"
14. Double click the first error to jump to it
15. Now carefully copy/paste this code over the top of the relevant ACPI code:
16. Hit Compile again and it should not show any errorsCode:// _BCM/_BQC: set/get for brightness level Method (_BCM, 1, NotSerialized) { // Update backlight via existing DSDT methods External(^^DD1F._BCM, MethodObj) ^^DD1F._BCM(Arg0) } Method (_BQC, 0, NotSerialized) { External(^^DD1F._BQC, MethodObj) Return(^^DD1F._BQC()) } Method (_BCL, 0, NotSerialized) { External(^^DD1F._BCL, MethodObj) Return(^^DD1F._BCL()) } Method (_DOS, 1, NotSerialized) { External(^^_DOS, MethodObj) ^^_DOS(Arg0) } // extended _BCM/_BQC for setting "in between" levels Method (XBCM, 1, NotSerialized) { // Update backlight via existing DSDT methods ^^DD1F._BCM(Arg0) } Method (XBQC, 0, NotSerialized) { Return(^^DD1F._BQC()) }
17. Save your changes and reboot
There was a flicker for some time when the boot sequence was complete. Otherwise everything else is working. The backlight works. No stall was there. It seems the stall was due to an audio problem. It has been there since I removed gfxhda.kext. When booting without the option of resetting HDA I had no stall. Also a bit of flickering is there while using the laptop.
EDIT 1: Sad to say, it was one of those less often happenings where backlight remained. The issue is still there. Using the AppleBacklightFixup.kext the slider is working. Also the backlight goes off at the end of the boot sequence as it did originally. All other things remain same. PR files updated.
EDIT2: After testing it more, found that after a few hot boots, the backlight works without any flicker. From what I found, It is that initially the backlight would go off at the start. After 2-3 hot boots the backlight would go off at the end of boot sequence. After 2-3 more hot boots the backlight would not go off. It will remain there for as many times you want to hot boot after that. PR files added as edit2.zip for this succesful boot.
This is the CFL related code:I had a look at your latest SSDT-PNLF. Where is the actual calculation for BXT_BLC_PWM_DUTY1?
if (Ones == Local2) { Local2 = COFFEELAKE_PWMMAX }
INI1(Local4)
// change/scale only if different than current...
Local1 = ^LEVX
If (!Local1) { Local1 = Local2 }
If (Local2 != Local1)
{
// set new backlight PWMMax but retain current backlight level by scaling
Local0 = (^LEVD * Local2) / Local1
//REVIEW: wait for vblank before setting new PWM config
//For (Local7 = ^P0BL, ^P0BL == Local7, ) { }
If (Local2 > Local1)
{
// PWMMax is getting larger... store new PWMMax first
^LEVX = Local2
^LEVD = Local0
}
Else
{
// otherwise, store new brightness level, followed by new PWMMax
^LEVD = Local0
^LEVX = Local2
}
}
OperationRegion(RMB1, SystemMemory, BAR1 & ~0xF, 0xe1184)
Field(RMB1, AnyAcc, Lock, Preserve)
{
Offset(0x48250),
LEV2, 32,
LEVL, 32,
Offset(0x70040),
P0BL, 32,
Offset(0xc2000),
GRAN, 32,
Offset(0xc8250),
LEVW, 32,
LEVX, 32,
LEVD, 32,
Offset(0xe1180),
PCHL, 32,
}
This is the CFL related code:
Code:if (Ones == Local2) { Local2 = COFFEELAKE_PWMMAX } INI1(Local4) // change/scale only if different than current... Local1 = ^LEVX If (!Local1) { Local1 = Local2 } If (Local2 != Local1) { // set new backlight PWMMax but retain current backlight level by scaling Local0 = (^LEVD * Local2) / Local1 //REVIEW: wait for vblank before setting new PWM config //For (Local7 = ^P0BL, ^P0BL == Local7, ) { } If (Local2 > Local1) { // PWMMax is getting larger... store new PWMMax first ^LEVX = Local2 ^LEVD = Local0 } Else { // otherwise, store new brightness level, followed by new PWMMax ^LEVD = Local0 ^LEVX = Local2 } }
^LEVX is BXT_BLC_PWM_FREQ1
^LEVD is BXT_BLC_PWM_DUTY1
Code:OperationRegion(RMB1, SystemMemory, BAR1 & ~0xF, 0xe1184) Field(RMB1, AnyAcc, Lock, Preserve) { Offset(0x48250), LEV2, 32, LEVL, 32, Offset(0x70040), P0BL, 32, Offset(0xc2000), GRAN, 32, Offset(0xc8250), LEVW, 32, LEVX, 32, LEVD, 32, Offset(0xe1180), PCHL, 32, }
The idea is to set a new LEVX and LEVD but to retain the same effective value of LEVD/LEVX, same as done for the other IGPUs.
I think we are going to need some debug instrumentation.