-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Device support for Delta 15 A5EFK #41
Comments
Hi, I also have a Delta 15 and want to help add support for it. I saw from another disussion that OpenRGB supports the Mystic Light version on the Delta 15 and I can confirm it works, so at least you can fully control the RGB lighting on Linux with software. For other EC addresses and values, I could help verify by checking on my own. I'm not sure how to read these EC dump files. |
I see that it's not very different from my laptop, still it wouldn't hurt to check things with windows, so here is what you need to get things running: 1- find any recent ISO of windows 10 (don't even bother to activate it). 2- install it then update it using windows update. 3- download the AMD adrenaline software thing (it should install the right drivers for the CPU/GPU). 4- download the MSI dragon center (it won't work if your drivers aren't installed correctly). 5- now you have two ways to start learning your EC behaviour, either use MsiEcRamEditor (which didn't work for me) Or use RWEverything. Note: cut off the Internet connection after the last step because windows updates might mess up your drivers. |
Hello! I have a I spent some time getting a lot of dumps from Linux and wrote a small python script to replace the changing characters with an underscore. My idea is that those changing values are probably sensor readings. Here are my results for a little over 70k dumps on Linux, where nothing is changed from the default
Then I dumped from Windows. I used RWEveryting as @mutchiko suggested. I did way fewer dumps because the process is manual. So here are the parts that stayed the same in 18 dumps in User mode, High perf, Cooler boost:
and the ones in User mode, High perf, auto fans
I won't attach my Linux dumps because it's reproducible easily, and because it would be too big. |
I checked a few values using RWEverything for Delta 15, this is what I could find. Will be testing more soon. Mic LED - 0x2B Bit-2 Keyboard Backlight Mode Addr - 0xF3 Bit - 0,1 - {80,81,82,83 ?...} User Scenarios - Addr 0xD5, Values -
|
Hi, I kind of forgot about this thread and got back to looking at it. (and fumbled with github controls apparently...) I also found that the fan curves can be controlled with these addresses: Each column is a stem in the fan curve screen in dragon center, but there isn't any temperature scale so they are just from cold to hot. (0x72 coldest, 0x77 hottest and same for gpu; 0x8A coldest, 0x8F hottest). |
It would seem like 0xED is changed along with 0xD5 when changing performance level in user mode. So the same A0 = high, A1 = medium and A5 = low applies. And both 0xD5 and 0xED are changed to A4 in silent mode, like quartz posted. And now looking at the code, 0xf2 seems to be the shift mode. I can't say easily what super battery changes, but at least it puts the performance mode to low and shift mode to eco. More about fan control: each stem goes from 0 to 150%, and each related address goes from 0 to 96, so it's just the percentage value in hex. These seem like in other models, but here goes anyways: |
More stuff: I can't seem to find anything related to the keyboard backlight, but it can be controlled with openrgb so that's not a problem. The whole row 0xA# and addresses 0xB0 to 0xBB are used for the name, version and date of the firmware. It seems like "advanced" fan control mode isn't truly manual, the fan speed is independent of the targets you set. Even if the target fan speed is 0 at all temps, the actual fan speed can be high. For example, the fan speed (both fans or just gpu) is sometimes hovering at 4173 rpm at idle (user-controlled mode and performance level high) even if I've set it to 0% at all temperatures with dragon center (0x71=0 and 0x89=0). But if I first set it to 100% (so higher than the 69% at idle) and then to 0%, it goes to 0 rpm and stays there for like 10 seconds before ramping up again. The gpu temperature should be 54 and cpu 57 according to msi, so it's weird why it wants to have the fan on. If the performance level is low or medium, the gpu fan stays off like it should, but the cpu fan still runs at 2400 rpm even if it should be 0. And sometimes it just decides to drop both speeds to 0. It goes the other way as well, setting the user scenario to super battery changes the fan control to auto, so that 0x89 (fan 2 target speed) reads 41 (65%), but the actual speed is 0 rpm. So I suppose that the "advanced" mode can't shut the fans off completely but it can boost them up to the set value. |
While 0xF4 changes when changing fan mode in the dragon center, changing the value manually doesn't do anything. It's more like "auto" mode is just a preset in the dragon center app and then with "advanced" you can actually change the target values. Changing them directly with rweverything does change the fans' target speed% and their actual speed in most cases (just like using advanced mode in the dragon center), irrespective of the settings in dragon center or the value in 0xF4. TLDR:
*So the actual fan speed is always automatic but can be controlled upwards with the curve. Also, the same preset curve that's used when you set the "fan speed" to auto in user controlled mode, is used in all other "user scenario" modes: extreme performance, balanced, silent and super battery, but then the secret sauce of the always automatic fans is altered so that it's more silent in silent and super battery modes (and performance is also dropped to achieve that of course). CPU fan preset curve:
GPU fan preset curve:
I don't think there's any benefit to using these, there's no real "automatic" mode and the curves are quite bad. I had my laptop shut down a couple times because it got too hot under load in a warm room (before I got cooler boost working and started properly cleaning the fans), partly because the fans weren't blowing enough as the fastest they get with the default is 80%. I've also been looking into thermal paste or good thermal pads for a set-and-forget thermal solution. To have proper support for the delta 15, I think at least the fan curves would be really great to have, and the performance levels should be looked into (as in, if changing 0xD5 and/or 0xED actually changes something). I also wonder if the actual cpu/gpu fan speed is readable from the ec somehow, I couldn't find any correlating values. The keyboard backlight is another one I couldn't find, but it can be controlled with openrgb. Everything else should be mentioned in this thread, and I could make a pull request at some point but not very soon. |
Another testable thing would be the exact temperature points for both cpu and gpu where they change which part of the curve is controlling the fan speed. That'd take a while to measure, though. |
I've had exactly the same issue, that's why I'm following this thread. It's basically impossible to play I'd gladly help testing a draft PR and report performance metrics on the different modes. |
Ok, I looked into the keyboard RGB. From https://gitlab.com/CalcProgrammer1/OpenRGB/-/issues/2003 it seems that the controller is I'm also currently trying to compile the knowledge in this thread into a patch to then be tested. |
Ok, this is untested, but heavily commented. static const char *ALLOWED_FW_14[] __initconst = {
"E15CKAMS.108", // MSI Delta 15 A5EFK
NULL
};
static struct msi_ec_conf CONF14 __initdata = {
.allowed_fw = ALLOWED_FW_14,
.charge_control = {
// Confirmed by Sheepguard
// See https://github.com/BeardOverflow/msi-ec/issues/41#issuecomment-1793228355
.address = 0xef,
.offset_start = 0x8a, // TODO What is that ?
.offset_end = 0x80, // TODO What is that ?
.range_min = 0x8a, // TODO What is that ?
.range_max = 0xe4, // TODO What is that ?
},
.webcam = {
// Confirmed by quartz270
// see https://github.com/BeardOverflow/msi-ec/issues/41#issuecomment-1767657001
.address = 0x2e,
.block_address = 0x2f,
.bit = 1,
},
.fn_win_swap = {
// Confirmed by Sheepguard
// See https://github.com/BeardOverflow/msi-ec/issues/41#issuecomment-1792990497
.address = 0xbf,
.bit = 4,
},
.cooler_boost = {
// Confirmed by Sheepguard
// See https://github.com/BeardOverflow/msi-ec/issues/41#issuecomment-1792990497
.address = 0x98,
.bit = 7,
},
.shift_mode = {
// TODO confirm - Reported by Quartz270 & Sheepguard
// See https://github.com/BeardOverflow/msi-ec/issues/41#issuecomment-1767657001
// See https://github.com/BeardOverflow/msi-ec/issues/41#issuecomment-1792990497
// See https://github.com/BeardOverflow/msi-ec/issues/41#issuecomment-1792916704
.address = 0xf2,
.modes = {
{ SM_ECO_NAME, 0xa5 }, // super battery
{ SM_COMFORT_NAME, 0xa1 }, // balanced
{ SM_TURBO_NAME, 0xa0 }, // extreme
MSI_EC_MODE_NULL
},
},
.super_battery = {
// TODO Support super battery
// Note: MControlCenter doesn't seem to get it working
.address = MSI_EC_ADDR_UNKNOWN
.mask = 0x0f,
},
.fan_mode = {
// Values reported by Sheepguard
// See https://github.com/BeardOverflow/msi-ec/issues/41#issuecomment-1793228355
.address = 0xf4,
.modes = {
{ FM_AUTO_NAME, 0x0d },
{ FM_SILENT_NAME, 0x1d },
{ FM_ADVANCED_NAME, 0x8d },
MSI_EC_MODE_NULL
},
},
.cpu = {
.rt_temp_address = 0x68, // Confirmed by Sheepguard
.rt_fan_speed_address = 0xc9, // From https://github.com/dmitry-s93/MControlCenter/
// RT fan speed min & max Confirmed by sheepguard
// See https://github.com/BeardOverflow/msi-ec/issues/41#issuecomment-1792990497
.rt_fan_speed_base_min = 0x00,
.rt_fan_speed_base_max = 0x96,
.bs_fan_speed_address = 0xcd, // From https://github.com/dmitry-s93/MControlCenter/
// TODO confirm basic fan speed min & max
.bs_fan_speed_base_min = 0x00,
.bs_fan_speed_base_max = 0x0f,
},
.gpu = {
.rt_temp_address = 0x80, // From https://github.com/dmitry-s93/MControlCenter
.rt_fan_speed_address = 0xcb, // From https://github.com/dmitry-s93/MControlCenter
},
.leds = {
// Confirmed by quartz270 & Sheepguard
// See https://github.com/BeardOverflow/msi-ec/issues/41#issuecomment-1767657001
// See https://github.com/BeardOverflow/msi-ec/issues/41#issuecomment-1792990497
.micmute_led_address = 0x2b,
.mute_led_address = 0x2d,
.bit = 2,
},
.kbd_bl = {
// Delta 15 uses the "MSI Mystic Lights MS-1562" controller
// See https://gitlab.com/CalcProgrammer1/OpenRGB/-/issues/2003
// Using OpenRGB MSIMysticLight64Controller
// TODO Keyboard backlight control (Supported in openrgb)
.bl_mode_address = MSI_EC_ADDR_UNKNOWN,
.bl_modes = { 0x00, 0x01 },
.max_mode = 1,
.bl_state_address = MSI_EC_ADDR_UNKNOWN,
.state_base_value = 0x80,
.max_state = 3,
},
}; Edit: I don't plan on working more on this, I don't really have the required knowledge for it. However, I'd happily help testing a draft PR, as said before. |
@GeoffreyCoulaud Thanks for your code basis; I was able to get msi-ec running on my MSI Delta 15 as well! Changes to code posted above:
-> For MSI Delta 15 support on bios versions:
Install by replacing msi-ec.c : OR Install by manually repeating 3 simple changes:
static const char *ALLOWED_FW_14[] __initconst = {
"E15CKAMS.108", // MSI Delta 15 A5EFK
"E15CKAMS.10C",
NULL
};
static struct msi_ec_conf CONF14 __initdata = {
.allowed_fw = ALLOWED_FW_14,
.charge_control = {
// Confirmed by Sheepguard
// See https://github.com/BeardOverflow/msi-ec/issues/41#issuecomment-1793228355
.address = 0xef,
.offset_start = 0x8a, // TODO What is that ?
.offset_end = 0x80, // TODO What is that ?
.range_min = 0x8a, // TODO What is that ?
.range_max = 0xe4, // TODO What is that ?
},
.webcam = {
// Confirmed by quartz270
// see https://github.com/BeardOverflow/msi-ec/issues/41#issuecomment-1767657001
.address = 0x2e,
.block_address = 0x2f,
.bit = 1,
},
.fn_win_swap = {
// Confirmed by Sheepguard
// See https://github.com/BeardOverflow/msi-ec/issues/41#issuecomment-1792990497
.address = 0xbf,
.bit = 4,
},
.cooler_boost = {
// Confirmed by Sheepguard
// See https://github.com/BeardOverflow/msi-ec/issues/41#issuecomment-1792990497
.address = 0x98,
.bit = 7,
},
.shift_mode = {
// TODO confirm - Reported by Quartz270 & Sheepguard
// See https://github.com/BeardOverflow/msi-ec/issues/41#issuecomment-1767657001
// See https://github.com/BeardOverflow/msi-ec/issues/41#issuecomment-1792990497
// See https://github.com/BeardOverflow/msi-ec/issues/41#issuecomment-1792916704
.address = 0xf2,
.modes = {
{ SM_ECO_NAME, 0xa5 }, // super battery
{ SM_COMFORT_NAME, 0xa1 }, // balanced
{ SM_TURBO_NAME, 0xa0 }, // extreme
MSI_EC_MODE_NULL
},
},
.super_battery = {
// TODO Support super battery
// Note: MControlCenter doesn't seem to get it working
.address = MSI_EC_ADDR_UNKNOWN,
.mask = 0x0f
},
.fan_mode = {
// Values reported by Sheepguard
// See https://github.com/BeardOverflow/msi-ec/issues/41#issuecomment-1793228355
.address = 0xf4,
.modes = {
{ FM_AUTO_NAME, 0x0d },
{ FM_SILENT_NAME, 0x1d },
{ FM_ADVANCED_NAME, 0x8d },
MSI_EC_MODE_NULL
},
},
.cpu = {
.rt_temp_address = 0x68, // Confirmed by Sheepguard
.rt_fan_speed_address = 0xc9, // From https://github.com/dmitry-s93/MControlCenter/
// RT fan speed min & max Confirmed by sheepguard
// See https://github.com/BeardOverflow/msi-ec/issues/41#issuecomment-1792990497
.rt_fan_speed_base_min = 0x00,
.rt_fan_speed_base_max = 0x96,
.bs_fan_speed_address = 0xcd, // From https://github.com/dmitry-s93/MControlCenter/
// TODO confirm basic fan speed min & max
.bs_fan_speed_base_min = 0x00,
.bs_fan_speed_base_max = 0x0f,
},
.gpu = {
.rt_temp_address = 0x80, // From https://github.com/dmitry-s93/MControlCenter
.rt_fan_speed_address = 0xcb, // From https://github.com/dmitry-s93/MControlCenter
},
.leds = {
// Confirmed by quartz270 & Sheepguard
// See https://github.com/BeardOverflow/msi-ec/issues/41#issuecomment-1767657001
// See https://github.com/BeardOverflow/msi-ec/issues/41#issuecomment-1792990497
.micmute_led_address = 0x2b,
.mute_led_address = 0x2d,
.bit = 2,
},
.kbd_bl = {
// Delta 15 uses the "MSI Mystic Lights MS-1562" controller
// See https://gitlab.com/CalcProgrammer1/OpenRGB/-/issues/2003
// Using OpenRGB MSIMysticLight64Controller
// TODO Keyboard backlight control (Supported in openrgb)
.bl_mode_address = MSI_EC_ADDR_UNKNOWN,
.bl_modes = { 0x00, 0x01 },
.max_mode = 1,
.bl_state_address = MSI_EC_ADDR_UNKNOWN,
.state_base_value = 0x80,
.max_state = 3,
},
};
static struct msi_ec_conf *CONFIGURATIONS[] __initdata = {
&CONF0,
&CONF1,
&CONF2,
&CONF3,
&CONF4,
&CONF5,
&CONF6,
&CONF7,
&CONF8,
&CONF9,
&CONF10,
&CONF11,
&CONF12,
&CONF13,
&CONF14,
NULL
}; Tested for 1 week, no unusual performance or bugs noticed so far. |
Thanks everyone! Closing since the support was merged. Adding a label to come back here when we implement fan curves and "super battery" |
Hello, I did the dump with teackot's debug branch. Cooler boost, some thermal readings and shift mode did work on some older msi_ec version last year, at least cooler boost is probably generic. The backlight is rgb (can be changed with the msi software), and always on (backlight button doesn't do anything on linux, isn't even recognised by libinput unlike other function buttons).
I'll do analysis on windows later. I'll have to check my ec and bios versions as well, but i'm pretty sure the ec at least is 15CKEMS1.108.
ec_dump.txt
The text was updated successfully, but these errors were encountered: