Contribute
Register

HP Spectre XT - DSDT (Sleep, Battery, Brightness, maybe more)

Status
Not open for further replies.
Battery:

Okay, will try the debug version and report back.
This patching of the 8 Bit EC-fields, is that hard to do?

---

Sleep:

Sadly my BIOS is one neutered soab (InsydeH20) and there is no patched Version available where I could set WOL or anything, only thing I could do is set my SATA mode to AHCI via EFI Shell and byte patching -.-

But on the upside, I just discovered that someone with the same problem fixed it via DSDT, I'm trying that right now

---

Brightness:

I looked into the mapping scheme that you use - now my question is, is there a ADB code for brightness up/down?
In your header files I only found wifi & co.

---

Sound:

Have you had any chance to look into the DSDT part if I did correctly?
If so, and this does not work like this, is there any way I can manually patch my AppleHDA + layout-id for my specific notebook?
 
Battery:

Okay, will try the debug version and report back.
This patching of the 8 Bit EC-fields, is that hard to do?

After you've done a few, it is not difficult (I've done about 16).

---

Sleep:

Sadly my BIOS is one neutered soab (InsydeH20) and there is no patched Version available where I could set WOL or anything, only thing I could do is set my SATA mode to AHCI via EFI Shell and byte patching -.-

But on the upside, I just discovered that someone with the same problem fixed it via DSDT, I'm trying that right now

---

Let me know what you find out there...

Brightness:

I looked into the mapping scheme that you use - now my question is, is there a ADB code for brightness up/down?
In your header files I only found wifi & co.

---

Going from memory, they are 0x90 and 0x91.

Sound:

Have you had any chance to look into the DSDT part if I did correctly?
If so, and this does not work like this, is there any way I can manually patch my AppleHDA + layout-id for my specific notebook?

I don't know if I saw an audio DSDT patch in this thread yet.... Maybe I missed it?
 
After you've done a few, it is not difficult (I've done about 16).

Would you mind to tell me how to do this? Would really love to get the battery icon working :)

Going from memory, they are 0x90 and 0x91.

Works great, can control brightness now with my keys. :)
Oddly though, I installed VoodooPS2 debug for identifying my brightness key codes. When I press the keys, there is no log at all, only when I press FN + the brightness keys. Do you have any idea why?

I don't know if I saw an audio DSDT patch in this thread yet.... Maybe I missed it?

http://www.tonymacx86.com/mountain-...battery-brightness-maybe-more.html#post676353

The first part in my post was about the audio. I'm not sure if I patched the DSDT right for it. (Audio icon grayed out, no sound at all)


-------------

Edit:

Another problem for the brightness. I can control the brightness with the mapped keys or the slider to the maximum of the slider. But this isn't full brightness. After I attempt to sleep the notebook (currently not working without the instant wake-up), the brightness is full!
So currently I have to sleep the notebook once to get control over full brightness. Any way to fix this?
 
Would you mind to tell me how to do this? Would really love to get the battery icon working :)

I keep meaning to write a guide. And maybe I'll do a guide using yours as an example... But it is more work to write a guide on how to do it...

The basic problem is this: any fields within an EmbeddedControl OperationRegion that are larger than 8-bit cause execution of the method that is accessing them to abort with an error under recent versions of AppleACPIPlatform (done on purpose by Apple to make our life difficult?).

So, for each field larger than 8-bit, it must be broken down into chunks that are 8-bit. Then all the code that accesses it must be changed to address the now smaller/renamed 8-bit fields instead of the one larger field.

Works great, can control brightness now with my keys. :)
Oddly though, I installed VoodooPS2 debug for identifying my brightness key codes. When I press the keys, there is no log at all, only when I press FN + the brightness keys. Do you have any idea why?

Do you have dedicated brightness keys or are they attached to the function keys? Does your BIOS have an option to swap "media keys" for "function keys"? Are your Fn+brightness keys generating standard scan codes for F1-F12? If so, then I'd say your "media keys" are handled by ACPI, not PS2.

