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

Help porting on MSI Bravo 17 A4DDR #20

Closed
EricV opened this issue Feb 18, 2023 · 19 comments
Closed

Help porting on MSI Bravo 17 A4DDR #20

EricV opened this issue Feb 18, 2023 · 19 comments
Labels
New firmware Request for a new firmware unimplemented features There are features that aren't implemented in the driver yet

Comments

@EricV
Copy link

EricV commented Feb 18, 2023

With the general announcement, I was hoping to be able to manage the battery mode. Reading the doc and the code I realize it only works with a given PC and a given ec firmware version.

Can we have a kind of porting manual?

@teackot
Copy link
Collaborator

teackot commented Feb 18, 2023

Reading the doc and the code I realize it only works with a given PC and a given ec firmware version

Yeah, all firmware versions have different configurations. I hope it will at least be narrowed down to the major version when we get some more feedback.

Can we have a kind of porting manual?

I am working on a debug mode right now, see the draft PR. I will add a manual to readme when the mode is finished.

Right now debug mode is available in my fork. Follow these steps to get an EC memory dump and attach it here so I can take a look.

If you have windows, you can also try this app and play around with settings in the official MSI app to see how they reflect on the EC memory.

@teackot
Copy link
Collaborator

teackot commented Feb 18, 2023

Oh, and also, please tell me your EC firmware version. (cat /sys/devices/platform/msi-ec/fw_version with the driver loaded)

@EricV
Copy link
Author

EricV commented Feb 19, 2023 via email

@EricV
Copy link
Author

EricV commented Feb 19, 2023 via email

@teackot
Copy link
Collaborator

teackot commented Feb 19, 2023

I also found this reddit post suggesting RWEverything, maybe it will work?

@EricV
Copy link
Author

EricV commented Feb 19, 2023 via email

@teackot
Copy link
Collaborator

teackot commented Feb 20, 2023

  • battery thresholds - [0xef]
  • webcam - ?
  • fn / win - [0xbf ?]
  • cooler boost - [0x98]
  • shift mode - [0xf2], available modes: ?
  • super battery - ? (may be unsupported)
  • fan mode - [0xf4], available modes: ?
  • cpu temp - [0x68]
  • realtime fan speed - [0x71] or [0xc9]
  • basic mode fan speed - [0x89] (if available)
  • mute and micmute LEDs - (0x2b, 0x2c) or (0x2c, 0x2d); On/off values - ?
  • backlight - [0xf3]; functional - ?

Can you please toggle your mute and micmute LEDs and switch the Fn/Win keys and tell me what happens

Also, swicth between different power profiles and tell me how the [0xf2] changes, and maybe other addresses too (I am particularly intrested in additional addresses set by super battery mode, apart from 0xf2 f3 and f4)

And one more question - does your laptop support setting constant fan speed (basic fan mode)

@EricV
Copy link
Author

EricV commented Feb 20, 2023

Thanks for the hint. I do confirm battery threshold on 0xef will give you the value later on.
I have no fan control in MSI dragon, no micmute on keyboard either
Keyboard backlight works on Linux without EC

0xf2 0xf3 0xf4 :

  • f3 seems to stay at 80
  • f2 moves form C4 to C2 (max perf to lower perf mode and then f4 moves)

For the webcam, it is really hard to see what changes as several value like temps and fan speed do move.

I do have super battery but did not figure out yet what it triggers.

More later on.

@teackot
Copy link
Collaborator

teackot commented Feb 20, 2023

For the webcam, it is really hard to see what changes as several value like temps and fan speed do move.

For the webcam - look at 0x2E; mute - 0x2B, 2C or 2D

I do have super battery but did not figure out yet what it triggers.

Check if it changes 0xD5

f3 seems to stay at 80

Try changing it to 80/81/82/83 and see if your backlight changes

@EricV
Copy link
Author

EricV commented Feb 20, 2023

For 0xF2 0xF3 0xF4 0xD5
Extreme Perf C4 82 00 A1
Balanced C1 82 00 A2
Silent C1 82 10 A2
Super Battery C2 80 80 A5

F3 is indeed the keyboard backlight: if I use the keyboard it can go form 80 to (no light) to 83. Note that F4 may chnages the last byte was D once but the first one did change to 1 for Silent.

