What to fix with the fresh factory Ubuntu 16.04 on a Dell XPS 13 9360 (Q&A)
Solution 1
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.
Solution 2
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).
- Go to the Ubuntu linux-firmware package site for zesty.
- 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)
- Under Downloadable files click to download the .deb file.
- 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%.
- Go to the Ubuntu mainline kernel site.
- Scroll to the bottom of the page and click the bottom link.
- Click to download the amd64 .deb files:
- linux-headers-*.deb
- linux-headers-*-generic.deb
- linux-image-*-generic.deb
- Double-click the downloaded files to install them.
- 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
Related videos on Youtube
Diego
Updated on September 18, 2022Comments
-
Diego almost 2 years
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
-
Diego over 7 yearsshould I convert this (my) entry into a wiki format so we can merge our suggestions?
-
Andrew Crouthamel over 7 yearsSure that's fine with me.
-
Diego over 7 yearsAndrew, 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?
-
Andrew Crouthamel over 7 yearsI've updated my answer with some clarifications and steps.
-
Diego over 7 yearsSome 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 over 7 years
-
Andrew Crouthamel over 7 yearsHere are some more ideas. I'll have to investigate VAAPI and ath10k power usage. askubuntu.com/questions/888430/…
-
cwash about 7 yearsMy monitor always stays blank after suspend. Having trouble figuring out how to fix this...
-
Diego about 7 years@cwash I also have the same problem but didn't get to solve it. Did you consider contacting dells official support?
-
Cerran almost 7 yearsOn 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 almost 7 yearsFor the touchpad driver issue, Dell offers an official solution here. Basically, Ubuntu 16.04 tries to use both
psmouse
andi2c
drivers with the touchpad, so you can simply disablepsmouse
(which emulates a PS/2 interface) and usei2c
. 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 almost 7 yearsAnother 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.
-
Diego almost 7 years@Cerran, good tips all of them! thanks for posting here. I should try to start over and fixing the touch pad this way.
-
Evan almost 7 yearsIs there a reason you're using the linux-firmware for zesty instead of xenial xerus? Are your suggestions for 16.04 or for 17.04?