Skip to content

Instantly share code, notes, and snippets.

@abenson
Last active February 25, 2024 19:02
Show Gist options
  • Star 15 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save abenson/bd39025c24422d177b2b7ba0fb2973e2 to your computer and use it in GitHub Desktop.
Save abenson/bd39025c24422d177b2b7ba0fb2973e2 to your computer and use it in GitHub Desktop.

Void Linux on the MSI Prestige 14 (A10SC)

Pretty much everything is working out of the box. The screen is beautiful and the keyboard is nice to type on.

The battery life when just doing using the laptop as a portable laptop is pretty good. It's light, thin.

I look forwarding to testing its for some light gaming, but until then, here's what I did to get everything working on it.

Basic Installation

Installation is straight-forward. I can't figure out how to bring a temporary boot device selection menu, but pressing "Delete" to get into the firmware configuration worked, and I was able to set default boot device there.

"SecureBoot" needs to be disabled, but it does support using your own keys, so there is the option of setting up SecureBoot later on.

Installation was normal following the chroot guide (void-installer does not seem to detect NVMe drives).

Display

nVidia GTX 1650 Max-Q

This laptop supports PRIME Offload, as well as advanced power management of the dGPU under Linux.

I installed the nvidia package (after installing void-repo-nonfree) and rebooted. Intel was correctly driven by the modesetting driver and the GTX 1650 is detected as a provider as well.

To enable advanced power management, I created the file /etc/modprobe.d/nvidia-pm.conf and added the following:

# Enable DynamicPwerManagement
options nvidia NVreg_DynamicPowerManagement=0x02	

I then had to enable PCI power management. I did this by adding the following lines to /lib/udev/rules.d/80-nvidia-pm.rules:

# Enable runtime PM for NVIDIA VGA/3D controller devices on driver bind
ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="auto"
ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030200", TEST=="power/control", ATTR{power/control}="auto"

# Disable runtime PM for NVIDIA VGA/3D controller devices on driver unbind
ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="on"
ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030200", TEST=="power/control", ATTR{power/control}="on"

Backlight control was working with xbacklight when using the Intel driver, before the nVidia driver switched it to modesetting and it stopped working. acpilight seems to be a more reliable solution and is compatible with xbacklight.

I attempted to monitor power-usage using nvidia-smi, but the usage never dropped below 3W. I did observe that the battery life had been considerably longer, and that there is a power usage increase when I run nvidia-smi, so I believe it is waking the dGPU up, never being able to show a 0W consumption.

Screen Tearing on modesetting

The modesetting driver has terrible screen tearing. Using the following picom.conf settings, I was able to eliminate it:

vsync = true;
use-damage = true;
backend = "glx";	

Keyboard

Function Keys

The Function keys operate as "media" keys by default, requiring fn to modify them to regular F1-12 keys. I didn't bother changing this.

The function keys mostly behave as expected. The following table describes the i3 keymappings I used to the capture the keystrokes.

Fn+ Action Capture Method
F1 Mute Volume bindsym XF86AudioMute
F2 Lower Volume bindsym XF86AudioLowerVolume
F3 Raise Volume bindsym XF86AudioRaiseVolume
F4 Toggle Touchpad bindcode mod4+Contro+93
F5 Mute Microphone N/A; does not send key or ACPI event
F6 Toggle Web Cam bindsym XF86WebCam; also physically toggles Web Cam connection
F7 Not sure. Headbulb? N/A; does not send key or ACPI event
F8 Keyboard Backlight N/A; handled by system itself
F9 Backlight dimmer bindsym XF86MonBrightnessDown
F10 Backlight brighter bindsym XF86MonBrightnessUp
F11 Monitor setup bindsym mod4+p
F12 Rotate screen N/A; does not send key or ACPI event

The "headbulb", I think, might be some MSI specific software launcher. I couldn't figure out how it sent anything to the operating system, so I wasn't able to map it to do something, ignoring that I have no idea what I would map it to.

To see if Camera is enabled, I added the following to my i3status.conf:

path_exists "camera" {
	path = "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-6/uevent"
	format = "Camera: ON"
	format_down = "Camera: OFF"
}

altgr and \

Using the standard us keyboard layout, altgr sends Alt_R and the key labeled \ sends <.

With the following config in /etc/X11/xorg.conf.d/40-altgr.conf, the keyboard will properly use AltGr (allowing for easy entry of '€', '£', etc) and the \ key sends the right keys!

Section "InputClass"
    Identifier "Keyboard Defaults"
    MatchIsKeyboard "yes"
    Option  "XkbLayout" "us"
    Option  "XkbVariant" "altgr-intl"
EndSection

Trackpad

The default driver of synaptics sucks. linbinput is much better for this trackpack in terms of palm-rejection and scrolling. With the following config in /etc/X11/xorg.conf.d/40-libinput.conf, libinput will be used for the trackpad only, and it still supports multitouch (i.e., two fingers for middle-click, three fingers for right-click).

# Force libinput for touchpad
Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
	Option "ClickMethod" "clickfinger"
EndSection

NVMe Trim

I have a snooze job setup under runit to one a week run fstrim.

The runit service (/etc/sv/fstrim/run) is as follows:

#!/bin/sh

TIMEFILE=$(dirname $0)/fstrim.timer

exec /usr/bin/snooze -w0 -s 7d -t $TIMEFILE $(dirname $0)/dotrim $TIMEFILE

This will call /etc/sv/fstrim/dotrim:

#!/bin/sh

TIMEFILE=$(dirname $0)/fstrim.timer
LOGFILE=/var/log/fstrim.log

date -u >> $LOGFILE
/usr/bin/fstrim -a -v >> $LOGFILE 2>&1

touch $TIMEFILE

The use of the "time file" will make sure the service runs on boot if it had not run since the expected time (i.e. if the system was off).

Final Notes

I'm really impressed how much of this laptop works out of the box with little effort. I also wasn't looking for "crazy" gaming performance, but so far this laptop has met and exceeded my requirements. This is both a great Linux laptop and a good Linux gaming laptop.

@M3lvin
Copy link

M3lvin commented Nov 15, 2020

Thx for the review, was looking to do the same 👍

@nuclearforg
Copy link

I have this udev rule to remap fn+{f4,f5} scancodes to the right keycodes (f20 = XF86AudioMicMute, f21 = XF86TouchpadToggle):

evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMicro-Star*:pn*A10SC*:pvr*
 KEYBOARD_KEY_f1=f20
 KEYBOARD_KEY_76=f21

It could be useful to those running a DE. fn+f7 just sends f7.

@abenson
Copy link
Author

abenson commented Feb 3, 2021

Thank you!

@mariolpantunes
Copy link

I have a similar laptop, have you manage to make the fan control work properly?
The fans appear to only have two settings, 0 RPM or maximum noise.

@abenson
Copy link
Author

abenson commented May 31, 2021

The fan is quite loud, but it scales pretty well unless I have something intense running.

@mariolpantunes
Copy link

Do you have any EC program running? Any tips or trick?

@lemmy04
Copy link

lemmy04 commented Jul 5, 2021

  • the "Headbulb" switches between the various power/performance settings on windows.
  • to change the way the function keys work, press fn+esc. There's even a status light on the esc key, and the setting persists across restarts and dualboot.

@dandv
Copy link

dandv commented Jan 28, 2023

Does the laptop have a fingerprint reader? The specs don't mention one. If it does, does it work?

Also, how is it holding up 2.5 years later?

@abenson
Copy link
Author

abenson commented Jan 30, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment