Contribute
Register

[solved] Backlight issues on xps 14

Status
Not open for further replies.
Backlight issues on xps 14

I have tried replacing
Method (_BQC, 0, NotSerialized)\n
{\n
Return(^^DD02._BQC())\n
}\n

with

Method(_BQC)
{
Return (\_SB.PCI0.LPCB.EC0.BRTS)
}







so this is what i am patching..



#Maintained by: RehabMan for: Laptop Patches
#graphics_PNLF-ACPI100.txt


# This patch enables the brightness slider in SysPrefs->Displays
# and will also enable activation of sleep mode by closing
# the laptop lid.
#
# This patch works well for laptops that have working
# ACPI methods with 64-or more levels (100 is common)
# for good support for Windows 2012 (Windows 8)
#
# Based on information from the normal laptop DSDT methods,
# optimized for use with ACPIBacklight.kext
#
# Note: This patch should be applied to the DSDT or SSDT that defines
# your integrated graphics device (always at _ADR 0x00020000)
# applied to one of the SSDTs, not DSDT.
#
# Note: Intended to be used with Windows 2012, so this should be done...
# if you previously patched for Windows 2006, undo that patch!


# sometimes in Scope (_SB.PCI0)
into method label _INI parent_label _SB.PCI0 code_regex If\s+\(_OSI\s+\(\"Windows\s2012\"\)\) replace_matched
begin If(LOr(_OSI("Darwin"),_OSI("Windows 2012"))) end;


# sometimes in Scope (_SB)
into method label _INI parent_label _SB code_regex If\s+\(_OSI\s+\(\"Windows\s2012\"\)\) replace_matched
begin If(LOr(_OSI("Darwin"),_OSI("Windows 2012"))) end;




into_all device label PNLF remove_entry;
into device name_adr 0x00020000 insert
begin
Device (PNLF)\n
{\n
// normal PNLF declares (note some of this probably not necessary)\n
Name (_ADR, Zero)\n
Name (_HID, EisaId ("APP0002"))\n
Name (_CID, "backlight")\n
Name (_UID, 10)\n
Name (_STA, 0x0B)\n
// _BCM/_BQC: set/get for brightness level\n
Method (_BCM, 1, NotSerialized)\n
{\n
// Update backlight via existing DSDT methods\n
^^DD02._BCM(Arg0)\n
}\n
Method(_BQC)
{
Return (\_SB.PCI0.LPCB.EC0.BRTS)
}\n
Method (_BCL, 0, NotSerialized)\n
{\n
Return(^^DD02._BCL())\n
}\n
Method (_DOS, 1, NotSerialized)\n
{\n
^^_DOS(Arg0)\n
}\n
// extended _BCM/_BQC for setting "in between" levels\n
Method (XBCM, 1, NotSerialized)\n
{\n
// Update backlight via existing DSDT methods\n
^^DD02._BCM(Arg0)\n
}\n
Method (XBQC, 0, NotSerialized)\n
{\n
Return(^^DD02._BQC())\n
}\n
// Use XOPT=1 to disable smooth transitions\n
Name (XOPT, Zero)\n
// XRGL/XRGH: defines the valid range\n
Method (XRGL, 0, NotSerialized)\n
{\n
Store(_BCL(), Local0)\n
Store(DerefOf(Index(Local0, 2)), Local0)\n
Return(Local0)\n
}\n
Method (XRGH, 0, NotSerialized)\n
{\n
Store(_BCL(), Local0)\n
Store(DerefOf(Index(Local0, Subtract(SizeOf(Local0), 1))), Local0)\n
Return(Local0)\n
}\n
}\n
end;

This generates a dsdt error of View attachment 161440

I am compiling from a fresh dsdt.dsl

Many thanks

From the screen shot you provide, it is clear you didn't change the code as we discussed.
 
Backlight issues on xps 14

When you say screenshot.. do you mean the picture I posted? or the output of the code that was patched? I totally know I am doing something wrong..just trying to understand what I am doing wrong. but like I said in the previous post I replaced the body where bqc was mentioned with the code you posted. Do I need the rest? Do I need more? I am really trying to wrap my head around this concept as for me it is quite foreign. It is very nice that you help people out with this type of stuff and I know you cant hold peoples hand with everything but please be a bit more detailed in where I went wrong as I see the bqc method in the code and not sure what else I was supposed to do. Thanks
 
Backlight issues on xps 14

Post native dsdt.
 
Backlight issues on xps 14

I appreciate it sir :)
 
Backlight issues on xps 14


As per previous suggestion, slightly modified ACPI100 patch:
Code:
# sometimes in Scope (_SB.PCI0)
into method label _INI parent_label _SB.PCI0 code_regex If\s+\(_OSI\s+\(\"Windows\s2012\"\)\) replace_matched
begin If(LOr(_OSI("Darwin"),_OSI("Windows 2012"))) end;

# sometimes in Scope (_SB)
into method label _INI parent_label _SB code_regex If\s+\(_OSI\s+\(\"Windows\s2012\"\)\) replace_matched
begin If(LOr(_OSI("Darwin"),_OSI("Windows 2012"))) end;

into_all device label PNLF remove_entry;
into device name_adr 0x00020000 insert
begin
Device (PNLF)\n
{\n
    // normal PNLF declares (note some of this probably not necessary)\n
    Name (_ADR, Zero)\n
    Name (_HID, EisaId ("APP0002"))\n
    Name (_CID, "backlight")\n
    Name (_UID, 10)\n
    Name (_STA, 0x0B)\n
    // _BCM/_BQC: set/get for brightness level\n
    Method (_BCM, 1, NotSerialized)\n
    {\n
        // Update backlight via existing DSDT methods\n
        ^^DD02._BCM(Arg0)\n
    }\n
    Method (_BQC, 0, NotSerialized)\n
    {\n
        Return (\_SB.PCI0.LPCB.EC0.BRTS)\n
    }\n
    Method (_BCL, 0, NotSerialized)\n
    {\n
        Return(^^DD02._BCL())\n
    }\n
    Method (_DOS, 1, NotSerialized)\n
    {\n
        ^^_DOS(Arg0)\n
    }\n
    // extended _BCM/_BQC for setting "in between" levels\n
    Method (XBCM, 1, NotSerialized)\n
    {\n
        // Update backlight via existing DSDT methods\n
        ^^DD02._BCM(Arg0)\n
    }\n
    Method (XBQC, 0, NotSerialized)\n
    {\n
        Return (\_SB.PCI0.LPCB.EC0.BRTS)\n
    }\n
    // Use XOPT=1 to disable smooth transitions\n
    Name (XOPT, Zero)\n
    // XRGL/XRGH: defines the valid range\n
    Method (XRGL, 0, NotSerialized)\n
    {\n
        Store(_BCL(), Local0)\n
        Store(DerefOf(Index(Local0, 2)), Local0)\n
        Return(Local0)\n
    }\n
    Method (XRGH, 0, NotSerialized)\n
    {\n
        Store(_BCL(), Local0)\n
        Store(DerefOf(Index(Local0, Subtract(SizeOf(Local0), 1))), Local0)\n
        Return(Local0)\n
    }\n
}\n
end;
 
Backlight issues on xps 14

Beautiful. Simply beautiful. I am sure that was easy to do but I have been working late trying to figure it out. I will compare to what I was trying to do and learn the error of my ways. Backlight working 100% now. Thank you so much! :)
 
Beautiful. Simply beautiful. I am sure that was easy to do but I have been working late trying to figure it out. I will compare to what I was trying to do and learn the error of my ways. Backlight working 100% now. Thank you so much! :)

Super... Marked [solved].
 
hmm sleep is not working though when I close the lid. I will post details in the morning. Thanks again
 
hmm sleep is not working though when I close the lid. I will post details in the morning. Thanks again

Off-topic. Open a separate thread.
 
Status
Not open for further replies.
Back
Top