Contribute
Register

Lenovo Z580, El Capitan, and SSDT/DSDT patches

Status
Not open for further replies.
Okay, so I've been hard at work trying to wrap my head around the patch writing process.
I decided to go with fixing the 16-bit objects only at first, as the larger ones were a bit too complicated for my logic-lacking brains, haha.

I guess I'm pretty close, but compiling isn't possible yet because of one line of code:
Screenshot%202016-09-01%2022.10.35.png


The compiler throws these two errors:
Screenshot%202016-09-01%2022.07.44.png


I don't get it, as triple checking the patch code does not reveal any typos or other anomalies.

You can find the patch code I wrote in the attatchment. My DSDT can be found in post #5, file Patchmagic.zip.

It'd be golden if you could point out where I went off the road. I'm curious! ;-)

Thanks again.
 

Attachments

  • patch16b.zip
    816 bytes · Views: 66
Read post #8
There is already a patch for your Z580's battery in RehabMan's repo.
 
I open MaciASL, which opens the system's DSDT on startup. That's what I'm trying the patch out on.
Patchmatic -extract returns the same DSDT file in .aml.
 
Code:
patchmatic -extract
iasl -da -dl *.aml

Open the resulting DSDT.dsl, apply patches to it... save as .aml...

It's clearly stated in the guide...
 
Okay, so I've been hard at work trying to wrap my head around the patch writing process.
I decided to go with fixing the 16-bit objects only at first, as the larger ones were a bit too complicated for my logic-lacking brains, haha.

I guess I'm pretty close, but compiling isn't possible yet because of one line of code:
Screenshot%202016-09-01%2022.10.35.png


The compiler throws these two errors:
Screenshot%202016-09-01%2022.07.44.png


I don't get it, as triple checking the patch code does not reveal any typos or other anomalies.

You can find the patch code I wrote in the attatchment. My DSDT can be found in post #5, file Patchmagic.zip.

It'd be golden if you could point out where I went off the road. I'm curious! ;-)

Thanks again.

A patch already exists, but your mistake is that you are trying to name identifiers starting with a digit. It is not valid ASL syntax. All identifiers must start with an alpha character or underscore. You can read about it in the ACPI spec.
 
Code:
patchmatic -extract
iasl -da -dl *.aml

Open the resulting DSDT.dsl, apply patches to it... save as .aml...

It's clearly stated in the guide...

Sorry man, I completely missed that in the guides. I gave this a try, too -- the full thing: running the commands you mentioned, re-patching the resulting DSDT.dsl, saving it out as an AML and replacing the file in /EFI/Clover/ACPI/patched with the new version.
No difference, the battery indicator still has an X in it, thinks it's on adapter power while I'm typing this on the battery.

I won't continue my attempts at writing my own patch, as RehabMan already clearly stated that the patch should work.
So it's probably somewhere in the process of applying the patch where something goes wrong, although I can't figure out what it is given what I described above.
 
Sorry man, I completely missed that in the guides. I gave this a try, too -- the full thing: running the commands you mentioned, re-patching the resulting DSDT.dsl, saving it out as an AML and replacing the file in /EFI/Clover/ACPI/patched with the new version.
No difference, the battery indicator still has an X in it, thinks it's on adapter power while I'm typing this on the battery.

I won't continue my attempts at writing my own patch, as RehabMan already clearly stated that the patch should work.
So it's probably somewhere in the process of applying the patch where something goes wrong, although I can't figure out what it is given what I described above.

Read post #17.
 
Status
Not open for further replies.
Back
Top