msi-ec
msi-ec copied to clipboard
Support for MSI Alpha 17 B5EEK
hello, after installing the msi-ec package from the AUR, i'm not able to find the msi-ec folder at : /sys/devices/platform/
i also noticed a error massage when i boot that goes along the lines: "failed to start kernel modules", which only happens when install msi-ec
important info: system: garuda linux kernel version: 6.1.30-1-lts
BIOS:E17LLAMS.108 EC:17LLEMS1.106 I tried to do this : https://github.com/BeardOverflow/msi-ec/issues/18#issuecomment-1435733090
but i failed to get the dump file this way, however, after going with the first 3 steps, i was able to find the msi-ec folder in: /sys/devices/platform/ (it disappears after rebooting) and from there i manually copied the contents of ec_dump dump.txt
when i opened ec_dump using kate and spammed f5 i saw some values change in real time, i remember one of entries had 3 values for each time that i press fn+f8 to change the keyboard lights (they don't work)
other things to note with this laptop:
1- i had very poor performance when using any external monitor, so i had to disable resize-BAR from the bios.
2-the dGPU:RX6600M is having performance issues too, low wattage, high usage when playing games.
so im hoping to solve this issue IF i can get msi-ec to work
thanks.
Hi!
Here's what I've found so far:
- charge control - [0xef]
- webcam's probably standard [0x2e]
- fn/super swap - ?
- cooler boost - standard [0x98]
- shift mode - [0xf2]
- super battery - ? (may be unsupported)
- fan mode - [0xf4]
- leds - needs testing
- keyboard backlight - [0xf3] contains a valid value, but it may be unsupported (because it's RGB)
super battery is supported, i remember having a mode like that in the msi app on windows, the charger was disconnected when i copied the dump file and i have tlp installed
cooler boost was not enabled
leds? i don't know what is that
keyboard is RGB, [0xf3] contains a value between 80 to 83 for every time i press fn+f8, and the lights are totally under control using open RGB, which shows that the device is: MSI MysticLight MS-1563 v0001
super battery is supported, i remember having a mode like that in the msi app on windows, the charger was disconnected when i copied the dump file and i have tlp installed
Okay! Though will be quiet difficult to figure out the exact address. So far we've found three different possible addresses.
cooler boost was not enabled
Yep, I can see that in the dump
leds? i don't know what is that
The LEDs on the sound mute and mic mute buttons. I suppose they don't light up when you press them
keyboard is RGB, [0xf3] contains a value between 80 to 83 for every time i press fn+f8, and the lights are totally under control using open RGB, which shows that the device is: MSI MysticLight MS-1563 v0001
We'll need to test that, because for some models it isn't enough to change the value in the EC to change the backlight
Okay! Though will be quiet difficult to figure out the exact address. So far we've found three different possible addresses.
ill figure which one is the real one, where can i find a list of all the addresses?
The LEDs on the sound mute and mic mute buttons. I suppose they don't light up when you press them
i didn't know that they even existed before, and you are right, they don't light up
i just figured something new, though i don't know what it is or what it does: [0x32] changes between 00 and 01 whenever i activate or disactivate cooler boost but of course it's not cooler boost
im still looking for any new entries so stay tuned,
ill figure which one is the real one, where can i find a list of all the addresses?
@glpnk has added a memory map, you can find it here
If you have Windows installed, I suggest you to use it to discover the addresses used by the MSI Center. There is a Windows app for it, you can find it here. It may or may not work for you.
I tried MsiEcRamEditor and it didn't work, so I'm using this and it seems to be working fine, however, i don't know what i should do exactly to figure out the values responsible for each option in the msi center app, so can you explain the steps that i should follow? Thanks
Switch the parameters in MSI Center and watch what changes in the RWEverything app when you do that. Some values in the EC are constantly changing (like CPU frequency, temperature, fan speed, etc), you can ignore them.
For example, if you switch between different battery thresholds, you'll see [0xEF] changing
In RWEverything you can save current values and load it for comparison, changed values will be highlighted, but you need to press some key (i don't remember which) to show current values instead saved
Thanks for the help, here is a list of the things i confirmed MSI Alpha 17 B5EEK_230531_204144.txt
I'm open to any suggestions before i go any further
Thank you!
Your EC configuration is somewhat similar to MSI Alpha 15
, but the set of available fan and shift modes is different.
• Display overdrive : ??? • Crosshair display (i dont care anymore)
These are interesting, but we have 0 info about these params and I'm not even sure they are related to the EC. Let's ignore them for now.
Explanation: i am very confused with shift mode in 0xF2, both of them seem to change when changing the scenario. i chose this to be super battery after looking at the memory map but i am totally lost here
I admit, our naming is pretty confusing =] The modes in the official MSI Center app actually change both parameters. We actually have no idea what exactly those params do. I think that the param we call 'super battery' is actually some sort of a GPU mode parameter, and the param we call 'shift mode' is a CPU mode parameter.
• Mic mute: stuck! can't turn it off to check! God knows who is listening on the other side
Haha, well knowing the speaker mute address, we can figure out the mic mute address because 2b and 2c are the only available options for these LEDs
So, this is the memory map of your EC:
parameter | address | comment |
---|---|---|
charge control | 0xef | - |
webcam | 0x2e ? | - |
fn/win swap | 0xbf | - |
cooler boost | 0x98 | - |
shift mode | 0xf2 | options: C0, C1, C2, C4 |
super battery | 0xd5 | options: A0, A1, A4, A5; AMD related? |
fan mode | 0xf4 | curious, seems like only the higher 4 bits matter?; options: auto, silent?, advanced |
speaker mute | 0x2c | - |
mic mute | 0x2b | - |
keyboard backlight | - | RGB with 4 different styles, out of scope of this driver :( |
Now, can you please switch the webcam LED on and off and see how the [0x2E] changes (i.e. the values for on and off)? Same for the speaker mute LED at [0x2C]
Edit: oh, and also fn/win swap
So i think that i have figured out a good chunk of values now, i also think that i have figured out the 'super battery' and 'shift mode' confusion, however, i won't confirm/change anything until tomorrow.
I will be taking into account your previous 2 comments to update the list with more entries and better naming to fit the actual project too.
What i need now is to know why does 'super battery' accepts only one value in the memory map? It must be CPU governors that get applied when changing modes (i don't know if the windows kernel works like that too)
But for me personally, i think 'super battery' is not the right thing to call it (at least in my case)
I will be taking into account your previous 2 comments to update the list with more entries and better naming to fit the actual project too.
Okay, thanks!
What i need now is to know why does 'super battery' accepts only one value in the memory map
That's because we didn't have much information about it until some recent laptop support requests. It should use a list of modes, like shift_mode and fan_mode params do.
i think 'super battery' is not the right thing to call it
I agree
As promised, here is the updated list: MSI Alpha 17 B5EEK_230602_134249.txt
And here is what i managed squeeze out of the MSI app, very interesting stuff, and in the same .zip file you'll find a few screenshots for the EC dump, i couldn't save it normally so i had to adapt: MSI Alpha 17 B5EEK.zip
You'll find some even more interesting changes between the linux dump and the dump on windows (which explains the tons of problems i have with this laptop on linux).
MSI naming is really strange, now i`m writing comparison table for supported firmwares and i really surprised that we already supporting Alpha 15 B5EE / B5EEK [158LEMS1]
#16, but you model is Alpha 17 and can be not compatible
I think the addresses are (mostly?) compatible, not sure about allowed values at them yet. Alpha 15 even has the 'super battery' parameter at [0xD5], just like Alpha 17, we just didn't add it yet.
Note: [0xED] is VERY WIERD! It changes the value to [0xC0] for unknown reasons, for example, when i press the webcam block button it changes whatever value to [0xC0].
About [0xED], this address is related to ACPI events, it will also change its value when you press the brightness keys or plug/unplug the type-c charger
@glpnk Well you can't blame anyone but MSI, it's not just the naming we're talking about here.
There was 6 months gap between the release of the Alpha 15 and the Alpha 17 ,in which MSI received alot of complaints that the Alpha 15 overheats itself and shuts down when charging after gaming for a bit.
It seems to me that they did some modifications to the EC to avoid such problems in later releases.
What is most important here is to look for the buid date for each firmware release (i can't find much info about the Alpha 15) but it seems that there is only one month between the first (and only) firmware release for the Alpha 17 and the latest update for the Alpha 15
I'm not blame anyone and I'm just found that devices from the same generation had different EC name, but could be compatible, check Katana GF66
UPD: also they use different names for EC and like EMS, IMS, AMS.
- AMS - is mostly BIOS name
- EMS - EC
- IMS - could be BIOS and EC in single file
I want to clear some confusion about fan_mode in [0xF4]:
Changing the scenario (shift mode) is one of 2 ways to have some sort of "control" over the fans, which gives the control to whatever is responsible for fan speed ( MSI app or something else)
The other way is to set the scenario to USER, in which i can control the performance and fan speed, under fan speed there is only 3 options:
Auto = [0x20]
Advanced = [0xA0] (No matter how you change the dan speed)
Cooler boost (doesn't change anything)
To even add more information: When editing the value in [0xF2] (shift mode) From [0xC2] (eco mode that turns off the fans) to [0xC1] (sport mode that turns on the fans) The fans will kick in as if i changed the scenario in the MSI app. And the actual fan_mode value doesn't even change!
So to my understanding there is no way to control the fans directly from the EC, but since it does already control the fans by itself then there isn't much pressure to get fan_mode support in the driver
i'm back at it again and here is what i found:
real time CPU fan speed at [0x71] those are the fan speed steps that can be controlled in advanced mode:
- CPU fan speed 0: [0x72]
- CPU fan speed 1: [0x73]
- CPU fan speed 2: [0x74]
- CPU fan speed 3: [0x75]
- CPU fan speed 4: [0x76]
- CPU fan speed 5: [0x77]
fan speed: 0% = 00 / 100% = 64
in [0x78] there should be another step but it is not controllable by the MSI app and is stuck to 55
real time GPU fan speed at [0x89]
- GPU fan speed 0: [0x8A]
- GPU fan speed 1: [0x8B]
- GPU fan speed 2: [0x8C]
- GPU fan speed 3: [0x8D]
- GPU fan speed 4: [0x8E]
- GPU fan speed 5: [0x8F]
fan speed: 0% = 00/ 100% = 64
just like before, the last step at [0x90] is stuck at 55
your fan curve address seems default, check https://github.com/dmitry-s93/MControlCenter/blob/53a8df677bc5df30813f935f3e79a7faf12708a6/src/operate.cpp#L64
i just tried it and it is very weird: CPU fan can't be controlled but the GPU fan seems to be fine it can mess up the charging LED even if the laptop is not plugged to the power, though it only happens when i click on the FN/super switch
shift mode and backlight are not supported it can report the right temperatures for both the CPU and the GPU it also reports fan speed for both fans but sometimes it gives me 2 million rpm so yeah
i experimented with charging registers (addresses) on my laptop and found
name | address, bit, value | description |
---|---|---|
FN-lock get | 0x2b bit 3 | read only |
cooling profile | 0x72-77, 0-150% in hex | advanced fan mode, but works in other modes |
charging state | 0x30-31, DANGEROUS!!! | something related to charging, setting 0x30 bit 0 to HIGH with unplugged charger triggers charging state with powering on charging led and charging mark on windows |
realtime fan RPM | 0xcd, around 4e-d2, inverted | value proportional to EC cooler RPM in HWINFO64 (max 6128 = 0x4e, min around 2k = 0xd2) |
fan enabled | 0x33 bit 3 | |
battery level | 0x42 | value in % |
also RPM in MControlCenter is calculated like [CONST / rpm register value]
look like EC reports cooler RPM in time per rotation
real time CPU temperature at [0x68]
- CPU temperature 0: [0x6A]
- CPU temperature 1: [0x6B]
- CPU temperature 2: [0x6C]
- CPU temperature 3: [0x6D]
- CPU temperature 4: [0x6E]
- CPU temperature 5: [0x6F]
real time GPU fan speed at [0x80]
- GPU temperature 0: [0x82]
- GPU temperature 1: [0x83]
- GPU temperature 2: [0x84]
- GPU temperature 3: [0x85]
- GPU temperature 4: [0x86]
- GPU temperature 5: [0x87]
i'm not sure about any of these since i can't find a way to test them out
@glpnk what's your laptop?
Model | Class | EC name | Link |
---|---|---|---|
Modern 14 C5M | Business | 14JKEMS1 | MSI support |
also I have problems with suspend (S3 and s2idle state), SSD dont power on after boot on arch and ubuntu like OS
but if laptop is booted from external ssd, internal ssd powering on after second and next sleep-resume cycles
i find it weird that your laptop doesn't support super battery, what values do you see in [0xD5]?
Yeah, its weird but in super battery mode in MSI app EC values not changed
Settings are the same as in silent (or eco, dont remember) mode but without silent cooler profile
Also how super battery setting look like in app? Mine look like one of power profiles like [turbo, silent, SB, eco]
how super battery setting look like in app?
Well, it's kind of complicated, i still don't know what is 'super battery' or what it does in this driver, however in the MSI app it's a "usage scenario" which means it's a part of shift_mode (eco)
But if i look at [0xD5] i see 4 values: A0, A1, A4, A5. @teackot says that it might be related to GPU mode or something, but changing it while stress testing both the CPU/GPU doesn't change anything.