Skip to content

Conversation

@greymouser
Copy link

@greymouser greymouser commented Dec 23, 2025

close #561

My primary motivation was proper Summit 13 AI+ Evo A2VM support (See #561 ).

  • Introduces new conf for 13P5EMS1.106, the Summit 13 AI+ Evo A2VM
    • The webcam is just a plastic slider AFAICT. So I have no way to understand what is supposed to happen with the webcam related config, so I set it to unsupported.
    • I could not determine if the GPU fan or temp was availabe, so set ti unsupported.
    • I tested all others features of the conf.

I'd appreciate a pointer to test webcam or GPU support, if possible.

Miscellaneous fixes/changes:

  • I changed the module install directory to "updates", which is in line with kernel documentation. https://docs.kernel.org/kbuild/modules.html#install-mod-dir . In the end, I don't know if this matters, but that directory is specifically called out to "override" modules similarly named in the base kernel modules. Since msi-ec exists in the kernel tree upstream, this seems appropriate.
  • I bumped the version to 0.13, since this is a bigger change overall.

Platform specific code changes:

  • Makefile is expanded to compile multiple files to original msi-ec module name.
  • Add a quirks_init and quirks_exit to the conf.
  • If the conf quirks_* entries are not NULL, they are invoked.
  • For 13P5EMS1.106, the Summit 13 AI+ Evo A2VM, this entails hooking up the speaker MUTE led.

Note that the platform::mute created by the original msi-ec code worked. And the button also worked to trigger speaker mute. I researched and experimented where the most proper spot to hook up the input event for speaker mute led would live (alsa UCM, other input drivers, etc), but this seems to be the most correct spot.

@greymouser
Copy link
Author

Tested against Linux 6.18.2.

@glpnk
Copy link
Collaborator

glpnk commented Dec 23, 2025

This is a driver, it should be as simple as possible

@glpnk
Copy link
Collaborator

glpnk commented Dec 23, 2025

About webcam - hardware may use "support" bits, which shows that camera is togglable. No need to hide it with quirks

@glpnk
Copy link
Collaborator

glpnk commented Dec 23, 2025

About GPU - temp is reported only under load. If temp is not reported, than system uses only CPU sensor and single fan curve. Second fan is just slave. Probably it's RPM sensor is unused

@glpnk
Copy link
Collaborator

glpnk commented Dec 23, 2025

  • I changed the module install directory to "updates", which is in line with kernel documentation. https://docs.kernel.org/kbuild/modules.html#install-mod-dir . In the end, I don't know if this matters, but that directory is specifically called out to "override" modules similarly named in the base kernel modules. Since msi-ec exists in the kernel tree upstream, this seems appropriate.

I hope it really works as intended, thanks for suggestion

@glpnk
Copy link
Collaborator

glpnk commented Dec 23, 2025

Sorry, but your mute led workaround does not use mute state from ALSA, and works as toggle.

Realistically, main audio in/out's are not configured as trigger, so they are ignored

@greymouser
Copy link
Author

About webcam - hardware may use "support" bits, which shows that camera is togglable. No need to hide it with quirks

No quirks for this part, just conf. AFAICT, there's just nothing in the EC regarding the webcam.

I'll revert to the common hex used elsewhere and test again.

@greymouser
Copy link
Author

About GPU - temp is reported only under load. If temp is not reported, than system uses only CPU sensor and single fan curve. Second fan is just slave. Probably it's RPM sensor is unused

Ahh, nice. I'll revert to the likely candidates in the conf and test while running a perf suite for a bit.

@glpnk
Copy link
Collaborator

glpnk commented Dec 23, 2025

... Mute led ...

Check quickfix #130 (comment) which was suggested in #156 (comment)

Mute LED
2D off=00 on=02
Enable with:
echo 'Master Playback Switch' | sudo tee /sys/class/sound/ctl-led/speaker/card1/attach

Some people made systemd service to run on startup, but I've forgot where it was

@greymouser
Copy link
Author

Sorry, but your mute led workaround does not use mute state from ALSA, and works as toggle.

Realistically, main audio in/out's are not configured as trigger, so they are ignored

It uses the mute state from the main-ec driver, but I can see what you're saying, as that is currently by side effect since the core of the driver and this addition both de facto initialize it to off, and thn they stay in sync as it's toggled. I could tie it back into reading the state directly from the EC again upon key press, which would inherently always be in sync.

Regarding ALSA, I did research and explore both the snd-hda-intel code and the SOF firmware all these platforms seem to use. I prodded all the GPIO bits I could (hda-verb and other tools) but was unable to have the audio mute state change trigger the LED, which it would/should if it was hooked up that way.

I'll look into it more. If it's in the binary firmware, I'm not sure what can be done.

I have a user space script that works, but it feels even more wrong than this attempt.

Does the speaker mute led tend to work automatically in sync with the sound drivers on all other supported platforms in MSI-EC?

@greymouser
Copy link
Author

... Mute led ...

Check quickfix #130 (comment) which was suggested in #156 (comment)

Mute LED

2D off=00 on=02

Enable with:

echo 'Master Playback Switch' | sudo tee /sys/class/sound/ctl-led/speaker/card1/attach

Some people made systemd service to run on startup, but I've forgot where it was

Oh! Nice. Thanks for sharing this. I'll implement similar and see why I can come up with.

@glpnk
Copy link
Collaborator

glpnk commented Dec 23, 2025

Fan-temp part of EC
image

@greymouser
Copy link
Author

greymouser commented Dec 23, 2025

GPU

While running Unigine GPU performance test over and over ...

$ cat debug/ec_dump |grep -E "0x6_|0x7_|0x8_|0x9_|0xc_|_0"
|      | _0 _1 _2 _3 _4 _5 _6 _7 _8 _9 _a _b _c _d _e _f
| 0x6_ | 00 00 00 00 00 00 00 00 45 00 36 3a 3e 42 46 4e  |........E.6:>BFN|
| 0x7_ | 64 5f 00 28 32 41 50 5f 78 00 2d 37 3b 3f 43 4b  |d_.(2AP_x.-7;?CK|
| 0x8_ | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|
| 0x9_ | 00 00 00 00 00 00 00 00 02 00 00 00 00 00 3e 00  |..............>.|
| 0xc_ | 00 00 01 25 00 00 00 00 00 57 00 56 00 00 00 00  |...%.....W.V....|

... so it doens't seem like this model doesn't hvae usable .gpu.rt_temp_address or .gpu.rt_fan_speed_address.

Webcam

$ cat webcam webcam_block 
off
off
$ cat debug/ec_dump |grep -E "0x2_|_0"
|      | _0 _1 _2 _3 _4 _5 _6 _7 _8 _9 _a _b _c _d _e _f
| 0x2_ | 00 00 00 00 00 00 00 00 0a 05 00 00 08 28 09 0b  |.............(..|
# moving plastic slider to cover camera
$ cat debug/ec_dump |grep -E "0x2_|_0"
|      | _0 _1 _2 _3 _4 _5 _6 _7 _8 _9 _a _b _c _d _e _f
| 0x2_ | 00 00 00 00 00 00 00 00 0a 05 00 00 08 28 09 0b  |.............(..|
# move slider back
$ echo on > webcam_block 
$ echo on > webcam
$ cat webcam webcam_block 
on
on
cat debug/ec_dump |grep -E "0x2_|_0"
|      | _0 _1 _2 _3 _4 _5 _6 _7 _8 _9 _a _b _c _d _e _f
| 0x2_ | 00 00 00 00 00 00 00 00 0a 05 00 00 08 28 0b 09  |.............(..|
# trying a camera program like cheese

... and cheese still launched and showed the camera.

Summary

If I understand these results, the webcam and gpu settings in the conf file for my platform
should be set to unsupported.

If we leave the vestigial webcam configuration in there, then the config would match CONF_G2_3. @glpnk Any preference there? Should I truly disable it, or leave it in? (I'm assuming the webcam related configs, when working, should disable the webcam, but honestly I'm assuming -- I never tried the MSI Windows app.)

Also, I vetted the ctl-led attach approach can work for the speaker mute led. I'm writing a constrainted udev rule and systemd script to fire off once at boot. Thanks again for that idea.

@glpnk
Copy link
Collaborator

glpnk commented Dec 23, 2025

Ah, all zeroes in dGPU area means no dGPU. Fan is only CPU controlled.

But seems that both fans report their RPM.

About webcam - in your original issue, you had 0x2E-F=0x0b=0b1101 which have webcam bit (1) set.

Do you think that's really a problem? It's impossible to document every model, and write down weird ones. Some models with shutter had this numbers zeroed, which meant no webcam control. Also older models had webcam block bit representing "hardware" camera switch.

@greymouser
Copy link
Author

Do you think that's really a problem? It's impossible to document every model, and write down weird ones. Some models with shutter had this numbers zeroed, which meant no webcam control. Also older models had webcam block bit representing "hardware" camera switch.

It's likely not a problem, yeah. I'll add the config to G2_3, add some comments in the code, and give it a final run through. "less is more" as they say.

@glpnk
Copy link
Collaborator

glpnk commented Dec 23, 2025

Sadly, your "dGPU" realistically is an iGPU. Intel's marketing is confusing, sadly

@glpnk
Copy link
Collaborator

glpnk commented Dec 23, 2025

Do you think that's really a problem? It's impossible to document every model, and write down weird ones. Some models with shutter had this numbers zeroed, which meant no webcam control. Also older models had webcam block bit representing "hardware" camera switch.

It's likely not a problem, yeah. I'll add the config to G2_3, add some comments in the code, and give it a final run through. "less is more" as they say.

Sadly, that's another part of controversiality of MSI devices - you found thing you can rely to determine something automatically, and after some time you need to fall back to white list.

@greymouser greymouser changed the title This PR introduces the ability to integrate platform specific quirks Support 13P5EMS1; small Makefile fix. Dec 23, 2025
@greymouser
Copy link
Author

Okay, this PR is now just a fully vetted addition of 13P5EMS1, some quirk comments in code, and a small Makefile fix.

@glpnk
Copy link
Collaborator

glpnk commented Dec 23, 2025

Nice, please bump version in driver code too

@greymouser
Copy link
Author

Bumped!

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.

[Support request] Summit 13 AI+ Evo A2VMTG

2 participants