-
Notifications
You must be signed in to change notification settings - Fork 57
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
Can't sun makefile - requires C99 or C11 mode #18
Comments
Hi! Try adding this to the beginning of the makefile:
|
Also I'm pretty sure your EC version isn't supported yet so we're going to need your help in adding it |
It seems to have solved the issue regarding the "for" loop but I keep on getting this error: /home/vic/msi-ec/msi-ec.c: In function ‘msi_platform_remove’: Also sure, if I can be of any help I'd happy to do so! |
Looks like it can't locate the kvfree function declaration Can you add the following line to the beginning of the
If it doesn't work either, maybe replacing kvfree with kfree will help |
Thanks. Adding the library didn't help so I replaced the kvfree function with kfree. It compiled without fatal errors, but still doesn't work. I get the following error: vic@Vic1184-GP66:~/msi-ec$ sudo make If I try to run make install I get this: vic@Vic1184-GP66:~/msi-ec$ sudo make install |
Yep, your EC version isn't supported. You can make sure by checking your dmesg ( |
I'm working on a debug mode for this driver which will let you load this module in a debug mode and collect some info for me, so I can add a config for your firmware |
Great! https://pastebin.com/Yu37QqMr (password: wwTHBQaJa2) |
Yep, this line:
means it didn't find a config for your version. I'll write here when the debug mode is ready, probably today |
I'm back! I already implemented EC dump, which I think is pretty sufficient, so if you don't want to wait until it gets merged you can get it from my repo:
To get an EC dump run this command:
|
If you have windows, you can also try this app and play around with settings in the official MSI app to see the changes in EC memory |
Hello. I've done as you said with your repo, however I still get some big errors doing it: vic@Vic1184-GP66: $ git clone -b debug_mode https://github.com/teackot/msi-ec.git "File o directory non esistente" means that the file or the directory does not exist. If I navigate to /sys/devices/platform/msi-ec/ I can't see any debug folder there. There is a file called ec_dump in /sys/devices/platform/msi-ec but I don't know if that's what you're after. https://pastebin.com/A1QhhNbm password: ErV05CQ6Bx I started the test with the keyboard backlighting on level 2 and I played with it around. I have in total 4 levels + off. |
Also, it seems like MsiEcRamEditor can't read anything on Windows 11. I'm running it as administrator but all it shows is zeros. Changing a value inside MSI Dragon Center or pressing a shortcut on the keyboard does nothing. |
Yeah, sorry, I moved it from debug/ to the root of the platform driver and forgot to edit the comment. Edited now
Yes, it is the right file. Judging by your dump:
Try RWEverything, as suggested in this reddit post I found. In addition to changing settings in Dragon Center, please also toggle your backlight, mute and mic mute LEDs |
Hello. So
This is what I was able to see using Windows: |
Thanks! I'll watch your video and add a configuration to the driver |
I'll move the conversation about the laptop to a new issue since this got closed |
Hello! I've downloaded your repo on Linux Mint 21.1 and trying to run the Makefile returns the following error message:
make[1]: ingresso nella directory «/usr/src/linux-headers-5.15.0-60-generic»
CC [M] /home/vic/msi-ec/msi-ec.o
/home/vic/msi-ec/msi-ec.c: In function ‘available_shift_modes_show’:
/home/vic/msi-ec/msi-ec.c:928:9: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
928 | for (int i = 0; conf.shift_mode.modes[i].name; i++) {
| ^~~
/home/vic/msi-ec/msi-ec.c:928:9: note: use option ‘-std=c99’, ‘-std=gnu99’, ‘-std=c11’ or ‘-std=gnu11’ to compile your code
/home/vic/msi-ec/msi-ec.c: In function ‘shift_mode_show’:
/home/vic/msi-ec/msi-ec.c:954:9: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
954 | for (int i = 0; conf.shift_mode.modes[i].name; i++) {
| ^~~
/home/vic/msi-ec/msi-ec.c: In function ‘shift_mode_store’:
/home/vic/msi-ec/msi-ec.c:971:9: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
971 | for (int i = 0; conf.shift_mode.modes[i].name; i++) {
| ^~~
/home/vic/msi-ec/msi-ec.c: In function ‘available_fan_modes_show’:
/home/vic/msi-ec/msi-ec.c:1031:9: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
1031 | for (int i = 0; conf.fan_mode.modes[i].name; i++) {
| ^~~
/home/vic/msi-ec/msi-ec.c: In function ‘fan_mode_show’:
/home/vic/msi-ec/msi-ec.c:1053:9: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
1053 | for (int i = 0; conf.fan_mode.modes[i].name; i++) {
| ^~~
/home/vic/msi-ec/msi-ec.c: In function ‘fan_mode_store’:
/home/vic/msi-ec/msi-ec.c:1069:9: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
1069 | for (int i = 0; conf.fan_mode.modes[i].name; i++) {
| ^~~
/home/vic/msi-ec/msi-ec.c: In function ‘msi_platform_probe’:
/home/vic/msi-ec/msi-ec.c:1396:9: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
1396 | for (int i = 0, j = 0; i < attributes_count; i++) {
| ^~~
/home/vic/msi-ec/msi-ec.c: In function ‘msi_platform_remove’:
/home/vic/msi-ec/msi-ec.c:1414:9: error: implicit declaration of function ‘kvfree’; did you mean ‘vfree’? [-Werror=implicit-function-declaration]
1414 | kvfree(msi_root_group.attrs);
| ^~~~~~
| vfree
/home/vic/msi-ec/msi-ec.c: In function ‘load_configuration’:
/home/vic/msi-ec/msi-ec.c:1524:9: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
1524 | for (int i = 0; CONFIGURATIONS[i]; i++) {
| ^~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:297: /home/vic/msi-ec/msi-ec.o] Errore 1
make[1]: *** [Makefile:1904: /home/vic/msi-ec] Errore 2
make[1]: uscita dalla directory «/usr/src/linux-headers-5.15.0-60-generic»
make: *** [Makefile:10: modules] Errore 2
There are not any damaged packages in my system and I installed build-essential and linux-headers-generic before running the makefile.
I've tried declaring the counters outside the "for" loop (right above where it starts) in the msi-ec.c file but I get some warnings instead and the fatal error at line 1414 regarding the implicit declaration of "kvfree". I'm running the makefile as root.
This is my inxi -b output in case it's needed:
System:
Host: Vic1184-GP66 Kernel: 5.15.0-60-generic x86_64 bits: 64
Desktop: Cinnamon 5.6.7 Distro: Linux Mint 21.1 Vera
Machine:
Type: Laptop System: Micro-Star product: GP66 Leopard 10UG v: REV:1.0
serial:
Mobo: Micro-Star model: MS-1542 v: REV:1.0 serial:
UEFI: American Megatrends v: E1542IMS.30A date: 03/09/2021
Battery:
ID-1: BAT1 charge: 34.6 Wh (72.5%) condition: 47.7/63.2 Wh (75.4%)
CPU:
Info: 6-core Intel Core i7-10750H [MT MCP] speed (MHz): avg: 3477
min/max: 800/5000
Graphics:
Device-1: NVIDIA GA104M [GeForce RTX 3070 Mobile / Max-Q] driver: nvidia
v: 525.78.01
Device-2: Acer HD Webcam type: USB driver: uvcvideo
Display: x11 server: X.Org v: 1.21.1.3 driver: X: loaded: nvidia
unloaded: fbdev,modesetting,nouveau,vesa gpu: nvidia
resolution: 1920x1080~144Hz
OpenGL: renderer: NVIDIA GeForce RTX 3070 Laptop GPU/PCIe/SSE2
v: 4.6.0 NVIDIA 525.78.01
Network:
Device-1: Intel Comet Lake PCH CNVi WiFi driver: iwlwifi
Device-2: Intel driver: igc
Drives:
Local Storage: total: 709.83 GiB used: 291.21 GiB (41.0%)
Info:
Processes: 390 Uptime: 7m Memory: 15.52 GiB used: 2.69 GiB (17.3%)
Shell: Bash inxi: 3.3.13
Thanks a lot for the help!
The text was updated successfully, but these errors were encountered: