MSI GS65 - ArchWiki

Jump to content

# MSI GS65

From ArchWiki

Hardware | PCI/USB ID | Working?
--- | --- | ---
Touchpad |  | Yes
Keyboard | `1038:1122` | Yes
GPU (Intel) | `8086:3e9b` | Yes
GPU (NVIDIA) | `10de:1ba1` | Yes
Webcam | `5986:211c` | Yes
Ethernet | `1969:e0b1` | Yes
Bluetooth | `8087:0aaa` | Yes
Thunderbolt |  | Yes
Audio | `8086:a348` | Yes
Wi-Fi | `8086:a370` | Yes

For a general overview of laptop-related articles and recommendations, see Laptop.

## Installation

Secure Boot can be disabled from the Security tab and boot mode can optionally be switched from UEFI to legacy. This laptop has advanced UEFI settings if desired.

## Firmware

BIOS version E16Q2IMS.110 introduces many ACPI problems if booting is changed from UEFI to Legacy, including a flood of `No handler or method for GPE [00->6E]` at boot, which can be solved through kernel parameters:

- `acpi=off` allows to boot but most things will not work, including the keyboard and touchpad.
- `pci=nomsi` or `acpi=off acpi=force` allows to boot and have working keyboard and touchpad, but the NVidia card will not work ; neither will the USB3 ports.
- `pcie_aspm=off` will allow most things to work: keyboard, touchpad, USB 3 devices, NVIDIA card.

## Video

### NVIDIA GPU multihead support

This article or section is a candidate for merging with Bumblebee.

Notes: Some of this can be deduplicated. (Discuss in Talk:MSI GS65)

The HDMI and DP ports are wired to the Nvidia GPU, so some additional actions required to make the multihead to work with monitors connected to this ports. Thunderbolt port is wired to Intel GPU thus allowing for external monitor to be used with Nvidia GPU off. See Bumblebee#Output wired to the NVIDIA chip, though configuration from there possibly would not work as is.

Instructions to get the external monitor working on the HDMI and DP ports on MSI GS65:

1. Install `bumblebee` and `xf86-video-intel`.

2. Configure Xorg to use the `intel` (not the `modesetting`) video driver for the Intel GPU.

    /etc/X11/xorg.conf.d/20-intel.conf

    Section "Device"
        Identifier  "intel"
        Driver      "intel"
    EndSection

3. Make Xorg launched by intel-virtual-output to use the Nvidia GPU:

    /etc/bumblebee/xorg.conf.nvidia

    Section "Device"
        Identifier  "nvidia"
        Driver      "nvidia"
    EndSection

4. Restart X server

5. Launch the `intel-virtual-output -b`

6. Use `xrandr` or other tool to turn on the monitor and adjust its position.

    $ xrandr --output VIRTUAL1 --right-of eDP1 --preferred

External monitor should be under the VIRTUAL1 output in `xrandr -q`. If not - check that `intel-virtual-output -b` successfully run the X server on DISPLAY=:8 and the `xrandr -d :8 -q` shows the connected monitor.

Limitations

It looks like the only one is inability to use VDPAU hardware video decoding, though to be honest it could be used directly on DISPLAY=:8 as an ugly hack (make sure your WM ignores the external screen first). But NVENC/NVDEC does not depend on X and could be used with tools like ffmpeg and gstreamer, and the Intel Quick Sync VAAPI also works, so missing VDPAU is a minor issue.

### Hybrid graphics

Like most modern laptops with hybrid graphics, the GS65 uses the Optimus MUXless scheme and supports the ACPI methods necessary for the complete power down of the dedicated NVIDIA GPU (Runtime D3cold), saving large amounts of power when not in use.

If using the latest proprietary NVIDIA drivers nvidia-open or nvidia-open-dkms, this should work nearly out of box without needing tools like Bumblebee simply by setting the `NVreg_DynamicPowerManagement` option of the `nvidia` module:

    /etc/modprobe.d/nvidia.conf

    options nvidia NVreg_DynamicPowerManagement=2

If the laptop's power LED settles from orange to white, this means the NVIDIA GPU is currently powered down. Use this and tools like nvtop to troubleshoot any configuration issues or misbehaving programs probing the GPU for no valid reason.

If you experience issues with the GPU's power management, visit PRIME#NVIDIA and this page for more details. If this still does not solve them, check if explicit ACPI D3cold capability is enabled in the advanced BIOS settings.

