About DSDT

Recently I’m playing with Hackint0sh. DSDT seems to be a very intriguing problem. So, what the hell is that?

DSDT (Differentiated System Description Table) is a part of the ACPI specification. It supplies information about supported power events in a given system. ACPI tables are provided in firmware from the manufacturer. A common Linux problem is missing ACPI functionality, such as: fans not running, screens not turning off when the lid is closed, etc. This can stem from DSDTs made with Windows specifically in mind, which can be patched after installation.

Basically a DSDT table is the code run on ACPI (Power Management) events.

Note: The goal of the Linux ACPI project is that Linux should work on unmodified firmware. If you still find this type of workaround necessary on modern kernels then you should consider submiting a bug report.

——DSDT – ArchWiki[1]

由上文引文中的Note知,对于一般的Linux发行版,Linux ACPI project(已运用于比较modern的kernel中)已经搞定了大部分ACPI问题,如果你的硬件还有问题,那可以作为bug提交,不必自己搞DSDT了,毕竟是很蛋疼的。那为什么黑苹果还要纠结于DSDT呢?想必那是因为OS X不是一般的Linux发行版,不鸟Linux ACPI project啦,大苹果威武。毕竟苹果只要顾及自己那定制的硬件就行了。

引文[1]中还一再强调,能不折腾就不折腾,尽量用前人测试过的,那想必可能有砖机甚至硬件损毁的风险。

Before you start…

It is possible that the hardware manufacturer has released an updated firmware which fixes ACPI related problems. Installing an updated firmware is often preferred over this method because it would avoid duplication of effort.
This process does tamper with some fairly fundamental code on your installation. You will want to be absolutely sure of the changes you make. You might also wish to clone your disk beforehand.
Even before attempting to fix your DSDT yourself, you can attempt a couple of different shortcuts:
Tell the kernel to report a version of Windows
Use the variable acpi_os_name as a kernel parameter. For example:
acpi_os_name=”Microsoft Windows NT”
Or
acpi_osi=”!Windows2012″
appended to the kernel line in grub legacy configuration
other strings to test:
“Microsoft Windows XP”
“Microsoft Windows 2000”
“Microsoft Windows 2000.1”
“Microsoft Windows ME: Millennium Edition”
“Windows 2001”
“Windows 2006”
“Windows 2009”
“Windows 2012”
when all that fails, you can even try “Linux”
Out of curiousity, you can follow the steps below to extract your DSDT and search the .dsl file. Just grep for “Windows” and see what pops up.
Find a fixed DSDT
A DSDT file is originally written in ACPI Source language (an .asl/.dsl file). Using a compiler this can produce an ‘ACPI Machine Language’ file (.aml) or a hex table (.hex). To incorporate the file in your Arch install, you will need to get hold of a compiled .aml file. – whether this means compiling it yourself or trusting some stranger on the Internet is at your discretion. If you do download a file from the world wide web, it will most likely be a compressed .asl file. So you will need to unzip it and compile it. The upside to this is that you won’t have to research specific code fixes yourself.
Arch users with the same laptop as you are: a minority of a minority of a minority. Try browsing other distro/linux forums for talk about the same model. Likelihood is that they have the same problems and either because there is a lot of them, or because they’re tech savvy — someone there has produced a working DSDT and maybe even provides a precompiled version (again, use at your own risk). Search engines are your best tools. Try keeping it short: ‘model name’ + ‘dsdt’ will probably produce results.

——DSDT – ArchWiki[1]

 

Reference:

[1] DSDT – ArchWiki. URL: https://wiki.archlinux.org/index.php/DSDT

Leave a Reply

Your email address will not be published. Required fields are marked *