sebanc / brunch

Boot ChromeOS on x86_64 PC - Supports Intel CPU/GPU from 8th gen or AMD Ryzen
GNU General Public License v3.0
3.54k stars 387 forks source link

Can I override DSDT using cpio archive or other method? #629

Open nekomimipanic opened 3 years ago

nekomimipanic commented 3 years ago

My tablet's ACPI table is different from standard one. It need to fix ACPI table, otherwise not work volume and power button. Ref. https://github.com/ivzave/matebook-linux

Is there any easy way to override DSDT before boot? (already prepared recompiled DSDT as dsdt.Aml) Cpio method can't work. Ref. https://wiki.archlinux.org/index.php/DSDT Ref. https://android.googlesource.com/kernel/tegra/+/ce636452343af0522d2666157dab9c2096f4f996/Documentation/acpi/initramfs-add-dsdt.sh

I recompile kernel,but it's annoying and takes time. So is there any other way to override DSDT?

Thx

sebanc commented 3 years ago

If it is just about the hardware buttons, it can be patched directly in the kernel, instead of using DSDT.

Could you attach a dmesg to this issue ?

nekomimipanic commented 3 years ago

Here is dmsg log. It's DSDT integrated kernel one. dmesg2.log

sebanc commented 3 years ago

I have added you to the brunch testing repo (you should have received a github invite), the release there should have working buttons for your device.

nekomimipanic commented 3 years ago

power button is working testing brunch. additionally this device Bluetooth firmware is not properly adopt. need root-c mount and in /firmware/brcm cp BCM4356A2-0a5c-6419.hcd BCM4354A2-0a5c-6419.hcd become working.

finally rotate is not work this testing one force_tablet_mode or sysfs_tablet_mode or already mentioned method not working. attach dmsg

thx [ 0.000000] micro.txt

sebanc commented 3 years ago

I have a doubt as you mention tablet mode:

nekomimipanic commented 3 years ago

May be tablet mode not triggered. on sysfs_tablet_mode, # echo 1 > /dev/pra~ but no action.

before testing update, it worked.

sebanc commented 3 years ago

Sorry but I really need to confirm if it is a tablet mode issue or sensors.

Could you remove all tablet mode related options, reboot, login then press CTRL+ALT+SHIFT+T to trigger tablet mode manually and see if rotation works ?

nekomimipanic commented 3 years ago

CTRL+ALT+SHIFT+T , no reaction...

sebanc commented 3 years ago

I have uploaded another brunch-testing, could you try it ?

Between, do you remember which release your were using previously (when tablet mode worked fine) ?

nekomimipanic commented 3 years ago

20201109 not working rotation and ctrl~ notworking too. force~ not working. r86 worked fine.

thx

sebanc commented 3 years ago

Well, the issue is I did not change much between r86 and this build so I am not sure what it could be related to...

Could you attach a new dmesg to this issue ? (after a fresh reboot, run "dmesg > ~/Downloads/dmesg.txt" in crosh shell and attach dmesg.txt from your Downloads folder to this issue)

sebanc commented 3 years ago

Forgot to say, a new dmesg without any tablet mode related options

sebanc commented 3 years ago

You can also try the new testing release

nekomimipanic commented 3 years ago

new one 201110ver work fine! thx.

ill attach dmesg log with 09 and 10. dmesg.zip

nekomimipanic commented 3 years ago

Hmm. both testing from chromeos-install.sh,not work. (clean install) Stable can rotate,

so first stable chromeos-install.sh then,chromeos-update -f 201110ver can rotate... but if edit rootc, become not rotate.

stable chromeos-install.sh then,chromeos-update -f 201109ver NOT rotate.

stable_20201014dmesg.log

sebanc commented 3 years ago

Thanks for all the tests :) that's very interesting (even though I don't really understand yet what the issue is)

nekomimipanic commented 3 years ago

can I check your additional ACPI code? I ll test step by step.

sebanc commented 3 years ago

You will find my patch below but I doubt it is related to the tablet mode issue.

--- a/drivers/platform/x86/intel-hid.c  2020-04-20 19:28:32.000000000 +0200
+++ b/drivers/platform/x86/intel-hid.c  2020-05-04 18:01:26.427423389 +0200
@@ -60,6 +60,20 @@

 static const struct dmi_system_id button_array_table[] = {
    {
+       .ident = "HUAWEI MateBook HZ-W09",
+       .matches = {
+           DMI_MATCH(DMI_SYS_VENDOR, "HUAWEI"),
+           DMI_MATCH(DMI_PRODUCT_NAME, "MateBook HZ-W09"),
+       },
+   },
+   {
+       .ident = "HUAWEI MateBook HZ-W19",
+       .matches = {
+           DMI_MATCH(DMI_SYS_VENDOR, "HUAWEI"),
+           DMI_MATCH(DMI_PRODUCT_NAME, "MateBook HZ-W19"),
+       },
+   },
+   {
        .ident = "Wacom MobileStudio Pro 13",
        .matches = {
            DMI_MATCH(DMI_SYS_VENDOR, "Wacom Co.,Ltd"),
sebanc commented 3 years ago

Could you try the new "brunch-testing" release ?

nekomimipanic commented 3 years ago

testing release not work rotate. thx

sebanc commented 3 years ago

Could you attach an "lsmod" to this issue ?

nekomimipanic commented 3 years ago

here is files you have a chance to build stable-r86 with only mod hz-w19 in intel_hid.c ,I want to try it.

dmesg.log lsmod.log

sebanc commented 3 years ago

The MateBook HZ-W09 part exist in brunch for more than 6 months so that's not related.

Actually, I just noticed that there are 2 tablet mode modules loaded on your device (which chromeos does not expect), could you try to add "module_blacklist=intel_vbtn" on the kernel command line (after "cros_debug")

nekomimipanic commented 3 years ago

no change lsmod.log