Regarding 0xef: for the battery:

50->60 % (best for battery) BC
70->80 % (balanced) D0
100% (full charge) E4

Webcam is indeed 2E: No Cam 49 /Cam enabled 4B
Mute is 2C: Muted is 36 Unmuted is 32

Did not found volume up or down.

@teackot
Copy link
Collaborator

teackot commented Feb 21, 2023

...0xD5
...A1
...A2
...A2
...A5

That's interesting. It seems to have a set of mode values... Judging by some Reddit threads and other configurations, I wonder if this address is related to the GPU

Basic fan mode is unsupported

F3 is indeed the keyboard backlight: if I use the keyboard it can go form 80 to (no light) to 83. Note that F4 may chnages the last byte was D once but the first one did change to 1 for Silent.

50->60 % (best for battery) BC
70->80 % (balanced) D0
100% (full charge) E4

Webcam is indeed 2E: No Cam 49 /Cam enabled 4B
Mute is 2C: Muted is 36 Unmuted is 32

Got it

@teackot
Copy link
Collaborator

teackot commented Feb 21, 2023

Okay, I added a config for your laptop. You can find it on the new_configs branch of my repo.

Didn't add different 0xD5 modes yet as it requires to change how we store them in configs.

Can you please test it for me, particularly webcam_block ("on" - webcam is off and blocked, "off" - webcam is unblocked), Fn/Win swap (write "left" or "right" into the fn_key attribute) and mute LED and kbd backlight in the leds/ subdirectory

@EricV
Copy link
Author

EricV commented Feb 21, 2023

Thanks a lot I tested it. Modules loads and seems functional. Tested the battery mode OK. I'm a bit worried about testing the webcam_block as apparently I cannot modify it via keyboard afterwards and I have no mode to do that on windows even in MSI dragon app. I need my webcam as I'm doing remote work ...

Regarding the D5 and GPU : this is an AMD based laptop with two graffic controller : one is embedded as in rizen 7 renoir for laptop and the other is Radeon RX 5500M.

Thanks a lot anyway.

@teackot
Copy link
Collaborator

teackot commented Feb 21, 2023

When you tested the webcam address (0x2e), did you toggle your webcam with a keyboard key or from Dragon Center? If it was Dragon Center (or both), then yeah, you don't have webcam_block function and kbd key and dragon center switch do the same thing.

If you only tested the keyboard button, then Dragon Center switch may be the webcam_block, but if you're concerned - don't test it from Linux

@EricV
Copy link
Author

EricV commented Feb 21, 2023

I used th webcam button Fn from keyboard. I have nothing in dragon center apps. I do not have led mic either. Led is only for webcam.

Thanks again.

@teackot
Copy link
Collaborator

teackot commented Feb 21, 2023

Oh, okay then, I'll remove it.

Thanks for helping the project grow!

I'll come back here when I add the 0xD5 thingy when I have time for it

@EricV
Copy link
Author

EricV commented Feb 21, 2023

In the various mode Extreme Perf, balanced ... I forgot to tell you have a user defined mode with two possible value drop down menu for performance (sure for this one) and fan (from memory I'm on Linux right now). I did not play yet with this user defined mode.

Tell me if you think it is worth. Have a nice day.

@teackot
Copy link
Collaborator

teackot commented Mar 2, 2023

Merged! Thank you for your help!

In the various mode Extreme Perf, balanced ... I forgot to tell you have a user defined mode with two possible value drop down menu for performance (sure for this one) and fan (from memory I'm on Linux right now). I did not play yet with this user defined mode.

Tell me if you think it is worth. Have a nice day.

Sorry, didn't see your message. I figured out what the custom modes are. There should be 4 modes, something like eco, balanced, high and extreme. The second drop-down is fan mode, we already know its values.

@teackot teackot added the New firmware Request for a new firmware label Aug 23, 2023
@teackot
Copy link
Collaborator

teackot commented May 4, 2024

Closing since no more help is needed yet

Adding a label to remember to add super battery and backlight modes when they are implemented

@teackot teackot closed this as completed May 4, 2024
@teackot teackot added the unimplemented features There are features that aren't implemented in the driver yet label May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New firmware Request for a new firmware unimplemented features There are features that aren't implemented in the driver yet
Projects
None yet
Development

No branches or pull requests

2 participants