Skip to content
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

Add MSI Modern 15 A5M (155LEMS1.106) support #66

Merged
merged 9 commits into from
Feb 5, 2024

Conversation

teackot
Copy link
Collaborator

@teackot teackot commented Aug 21, 2023

No description provided.

@teackot
Copy link
Collaborator Author

teackot commented Aug 21, 2023

#4
#57 (partially)

@glpnk
Copy link
Contributor

glpnk commented Aug 25, 2023

Add FM_SILENT_NAME 0xF4=D1/C1

Needs testing:

  • webcam (2e bit 1), webcam block (2f bit 1)
  • mute led (2c bit 2)
  • micmute led (2b bit 2)
  • FN swap (BF? bit 4)
  • fan modes

@glpnk
Copy link
Contributor

glpnk commented Oct 6, 2023

@teackot please add 155LEMS1.105 firmware #83. Dump here

@lmaxyz
Copy link

lmaxyz commented Nov 23, 2023

@glpnk Hi! How much time do you need to check and accept this pull request? I can't understand what flow is at your repo, half year gone, but pull request is still marked as draft.
I have A5M too, and msi-ec-git from AUR doesn't work for me, because there is no config for my fw.
Can I help you somehow?

@benitozh
Copy link

Hi, I think we're still here #83 (comment) . Only I'm a computer geek, I don't know how to finish the job. Indeed, having compatibility with the Modern 15 A5M would be ideal, and it seems that many users are interested on this particular laptop given the previous posts shared on the forum for this specific platform. Until the work is finished, thanks for the effort and attention already put into the project.

@glpnk
Copy link
Contributor

glpnk commented Nov 23, 2023

@lmaxyz Does all features from draft are working? I can't accept PR because I'm not maintainer.

@benitozh From the checklist you linked in the comment, it looks like all the main functions are supported, but:

  • cpu/basic_fan_speed is unsupported (and reading unsupported values is fixed in some PR)
  • number of fan modes is unknown. @ushinnary tested it but F4 address on screenshots is hidden.

Anyone has Windows to test F4 values again? I don't know how to test is mode supported on Linux because it provide no feedback. From models with indexes B_M and C_M I can assume that FM_BASIC_NAME is unsupported but may be it's default and can be read from Linux after reboot.

@teackot What do you think about this issue?

@benitozh
Copy link

@glpnk Thanks for letting me know. I'm actually using Win11, and will try eventually to test the designated value while adjusting fan speed for F4.

@benitozh
Copy link

benitozh commented Dec 3, 2023

Hi,
After a few adjustments to get RWeverything working, here are the values obtained according to the different modes.
I hope that this will be suitable, I have no idea how to interpret these values, hoping that everything is there :)
If this doesn't work for you, let me know how to target the right value.
I really want our MSI model to be supported.

Super battery mode :
Super battery

Silent mode :
Silent

Balanced :
Balanced

High performance enabled :
HighPerf

Quick CPU-Z just in case for BIOS version (not sure if this is linked to EC but still) :
Capture d'écran 2023-12-03 154715

@benitozh
Copy link

benitozh commented Dec 3, 2023

Forgot to share the last screenshot for auto mode :
Auto

@glpnk
Copy link
Contributor

glpnk commented Dec 4, 2023

@benitozh Thanks for your effort. Can you explain how you managed to fix RWEverything?

Please check other settings inside high performance mode like on this screenshot (from @ushinnary research)

image

You don't need to change settings in fan curve mode, just enable it. Cooler boost seems default

I think fan modes are similar on modern series laptops, so FM_BASIC_NAME is excess. (Does anyone know a source of this setting for this model? I can assume it came from #4, but it can be some mistake or software difference)

.fan_mode = {
+++		.address = 0xf4,
		.modes = {
+++			{ FM_AUTO_NAME,     0x0d },
+++			{ FM_SILENT_NAME,   0x1d },
---			{ FM_BASIC_NAME,    0x4d },
+++			{ FM_ADVANCED_NAME, 0x8d },
			MSI_EC_MODE_NULL
		},
	},

@benitozh
Copy link

benitozh commented Dec 5, 2023

Hello,

I was able to fix the problem I was facing when launching RWEverything by applying the method explained in this post, modifying a value in my computer's registry to support the application's driver.
--> https://www.reddit.com/r/buildapc/comments/e9hezi/rw_everything_not_working_after_windows_build/

After consulting the parameters proposed in the High Performance mode, the "auto" mode is selected by default, with the option of replacing it with the cooler booster mode. Here's a screenshot of the values obtained by activating the cooler booster mode.
--> Cooler boost :
coolerboost

--> As asked, the custom fan curve with default parameters enabled :
Custom fan curve

Capture d'écran 2023-12-05 155747

Finally, I can't say for sure whether the address you're referring to comes from #4, but if it does, it seems valid in the sense of the post written by @BeardOverflow #4 (comment)

@glpnk
Copy link
Contributor

glpnk commented Dec 5, 2023

@benitozh So fan modes are similar to other "modern" models, and you have second ("dGPU") fan, but don't have dGPU, only in-CPU video. (please reply/dislike if I wrong or like if true)

My thoughts from comment above now confirmed.

@benitozh
Copy link

benitozh commented Dec 6, 2023

Hi @glpnk, indeed the A5M model has two fans, and no discrete video card but only one integrated in the CPU (R5 5500u).
Here a screenshot of CPU-Z, if it can help you confirm your thoughts hardware wise :

Capture d'écran 2023-12-06 145017
Board
gpu

Is there anything else that needs to be done so that the msi-ec driver can support our laptop ?

@glpnk
Copy link
Contributor

glpnk commented Dec 6, 2023

@benitozh Thanks again, I think we done.

@teackot We need to remove fan mode { FM_BASIC_NAME, 0x4d }, and it ready to merge

.fan_mode = {
+++		.address = 0xf4,
		.modes = {
+++			{ FM_AUTO_NAME,     0x0d },
+++			{ FM_SILENT_NAME,   0x1d },
---			{ FM_BASIC_NAME,    0x4d },
+++			{ FM_ADVANCED_NAME, 0x8d },
			MSI_EC_MODE_NULL
		},
	},

@benitozh
Copy link

benitozh commented Dec 6, 2023

Awesome, can't wait to get my hands back on Arch :)

@benitozh
Copy link

benitozh commented Dec 23, 2023

Hi there, just quick question : is there a scheduled time until this repo get merged with the main msi-ec branch ? Thanks :)

EDIT : Hi @BeardOverflow, @teackot could you please merge this fork to the main msi-ec branch in order to get our laptop MSI Mordern 15 A5M working with the your driver ? We're still standing by since early december. Thanks in advance :)

@lmaxyz
Copy link

lmaxyz commented Feb 5, 2024

Hi guys! Is repository maintainer here? Can somebody merge the PR? @teackot , I see you are active on github. Do you have contact information to contact @BeardOverflow . I think he dropped repository maintaining and we should contact him somehow.

@teackot
Copy link
Collaborator Author

teackot commented Feb 5, 2024

Hi, @lmaxyz

I haven't been active in this project for some time because of my university and got out of the loop. And then didn't have enough motivation to process everything that happened while I was away, I'm trying to get back to maintaining it though.

I'll look through this PR once I get home in a couple of hours, thanks for the bump!

@teackot teackot marked this pull request as ready for review February 5, 2024 21:52
@teackot teackot merged commit 4f0d5eb into BeardOverflow:main Feb 5, 2024
@teackot
Copy link
Collaborator Author

teackot commented Feb 5, 2024

Finally!

@teackot
Copy link
Collaborator Author

teackot commented Feb 5, 2024

@lmaxyz

I have A5M too, and msi-ec-git from AUR doesn't work for me, because there is no config for my fw.

About that, the AUR package doesn't work with the latest kernel because of #71

@quaresmajose
Copy link
Contributor

@lmaxyz

I have A5M too, and msi-ec-git from AUR doesn't work for me, because there is no config for my fw.

About that, the AUR package doesn't work with the latest kernel because of #71

I have this AUR package fork https://github.com/quaresmajose/msi-ec-dkms-git witch is working pretty well using the dkms.

@benitozh
Copy link

Hi there :)
I was able to install successfully using the DKMS method to install msi-ec on Fedora, as well as Endeavour OS (I installed the DKMS package first before installing msi-ec, maybe that will help you @lmaxyz).

However, while the coolerboost function activates correctly when I change the appropriate file to on or off, the fan-mode function doesn't seem to respond to changing the value in the /sys/devices/platform/msi-ec/fan_mode file, even though I specify "auto" or "advanced", the fans run continuously. In principle, the auto function should turn the fans off until the computer's power level is too high.

Perhaps I've missed something important? I'd like your opinion on this.
An important note though, I'm using the EC 155LEMS1.106 version, which is supported by the msi-ec driver.

Thanks in advance for your answers!

@lmaxyz
Copy link

lmaxyz commented Feb 17, 2024

Hi @benitozh and thanks for your advice! I'll try it later.

What about fans. I think you should try to use shift_mode option. It 's for power control but it affects fans too. When I set it to eco value my laptop fans stop until I give some load to laptop's CPU. Maybe it's what you want.

@teackot
Copy link
Collaborator Author

teackot commented Feb 17, 2024

@benitozh Hi!

Have you tried watching the fan speed on fresh boot, in case it is because of some background processes or your DE/WM? My fans, for example, work much more when I use Gnome, even on fresh boot.

Also, try the "silent" option - the fans should probably work quieter and/or less often.

@benitozh
Copy link

@teackot @lmaxyz Thanks for your advices. I'll try your suggestions soon and will let you know if there is still an issue.

@benitozh
Copy link

It worked ! Thanks for your advice, i literally didn't think to change the value in the shift_mode folder in a first place. I'm still a newbie in there but I'm learning a lot thanks to you all.
Also a subsequent question : each time I reboot my system, the value in shift_mode is replaced by the default one, aka comfort mode. Any idea to make it choose automatically the eco stance at start-up without having to use the terminal manually ?

@lmaxyz
Copy link

lmaxyz commented Feb 18, 2024

@benitozh Glad to help you)
You can write and enable switch_to_eco_mode.service file, that will execute switch_to_eco_mode.sh script. Inside switch_to_eco_mode.sh script you just write command that changes shift_mode value.
If you don't know about service files, you can google it, there is a lot of guides how to write it. For example this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants