BeardOverflow / msi-ec

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

Add MSI GF63 Thin 9SC support #131

Closed smalltheif closed 2 weeks ago

smalltheif commented 3 weeks ago

EC Firmware version: 16R3EMS1.104

Issues :

EC 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 14 00 00 14 00
0x1_ | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x2_ | 00 14 00 00 00 00 00 00 00 00 00 80 c0 04 78 0b
0x3_ | 03 89 00 0d 50 0a 37 00 94 11 88 2c c2 01 e0 48
0x4_ | 00 00 64 00 e5 0f 00 00 e5 0f 69 32 ea 0b 00 00
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 37 00 37 40 49 4c 52 58
0x7_ | 64 23 23 26 2a 2d 32 37 3e 00 08 03 03 03 03 03
0x8_ | 2e 00 37 3d 43 49 4f 55 63 23 23 26 2a 2d 32 37
0x9_ | 3e 00 08 03 03 03 03 03 02 00 64 02 00 6e 00 00
0xa_ | 31 36 52 33 45 4d 53 31 2e 31 30 34 ad 39 31 34
0xb_ | 32 b2 32 30 31 30 3a 31 37 3a 33 32 e5 0f 40 c0
0xc_ | 00 07 25 00 00 00 46 00 00 75 00 00 00 e2 14 00
0xd_ | 00 00 00 80 7f 00 d1 00 00 00 00 00 00 00 00 00
0xe_ | e2 02 00 fa 10 00 00 00 40 00 00 00 00 d1 00 e4
0xf_ | 00 00 80 83 0d 23 05 f5 00 00 00 00 00 00 00 00

Issues resolved:

smalltheif commented 3 weeks ago

I'm commenting my working notes in case it may be helpful.

Additional Info

Fan Address Value State Comment
Real-Time fan speed 0xCD Weird behavior: gradually increasing the RPM starting at the lowest speed (1500 RPM = 0x3A) then the hexa value decreases and cross 0x00, loops around at 0xFF, at 3000 RPM = 0xA0 and finally max at 5925 RPM = 0x51
CPU Fan base speed 0x71 0x00 min Same fan as GPU, both base speeds control the fan
0x64 max
Temperature 0x68
GPU Fan base speed 0x89 0x00 min Same fan as CPU, both base speeds control the fan
0x64 max
Temperature 0x80

Function keys

Function keys Address Value State Comment
Webcam 0x2E 0x35 off
0x37 on
Airplane Mode 0x2E 0x08 off Disable internet. Same address as webcam.
0x00 on Delayed value change.
0x02 When both Webcam and Airplane Mode are on.
Dragon Center EC unchanged.
Disable touchpad EC unchanged.
Switch Display EC unchanged.
Display brightness EC unchanged.
Speakers level EC unchanged.
Mute Speakers EC unchanged.
Keyboard brightness EC unchanged.

Features in Dragon Center

Features Address Value State Comment
Disable Windows key EC unchanged.
Win-Fn swap 0xBF 0xC0 original
OxD0 inverted
Webcam 0x2E 0x35 off
0x37 on
Shift mode 0xF2 0xC2 ECO
0xC1 Comfort
0xC0 Sport
0xC4 Turbo
Fan Mode 0xF4 0x0D Auto
0x4D Basic FM_BASIC_NAME
0x8D Advanced
Fan Speed 0x71,0x89 0x14-0x32 Basic Both addresses are min and max at these values.
0x71-0x77 0x00-0x64 Advanced CPU fan: min: 0% at 0 RPM, 1% to 25% ~1500 RPM, then gradually increasing with a step 1% = 60 RPM, max : 100% at 5925 RPM (over 100% no effect)
0x89-0x8F 0x00-0x64 Advanced Same as CPU fan.
Charge control 0xEF 0xE4 Range max Issue explaining the offsets
0xBC Range min
Cooler Boost 0x98 0x02 off
0x82 on
Super battery Absent from the Dragon Center.
LEDs (micmute) No mic led on this laptop.
Keyboard back-light Absent from the Dragon Center.
glpnk commented 3 weeks ago

About realtime fan speed - actually it seems using 2 bytes, and values is X / RPM

Does writing keyboard brightness to EC change backlight brightness?

Win-Fn swap

Known issue

smalltheif commented 2 weeks ago

After closer inspection, I identified the byte corresponding to the keyboard backlight intensity. I modified the address and verified the correct functioning.

About realtime fan speed - actually it seems using 2 bytes, and values is X / RPM

Do you know what are these 2 bytes? I don't understand what X / RPM means.

Win-Fn swap

This issue seems to have been resolved in the main branch, do I correct my version of the branch, by adding .invert = true?

glpnk commented 2 weeks ago

Do you know what are these 2 bytes? I don't understand what X / RPM means

yes, but for now just use mcontrol center if you want realtime rpm

This issue seems to have been resolved in the main branch, do I correct my version of the branch, by adding .invert = true?

Yes, please do this

Also, you can merge main to your branch if you know how to do it. Else, just add this option.

.invert  = true
smalltheif commented 2 weeks ago

Everything should be OK to merge.

On a side note: adding support for the keyboard backlight intensity enabled its control in the quick settings in Gnome 46 on Fedora 40 (Workstation Edition).

glpnk commented 2 weeks ago

On a side note: adding support for the keyboard backlight intensity enabled its control in the quick settings in Gnome 46 on Fedora 40 (Workstation Edition).

Wow, that's good, because on older gnomes you need to install external plugin

teackot commented 2 weeks ago

Hi!

after each reboot, the shift mode is back to unspecified

That's normal, it happens on all laptops. You can mark is as supported

Edit: actually, I'll just commit it myself. I'm merging multiple PRs right now, don't wan't to cause more conflicts