http://www.tonymacx86.com/mountain-...battery-brightness-maybe-more.html#post676353

The first part in my post was about the audio. I'm not sure if I patched the DSDT right for it. (Audio icon grayed out, no sound at all)

I would have to see the AppleHDA you're trying to use, and your DSDT/patch.

Another problem for the brightness. I can control the brightness with the mapped keys or the slider to the maximum of the slider. But this isn't full brightness. After I attempt to sleep the notebook (currently not working without the instant wake-up), the brightness is full!
So currently I have to sleep the notebook once to get control over full brightness. Any way to fix this?

Known problem with HD3000/HD4000. Solution is to blink the display (turn it off, then on). You can install 'blinkscreen' using the ProBook Installer.
 
I keep meaning to write a guide. And maybe I'll do a guide using yours as an example... But it is more work to write a guide on how to do it...

Sounds like you really have to know what you are doing there :/ Is there any chance you could do this to my DSDT? This just sounds like something I wouldn't be able to do, even with 2 weeks of straight DSDT learning...

Do you have dedicated brightness keys or are they attached to the function keys? Does your BIOS have an option to swap "media keys" for "function keys"? Are your Fn+brightness keys generating standard scan codes for F1-F12? If so, then I'd say your "media keys" are handled by ACPI, not PS2.

They are combined with the F2/F3 buttons. One of the few options my BIOS offers is actually the one to activate the "Function Keys", I will fiddle around with this. For now, the brightness part is done. The blinkscreen method works like a charm -> another point done, nice! :)

I would have to see the AppleHDA you're trying to use, and your DSDT/patch.

Sure thing.

AppleHDA: http://www.osx86.net/files/file/3498-apple-hda-for-idt-92hd99bxx-id-0x111d76e5/
And my current DSDT: http://d-h.st/VHp

The AppleHDA is supposed to be for exactly my chipset. Copied to S/L/E, fixed permissions, rebuild cache, made the changes to the DSDT (the part with the layout-id was completely added to the DSDT).
But no sound, grayed out speaker-icon in the bar. Strangely thought, AirPlay works just fine as I accidently discovered this morning.
 
Sounds like you really have to know what you are doing there :/ Is there any chance you could do this to my DSDT? This just sounds like something I wouldn't be able to do, even with 2 weeks of straight DSDT learning...

When I get a chance, I'll look at it. From a my quick look at it it is going to be fairly involved (16-bit or 32-bit fields are easy; registers larger than that are extra work).

They are combined with the F2/F3 buttons. One of the few options my BIOS offers is actually the one to activate the "Function Keys", I will fiddle around with this.

It sounds to me like these are handled via ACPI. You might want to take a look at this project: https://github.com/Dolnor/IOWMIFamily

AppleHDA: http://www.osx86.net/files/file/3498-apple-hda-for-idt-92hd99bxx-id-0x111d76e5/
And my current DSDT: http://d-h.st/VHp

The AppleHDA is supposed to be for exactly my chipset. Copied to S/L/E, fixed permissions, rebuild cache, made the changes to the DSDT (the part with the layout-id was completely added to the DSDT).
But no sound, grayed out speaker-icon in the bar. Strangely thought, AirPlay works just fine as I accidently discovered this morning.

This could be an IRQ issue in your DSDT or could be an issue with using an old (2.3.7) AppleHDA on current OS X (current version AppleHDA is 2.4.7). I'll see what I can do there...

Try the IRQ fix patch from my DSDT patch repo: https://github.com/RehabMan/Laptop-DSDT-Patch
 
When I get a chance, I'll look at it. From a my quick look at it it is going to be fairly involved (16-bit or 32-bit fields are easy; registers larger than that are extra work).

That would be absolutely great! I would be soo grateful!

This could be an IRQ issue in your DSDT or could be an issue with using an old (2.3.7) AppleHDA on current OS X (current version AppleHDA is 2.4.7). I'll see what I can do there...

