Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save CarbonChauvinist/6c14beeaf9c745b144638f1feb6634c5 to your computer and use it in GitHub Desktop.
Save CarbonChauvinist/6c14beeaf9c745b144638f1feb6634c5 to your computer and use it in GitHub Desktop.
Dell Precision 5510 - Arch Linux - ACPI DSDT SSDT (Bios 1.6.1)
## Boot normally and extract the DSDT tables
cp -R /sys/firmware/acpi/tables/DSDT DEST
## Create workbench folder which contains all SSDT and DSDT extracted files renamed with .aml extension
cd DEST
mkdir workbench
cp DSDT SSDT* workbench/
cp dynamic/SSDT* workbench/
## Rename all files in workbench to *{,.aml}
cd workbench/
find -type f | xargs -I % sh -c 'cp %{,.aml}'
## create refs.txt file in workbench folder with contents (see file)
touch refs.txt
## Decompile DSDT using refs text
iasl -da -dl -fe refs.txt DSDT.aml SSDT*.aml
## Around line ~3955 replace the following code
If (LEqual (PM6H, One))
{
CreateBitField (BUF0, \_SB.PCI0._Y0C._RW, ECRW) // _RW_: Read-Write Status
Store (Zero, ECRW (If (PM0H)
{
CreateDWordField (BUF0, \_SB.PCI0._Y0D._LEN, F0LN) // _LEN: Length
Store (Zero, F0LN)
}))
}
## With the following code
If (LEqual (PM6H, One))
{
CreateBitField (BUF0, \_SB.PCI0._Y0C._RW, ECRW) // _RW_: Read-Write Status
Store (Zero, ECRW)
}
If (PM0H)
{
CreateDWordField (BUF0, \_SB.PCI0._Y0D._LEN, F0LN) // _LEN: Length
Store (Zero, F0LN)
}
## Comment out the following lines ~18556
/*If (LEqual (DPTF, One))
{
_E42 ()
}*/
## Recompile now, should do so without any errors, though a ton of warnings
iasl -tc DSDT.dsl
## If compiled without any errors, make sure to increment the version otherwise will not be able to hav kernel override load as needed
## Edit Definition block Line 21, incrememnt the last hex value
DefinitionBlock ("", "DSDT", 2, "DELL ", "CBX3 ", 0x0107200C)
# Recompie again, this tine with the incremented DefinitionBlock
iasl -tc DSDT.dsl
## Using CPIO to override the DSDT tables at boot
mkdir -p kernel/firmware/acpi
## Copy all .aml files to the newly created folder for teh CPIO override
cp DSDT.aml SDDT*.aml kernel/firmware/acpi
## Create the acpi_override file, this creates the CPIO archive containing the fixed ACPI tables.
find kernel | cpio -H newc --create > acpi_override
## Copy the archive to the boot directory.
cp acpi_override /boot
## Lastly configure bootloader to load override
vim /boot/loader/entries/arch-zen-lvm.conf
## Add the following initrd line after intel ucode initrd
initrd /acpi_override
## Also make sure to pass the following kernel parameter in boot options
ACPI_TABLE_UPGRADE=y
## Reboot and verify override is being loaded
journalctl -b -k | ag ACPI
## Look for following lines or similar
Feb 25 12:51:23 archlinux kernel: ACPI: Table Upgrade: override [DSDT-DELL - CBX3 ]
Feb 25 12:51:23 archlinux kernel: ACPI: DSDT 0x0000000038C77228 Physical table override, new table: 0x0000000038236AD6
Feb 25 12:51:23 archlinux kernel: ACPI: DSDT 0x0000000038236AD6 021188 (v02 DELL CBX3 0107200C INTL 20180105)
## /boot/loader/entries/arch-zen-lvm.conf
title Arch Linux Zen (LVM)
linux /vmlinuz-linux-zen
initrd /intel-ucode.img
initrd /acpi_override_3
initrd /initramfs-linux-zen.img
options rw rd.luks.uuid=145628bb-0138-4b8b-bc94-2d041c756539 rd.luks.name=145628bb-0138-4b8b-bc94-2d041c756539=lvm root=/dev/mapper/lvmvg-root resume=/dev/mapper/lvmvg-swap scsi_mod.use_blk_mq=y dm_mod.use_blk_mq=y kernel.nmi_watchdog=0 i915.disable_power_well=0 ACPI_TABLE_UPGRADE=y quiet
External(MDBG, MethodObj, 1)
External(_GPE.MMTB, MethodObj, 0)
External(_SB.PCI0.LPCB.H_EC.ECWT, MethodObj, 2)
External(_SB.PCI0.LPCB.H_EC.ECRD, MethodObj, 1)
External(_SB.PCI0.LPCB.H_EC.ECMD, MethodObj, 1)
External(_SB.PCI0.PEG0.PEGP.SGPO, MethodObj, 2)
External(_SB.PCI0.GFX0.DD02._BCM, MethodObj, 1)
External(_SB.PCI0.SAT0.SDSM, MethodObj, 4)
External(_GPE.VHOV, MethodObj, 3)
External(_SB.PCI0.XHC.RHUB.TPLD, MethodObj, 2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment