Getting a Dell XPS 13 up and running with Crunchbang(Waldorf), Linux Kernel 3.10.6(or the Ubuntu Sputnik kernel) and Ruby on Rails
Well the sputnik kernel might have better support for the web camera and some other minor things, but all of a sudden it started crashing over and over again and I was not able to track down the reason. Back on kernel 3.10.6 and it has been running fine since, will keep this gist updated as things progress.
I'm currently employed as a Backend developer for an e-commerce company and I received a new laptop to work on, which is a Dell XPS 13. While this laptop comes in a Ubuntu version, the one I received at work was not that model but a core I5 with Win8P.
So I figured that instead of running Ubuntu which has support for the "Sputnik"(as the project is called) built in, I'd go with Crunchbang. The experience has been alright so far but it has required some work that I probably would never have needed to do had I gone with Ubuntu and Sputnik kernel. This is really my first tour of Crunchbang as a work system, my work system has generally been Ubuntu, but there seems to be a very attractive "simplicity" to Crunchbang combined with Openbox.
Below are the notes that I have taken down on my journey to get the system set up to perform my work as a Ruby on Rails developer.
Here are the first few steps to get crunchbang up and running:
- Download Crunchbang - http://crunchbang.org/download
- Create a USB drive with Crunchbang 64bit on it - http://crunchbang.org/forums/viewtopic.php?id=23267
- Change the boot type in the bios to Legacy, now move up the USB drive to the first position.
Now when you reboot you should hit the installation menu of Crunchbang. Go ahead and install it, I didn't want to keep Win8 around so I went with the default partitioning. When the installation program starts erasing your drive it really takes a while, I'd say about 4-5 hours(Note: There are probably quicker ways to do this, but I decided to go with the regular install script).
When your system is setup and ready you have some tweaking and work ahead of you. First up go through the install question that is shown when you boot up Crunchbang. Next it is time to compile your own linux kernel with the drivers for the cypress trackpad(along with several other improvements). When I compiled the kernel the latest stable version was 3.10.6(as of 15/8 2013 it is 3.10.7, pick one you prefer).
Update: After having further issues with graphics card and the webcam, I decided it was probably better to just go with the ubuntu-precis(sputnik branch) instead and then everything started working as intentioned. The instructions to compile the sputnik-kernel can be found under the link below.
- Compilation instructions here https://wiki.debian.org/InstallingDebianOn/Dell/Dell%20XPS%2013(Scroll down to the section on kernel 3.9.3), but exchange https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.9.3.tar.xz for https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.10.6.tar.xz
When you reboot select the kernel version of 3.10.x instead of the 3.2.x one in GRUB(Except if you went with the sputnik kernel, then select 3.2.x).
Basically this is all you need to have your Dell XPS 13 up and running with Crunchbang, Wifi and a functioning trackpad.
synclient TapButton1=1 &
synclient HorizTwoFingerScroll=1 &
synclient HorizScrollDelta=-36 & # The value here is set to negative to invert the scroll direction
synclient VertScrollDelta=-36 & # The value here is set to negative to invert the scroll direction
synclient PalmDetect=1 &
Minidisplayport adapter - Do not buy a Deltaco Multiport, it does not work well with the default settings(I am assuming, as it does not activate properly without a passive adapter connected before or into it).
USB to Ethernet adapter - I got the startech.com adapter with the laptop, my initial impressions were that I would need to compile the drivers myself to begin with, but turns out this driver should be available in the new kernel(the chipset is called AX88179). If you find yourself needing to compile the driver on your own it is available here http://www.asix.com.tw/download.php?sub=downloadsearch&PSNoID=112, then follow the instructions included this was version 1.5 when I checked last. There is one issue with the adapter though and that is that it will keep losing packets when it is set at 1GBs speed, as such I had to add a small conf in /etc/network/interfaces as follows:
auto lo eth0
iface lo inet loopback
iface eth0 inet dhcp
post-up /sbin/ethtool -s eth0 speed 100 duplex full autoneg on
Most of it is there by default, I added the last 2 lines and eth0 to the first line.
To then get the connection to work properly with network-manager you need to change the NetworkManager.conf instructions here - http://askubuntu.com/questions/71159/network-manager-says-device-not-managed
I ended up doing this a bit differently, will post new instructions when I have time to write it up.
Emacs 24 - http://emacs.naquadah.org/ find the appropriate package. These are the packages I added to /etc/apt/sources.list :
deb http://emacs.naquadah.org/ stable/
deb-src http://emacs.naquadah.org/ stable/
Emacs - To create a better command to start emacs you can follow Avdi Grimms short guide here - http://devblog.avdi.org/2011/10/27/running-emacs-as-a-server-emacs-reboot-15/
Emacs Prelude - Here is my Prelude repository with my own personal.el file - https://github.com/bjoska/prelude
Setting capslock to ctrl is done by following this guide here - http://www.emacswiki.org/emacs/MovingTheCtrlKey#toc8
edit /etc/default/keyboard
set XKBOPTIONS="" to
XKBOPTIONS="ctrl:nocaps"
and voila you are done after a reboot.
Also added the following to the autostart.sh, to re-enable the tray indicator for which keyboard I'm currently using -
fbxkb &
Openbox Keyboard conf Swedish and US(still looking for a better way to see which keyboard is actually active) -
<keybind key="C-S-A-Right">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>English US</name>
</startupnotify>
<command>setxkbmap us</command>
</action>
</keybind>
<keybind key="C-S-A-Left">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>Swedish</name>
</startupnotify>
<command>setxkbmap se</command>
</action>
</keybind>
I prefer zsh in front of bash, but it is a matter of taste. - You can get ZSH with sudo apt-get install zsh
in the terminal.
My .zsh.d
conf is available here - https://github.com/bjoska/zsh-source-files
You can get pidgin from aptitude, which is a decent enough IM client to use with GTalk. - sudo apt-get install pidgin
in the terminal.
Skype see this topic here at Crunchbang(see reply from Gebeer) - http://crunchbang.org/forums/viewtopic.php?id=19022
If your sound happens to not work see this blog post: http://joepie91.wordpress.com/2013/05/09/how-to-solve-sound-issues-with-skype-on-crunchbang-linux-and-perhaps-other-distributions/
Now on to getting Ruby onto the system, I myself prefer using RVM in front of chruby or rubyenv, this is a matter of taste I guess. You can follow the instructions here on how to get up and running with RVM - http://rvm.io/rvm/install
#Todo:
- Virtualbox
- Firewall
- Wine
- chrootkit
- rkhunter
- .nsswitch.conf - Removed some of the contents. This only applies to certain networks.
few tips and tricks - http://fabianpeter.de/linux-desktop/crunchbang-linux-and-my-quest-for-the-perfect-desktop/ general idea of what to do after install - http://debianhelp.wordpress.com/2012/10/02/crunchbang-11-waldorf-debian-wheezy-os/
Yay for Crunchbang! :) I've been hooked since 8.10.