0

In summary, my question is: how do I modify ACPI tables on Windows?

More details: I'm having issues installing ubuntu 18.04 in dual boot on my new hp envy x360 Ryzen 3700U. I found an answer here: https://askubuntu.com/questions/1162746/why-wont-my-hp-envy-x360-laptop-with-ryzen-7-3700u-boot-ubuntu-live-cd; which involves modifying the ACPI configuration.

I did the following (as explained by "justin" on https://bugzilla.kernel.org/show_bug.cgi?id=203431):

1. run "acpidump -o tables" to create a file with the currently running tables
2. "acpixtract -a tables" to extract the individual tables (we only care about the FACP table)
3. "iasl -d facp.dat" to disassemble the FACP table
4. edit facp.dsl with your prefered text editor. 
set the "Oem Revision" field at the top to a larger number
set the "Hardware Reduced (V5)" field to 0
5. "iasl -sa facp.dsl" to assemble your modified table
6. install the produced facp.aml file like you did before

I think the first 5 steps went well. I am stuck on the last part because I don't understand what I should do (install the produced facp.aml):
From what I gathered in the first thread, I have to create a CPIO archive with the FACP.aml file and provide it to the initrd kernel. I don't know how to do this since all the resources I found are for Linux and not for Windows. Can someone please explain this in simpler words?

According to the tutorial on https://acpica.org/, I have to run "acpiexec facp.aml". I did but I got this result:

Intel ACPI Component Architecture                                                                                       
AML Execution/Debug Utility version 20190816                                                                            
Copyright (c) 2000 - 2019 Intel Corporation       

Input file facp.aml, Length 0x114 (276) bytes                                                                                                                                                                                                   

ACPI: RSDP 0x000000000041C7B8 000024 (v02 Intel )                                                                       
ACPI: XSDT 0x00000000004714A8 000034 (v00 Intel  AcpiExec 00001001 INTL 20190816)                                     
ACPI: FACP 0x0000000000472490 000114 (v06 HPQOEM SLIC-MPC 01072009 INTL 20190816)                                       
ACPI: DSDT 0x000000000041A378 000024 (v02 Intel  Local    00000001 INTL 20090730)                                       
ACPI: FACS 0x000000000041C918 000040        

ACPI table initialization:                                                                                              
Table [DSDT: Local   ] (id 01) -    0 Objects with   0 Devices,   0 Regions,    
0 Methods (0/0/0 Serial/Non/Cvt)        
ACPI: 1 ACPI AML tables successfully acquired and loaded                                                                                                                                                                                        

Final data object initialization:                                                                                       
Namespace contains 9 (0x9) objects                                                                                      
Initializing General Purpose Events (GPEs):                                                                                 
Initialized GPE 00 to 1F [_GPE] 4 regs on interrupt 0x9 (SCI)                                                       
Initializing Device/Processor/Thermal objects and executing _INI/_STA methods:                                              
Executed 0 _INI methods requiring 0 _STA executions (examined 2 objects)                                            
Unexpected AE_BAD_ADDRESS from AcpiWriteBitRegister (aetests-550)                                                       
Unexpected AE_BAD_ADDRESS from AcpiReadBitRegister (aetests-563)                                                        
Unexpected AE_BAD_PARAMETER from AcpiInstallGpeHandler (aetests-412)                                                    
Unexpected AE_BAD_PARAMETER from AcpiEnableGpe (aetests-415)                                                            
Unexpected AE_BAD_PARAMETER from AcpiDisableGpe (aetests-418)     

Even when I run this command on an unmodified .aml file, it doesn't work, although I don't get the Unexpected AE_BAD_ADDRESS and Unexpected AE_BAD_PARAMETER lines in this case.

Since I am a complete beginner and I don't know what I'm doing, an easy to follow explanation is very much appreciated!

2 Answers 2

1

I have successfully booted Ubuntu Budgie (Live system, not installed) with the same Envy Model and processor with keyboard, trackpad and touch working.

Extract the ACPI table as you did, but on step 4 there is an additional line you need to edit, you want to change

 8042 Present on ports 60/64 (V2) : 0

to

8042 Present on ports 60/64 (V2) : 1 

this is to make trackpad and touchscreen work. And then follow the next step to compile your FACP.dsl file.

In order you install it, you need to place it into your Linux bootable flash drive inside initrd.

In order to do that you need to execute the Linux commands below, I used Windows Subsystem for Linux (WSL) to conveniently fulfill that purpose.

Create a Linux bootable flash drive (in ISO mode). Copy initrd (in ubuntu its located in /casper) to a newly created folder on your computer, you also want to move your facp.aml file to the same folder.

Open Linux shell in that folder and execute these commands;

# mkdir -p kernel/firmware/acpi 
# mv facp.aml kernel/firmware/acpi
# find kernel | cpio -H newc --create > instrumented_initrd

and lastly

cat initrd >>instrumented_initrd

Now move this file (instrumented_initrd) into /casper folder inside your bootable drive, rename it to initrd (remove instrumented) and click yes to replace.

In my case, this made my computer boot Ubuntu Budgie successfully with keyboard, trackpad and touchscreen work.

4
  • thanks for your response! Ubuntu Budgie didn't work but manjaro did install with keyboard, trackpad and touchscreen support. I still trying out the fingerprint sensor though
    – bouhmid
    Commented Sep 7, 2019 at 17:31
  • Just for your information, linux kernel 5.2.11 seems to work out of the box with no modifications. Touchpad, keyboard, even touchscreen works. I have yet to try with the fingerprint.
    – wizardot
    Commented Sep 7, 2019 at 21:08
  • If you have initrd.lz rather than just initrd would it need to be decompressed before you can run the final cat command?
    – nettux
    Commented Sep 26, 2019 at 14:01
  • @nettux I'm not sure, I am no way an expert in this, I just searched online. However, I do not use this method, instead, I use Manjaro 18.1 which packs the 5.2 kernel and boots fine with no modifications. If you want an ubuntu based distro you can use Cubic to modify the ISOs kernel.
    – wizardot
    Commented Sep 26, 2019 at 16:23
0

You can follow directions in this thread to install a fresh copy of Ubuntu:

Boot Ubuntu Live CD

Method 1 in the accepted answer should allow you to boot a new install. Method 2 should allow you to make it fully functional.

You can use the tools here to dump the ACPI tables in Windows:

ACPI tools Windows binaries

To use them from CLI:

$ acpidump -b
$ iasl -d facp.dat

Now modify facp.dsl with a text editor. Change "reduced hardware support" from 1 to 0.

Recompile facp.dsl

$ iasl -sa facp.dsl

See this post: load custom ACPI table in Linux

To create a cpio archive, follow these steps:

# mkdir -p kernel/firmware/acpi
# mv facp.aml kernel/firmware/acpi
# find kernel | cpio -H newc --create > my_tables.cpio

Edit /boot/grub/grub.cfg. Where it shows:

initrd <kernel>

You need to add a line that references your cpio archive. You might try booting advanced mode and adding an echo line as well o you can verify that it is loading the modified table:

echo 'Loading custom ACPI table ...'
initrd /my_tables.cpio
initrd <kernel>

I haven't had time to do an Ubuntu install on my new laptop, so I can't personally verify that these directions worked for me. I will post an update once I have time to do the install.

3
  • I can't do this since I can't boot Linux. I need to load the custom ACPI in Windows first. Do you know how load custom ACPI table in Windows 10?
    – bouhmid
    Commented Aug 28, 2019 at 9:24
  • I just modified my answer with more complete instructions. I would not remove the Windows partition just yet. Either get a new SSD or shrink the WIndows partition and add a separate partition for Ubuntu. You can always delete the Windows partition later. Commented Aug 29, 2019 at 15:15
  • Thank you for responding! But I can't boot ubuntu (or any other distro) in the first place. I did already check that first thread but I can't change the boot parameters to "nolapic acpi=off i8042.nopnp" because I don't get the regular Ubuntu boot screen like everyone else it seems. I get a UNetbootin blue screen instead and then nothing.. My question is actually after recompiling the facp.dsl, if there is a way to load the modified facp.aml file directly from windows 10?
    – bouhmid
    Commented Aug 30, 2019 at 21:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .