Make the following usb sticks and drives on windows:
- Ubuntu install usb stick
- System recovery usb stick
- System backup image on usb hard drive
- Optional: Run the msi dragon software first time setup and configure for quiet operation and battery life, this will reduce fan noise
- Partition drive. Goto disk management, right click on drive you want to partition for linux, and click "shrink volume"
- should have at least 100gb, ideally more depending on intended usage
- Disable fast startup (in control panel)
- hold
alt
when booting with ubuntu usb inserted - do 'other' when given options to install
- On the open space on the disk:
- make a partition for swap that is same size as your memory, set to use as swap (16gb is reasonable if you're not sure)
- make remaining space into partitiion with ext4
- leave bootloader installed onto base disk
- after install, may need to boot into bios (alt) and set boot order to use grub bootloader instead of windows
- for me this option was on the bottom of the boot order bios options page
- make sure to install nvidia drivers through software center (need to reboot with safeboot)
- install gnome tweak tool
- Optional: swap left ctrl and left alt
- tweaks -> mouse and keyboard -> additional layout options -> ctrl position
- install fonts from google fonts
- Update: Now prefer cascadia mono font
- noto sans medium for window titles and interface
- noto sans regular or garuda regular for documents
- noto sans mono medium for shell (if you like 'crisp' fonts, use regular instead)
- set fonts in tweak tool
- set scaling factor under fonts to 0.85
- install gnome shell extensions
- install ocs-url
- install appimage installer
- install shell theme/icons (I used adapta bluegrey for applications, flat remix blue dark icons, and flat remix dark full panel shell theme
- Optional: install login theme
- (I used gdm3 theme blur)
- alternately install lightdm
sudo apt install lightdm
if you want to use hdmi - I couldn't get hdmi port to work reliably and switched to thunderbolt port for external display instead
- fix airplane mode button (use to turn wifi card back on after suspend)
sudo nano /etc/default/grub
- add line
GRUB_CMDLINE_LINUX_DEFAULT="acpi_osi=! acpi_osi='Windows 2009' quiet splash"
sudo update-grub
- reboot
- note: switching to use hibernate is another recommended solution but
pm-hibernate
command didn't do anything when I tried it after installingpm-tools
- For gnome-terminal in preferences set the copy shortcut to
ctrl-c
and paste shortcut toctrl-v
. Then setstty intr ^x
to set a new interrupt shortcut (that does ctrl-x) - (Optional) In tweak-tool->Keyboard & Mouse -> Additional Layout Options under 'Ctrl position' I swapped left ctrl and left alt. This makes the behavior similar to mac where the alt key next to spacebar controls most shortcuts and is easier to reach.
Add the following to ~/.bashrc
or ~/.zshrc
alias open="xdg-open &>/dev/null"
- you can switch between nvidia and intel graphics with
sudo prime-select nvidia|intel
, then reboot
- intel uses less power, but you need nvidia to connect to external monitors with hdmi
(alternative to synaptics but has weird mouse jumping issue)
- install mtrack:
mkdir -p repos/packages/
cd repos/packages
git clone https://github.com/p2rkw/xf86-input-mtrack.git
cd xf86-input-mtrack
./configure --with-xorg-module-dir=/usr/lib/xorg/modules
make
sudo make install
- copy the
50-mtrack.conf
file at bottom of this guide into/usr/share/X11/xorg.conf.d/50-mtrack.conf
- Settings you may want to change:
- Sensitivity: sets mouse speed
- EdgeRightSize: how much of right side of trackpad to ignore (I set high for large trackpad on GS Stealth)
- EdgeTopSize: ignore part of top of touchpad
ClickFinger0
andEdgeBottomSize
are set to click integrated touchpad button with thumb while ignoring tracking for thumb, you can disable this behavior by removing these optionsTapButton1-4
currently 0, set to nonzero to enable tap to clickScrollDistance
lower = faster scrolling
- (Optional) Configure adaptive mouse acceleration (I found unnecessary with polynomial acceleration profile):
- good guide to mouse config:
http://510x.se/notes/posts/Changing_mouse_acceleration_in_Debian_and_Linux_in_general/
- edit
~/.xprofile
:
# xset m 6/2 8
# xinput --set-prop 'SynPS/2 Synaptics TouchPad' 'Device Accel Constant Deceleration' 1.03
# xinput --set-prop 'SynPS/2 Synaptics TouchPad' 'Device Accel Adaptive Deceleration' 1.5
- these settings adjust mouse acceleration, you can try different settings using the xinput and xset commands
- use
xset q
andxinput list
,xinput --list-props
with id of touchpad fromxinput list
to see what the current settings are - Adaptive Decel is applied on small mouse movements to make precise pointing possible
- xset sets acceleration as fraction, so 4/1 is 4.0, 1/4 is .25. Third value is distance before accel applied
Gives nice subpixel rendering that makes fonts look smooth. Add startup command:
/bin/bash -c "sleep 3 && xrandr --output eDP-1-1 --scale 1.1x1.1"
The sleep ensures it waits for xorg startup to finish before rescaling
-
First pick background image and put in
~/Pictures/mybackground.jpg
-
Goto background in settings and select, it should show up under pictures
-
copy into backgrounds:
sudo cp ~/Pictures/mybackground.jpg /usr/share/backgrounds/mybackground.jpg
-
Install the slick greeter (you'll need to build from source for ubuntu)
git clone https://github.com/linuxmint/slick-greeter.git
cd slick-greeter
sudo apt install gtk-3.0
sudo apt install libcanberra-gtk3-dev
sudo apt install liblightdm-gobject-1-dev
sudo apt install valac
./autogen.sh
./configure
make
sudo make install
- Edit lightdm config
sudo vim /usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf
and set to following:
[Seat:*]
greeter-session=slick-greeter
- Then
sudo vim /etc/lightdm/slick-greeter.conf
to be following:
[Greeter]
background=/usr/share/backgrounds/purplemountains.jpg
I used the following project for undervolting: https://github.com/georgewhewell/undervolt
Set -50mV for GPU and -100mV for all other options
- Using TLP currently https://linrunner.de/en/tlp/docs/tlp-configuration.html
- Nice gui: the
cpufeq
gnome plugin, easy ui for setting max cpu freq, disabling cores, etc. (https://konkor.github.io/cpufreq/install/)- I usually set maximum cpu frequency to 30% for battery use, or 80-100% for serious development/experiments on A/C
- Directions here: https://unix.stackexchange.com/questions/58900/how-to-scroll-the-screen-using-the-middle-click/421672#421672
Use isw for fan settings, regular linux fan drivers won't work for MSI laptops.
git clone https://github.com/YoyPa/isw
cd isw
sudo cp etc/isw.conf /etc/isw.conf
sudo cp etc/modprobe.d/isw-ec_sys.conf /etc/modprobe.d/isw-ec_sys.conf
sudo cp etc/modules-load.d/isw-ec_sys.conf /etc/modules-load.d/isw-ec_sys.conf
sudo cp usr/lib/systemd/system/[email protected] /etc/systemd/system/isw.service
sudo cp isw /usr/bin/isw
sudo chmod 644 /etc/modprobe.d/isw-ec_sys.conf
sudo chmod 644 /etc/modules-load.d/isw-ec_sys.conf
sudo chmod 644 /etc/systemd/system/isw.service
sudo chmod 755 /usr/bin/isw
sudo modprobe ec_sys write_support=1
Edit /etc/systemd/system/isw.service
:
- set sleep path to
/bin/sleep
- set isw cmd to
/usr/bin/isw -w 16Q4EMS1
- can double check id number is correct in
isw.conf
file under laptop version Start isw service:
sudo systemctl enable isw
sudo systemctl start isw
Edit /etc/isw.conf
. Under the [16Q4EMS1]
heading set the following:
# CPU
cpu_temp_0 = 47
cpu_temp_1 = 50
cpu_temp_2 = 58
cpu_temp_3 = 67
cpu_temp_4 = 76
cpu_temp_5 = 82
cpu_fan_speed_0 = 0
cpu_fan_speed_1 = 0
cpu_fan_speed_2 = 25
cpu_fan_speed_3 = 45
cpu_fan_speed_4 = 50
cpu_fan_speed_5 = 75
cpu_fan_speed_6 = 80
# GPU
gpu_temp_0 = 50
gpu_temp_1 = 55
gpu_temp_2 = 61
gpu_temp_3 = 65
gpu_temp_4 = 71
gpu_temp_5 = 77
gpu_fan_speed_0 = 0
gpu_fan_speed_1 = 20
gpu_fan_speed_2 = 50
gpu_fan_speed_3 = 60
gpu_fan_speed_4 = 70
gpu_fan_speed_5 = 80
gpu_fan_speed_6 = 90
Can edit these to customize fan settings. Note for different MSI laptops heading may be different.
- install mail client (I used mailspring)
- set up onedrive client repo (I use onedrive)
- install as user level service
- add the following aliases:
alias onedrivestart="systemctl --user start onedrive && systemctl --user status onedrive"
alias onedrivestop="systemctl --user stop onedrive&& systemctl --user status onedrive"
- monitor temperature with psensor: https://itsfoss.com/check-laptop-cpu-temperature-ubuntu/
- trash bin to sidebar: link
- install gimp and xournal (xournal++ did not work for me but its also an option)
- take a picture of your signature with only white paper in background, ideally even lighting conditions
- use gimp wand selection to select background of signature (hold shift to multiselect and increase wand threshold to 90-100)
- hit
delete
to make transparent (you may need to do Layer->Transparency->Add Alpha Layer first) - export to png
- use xournal image annotation to annotate and sign pdfs
- cuda/dev environment setup
- backups
- 4 finger gesture: https://int3ractive.com/2018/09/make-the-best-of-MacBook-touchpad-on-Ubuntu.html
- nested file view
- remap eject button to forward delete on mac keyboards
- bumblebee: https://wiki.ubuntu.com/Bumblebee#Installation
- try out i3, config tutorial: https://www.youtube.com/watch?v=j1I63wGcvU4
- automatic remapping for mac keyboards: https://superuser.com/questions/1046689/how-to-find-the-same-comfort-of-mac-keyboard-and-save-myself-from-pinkie-finger
- fix mtrack mouse jumping issue
- make files appear on right side desktop by default?
This should go in /usr/share/X11/xorg.conf.d.50-mtrack.conf
Section "InputClass"
MatchIsTouchpad "on"
Identifier "Touchpads"
Driver "mtrack"
Option "Sensitivity" "0.25"
Option "AccelerationProfile" "2"
Option "FingerHigh" "5"
Option "FingerLow" "1"
Option "DisableOnPalm" "true"
Option "IgnoreThumb" "true"
Option "ThumbRatio" "70"
Option "ThumbSize" "5"
Option "IgnorePalm" "true"
Option "TapButton1" "0"
Option "TapButton2" "0"
Option "TapButton3" "0"
Option "TapButton4" "0"
Option "ClickFinger0" "1"
Option "ClickFinger1" "1"
Option "ClickFinger2" "3"
Option "ClickFinger3" "2"
Option "ButtonMoveEmulate" "false"
Option "ButtonIntegrated" "true"
Option "ClickTime" "25"
Option "EdgeTopSize" "15"
Option "EdgeBottomSize" "40"
Option "EdgeRightSize" "40"
Option "EdgeScrollSensitivity" "0"
Option "EdgeScrollDist" "0"
Option "EdgeScrollUpButton" "0"
Option "EdgeScrollDownButton" "0"
Option "EdgeScrollLeftButton" "0"
Option "EdgeScrollRightButton" "0"
Option "SwipeLeftButton" "0"
Option "SwipeRightButton" "0"
Option "SwipeUpButton" "8"
Option "SwipeDownButton" "0"
Option "SwipeDistance" "700"
Option "ScrollCoastDuration" "300"
Option "ScrollCoastEnableSpeed" ".2"
Option "ScrollUpButton" "5"
Option "ScrollDownButton" "4"
Option "ScrollLeftButton" "7"
Option "ScrollRightButton" "6"
Option "ScrollDistance" "100"
EndSection
Great Job, Really Helpful.