10

The Dell factory installed Ubuntu on 16.04 has a few shortcomings that needed to be fixed before it is fully useful. Below are the things I had to fix. Please feel free to add yours as well.

[NB] As suggested by the admins I have set up a thread on Ubuntu Forums https://ubuntuforums.org/showthread.php?t=2357424

closed as too broad by dobey, Robie Basak, Pilot6, Wayne_Yux, Eric Carvalho Mar 28 '17 at 13:08

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    AskUbuntu is not a forum and not suited to opinionated discussions like this. This would be better suited to Ubuntu Forums. – dobey Mar 27 '17 at 18:39
  • Thanks for your suggestion, the question may be rewritten as "how to make dell xps 13 fully functional as designed?" Some parts of the answer may be opinionated, but the others are totally factual. You will see that if you check the actual answers below. – Diego Mar 27 '17 at 22:41
  • It is "fully functional as designed" as it was shipped. "Factual" or not, 99.999% of people do not need these "fixes" to have a "fully functioning" laptop. Some of these are workarounds for bugs. And AskUbuntu (SE) is not designed for broad questions with multiple answers, or to provoke discussion. – dobey Mar 28 '17 at 0:34
  • 1
    Well, Dell provides official support for their pre-installed XPS laptops. I've had one for over 3 years and without the issues you've mentioned. Most of these workarounds/hacks are also not Ubuntu specific, and are documented on Arch wiki and elsewhere too. No. Migrating to forums is a manual task. – dobey Mar 29 '17 at 12:04
  • 1
    Please add at least the exact model number (should be XPS 13 9360) to make this question useful for people later on when new XPS models come out and things get confusing. – sola Aug 12 '17 at 19:00
8

Here is my list, based on recommendations from the Arch Linux Wiki on the Dell XPS 13 (9360).

Update linux-firmware in order to get the i915 guc and huc blobs

Manually install latest linux-firmware (at least released after 20170217).

  1. Go to the Ubuntu linux-firmware package site for zesty.
  2. Click on "linux-firmware 1.xyz in amd64 (Release)", where xyz is the latest version you see on the page. (Assuming you need 64-bit packages)
  3. Under Downloadable files click to download the .deb file.
  4. Double-click the downloaded file to install it.

Update to the latest kernel to get NVMe power savings

Manually install kernel 4.11rc1 or later to get an NVMe power savings patch (download the linux-image-generic, linux-headers and linux-headers-generic for the version you choose). This alone should net you an idle power savings of 30%.

  1. Go to the Ubuntu mainline kernel site.
  2. Scroll to the bottom of the page and click the bottom link.
  3. Click to download the amd64 .deb files:
    • linux-headers-*.deb
    • linux-headers-*-generic.deb
    • linux-image-*-generic.deb
  4. Double-click the downloaded files to install them.
  5. Run sudo update-grub.

Improve graphics performance and power savings

Requires above two updates first!

Edit /etc/default/grub and include the following options after GRUB_CMDLINE_LINUX_DEFAULT="quiet splash to improve video driver power savings and performance:

i915.modeset=1 i915.enable_rc6=1 i915.enable_fbc=1 i915.enable_guc_loading=1 i915.enable_guc_submission=1 i915.enable_huc=1 i915.enable_psr=1 i915.disable_power_well=0 i915.semaphores=1

Run sudo update-grub.

Note that you should be able to add these into a .conf file for the i915 module, but Ubuntu doesn't seem to look at the file when I create it, which is why I recommend this method instead. Also, not all options are supported at this time (such as enable_huc and sempahores, but may be in the future in later kernels or linux-firmware releases).

I've tested Borderlands 2 with this and see an improvement of about 5 FPS (on an original 26 FPS). I also see a slight decrease in power usage.

Ensure you get the best wireless speeds

Edit /etc/default/crda and set your country code at the end of the REGDOMAIN line.

eg. REGDOMAIN=US

Fix palm detection on the touchpad

Install xserver-xorg-input-libinput.

Create /usr/share/X11/xorg.conf.d/90-libinput.conf containing:

Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
        Option "Tapping" "True"
        Option "PalmDetection" "True"
        Option "TappingDragLock" "True"
EndSection

Fix some screen tearing issues

Create /usr/share/X11/xorg.conf.d/20-intel.conf containing:

Section "Device"
        Identifier  "Intel Graphics"
        Driver      "intel"
        Option      "AccelMethod" "sna"
        Option      "TearFree"    "true"
EndSection
  • should I convert this (my) entry into a wiki format so we can merge our suggestions? – Diego Mar 27 '17 at 16:40
  • Sure that's fine with me. – Andrew Crouthamel Mar 27 '17 at 16:53
  • Andrew, could you please clarify what you meant with Manually install latest linux-firmware (at least released after 20170217). I mean could you pls, write up the exact steps. Did you need to compile from the source? – Diego Mar 27 '17 at 17:05
  • 1
    I've updated my answer with some clarifications and steps. – Andrew Crouthamel Mar 27 '17 at 18:33
  • Some error messages [drm] Finished loading DMC firmware i915/kbl_dmc_ver1_01.bin (v1.1) [ 1.374516] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=io+mem [ 1.380968] i915 0000:00:02.0: Direct firmware load for i915/kbl_huc_ver02_00_1810.bin failed with error -2 [ 1.380969] [drm] Failed to fetch valid uC firmware from i915/kbl_huc_ver02_00_1810.bin (error -2) [ 1.382312] [drm:intel_huc_load [i915]] ERROR Failed to complete HuC uCode load with ret -5 [ 1.397931] [drm] Initialized i915 1.6.0 20170123 for 0000:00:02.0 on minor 0 – Diego Mar 27 '17 at 19:22
8

Cooling Fan spins up because of a faulty samba process

The culprit is gvfsd-smb-browse process.

Add the statement below to [global] section of your /etc/samba/smb.conf

name resolve order = wins lmhosts bcast

https://itsfoss.com/fix-gvfsd-smb-high-cpu-ubuntu/

Remove conflicting duplicate touchpad driver

To get things working properly, I needed to disable the second touchpad device "SynPS/2 Synaptics TouchPad". I think it was mostly being ignored, and syndaemon was attaching to it instead of "DLL0704:01 06CB:76AE Touchpad", which was actually managing the touchpad.

I disabled it in the Xorg config file. I opened:

/usr/share/X11/xorg.conf.d/51-synaptics-quirks.conf

and added this entry:

Code:

# Disable generic Synaptics device, as we're using
# "DLL0704:01 06CB:76AE Touchpad"
# Having multiple touchpad devices running confuses syndaemon
Section "InputClass"
        Identifier "SynPS/2 Synaptics TouchPad"
        MatchProduct "SynPS/2 Synaptics TouchPad"
        MatchIsTouchpad "on"
        MatchOS "Linux"
        MatchDevicePath "/dev/input/event*"
        Option "Ignore" "on"
EndSection

https://ubuntuforums.org/showthread.php?t=2316240

Activate Touchpad Palm Detection

Add to /usr/share/X11/xorg.conf.d/50-synaptics.conf after line 13 an Option "PalmDetect" "1" so the overall this section looks like this:

Section "InputClass"
        Identifier "touchpad catchall"
        Driver "synaptics"
        MatchIsTouchpad "on"
    Option "PalmDetect" "1"
# This option is recommend on all Linux systems using evdev, but cannot be
# enabled by default. See the following link for details:
# http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html
      MatchDevicePath "/dev/input/event*"
EndSection

https://erik.torgesta.com/2016/11/things-to-improve-ubuntu-16-04-on-dell-xps-13-9630/

sudo add-apt-repository ppa:atareao/atareao
sudo apt-get update
sudo apt-get install touchpad-indicator
/opt/extras.ubuntu.com/touchpad-indicator/bin/touchpad-indicator&

The touchipad icon should appear in the notification area. Go to preferences, Set General Options->Autostart and Actions->Disable Touchpad on typing. Youst may want to adjust the delay in milliseconds too.

Changing the scrolling direction of the two-finger scrolling on the touch-pad:

EDIT: the below file doesn't seem to have any effect on the scrolling but breaks the mouse functionality. I have deleted it again but do not have the problem with the scrolling anymore.

Alternate method from https://askubuntu.com/a/519859/452753 worked for me:

In the file /usr/share/X11/xorg.conf.d/20-natural-scrolling.conf you have opened in your preferred text editor, paste the following:

Section "InputClass"
        Identifier "natural scrolling for mouse wheel"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "mouse"
        Option "Device" "/dev/input/mice"
        Option "Protocol" "Auto"
        Option "ZAxisMapping" "5 4"
EndSection