Try the IRQ fix patch from my DSDT patch repo: https://github.com/RehabMan/Laptop-DSDT-Patch

The IRQ fix did the trick! Although my top-speakers still remain silent. (HP Spectre XT has two speakers on the bottom and one or two on the top, the top one(s) are mainly responsible for the depth of the sound-quality).
Is there any chance to get them work? I'm not quite sure what can be achieved there. If you have a hint for me on how to approach this, this would be awesome.

---

Another problem came up with my Atheros 9285, maybe you can help me with this too, since I saw that you have fixes for this adapter in your repo, too.

The Atheros was working all the time now, but for 2-3 days not anymore. It wouldn't work in MacOSX nor in Linux (didn't detect any networks anymore), only in Windows.
After reading that it sometimes gets 'shut off' by hardware, I covered pin 20 on it to make it always-on. Now it detects networks again in OSX and Linux, Linux also successfully connects to networks, but MacOSX won't. In MacOSX the connection to my home-wifi times out immediately after I try to connect to it.

I tried your RP02-PSXS fix from your repo, but it did not change a thing. Now I don't know how to get this thing working again. :/

Thanks again for all your time and patience, RehabMan, very much appreciated!
 
The IRQ fix did the trick! Although my top-speakers still remain silent. (HP Spectre XT has two speakers on the bottom and one or two on the top, the top one(s) are mainly responsible for the depth of the sound-quality).
Is there any chance to get them work? I'm not quite sure what can be achieved there. If you have a hint for me on how to approach this, this would be awesome.

It is probably something that would need to be changed in the layout file (Contents/Resources/layout12.xml.zlib in your case).

Creating the Platforms.xml and layout.xml is the most time consuming/difficult part of the whole process. It is the heart of patching AppleHDA. If you google for 'patch AppleHDA guide' you will see...

Another problem came up with my Atheros 9285, maybe you can help me with this too, since I saw that you have fixes for this adapter in your repo, too.

The Atheros was working all the time now, but for 2-3 days not anymore. It wouldn't work in MacOSX nor in Linux (didn't detect any networks anymore), only in Windows.
After reading that it sometimes gets 'shut off' by hardware, I covered pin 20 on it to make it always-on. Now it detects networks again in OSX and Linux, Linux also successfully connects to networks, but MacOSX won't. In MacOSX the connection to my home-wifi times out immediately after I try to connect to it.

I take it the way you got it working initially was to install some kexts? Or did you do DSDT patches already for it?

AR9285 will work with native kexts untouched. Most people don't realize that and install patched kexts (which do not match their OS X version) which is a very bad idea. Best thing to do is restore your native IO80211Family.kext and do DSDT patches to make it work. To do the DSDT patch properly, you need an ioreg dump (so you know what node in the DSDT the WiFi device is at) and a DSDT ready to patch.
 
It is probably something that would need to be changed in the layout file (Contents/Resources/layout12.xml.zlib in your case).

Creating the Platforms.xml and layout.xml is the most time consuming/difficult part of the whole process. It is the heart of patching AppleHDA. If you google for 'patch AppleHDA guide' you will see...

This is really hard work... I get to the points where I have my verbs.txt and converted my files with codecgraph, but after that I don't really graps all the guides out there. :(
Do you know if there is anyone who will do this process for a little money or something? I really want to make this hackintosh work, but I have to admit that I am coming to a point where I don't really know how I myself could complete these steps.


I take it the way you got it working initially was to install some kexts? Or did you do DSDT patches already for it?

AR9285 will work with native kexts untouched. Most people don't realize that and install patched kexts (which do not match their OS X version) which is a very bad idea. Best thing to do is restore your native IO80211Family.kext and do DSDT patches to make it work. To do the DSDT patch properly, you need an ioreg dump (so you know what node in the DSDT the WiFi device is at) and a DSDT ready to patch.

Yeah I did use some custom kexts, but I put the original 10.8.3 back in S/L/E.
Still no connecting to my network.

Here is the IOReg dump: http://d-h.st/jA2

