Skip to content

Instantly share code, notes, and snippets.

@rtaibah
Last active October 10, 2017 19:44
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save rtaibah/0922731c452c6d1ab682 to your computer and use it in GitHub Desktop.
Save rtaibah/0922731c452c6d1ab682 to your computer and use it in GitHub Desktop.
Linux Mint 17 + Xmonad on Macbook Pro Retina 15

Base installations

sudo apt-get install blueman build-essentials calcurse chromium-browser cpufrequtils gnupg2 gparted hfsprogs imagemagick linux-tools-common lxappearance mplayer rtorrent ruby skype ubuntu-restricted-essentials urlview vagrant vim xclip

System Configurations

Lastpass

Install Lastpass using the script Lastpass provides

Nvidia Driver

Add 'nomodeset' to grub. Then restart.

sudo vim /etc/default/grub
sudo update-grub

Download the Nvidia 337.12 for 64 bit Linux

Kill mdm. Chmod. Run. Reboot.

sudo service mdm stop
chmod 777 ~/Downloads/NVIDIA-Linux-*-337.12.run
su
/home/[USERNAME]/Downloads/NVIDIA-Linux-*-337.12.run
reboot

Confirm

lspci -nnk | grep -iA2 vga

Install and Configure Xmonad

Clone custom xmonad repo, and copy all the contents of the repo into ~/.xmonad. follow instructions.

Suspend/Hibernation

To change the power button to logout then suspend:

sudo visudo

Add the following to the bottom of the file:

rtaibah ALL=NOPASSWD:/usr/sbin/pm-suspend-hybrid

Then bind the power button to xmonad.hs keybinding section

, ((0, 0x1008ff2a), spawn "sudo /usr/sbin/pm-suspend-hybrid")

Power Tweaks

enable intel_pstate

sudo vim /etc/default/grub
sudo update-grub

restart then check if it is enabled:

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_driver

Now we can use powersave mode:

sudo cpupower frequency-set -g powersave

To use performance

sudo cpupower frequency-set -g performance

Make it permanent

sudo sed -i 's/^GOVERNOR=.*/GOVERNOR="powersave"/' /etc/init.d/cpufrequtils

To revert

sudo sed -i 's/^GOVERNOR=.*/GOVERNOR="ondemand"/' /etc/init.d/cpufrequtils

Note: pstate does not support ondemand, so reverting will not utilize pstate

Install powertop

sudo apt-get install powertop

Run powertop as sudo for a day or two, then run:

sudo powertop --auto-tune

Then calibrate

sudo powertop --calibrate

Install i7z

sudo apt-get install i7z

iz7 is a reporting tool for i7 chips (and now i5 & i3)

Install thermald

sudo apt-get install thermald

Thermald is zero configuration, just install. For more information see here

Screensaver/System Lock

Install gnome-screensaver-command. Xmonad does not lock by default. Referencing commands are in the relevant xmonad config files

sudo apt-get install gnome-screensaver

Then bind gnome-screensaver-command -l to your keyboard

gnome-screensaver-command -l

note to self: find a more elegant way to do this.

Trackpad Tweaks

Disable trackpad tapping use gpointing-device-settings

sudo apt-get install gpointing-device-settings

Screen Brightness Keys

Install xcalib

sudo apt-get install xcalib

Then add keybinding to xmonad.hs

, ((0, 0x1008ff03), spawn "xcalib -co 90 -a")
, ((0, 0x1008ff02), spawn "xcalib -c")

Note: xcalib does not increase brightness gradually, but just resets to max brightness. Which fits my needs

Keyboard Brightness Keys

Use kbdlights.

gcc /PATH/TO/kbdlights.c -o kbdlights

Add keybinding to xmonad.hs

, ((0, 0x1008ff06), spawn "/PATH/TO/kbdlight down")
, ((0, 0x1008ff05), spawn "/PATH/TO/kbdlight up")

Retina Tweaks

Change DPI to 220

echo "Xft.dpi: 220" > ~/.Xresources

Firefox Tweaks

Open Firefox advanced preferences page (about:config) and set parameter layout.css.devPixelsPerPx to 2 (or find the one that suits you better; 2 is a good choice for Retina screens).

Install Theme Font & Size Change, set fonts to 10

WiFi Drivers

STA

sudo apt-get upgrade
sudo  apt-get install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') broadcom-sta-dkms
sudo modprobe -r b44 b43 b43legacy ssb brcmsmac
sudo modprobe wl

B43

sudo apt-get upgrade
sudo apt-get install firmware-b43-installer

Then blacklist wl in /etc/modprobe.d/blacklist.conf

Arabic Support For Terminal

sudo apt-get install libfribidi0 libfribidi-dev

Download and install this package

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