Save the file and reboot. As above, individual users can switch it off on a per-user basis by using Ubuntu-Tweak to "turn on" natural scrolling (it will be the reverse of the system-wide setting on a per-user basis but will not affect the actual system setting for other users who will want to use natural scrolling).

Get the F1-F12 row to function as such instead of media keys by default

How to invert fn keys on Dell Laptop? Press F2 during POST (Power On Self Test) to enter the System Setup (BIOS) utility.

In the Function Key Behavior, select Multimedia Key First or Function Key First.

Function Key First — This is the default option. Press any function key to perform the associated function. For multimedia action, press Fn + the required multimedia key.

Lacking dedicated page up/down, home/end buttons.

The XPS 13 keyboard has these buttons combined with the arrow buttons and so one needs two hands to access them (pressing Fn required). Here I re-purpose Print button to act as a Home button and Insert as PgDn:

xmodmap -e "keycode 107 = Home" # using "Print" button
xmodmap -e "keycode 118 = Next" # using "Insert" button

Remove the Print shortcut to Screenshot in the System Settings->Keyboard ->Shortcuts->Screenshots

Right Ctrl (with the list symbol) + up_arrow/down_arrow function as home/end as well.

Encrypted home directory blocks ssh key based authentication and vpn client

This is not strictly an XPS or 16.04 related issue, but it is helpful to know that you need to move your authorized_keys file outside of your encrypted home directory in order to be able to use ssh key based authentication. https://help.ubuntu.com/community/SSH/OpenSSH/Keys#Troubleshooting

Here is a help entry from one of the VPN providers on the fix for their software in case you are using encrypted home directory. https://helpdesk.privateinternetaccess.com/hc/en-us/articles/227831828-Installing-the-PIA-app-on-Linux-with-encrypted-home-directories

Change Default Power Button Behaviour From Interactive to Suspend

gsettings set org.gnome.settings-daemon.plugins.power button-power suspend

Monitor Stays Blank After Suspend When External Monitor Was In Use

This issue seems to pertain to poor Thunderbolt protocol support in older kernels. Problems crashing/hanging after plugging/unplugging monitors seem to go away after updating the kernel - see below.

Update to latest HWE Kernel

The 4.4.0 kernel that ships with the XPS 13 seems to have some problems with WiFi breaking, resuming from sleep, and external monitors that goes away with a kernel update.

There are many options for updating the kernel, however as far as I can tell the best approach is to install a signed (because the original image was signed and UEFI may complain without it) HWE (Hardware Enablement) kernel along with the image-extra drivers. HWE is especially important because the 4.10 and 4.13 kernel updates bring significant improvements in Thunderbolt 3 support--super important if you are using a docking station. The following command does that:

sudo apt install linux-signed-generic-hwe-16.04 linux-image-extra-virtual-hwe-16.04

If you don't install linux-image-extra-virtual-hwe your WiFi and touchpad will probably not work.

This kernel update may also fix the above issue with the screen not working after resume / connection to external monitor.

  • 1
    My monitor always stays blank after suspend. Having trouble figuring out how to fix this... – cwash May 28 '17 at 21:56
  • @cwash I also have the same problem but didn't get to solve it. Did you consider contacting dells official support? – Diego May 28 '17 at 22:52
  • 1
    On my system (9360), I found a much easier way of swapping the function of the F-keys. On the <Esc> key, there is a small "function lock" symbol ("Fn" inside a lock), so I simply pressed <Fn><Esc> to swap the functionality. This settings change has persisted through multiple suspend/resume/restart/shutdown operations. This functionality is documented in the XPS 13 Setup and Specifications guide. See section "Keyboard shortcuts", where it says "Toggle Fn-key lock". – Cerran Jul 28 '17 at 17:40
  • 2
    For the touchpad driver issue, Dell offers an official solution here. Basically, Ubuntu 16.04 tries to use both psmouse and i2c drivers with the touchpad, so you can simply disable psmouse (which emulates a PS/2 interface) and use i2c. I have tried this on my 9360 and confirmed that it works. While typing, the mouse cursor no longer changes the focus to other windows due to palm hits, either. – Cerran Jul 28 '17 at 17:54
  • 1
    Another way to change the direction of two-finger scrolling that does not require Ubuntu Tweak is to go to Settings > Mouse & Touchpad > Touchpad. There is a checkbox labeled "Natural scrolling"; toggle this to change the direction. – Cerran Jul 28 '17 at 17:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.