BeardOverflow / msi-ec

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

add `Modern 14 B10MW` FW `14D1EMS1.103` #140

Open glpnk opened 5 days ago

glpnk commented 5 days ago

Checklist #100

Patchnote:

How to install for testing:

git clone -b 14D1EMS1 https://github.com/glpnk/msi-ec.git
cd msi-ec
make

Preferred way of installation is DKMS, because the kernel contains different versions of msi-ec, which will cause conflict.

sudo make dkms-install

Reboot or manually reload module with (without reboot, some daemons will not detect new functions)

sudo modprobe -r msi-ec
sudo modprobe msi-ec debug=true
SteelT1 commented 4 days ago

Cooler boost :white_check_mark:
Webcam :white_check_mark: Webcam block :white_check_mark: Keyboard brightness :white_check_mark:
CPU temp :white_check_mark: CPU fan speed :white_check_mark:
Speaker mute led state :white_check_mark: Mic mute led state :white_check_mark: Battery Modes :white_check_mark: Shift Modes :white_check_mark:

Few things I noticed though: On reboot, /sys/devices/platform/msi-ec/shift_mode shows "unspecified" and /sys/devices/platform/msi-ec/fan_mode shows "auto", not sure if that's normal.

And from booting back into windows to confirm the above, noticed that Creator Center sets 0x?D instead of 0x?0 for fan modes. not sure why it was 0x?0 yesterday.

The values returned by /sys/devices/platform/msi-ec/fn_key and sys/devices/platform/msi-ec/win_key seemed to be swapped, left instead of right for fn_key and vice versa with win_key.

glpnk commented 4 days ago

Please send me output of next command

efivar -n dd96baaf-145e-4f56-b1cf-193256298e99-MsiDCVarData -p

About Fn/Win - I rapidly googled photo and got that Fn was on left side, but photos by MSI show Fn on right side, sorry

pic

Eh, really on right side, I'll fix this now and force push

glpnk commented 4 days ago

And from booting back into windows to confirm the above, noticed that Creator Center sets 0x?D instead of 0x?0 for fan modes. not sure why it was 0x?0 yesterday.

On your first dump, you have 0xF4=0x0D, but later was 0 instead of D. Good question why this happened, but seems that EC understand any value

SteelT1 commented 4 days ago

Output efivar -n dd96baaf-145e-4f56-b1cf-193256298e99-MsiDCVarData -p

GUID: dd96baaf-145e-4f56-b1cf-193256298e99
Name: "MsiDCVarData"
Attributes:
        Non-Volatile
        Boot Service Access
        Runtime Service Access
Value:
00000000  01 01 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000010  00 00 00 00
glpnk commented 4 days ago

Can you make new EC dump right after reboot? You can use this command to not load any kernel modules:

sudo dd if=/dev/mem bs=1 skip=4227860480 count=256 | hexdump -C

Screenshot from RE Everything would be enough if you're on Windows, but it would be better from Linux

glpnk commented 4 days ago

On reboot, /sys/devices/platform/msi-ec/shift_mode shows "unspecified"

Yeah, some laptops write 0x8? to 0xF2 after reboot, but to change shift you need to write 0xC?

and /sys/devices/platform/msi-ec/fan_mode shows "auto", not sure if that's normal.

auto is default shift, so it's ok

SteelT1 commented 4 days ago
00000000  00 80 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000020  00 00 00 00 00 00 00 00  00 00 00 88 e0 06 0b 0a  |................|
00000030  02 05 00 0d 50 0a 05 00  f4 0c 88 2c 4b 01 c0 00  |....P......,K...|
00000040  16 0d 61 00 13 08 8c fb  cb 07 17 2d f4 0b fa 32  |..a........-...2|
00000050  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000060  00 00 00 00 00 00 00 00  30 00 38 3e 44 4a 50 5a  |........0.8>DJPZ|
00000070  64 32 00 32 41 49 50 5a  64 50 04 03 03 03 03 03  |d2.2AIPZdP......|
00000080  00 00 35 3a 3f 44 50 5a  64 00 00 32 41 49 50 5a  |..5:?DPZd..2AIPZ|
00000090  64 4b 03 03 03 03 05 05  06 0f 78 06 0f 78 00 00  |dK........x..x..|
000000a0  31 34 44 31 45 4d 53 31  2e 31 30 33 30 36 31 39  |14D1EMS1.1030619|
000000b0  32 30 32 30 30 38 3a 30  39 3a 31 34 13 08 00 00  |202008:09:14....|
000000c0  00 07 25 00 00 9e 40 00  00 01 00 00 00 9b 14 00  |..%...@.........|
000000d0  00 00 00 00 70 00 00 00  27 3c 32 80 00 18 07 03  |....p...'<2.....|
000000e0  e2 02 00 00 10 00 00 00  00 00 00 00 00 83 00 e4  |................|
000000f0  00 00 80 83 0d 00 05 00  00 00 00 00 00 00 00 00  |................|
256+0 records in
256+0 records out
256 bytes copied, 0.00201877 s, 127 kB/s
00000100
glpnk commented 4 days ago

Have you tested fan modes? Because you don't have it in checklist

But it is hard to tell without custom fan curve. Silent mode is questionable by design

glpnk commented 4 days ago

@SteelT1 Thank you for your effort. To check newer commit, you need to run:

make clean
git pull
make
sudo make dkms-uninstall
sudo make dkms-install

And reboot or reload module by guide from first comment in this issue


My device Modern C5M use fan curve in any fan mode, even in silent. So fan mode might be just a placeholder for MSI app.


@teackot Ready to merge

SteelT1 commented 4 days ago

Have you tested fan modes? Because you don't have it in checklist

But it is hard to tell without custom fan curve. Silent mode is questionable by design

I forgot to earlier, but it seems to be taking effect, set it to advanced and applied a custom curve using MControlCenter, and after a few seconds, it started ramping up, same with setting it to silent and ramping down after a few seconds.

glpnk commented 4 days ago

Thank you, so it is ready to merge

SteelT1 commented 4 days ago

Yep, fn_key and win_key also reports correct values now.

Thank you so much for adding support!