Closed pg-goose closed 1 month ago
Hi, @pg-goose, your model is not merged to main branch, but you can use draft version from PR #66 with:
Download
git clone -b modern-15-a5m https://github.com/teackot/msi-ec.git
Make and install
make
sudo make install
If your kernel contains older version of module use load
for testing #71
make
sudo make load
Main discussion in #57
UPD:
Also you can load module from main branch in debug mode
by
sudo make load-debug
Thanks @glpnk !!
What does make load
do?
I've runned sudo make uninstall clean
(just in case), rm the folder and then cloned the branch and got the same result as before I'm afraid...
make
make[1]: Entering directory '/usr/src/linux-headers-6.2.0-34-generic'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc-11 (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
You are using: gcc-11 (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
CC [M] /home/pgalopa/development/msi-ec/msi-ec.o
MODPOST /home/pgalopa/development/msi-ec/Module.symvers
CC [M] /home/pgalopa/development/msi-ec/msi-ec.mod.o
LD [M] /home/pgalopa/development/msi-ec/msi-ec.ko
BTF [M] /home/pgalopa/development/msi-ec/msi-ec.ko
Skipping BTF generation for /home/pgalopa/development/msi-ec/msi-ec.ko due to unavailability of vmlinux
make[1]: Leaving directory '/usr/src/linux-headers-6.2.0-34-generic'
sudo make install
mkdir -p /lib/modules/6.2.0-34-generic/extra
cp msi-ec.ko /lib/modules/6.2.0-34-generic/extra
depmod -a
echo msi-ec > /etc/modules-load.d/msi-ec.conf
modprobe -v msi-ec
insmod /lib/modules/6.2.0-34-generic/extra/msi-ec.ko
modprobe: ERROR: could not insert 'msi_ec': Operation not supported
make: *** [Makefile:38: install] Error 1
make load
sudo make load
insmod msi-ec.ko
insmod: ERROR: could not insert module msi-ec.ko: Operation not supported
make: *** [Makefile:21: load] Error 1
sudo make load-debug
at main branchsudo make load-debug
insmod msi-ec.ko debug=1
Seems like it works on 'debug mode'! I wonder which is the difference but I also don't know which may be the problem :S
I've done this, is it useful?
/sys/devices/platform/msi-ec/debug$ cat fw_version ec_dump >> /home/pgalopa/ec_debug_summary.txt
cat /home/pgalopa/ec_debug_summary.txt
155LEMS1.105
| _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 06 0b 0b
0x3_ | 03 03 01 0d 51 0a 05 00 f8 11 88 2c cc 01 80 00
0x4_ | f8 11 39 00 37 0c d6 05 e5 06 00 2f f4 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 00 00 00 00 22 00 32 3a 41 46 5a 5f
0x7_ | 64 2d 2d 3a 41 48 50 55 64 00 03 05 05 05 05 03
0x8_ | 00 00 32 3c 46 52 5a 5d 64 00 2d 32 41 48 50 55
0x9_ | 64 00 03 05 05 06 03 03 02 00 6e 02 00 66 00 00
0xa_ | 31 35 35 4c 45 4d 53 31 2e 31 30 35 30 37 32 38
0xb_ | 32 30 32 31 31 36 3a 31 38 3a 30 32 37 0c 00 28
0xc_ | 00 07 25 0f 00 00 00 00 00 f4 00 a1 00 96 00 00
0xd_ | 00 00 40 00 70 a1 00 00 21 c0 22 80 00 00 00 00
0xe_ | e2 02 00 00 10 00 00 00 00 22 60 00 00 83 00 80
0xf_ | 00 00 c1 82 0d 00 05 00 00 00 00 00 00 00 00 00
@pg-goose thanks for your report. Your EC firmware version is 105
, but version in PR #66 is 106
. Frequently settings between versions remain the same. According to change log from MSI service page:
I think they are the same, so you need to add 155LEMS1.105
to ALLOWED_FW_12
array like this
static const char *ALLOWED_FW_12[] __initconst = {
"155LEMS1.105",
"155LEMS1.106", // MSI Modern 15 A5M
NULL
};
Or you can just update EC
After the adding that line the output of sudo make install
seems nominal
sudo make install
mkdir -p /lib/modules/6.2.0-34-generic/extra
cp msi-ec.ko /lib/modules/6.2.0-34-generic/extra
depmod -a
echo msi-ec > /etc/modules-load.d/msi-ec.conf
modprobe -v msi-ec
insmod /lib/modules/6.2.0-34-generic/extra/msi-ec.ko
Changing the contents of /sys/devices/platform/msi-ec/webcam
to off
while using it turned off the camera. I would asume that it's working correctly and I can safely tweak other params, correct?
@glpnk If I can do anything else to contribute please feel free to request!
I've went ahead and tweaked some things:
[x] cooler_boost
Like a plane taking off
[x] battery_mode
Changed the file successfully, have yet to see if it works
[x] shift_mode (changed to eco)
Changed the file successfully, I don't know how to check if it worked any suggestion?
[x] cpu/realtime_fan_speed
Seems about right, 66
[x] cpu/realtime_temperature (checks out)
Seems about right, 37
[ ] cpu/basic_fan_speed
When I try to edit this one using
sudo nano...
a red rectangle at the bottom of the terminal appears saying '[Invalid argument]', the file is empty and when attempted to modify nothing seems to change. Output fromls -la
=>-rw-r--r-- 1 root root 4096 oct 6 11:54 basic_fan_speed
Also tried withsudo sh -c 'echo 100 > cpu/basic_fan_speed'
with no success.
[ ] fan_mode
I don't understand this one, what does it mean that in 'advanced' there are 6 levels? Can I set those? fan speed swiches levels depending on temperature or my input?
Hi!
cpu/basic_fan_speed
We don't know the address for this one on your firmware yet, it is set to MSI_EC_ADDR_UNKNOWN
fan_mode I don't understand this one, what does it mean that in 'advanced' there are 6 levels? Can I set those? fan speed swiches levels depending on temperature or my input?
There are 4 options:
Closing since no more info is needed yet
Laptop model
Modern 15 A5M
EC firmware version
No such file or directory
Description
Distro: Ubuntu 22.04 Kernel: 6.2.0-33
So I've added
-vvv
to modprobe command at the makefile and resulted in:modprobe: ERROR: could not insert 'MODULE': Operation not permitted
A little google-fu and found this article and executed this as root:
Which scares me AF as I don't have any idea of what I'm doing... but as we say in spain 'hemos venido a jugar, no?' (We've come to play, right?) So I repeat the process:
Any other troubleshoot steps or is it clear where is the problem? Thanks!! (This repo is an absolut blessing)