BeardOverflow / msi-ec

GNU General Public License v2.0
134 stars 41 forks source link

Support for MSI Summit E14 Flip Evo A13MT #136

Open teackot opened 1 week ago

teackot commented 1 week ago

Laptop model

MSI Summit E14 Flip Evo A13MT

EC firmware version

14F1EMS1.209

EC memory dump

| _0 _1 _2 _3 _4 _5 _6 _7 _8 _9 _a _b _c _d _e _f
-----+------------------------------------------------
0x0_ | 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1_ | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x2_ | 00 00 00 00 00 00 00 00 0a 05 00 00 08 2c 01 08
0x3_ | 02 05 00 0d 00 00 50 81 c2 11 28 3c c8 01 c0 00
0x4_ | bc 11 42 00 4c 11 5c fb 45 0b 82 3c e8 0b c0 44
0x5_ | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x6_ | 00 00 00 00 00 00 00 00 28 00 28 32 3c 50 55 5a
0x7_ | 64 2d 00 2d 32 4b 55 6e 78 57 05 08 08 12 03 03
0x8_ | 00 00 2d 32 3c 41 46 4b 64 00 00 32 3c 4b 50 5a
0x9_ | 5a 00 05 03 08 03 03 03 06 25 7d 02 00 7d 27 00
0xa_ | 31 34 46 31 45 4d 53 31 2e 32 30 39 30 34 32 35
0xb_ | 32 30 32 33 30 39 3a 32 39 3a 31 38 00 00 00 08
0xc_ | 00 00 01 24 00 00 00 00 00 b0 00 00 00 00 00 00
0xd_ | 00 00 c1 80 0d 00 05 80 00 01 00 00 00 01 00 00
0xe_ | e2 00 00 4c 11 00 00 81 00 04 00 00 00 c2 01 00
0xf_ | 40 00 70 00 29 7f 05 00 64 00 00 00 00 00 00 00

GPU

iGPU only (Intel)

Is your keyboard RGB?

No (single color)

Additional context

Got myself a new laptop

User scenarios

scenario 0xd2 0xd4 0xeb 0x33
Extreme performance 0xc4 0x8d (advanced)/0x0d (auto) 0x00 0x05
Balanced 0xc1 0x0d 0x00 0x0d
Silent 0xc1 0x1d 0x00 0x0d
Balanced 0xc2 0x0d 0x0f 0x0d

Advanced fan curve

0x71 - current choice 0x72..0x77 - fan curve

Keyboard Backlight

0x2c: always on - 00, 10sec - 08 0xd3: state

USB Power Share

0xbf bit 5 (08/28)

Fn <-> Win

0xe8 bit 4 invert = false

glpnk commented 1 week ago

Is it your new laptop? Or just issue repost from other repo?

teackot commented 1 week ago

Yes, it's mine. My previous one (Prestige 14) is still around though

glpnk commented 1 week ago

Nice, I'm found a way to test the WMI events, which fires on fn-lock and similar laptop things

glpnk commented 1 week ago

Basically, you need to set SCM bit and listen to events with modded msi-wmi module from ~2010

teackot commented 1 week ago

you need to set SCM bit

You mean a WMI method or an EC bit?

glpnk commented 1 week ago

On wmi2 device you can access any (255 of 256) byte of EC mapped to regions, or just by address, with get/set_data wmi method, which byte you can check in https://github.com/BeardOverflow/msi-ec/discussions/98#discussioncomment-9817838

tldr:

Screenshot from 2024-06-20 01-29-19

glpnk commented 1 week ago

If you want to test events, just make, unload and load this module and check dmesg -w. It's roughly coded but works. (only for ACPI_BUFFER's)

msi-wmi-event.zip

You can check changes made to sources with some diff tool

https://github.com/torvalds/linux/blob/master/drivers/platform/x86/msi-wmi.c

Or add this code between lines 221-222

} else if (obj && obj->type == ACPI_TYPE_BUFFER) {
        pr_info("Got buffer, len: %d\n", obj->buffer.length);
        pr_info("Array: [");
        for (int i = 0; i < obj->buffer.length; i++) {
            printk("0x%X,", obj->buffer.pointer[i]);
        }
        printk("]\n");

I don't found how to print arrays in one like to kernel log, so it's a bit messed