Skip to content

Instantly share code, notes, and snippets.

@bjonord
Last active December 21, 2015 05:59
Show Gist options
  • Save bjonord/6260823 to your computer and use it in GitHub Desktop.
Save bjonord/6260823 to your computer and use it in GitHub Desktop.
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

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

Update 04/09-2013:

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.

End of updates

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.

Getting started

Here are the first few steps to get crunchbang up and running:

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).

Compiling the latest kernel

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).

Giving up and going with the sputnik kernel

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.

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.

Setting for Trackpad in autostart:

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

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

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

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

Keyboard settings

Turning capslock into another ctrl key

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.

Start the tray keyboard indicator

Also added the following to the autostart.sh, to re-enable the tray indicator for which keyboard I'm currently using - fbxkb &

Switching between keyboard layouts

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>

Utilities, messaging etc

ZSH

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

Pidgin

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

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/

Ruby

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.

References:

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/

@zph
Copy link

zph commented Nov 28, 2013

Yay for Crunchbang! :) I've been hooked since 8.10.

@bjonord
Copy link
Author

bjonord commented May 16, 2014

:)
I am hooked, but it is a lot of work sometimes.

@chrcoe
Copy link

chrcoe commented Jun 24, 2014

Thanks for this! I was just Googling around to do this same process at the end of the summer with my Sputnik dev machine. I have been using Crunchbang on my desktop for years and have 'put up' with Ubuntu on this laptop until the warranty expired :D

The only other thing that I thought might be a hangup is if the battery life gets drained unexpectedly (which has happened on a lot of laptops when I switched them to linux)

@bjonord
Copy link
Author

bjonord commented Nov 7, 2014

Sorry for the slow response, seldom check back here. :)

"The only other thing that I thought might be a hangup is if the battery life gets drained unexpectedly (which has happened on a lot of laptops when I switched them to linux)"

The battery life isn't great on XPS, but it alright all things considered. Think when I had it, I got about 3-4hours out of it, if I didn't compile anything big.

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