BeardOverflow / msi-ec

GNU General Public License v2.0
145 stars 45 forks source link

MSI Bravo 15 A4DDR Support #134

Closed Jiogo18 closed 3 months ago

Jiogo18 commented 3 months ago

Laptop model

MSI Bravo 15 A4DDR

EC firmware version

16WKEMS1.105

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 00 00 00 80 c0 07 09 0b
0x3_ | 03 01 00 0d 53 0a 05 00 94 11 88 2c c2 01 c0 00
0x4_ | fc 08 4f 00 1f 0f 00 00 e7 0b 94 2f 8b 0b fa 32
0x5_ | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x6_ | 00 00 00 00 36 00 00 00 37 00 37 40 49 4c 52 58
0x7_ | 6e 2b 26 2b 30 36 3c 46 55 00 08 03 03 03 03 03
0x8_ | 00 00 37 3d 43 49 4f 54 6c 00 00 2b 30 36 3c 46
0x9_ | 55 00 08 03 03 03 03 02 02 00 64 02 00 6e 00 00
0xa_ | 31 36 57 4b 45 4d 53 31 2e 31 30 35 30 39 31 36
0xb_ | 32 30 32 30 31 33 3a 34 34 3a 32 32 1f 0f 00 00
0xc_ | 00 02 23 00 00 00 00 00 00 12 00 00 00 cf 14 00
0xd_ | 00 00 02 00 7f a0 00 00 00 00 00 80 00 00 00 00
0xe_ | e2 02 00 00 10 00 00 00 00 00 00 00 00 c0 00 bc
0xf_ | 00 00 81 80 0d 00 05 00 00 00 00 00 00 00 00 00

GPU

AMD

Is your keyboard RGB?

No (single color)

Additional context

Pull request coming soon.

Working notes

Name Address Values seen Description
charge_control 0xEF 0x9e (30%, maybe lower)
- 0xe4 (100%)
Battery threshold, value 0x80 is also possible for 100%
Battery status 0x31 0x01-0x0d - bit 0 = Present
- bit 1 = Charging
- bit 2 = Discharging
- bit 3 = Fully charged
Battery charge 0x42 Charge percent
webcam 0x2E 0x09 and 0x0c No webcam block
fn_win_swap 0xBF 0x00 and 0x10
cooler_boost 0x98 0x02 and 0x82
shift_mode 0xF2 0xC1, 0xC2, 0xC4 on Windows (or same with 0x8X on Linux) - 0xC1: Silent, Balanced and AI
- 0xC2: Super Battery
- 0xC4: Extreme Performance
super_battery Set by Mode 0xC2 (?)
fan_mode 0xF4 0x00, 0x10, 0x80
(or same with 0xX3 or 0xXd)
- 0x0d: normal / Balanced / Performance+Auto
- 0x1d: Silent
- 0x8d: Performance+Advanced
cpu rt temp 0x68 Another value/sensor at address 0x64
cpu rt speed 0x71 0x00 (0%) - 0x96 (150%) Value at 0x64 (100%) is target at 6000 RPM
gpu rt temp 0x80
gpu rt speed 0x89 0x00 (0%) - 0x96 (150%) Same as CPU
leds No leds
kbd_bl 0xF3 0x80-0x83 One color, no backlight mode
? 0xC9 0x01-0x6d Energy consumption? (W or J?)

Energy consumption (?) values:

Remarks

Target Fan Speed vs Realtime RPM

0x71 is CPU Target Fan Speed. It's always one of the 7 values in 0x72-0x77 to control fan speed in Advanced mode. In Auto or Silent modes, the value is still updated, but fans follow Auto/Silent speed instead.

The value at 0xCC and 0xCD is the realtime CPU Fan RPM used in MSI Center. For this device, the constant is 480000 (ISW-Modern msi ec.png).

RPM values seen in MSI Center:

Same issue with GPU Fan (RPM at 0xCA and 0xCB)

Speed percent

Both CPU and GPU Fan can be configured at "150%" speed 0x96 in Advanced Performance. rt_fan_speed_base_max is set to 0x96 (=150), but it means that percent values are off by a factor of 1.5 This could be solved by adding another attribute rt_fan_speed_base_100 set to 0x64 to calculate the scale to 100% (?) Or by adding an attribute rt_fan_speed_base_max_percent set to 150 (?)

CPU:

GPU:

glpnk commented 3 months ago

Both CPU and GPU Fan can be configured at "150%" speed 0x96 in Advanced Performance. rt_fan_speed_base_max is set to 0x96 (=150), but it means that percent values are off by a factor of 1.5 This could be solved by adding another attribute rt_fan_speed_base_100 set to 0x64 to calculate the scale to 100% (?) Or by adding an attribute rt_fan_speed_base_max_percent set to 150 (?)

100-150% might just be overdrive + I think Linux not have standard versatile cooler API with defined ranges of values

0xC9

Just garbage value I think