I'm sorry I'm coming up with one problem after another...
 
I have added a battery patch for you to test in the laptop patch repo. Look for "HP Spectre XP".

To test:
- apply the patch to your DSDT with MaciASL, save to /Extra/dsdt.aml so you're using it.
- install the debug version of the battery manager: https://github.com/RehabMan/OS-X-ACPI-Battery-Driver

Report what you find. Because the patches were fairly involved, I took a shortcut and eliminated the WMI (Windows Management Instrumentation which is not used on OS X) section from the DSDT. If that doesn't work out I can try an alternate method.

Here's the patch (just for reference in this thread):
Code:
#Maintained by: RehabMan for: Laptop Patches
#battery_HP-Spectre-XT.txt

# created by RehabMan 2013-09-09
# created originally for LilaQ

# works for:
# for HP Spectre XT Touchsmart 15-4000EG

# remove WMI related items; makes it easier to patch battery EC
into device label WMID remove_entry;
into device label WLBU remove_entry;
into method label CHWL code_regex \(\^WMID\.[^\)].*\) replaceall_matched begin (Zero) end;
into method label _PTS code_regex \\_SB\.WMID\.ESDT\s+\(\) remove_matched;
into method label PFUN code_regex \^\^\^\^WMID\.SWDS\s+\(0x01FF0000\) remove_matched;
into method label _Q40 remove_entry;
into method label _Q41 remove_entry;
into method label _Q42 remove_entry;

#                SMD0,   256, 
#                BTDC,   64, 
#                BMNN,   72, 
#                BDVN,   56, 
#                ERIB,   16, 

# 16-bit EC
into device label EC0 code_regex ERIB,\s+16 replace_matched begin ERI0,8,ERI1,8 end;
into method label FANG code_regex Store\s+\(Arg0,\s+ERIB\) replace_matched 
begin
Store(ShiftLeft(Arg0, 8), ERI1) Store(Arg0, ERI0)
end;
into method label FANW code_regex Store\s+\(Arg0,\s+ERIB\) replace_matched
begin
Store(ShiftLeft(Arg0, 8), ERI1) Store(Arg0, ERI0)
end;

# deal with 256-bit SMD0
into device label EC0 code_regex SMD0,\s+256 replace_matched 
begin
//SMD0, 256,\n
SD00,8,SD01,8,SD02,8,SD03,8,\n
SD04,8,SD05,8,SD06,8,SD07,8,\n
SD08,8,SD09,8,SD0A,8,SD0B,8,\n
SD0C,8,SD0D,8,SD0E,8,SD0F,8,\n
SD10,8,SD11,8,SD12,8,SD13,8,\n
SD14,8,SD15,8,SD16,8,SD17,8,\n
SD18,8,SD19,8,SD1A,8,SD1B,8,\n
SD1C,8,SD1D,8,SD1E,8,SD1F,8
end;

into device label EC0 insert
begin
Method (RSMD, 0, Serialized)\n
{\n
    Name (TEMP, Buffer(0x20) { })\n
    Store (SD00, Index(TEMP, 0x00))\n
    Store (SD01, Index(TEMP, 0x01))\n
    Store (SD02, Index(TEMP, 0x02))\n
    Store (SD03, Index(TEMP, 0x03))\n
    Store (SD04, Index(TEMP, 0x04))\n
    Store (SD05, Index(TEMP, 0x05))\n
    Store (SD06, Index(TEMP, 0x06))\n
    Store (SD07, Index(TEMP, 0x07))\n
    Store (SD08, Index(TEMP, 0x08))\n
    Store (SD09, Index(TEMP, 0x09))\n
    Store (SD0A, Index(TEMP, 0x0A))\n
    Store (SD0B, Index(TEMP, 0x0B))\n
    Store (SD0C, Index(TEMP, 0x0C))\n
    Store (SD0D, Index(TEMP, 0x0D))\n
    Store (SD0E, Index(TEMP, 0x0E))\n
    Store (SD0F, Index(TEMP, 0x0F))\n
    Store (SD10, Index(TEMP, 0x10))\n
    Store (SD11, Index(TEMP, 0x11))\n
    Store (SD12, Index(TEMP, 0x12))\n
    Store (SD13, Index(TEMP, 0x13))\n
    Store (SD14, Index(TEMP, 0x14))\n
    Store (SD15, Index(TEMP, 0x15))\n
    Store (SD16, Index(TEMP, 0x16))\n
    Store (SD17, Index(TEMP, 0x17))\n
    Store (SD18, Index(TEMP, 0x18))\n
    Store (SD19, Index(TEMP, 0x19))\n
    Store (SD1A, Index(TEMP, 0x1A))\n
    Store (SD1B, Index(TEMP, 0x1B))\n
    Store (SD1C, Index(TEMP, 0x1C))\n
    Store (SD1D, Index(TEMP, 0x1D))\n
    Store (SD1E, Index(TEMP, 0x1E))\n
    Store (SD1F, Index(TEMP, 0x1F))\n
    Return (TEMP)\n
}\n
end;

into device label EC0 insert
begin
Method (WSMD, 1, Serialized)\n
{\n
    Name (TEMP, Buffer(0x20) { })\n
    Store (Arg0, TEMP)\n
    Store (DerefOf(Index(TEMP, 0x00)), SD00)\n
    Store (DerefOf(Index(TEMP, 0x01)), SD01)\n
    Store (DerefOf(Index(TEMP, 0x02)), SD02)\n
    Store (DerefOf(Index(TEMP, 0x03)), SD03)\n
    Store (DerefOf(Index(TEMP, 0x04)), SD04)\n
    Store (DerefOf(Index(TEMP, 0x05)), SD05)\n
    Store (DerefOf(Index(TEMP, 0x06)), SD06)\n
    Store (DerefOf(Index(TEMP, 0x07)), SD07)\n
    Store (DerefOf(Index(TEMP, 0x08)), SD08)\n
    Store (DerefOf(Index(TEMP, 0x09)), SD09)\n
    Store (DerefOf(Index(TEMP, 0x0A)), SD0A)\n
    Store (DerefOf(Index(TEMP, 0x0B)), SD0B)\n
    Store (DerefOf(Index(TEMP, 0x0C)), SD0C)\n
    Store (DerefOf(Index(TEMP, 0x0D)), SD0D)\n
    Store (DerefOf(Index(TEMP, 0x0E)), SD0E)\n
    Store (DerefOf(Index(TEMP, 0x0F)), SD0F)\n
    Store (DerefOf(Index(TEMP, 0x10)), SD10)\n
    Store (DerefOf(Index(TEMP, 0x11)), SD11)\n
    Store (DerefOf(Index(TEMP, 0x12)), SD12)\n
    Store (DerefOf(Index(TEMP, 0x13)), SD13)\n
    Store (DerefOf(Index(TEMP, 0x14)), SD14)\n
    Store (DerefOf(Index(TEMP, 0x15)), SD15)\n
    Store (DerefOf(Index(TEMP, 0x16)), SD16)\n
    Store (DerefOf(Index(TEMP, 0x17)), SD17)\n
    Store (DerefOf(Index(TEMP, 0x18)), SD18)\n
    Store (DerefOf(Index(TEMP, 0x19)), SD19)\n
    Store (DerefOf(Index(TEMP, 0x1A)), SD1A)\n
    Store (DerefOf(Index(TEMP, 0x1B)), SD1B)\n
    Store (DerefOf(Index(TEMP, 0x1C)), SD1C)\n
    Store (DerefOf(Index(TEMP, 0x1D)), SD1D)\n
    Store (DerefOf(Index(TEMP, 0x1E)), SD1E)\n
    Store (DerefOf(Index(TEMP, 0x1F)), SD1F)\n
}\n
end;

into method label ESMR code_regex Store\s+\((.*),\s+\^\^LPCB\.EC0\.SMD0\) replaceall_matched begin ^^LPCB.EC0.WSMD(%1) end;
into method label ESMR code_regex \(\^\^LPCB\.EC0\.SMD0\, replaceall_matched begin (^^LPCB.EC0.RSMD(), end;
into method label ESMW code_regex Store\s+\((.*),\s+\^\^LPCB\.EC0\.SMD0\) replaceall_matched begin ^^LPCB.EC0.WSMD(%1) end;
into method label CFUN code_regex Store\s+\((.*),\s+SMD0\) replaceall_matched begin WSMD(%1) end;
into method label CFUN code_regex \(SMD0\, replaceall_matched begin (RSMD(), end;

# deal with 64-bit BTDC
into device label EC0 code_regex BTDC,\s+64 replace_matched 
begin
//BTDC, 64,\n
TDC0,8,TDC1,8,TDC2,8,TDC3,8,\n
TDC4,8,TDC5,8,TDC6,8,TDC7,8\n
end;

into device label EC0 insert
begin
Method (RTDC, 0, Serialized)\n
{\n
    Name (TEMP, Buffer(0x08) { })\n
    Store (TDC0, Index(TEMP, 0x00))\n
    Store (TDC1, Index(TEMP, 0x01))\n
    Store (TDC2, Index(TEMP, 0x02))\n
    Store (TDC3, Index(TEMP, 0x03))\n
    Store (TDC4, Index(TEMP, 0x04))\n
    Store (TDC5, Index(TEMP, 0x05))\n
    Store (TDC6, Index(TEMP, 0x06))\n
    Store (TDC7, Index(TEMP, 0x07))\n
    Return (TEMP)\n
}\n
end;

into method label GUBT code_regex \(BTDC, replaceall_matched begin (RTDC(), end;

# deal with 72-bit BMNN
into device label EC0 code_regex BMNN,\s+72 replace_matched 
begin
//BMNN, 72,\n
MNN0,8,MNN1,8,MNN2,8,MNN3,8,\n
MNN4,8,MNN5,8,MNN6,8,MNN7,8,\n
MNN8,8
end;

into device label EC0 insert
begin
Method (RMNN, 0, Serialized)\n
{\n
    Name (TEMP, Buffer(0x09) { })\n
    Store (MNN0, Index(TEMP, 0x00))\n
    Store (MNN1, Index(TEMP, 0x01))\n
    Store (MNN2, Index(TEMP, 0x02))\n
    Store (MNN3, Index(TEMP, 0x03))\n
    Store (MNN4, Index(TEMP, 0x04))\n
    Store (MNN5, Index(TEMP, 0x05))\n
    Store (MNN6, Index(TEMP, 0x06))\n
    Store (MNN7, Index(TEMP, 0x07))\n
    Store (MNN8, Index(TEMP, 0x08))\n
    Return (TEMP)\n
}\n
end;

into method label GUBI code_regex \(BMNN, replaceall_matched begin (RMNN(), end;

# deal with 56-bit BDVN
into device label EC0 code_regex BDVN,\s+56 replace_matched 
begin
//BDVN, 56,\n
DVN0,8,DVN1,8,DVN2,8,DVN3,8,\n
DVN4,8,DVN5,8,DVN6,8
end;

into device label EC0 insert
begin
Method (RDVN, 0, Serialized)\n
{\n
    Name (TEMP, Buffer(0x07) { })\n
    Store (DVN0, Index(TEMP, 0x00))\n
    Store (DVN1, Index(TEMP, 0x01))\n
    Store (DVN2, Index(TEMP, 0x02))\n
    Store (DVN3, Index(TEMP, 0x03))\n
    Store (DVN4, Index(TEMP, 0x04))\n
    Store (DVN5, Index(TEMP, 0x05))\n
    Store (DVN6, Index(TEMP, 0x06))\n
    Return (TEMP)\n
}\n
end;

into method label GBMN code_regex \(BDVN, replaceall_matched begin (RDVN(), end;
 
Status
Not open for further replies.
Back
Top