Note that some ACPI-related kernel parameters (like `acpi_osi`) or custom DSDT tables might make this feature inoperable. Proceed with care.

## Power management

An issue when sleeping is that the networking will be disabled when waking and set to airplane mode. This issue does not affect hibernation.

## Keyboard backlight

The Steel Series lights on the keyboard cannot be configured with msi-keyboard-gitAUR because this tool only works with region-based RGB lighting. For this laptop model, the tool msi-perkeyrgbAUR provides partial control.

If keyboard lights remain off, be sure you have rebooted after installing msi-perkeyrgb to refresh udev and that the brightness is turned to maximum with `Fn+PgUp`, then try the command again.

For switching colors with a key, create a script file:

    msi-rgb-switch.sh

    profs=(aqua chakra default disco drain freeway plain rainbow-split roulette disable)
    fn="./.msi-rgb"
    touch $fn
    prof=$(cat $fn)
    if [ -z $prof ]; then
        echo "0" > $fn
        vl=0
    else
        nv=$(($((prof+1)) > 9 ? 0 : $((prof+1))))
        echo $nv > $fn
        vl=$nv
    fi
    if [ ${profs[$vl]} = "disable" ]; then
        msi-perkeyrgb -m GS65 -d
    else
        msi-perkeyrgb -m GS65 -p ${profs[$vl]}
    fi

and map the script to a shortcut key. This will rotate to the next RGB color automatically.

## Function keys

Key | Visible?1 | Marked?2 | Effect
--- | --- | --- | ---
`Fn+F2` | Yes | Yes | Inputs `Super+P`.
`Fn+F3` | Yes | Yes | `F21`/`XF86XK_TouchpadToggle`
`Fn+F6` | Yes | Yes | `Camera`. This also brings the webcam online and exposes it to the kernel.
`Fn+F7` | No4 | Yes | Unmapped.
`Fn+F8` | Yes | No | `WLAN`/Airplane mode. Hardblocks Wi-Fi and removes Bluetooth from the USB bus. Enabled by EC. See #Airplane mode switch.
`Fn+F9` | Yes | No | `Bluetooth`. Enabled by EC. See #Airplane mode switch.
`Fn+F10` | No | Yes | Similar to `Fn+F8` but does not send `WLAN`. See #Airplane mode switch.
`Fn+F12` | Yes3 | Yes | `Sleep`
`Fn+Del` | Yes | Yes | `Insert`
`Fn+Home` | No | Yes | Non-functional.
`Fn+PgUp` | No4 | Yes | Increases keyboard backlight brightness.
`Fn+PgDown` | No4 | Yes | Decreases keyboard backlight brightness.
`Fn+End` | Yes | Yes | `Mute`
`Fn+Up` | Yes | Yes | `Brightness up`
`Fn+Down` | Yes | Yes | `Brightness down`
`Fn+Left` | Yes | Yes | `Volume down`
`Fn+Right` | Yes | Yes | `Volume up`
`Fn+Q/A` | No4 | No | Unmapped.
`Fn+W/Z` | No4 | No | Unmapped.

1. The key is visible to `xev` and similar tools.
2. The physical key has a symbol on it, which describes its function.
3. systemd-logind handles this by default.
4. Triggers unknown key events. Can be mapped to valid keycodes with setkeycodes(8) or Input remap utilities. Monitor `dmesg` when pressing these keys.

### Airplane mode switch

The airplane mode key combinations `Fn+F8`, `Fn+F9` and `Fn+F10` are disabled by default. They can re-enabled in a couple ways. This is especially relevant as resuming from sleep usually hardblocks the Wi-Fi card.

#### Using kernel parameters

The simplest and safest method is by adding the following kernel parameters:

    acpi_osi=! acpi_osi="Windows 2009"

However, this might alter or disable other power management features, as this works by tricking the ACPI DSDT into thinking it's running on an older version of Windows.

#### Using the EC (Embedded Controller)

The radio killswitch state lives in the embedded controller, so it can be restored by writing the EC registers behind the airplane mode key. This works without any external tool via the `ec_sys` kernel module (the previously recommended iswAUR is abandoned; mcontrolcenter-binAUR is a maintained GUI alternative, but plain `dd` suffices for this).

Warning Register values differ between EC firmware revisions, and some

registers are shared with unrelated functions. Always capture dumps from your own machine (see below) before writing. EC writes are volatile: if something misbehaves, power off completely, or press the pinhole switch on the underside

for 10 seconds with the AC cable disconnected, to reset the controller.

Two registers are involved, on two different layers:

- `0x34` restores the hotkey's functionality: write `0x30` if it reads `0x50`. With the `acpi_osi` kernel parameters described above, it already reads `0x30` and needs no write (verified on a GS65 8RF and a Stealth 9SE).
- `0x2e` bit 3 is the radio killswitch itself: set means radios on, clear means airplane mode. On the 8RF the register reads plain `9`/`1`, so whole-byte writes work there. On the Stealth 9SE (EC firmware 16Q4EMS1.109) the same bit toggles, but the register reads `0x5b`/`0x53` because other bits carry other functions (bit 1 is the webcam toggle), so only bit 3 should be modified: read the current value and write it back with bit 3 flipped.

To find the values for your firmware, dump the EC three times, pressing `Fn+F10` between dumps, and diff the results (ignore bytes that drift regardless of the toggle, such as temperature and battery telemetry):

    # modprobe ec_sys
    # od -A x -t x1z /sys/kernel/debug/ec/ec0/io

Wireless hard-blocked after resume: after resuming from S3 sleep the EC is left in an inconsistent state: `0x2e` bit 3 is still set while the killswitch is asserted. This is why `Fn+F10` must be pressed twice, and why a single register write is not enough either. Replaying the double press (clear bit 3, then set it) reliably clears the hard block. On the 9SE:

    # modprobe ec_sys write_support=1
    # printf '\123' | dd of=/sys/kernel/debug/ec/ec0/io bs=1 seek=46 conv=notrunc   # 0x2e: 0x53, bit 3 clear
    # sleep 1
    # printf '\133' | dd of=/sys/kernel/debug/ec/ec0/io bs=1 seek=46 conv=notrunc   # 0x2e: 0x5b, bit 3 set

To automate this on every resume, place a script in `/usr/lib/systemd/system-sleep/` that checks for the block and replays the toggle (skipping when bit 3 is already clear, i.e. airplane mode was enabled on purpose):

    /usr/lib/systemd/system-sleep/98-wifi-unblock.sh

    #!/bin/sh
    # Clear the wifi hard block after S3 resume by replaying the Fn+F10
    # double press on EC register 0x2e.
    [ "$1" = "post" ] || exit 0

    EC=/sys/kernel/debug/ec/ec0/io
    wifi_blocked() { rfkill list | grep -A2 'Wireless' | grep -q 'Hard blocked: yes'; }
    readbyte() { dd if="$EC" bs=1 skip=$(($1)) count=1 2>/dev/null | od -A n -t x1 | tr -d ' '; }
    writebyte() { printf "$(printf '\\%03o' $2)" | dd of="$EC" bs=1 seek=$(($1)) conv=notrunc 2>/dev/null; }

    for attempt in 1 2 3; do
        wifi_blocked || exit 0
        modprobe ec_sys write_support=1 2>/dev/null
        val=0x$(readbyte 0x2e)
        if [ $((val & 0x08)) -ne 0 ]; then
            writebyte 0x2e $((val & ~0x08))
            sleep 1
            writebyte 0x2e $((val | 0x08))
        fi
        modprobe -r ec_sys 2>/dev/null
        sleep 2
    done
    exit 0

Note that the bug does not occur when suspending with s2idle instead of deep sleep, at the cost of higher battery drain. Register findings for the 9SE were also reported to the msi-ec project.

A more detailed explanation can be found on the Talk:MSI GS65#Unblocking wifi after sleep page.

## Touchpad

Multi gestures do not work out the box, but are detected with libinput-gesturesAUR.

## Thermals

Fan control by "Fancontrol (lm-sensors)" or "NoteBook Fan Control (NBFC)" is not supported, but by the use of the tool iswAUR you can control the fans in the same way as Dragon Center on Windows.

## Microphone

GS65 has twin microphones, which is pleasing to have for noise reduction and echo cancellation, as well as background sounds suppression via beamforming technique. To get the best of it, configure:

    /etc/pulse/default.pa

    load-module module-echo-cancel use_master_format=1 aec_method=webrtc aec_args="beamforming=1 mic_geometry=-0.025,0,0,0.025,0,0"
    set-default-source alsa_input.pci-0000_00_1f.3.analog-stereo.echo-cancel

Also, it could be useful to add `analog_gain_control=0` to `aec_args` to disable automatic gain control.

If you are using PipeWire instead of PulseAudio, use the following configuration instead:

    /etc/pipewire/pipewire.conf.d/echo-cancel.conf

    context.modules = [
       {   name = libpipewire-module-echo-cancel
           args = {
               # If you want to keep format from master device
               use_master_format = true
               aec_method = webrtc
               aec_args = {
                   beamforming = true
                   mic_geometry = "-0.025,0,0,0.025,0,0"
                   analog_gain_control = false
               }
               source_name = "echo-cancel-source"
               sink_name = "echo-cancel-sink"
           }
       }
    ]

Optionally, make the `echo-cancel-source` your default:

    /etc/wireplumber/main.lua.d/51-default-source.lua

    default_sources = {
       "echo-cancel-source"
    }

Restart the `pipewire.service` `pipewire-pulse.service` `wireplumber.service` user units.

Confirm if it is working with:

    $ pw-cli ls Node | grep -i echo

or

    $ pactl list sources short}}

You should see `echo-cancel-source` as a source and select it in applications which use the microphone.

## Known issues

### Lockup Issue (lspci and poweroff hang)

Symptoms:

- lspci hangs
- poweroff hangs

Applies to: Arch boot ISO and systems with nouveau or without nvidia driver installed. See NVIDIA Optimus#Lockup issue (lspci hangs).

Solutions:

- Arch ISO: Add `modprobe.blacklist=nouveau` to the kernel parameters (https://superuser.com/a/1301487).
- System using nvidia-open: Should not run into this issue. bbswitch may not work and cause this, however.
- System using nouveau: Add `nouveau.runpm=0` to the kernel parameters. This disables runtime power-management, which causes this issue to begin with.

### Cheese hangs while opening the camera

The issue can be fixed by installing vlc and running:

    $ vlc v4l:// :v4l-vdev="/dev/video0"

Following this, cheese should work correctly.

### Wi-Fi is hardblocked (airplane mode) after waking up from suspend

Waking from suspend will have Wi-Fi in airplane mode. [1]

    # rfkill list

    1: phy0: Wireless LAN
    	Soft blocked: no
    	Hard blocked: yes

Wi-Fi can be reactivated by pressing the airplane mode key combination twice. The block is asserted by the embedded controller, and can be cleared automatically on every resume; see #Using the EC (Embedded Controller) for the mechanism and a ready-made sleep hook.

Alternative mitigations:

- Suspend with s2idle instead of deep sleep (kernel parameter `mem_sleep_default=s2idle`): the bug only occurs when resuming from S3, at the cost of higher battery drain while suspended.
- Configure systemd to hibernate instead of suspending:

    /etc/systemd/logind.conf

    HandleSuspendKey=hibernate
    HandleLidSwitch=hibernate

### System freeze

From time to time the graphical interface will freeze and the keyboard will be unresponsive, though audio keeps running. It tends to happen when CPU temperature is high and CPUs are throttling.

There is no known solution for this.

It is not clear what causes this issue:

    # journalctl -r --boot -1

    Jul 22 20:27:40 almsi kernel: nvidia-modeset: ERROR: GPU:0: Failed to allocate memory for the display color lookup table.

Issue caused by the Intel E2500 Wi-Fi card.

    # journalctl -f

    iwlwifi 0000:00:14.3: BIOS contains WGDS but no WRDS

Wi-Fi card ask for a hardware reset. (System will freeze for +/- 10s)

Fixed by replacing the Wi-Fi card.

### Display outputs do not work after suspend

If the laptop is suspended with another monitor connected, then on wake all display outputs do not recognise when an external display is connected to any port. This persists across reboots. Worryingly it also persists if you reboot into Windows.

One workaround is to boot into Windows, suspend the laptop, then wake it. Connected displays will then be recognised when rebooting into Windows or Arch. Another workaround is to suspend and wake until the connected display is recognized. Sometimes this takes several tries but it avoids having to boot into Windows.

Another workaround is to disable audio devices.

    blacklist-intel_snd_suspend.conf

    #for kernel 4.x
    blacklist snd_hda_intel

    #for kernel 5.x - additional modules, if not disable it - suspend not working
    blacklist snd_sof_intel_hda
    blacklist snd_sof_intel_hda_common
    blacklist sof_pci_dev
    blacklist snd_sof_intel_byt
    blacklist snd_sof_intel_ipc

Category:

- MSI

Hidden category:

- Pages or sections flagged with Template:Merge

MSI GS65
Add topic