[Fix] Getting the MSI PE60 6QE (Skylake) to run Linux

After lots of experimentation, it turned out that the best boot parameter so far (Ubuntu 16.10 alpha July 2016) is:

pci=noacpi

Otherwise (e.g. with acpi=noirq), there is a crash trying to load the nvidia card and an issue with ACPI trying to load _DSM. If you want to disable the nivida card completely, for 6W or more of power savings, use nouveau.modeset=0. This might need to be in addition to pci=noacpi.

This might work for lots of other notebooks, especially with Nvidia graphics and a Skylake CPU, e.g. the MSI GE62 6QF series.

Prioritizing System Services with Systemd - Run a Process Permanently in the Background

If you simply want to adjust some priorities, here is how to do it in three steps.
  1. sudo systemctl edit [service]
  2. sudo systemctl daemon-reload
  3. sudo systemctl restart [service]

Removing all images with rkt

Note this will remove all images, not just stale ones. Set rkt to point to your rkt binary.

#!/bin/sh
rkt="./rkt/rkt"
images="$(sudo $rkt image list | awk 'NR>1 {print $1}')"
set -x
sudo $rkt gc --grace-period=1s
sleep 1
sudo $rkt gc --grace-period=1s
sudo $rkt image list
sudo $rkt image rm $images

Forward Wake on LAN packages bewteen networks with socat

If you have two networks and you want to wake a machine in another from network it can be tricky because you can't always set the destination IP address or network. An easy fix is to use socat to forward the UDP wakeonlan packages to the other network or IP:

sudo socat -v UDP4-RECVFROM:9,fork UDP4-SENDTO:192.168.1.255:9

You can leave out the -v for less verbosity. The target network is 192.168.1.255, you can replace this with a specific IP, which helps with routers not forwarding broadcasts. Usually UDP port 9 is used, but you may change this to port 7 for your setup. You will need to be root because port 9 is generally privileged.