donderdag 27 augustus 2015

Setup Linux Mint 17.2 on Dell XPS 15 (2015 edition)

This blog post will describe a possible setup for Linux Mint 17.2 on a Dell XPS 15 (built year 2015 with 4K Ultra-HD touch screen). It will focus on the pre-installation steps (how to boot your Linux Live USB) and post-installation steps (fixing driver issues). It is expected that the reader already knows how to perform a Linux install.

Installation of Linux on a Dell XPS 15

Download Linux Mint 17.2 Cinnamon and create a bootable USB.

Disable fast boot from Windows

Boot into Windows and disable fast boot (Instructions at http://www.eightforums.com/tutorials/6320-fast-startup-turn-off-windows-8-a.html)

Disable Secure boot and change boot order

Go into the Bios (Reboot notebook and press F2 on splash screen (bios keys are mentioned in bottom right corner). After this your BIOS screens should look like:





Boot from the USB into Linux. Once there use gparted (if needed install using `sudo apt-get install gparted` to resize the Windows partitions and to free up space for your Linux installation. Next perform the Linux installation to your preference (for me that means a separate partition for /home).

Driver issues + fixes

Wi-Fi

This is one is available in the restricted drivers area of Mint. Before launching it however it is best to get your repository data up-to-date and to install all updates:

sudo apt-get update && sudo apt-get upgrade 

Next go to the restricted drivers wizard using the menu:


In this window only consider the area on the wireless drivers (broadcom drivers):

Select bcmwl-kernel-source and click apply changes, this should do all the necessary configuration to get Wi-Fi working.  Next you can connect to a wireless network using network manager.

How to get internet-access on this notebook without Wi-Fi?

I have bought the 4-in-1 connector for the PC that will go from USB3.0 to USB2.0, ethernet, VGA & HDMI ports. For the USB and the ethernet ports this adapter is plug&play. So handy when you need to install updates when your wireless is not yet working.

Nvidia

Bumblebee Installation instructions

Using instructions from https://wiki.ubuntu.com/Bumblebee

sudo apt-get update
sudo apt-get upgrade
sudo add-apt-repository ppa:bumblebee/stable
sudo apt-get install bumblebee bumblebee-nvidia primus linux-headers-generic

Which gives the following output:

Dellx log # sudo apt-get install bumblebee bumblebee-nvidia primus linux-headers-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  bbswitch-dkms lib32gcc1 libc6-i386 linux-headers-3.13.0-62
  linux-headers-3.13.0-62-generic nvidia-304 nvidia-current primus-libs socat
Recommended packages:
  nvidia-settings libcuda1-304 nvidia-opencl-icd-304 primus-libs-ia32
The following packages will be REMOVED:
  linux-kernel-generic
The following NEW packages will be installed:
  bbswitch-dkms bumblebee bumblebee-nvidia lib32gcc1 libc6-i386
  linux-headers-3.13.0-62 linux-headers-3.13.0-62-generic
  linux-headers-generic nvidia-304 nvidia-current primus primus-libs socat
0 upgraded, 13 newly installed, 1 to remove and 0 not upgraded.
Need to get 47,8 MB of archives.
After this operation, 260 MB of additional disk space will be used.
Do you want to continue? [Y/n] 

Install newest nvidia drivers

These are present in the driver manager.


Select the latest driver


Click apply and afterwards it should show that an additional proprietary driver is in use.


Configure Bumblebee to use these new drivers

Changes the following four lines using your favorite editor in /etc/bumblebee/bumblebee.conf (using sudo, e.g. sudo gedit /etc/bumblebee/bumblebee.conf):

Driver=nvidia
KernelDriver=nvidia
# colon-separated path to the nvidia libraries
LibraryPath=/usr/lib/nvidia-346-updates:/usr/lib32/nvidia-346-updates
# comma-separated path of the directory containing nvidia_drv.so and the
# default Xorg modules path
XorgModulePath=/usr/lib/nvidia-346-updates/xorg,/usr/lib/xorg/modules

Note that paths are once colon-separated and once comma-separated.

After a reboot the bumblebee daemon should be running.
peter@Dellx ~ $ /etc/init.d/bumblebeed status
 * bumblebeed is running

Why would I install these proprietary drivers?

You don't need to install them but they can boost performance our lower your power consumption:

Performance

3D Performance before setup
peter@Dellx ~ $ glxgears 
Xlib:  extension "NV-GLX" missing on display ":0".
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
348 frames in 5.3 seconds = 65.786 FPS
300 frames in 5.0 seconds = 59.997 FPS
300 frames in 5.0 seconds = 59.995 FPS
300 frames in 5.0 seconds = 59.996 FPS
3D performance after setup
peter@Dellx ~ $ glxgears 
30157 frames in 5.0 seconds = 6031.306 FPS
31302 frames in 5.0 seconds = 6260.384 FPS
32086 frames in 5.0 seconds = 6415.288 FPS
30959 frames in 5.0 seconds = 6191.375 FPS

Battery saving mode

This performance gain comes however with a penalty for the autonomy of your notebook (higher battery drain). In your panel with status and notification icons an Icon should be present that either holds the nvidia logo or the intel logo:



When you click the logo you will get the Nvidia configuration screen that allows you to switch between the modes.



When selecting a mode you'll need to provide a password because privileges are required (only possible if your user is allowed to perform privileged actions (sudo rights)).



In order to activate the changes you need to re-login.



After a re-login you'll see the intel logo.


To investigate

  • How to get the 4-in-1 adapter working for external displays.  Low priority as I currently don't have a secondary display.
  • Quite frequently text gets pasted while typing or mouse jumps.  This is likely caused by the touchpad which is quite broad and easily touched by accident.  Currently I don't have an external mouse but will likely look into buying one in the near future and will then check howto best disable the touchpad when mouse is connected and re-activate it when mouse is disconnected.  (e.g. using udev)
  • In syslog CPU stacktraces show up from time to time
  • Touchscreen: This seems to be a weak point for Linux.  The 'chromium-browser' however seems to do support gestures like pinching and two-finger scrolling.  Can be handy for Google Maps although I dislike greasy fingers on my screen.

Geen opmerkingen:

Een reactie posten