Linux MSI Prestige 15
MSI P15 A10SC
Disclaimer: this page is still a draft, but since I started it a long time ago I decided to publish this. Part of the information you find here have been added to the first version of the ArchWiki page. Part of what you find here is also out of date, as it has been fixed (like the keyboard buttons)
So, I got this new laptop a couple of weeks ago, and I obviousely installed linux. My choice was for ArchLinux, but since I didn’t have enough time to install it first, I got Manjaro. Later on, I tought to reinstall it, but I optimised too much to do it, so I skipped. Maybe I will do it after this post :)
Fan
Immediately installing linux on this very powerful machine, I noticed it was kind ov overheating. Maybe, this is the major problem of this laptop, as you’ll see later on.
The github user YoYPa 1 made isw 2, a python script that manages the EC (Embedded Controller) ad the MSI Creator Center would do. In particular, you can manage the fan speed profile for the gpu/cpu, view the current fan speed, enable/disable the cooler boost and other things that I personally didn’t investigate, such as the battery charge limit (I set this in windows and the settings was not discarded starting linux, but I set it just to be sure).
In particular, the P15 A10SC configuration should be 16S3EMS1
, easily verifiable by an EC dump via sudo isw -c
at the addresses 0x0a to 0x07.
Considering how the cooling system has been designed, visible in 3 and 4, I believe the GPU fan should never go completely off
TLP: power save and management
DO NEVER USE the “performance” option in CPU_ENERGY_PERF_POLICY_ON_AC/BAT, becasue it forces the cpu to remain in turbo state for the entire time, overheating it.
Keyboard
The keyboard mounted on this laptop is not a standard one, and needs a custom mapping. In particular, the Home and End buttons, obtained by AltGr+PgUp and AltGr+PgDown respectively do not work out of the box. To solve this, the easiest way is to add the following lines at the end of our defualt keyboard section in /usr/share/X11/xkb/symbols/$LAYOUT
, or creating a new section for it:
key <PGUP> { [ Prior, Prior, Home, Home ] };
key <PGDN> { [ Next, Next, End, End ] };
Now, it is possible to configure the ZSh so that these two keys are recognised. The last two lines are a fallback, which works in case the keyboard layout we’ve just modified gets overwritten or has not been configured:
bindkey "^[[5~" history-beginning-search-backward #PgUp
bindkey "^[[6~" history-beginning-search-forward #PgDown
bindkey "^[[1;1H" beginning-of-line #Home
bindkey "^[[1;1F" end-of-line #End
bindkey "^[[5;1~" beginning-of-line #Home
bindkey "^[[6;1~" end-of-line #End
Fn Keys
A problematic aspect of this laptop are Fn keys. By pressing them, and using dmesg, it should be possible to see that Fn1-3 works out of the box, as well as Fn6 and Fn8-11. If this is not the case, check your Desktop Environment configuration or try fix it (you can also write me if you prefer). The remaining keys are Fn4, Fn5, Fn7 and Fn12. By pressing these, a message should appear on dmesg saying to use setkeycodes e071 <keycode>
or something similar. This will not work, and a different approach will need to be used.
Keycode already configured (Fn4)
By using showkey
the Fn4 key should result to input the keycode 93. By knowing this, the key can be enabled by writing to the file .Xmodmap in our home directory the following:
keycode 93 = XF86TouchpadToggle NoSymbol XF86TouchpadToggle
No keycode known (Fn5, Fn12)
This keys are more tricky to configure and need to modify the hardware database created by systemd. This has committed to the repository and it will be hopefully available in the next release of the software. In the meanwhile, here is the solution. It is necessary to write the following at the end of the # Micro-Star
section in the /lib/udev/hwdb.d/60-keyboard.hwdb
file:
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMicro-Star*:pn*A10SC*:pvr*
KEYBOARD_KEY_f1=f20
KEYBOARD_KEY_f2=f21
Then execute the followings as root to recreate and then reload the hardware configuration systemd-hwdb update && udevadm trigger
. Note that the first part of the command needs to be executed even if we are rebooting. Now the Fn5 key should work, while the Fn12 requires additional work, i.e. the creation of a script to execute to toggle the screen rotation. This should contain the followings:
#!/bin/sh
# This shell script is PUBLIC DOMAIN. You may do whatever you want with it.
TOGGLE=/tmp/.toggle #Prefer temporary directory so that the file is lost after a reboot
if [ ! -e $TOGGLE ]; then
touch $TOGGLE
xrandr -o inverted
else
rm $TOGGLE
xrandr -o normal
fi
then saved with execution permissions and bound to the key via any software. Personally, since I use KDE, I bound it via the shortcut manager in KDE settings under custom shortcuts, so that the scripts get executed every time the key is pressed.
Not a Fn key (Fn7)
By what I was able to conclude, by pressing the Fn7 button, the Fn7 key gives always back F7 instead, no matter if together the Fn key or not.
Hibernation
Hibernation could give some errors, like rebooting after having completed the hibernation (instead of shutdown). This can be easily solved by editing the file /etc/systemd/sleep.conf
with the following:
HibernateMode=shutdown
References
[1] : https://github.com/YoyPa
[2] : https://github.com/YoyPa/isw