Linux Mint 18.1/Ubuntu 16.04 on the Dell Precision 5510

02 Dec

as of December of 2016

My New Dell Precision 5510 laptop came with Linux, cool, but it was Ubuntu 14.04, not so cool.  So I’ve been fighting with a clean install of Linux Mint 18.1 (based on Ubuntu 16.04) on the laptop to get it to work perfectly with the laptop. My friend (who got the same laptop and did the same thing) and I kept finding strange little quirks/issues/annoyances and we ended up implementing 6 or 7 various fixes/workarounds/enhancements to cover all the little issues. We’re still not out of the woods 100% yet but everything is working for the most part.   I got annoyed and wondered what Dell had done to the Ubuntu 14.04 to address these issues, so I backed up everything and reverted to Dell factory image. And… it turns out Dell only solved 1 or 2 of the issues/quirks. So they really didn’t adjust Ubuntu 14.04 to their laptop very well as far as I can tell. Very disappointing, but I guess it’s “nice” that the laptop came with factory Linux in general.

Most of my issues centered around the touchpad, I kept accidentally mis-clicking everytime I was typing it, my left hand’s thumb would graze the upper left hand corner of the touchpad and make mis-clicks. The setting  “disable touchpad inwhile typing” in Preferences/Mouse and Touchpad  doesn’t work! This appears to be a very common issue, especially with Dell laptops/touchpads.

1. The first thing discovered was that Linux detected 2 touchpads, one called “SynPS/2 Synaptics TouchPad” and one called “DLL06E5:01 06CB:7A13 Touchpad”, one was generic the other was Dell specific. So I had to modify  /usr/share/X11/xorg.conf.d/51-synaptics-quirks.conf and put an ignore rule for “SynPS/2 Synaptics TouchPad”. This made only the DLL06E5 one be detected, which helped out with some issues. The touchpad felt better/more responsive afterwards.

Run: “xinput list” and verify you see a DLL…  and a “SynPS/2 Synaptics” input.
Fix: Modify /usr/share/X11/xorg.conf.d/51-synaptics-quirks.conf and add this to the bottom:

—-
Section “InputClass”
Identifier “SynPS/2 Synaptics TouchPad”
MatchProduct “SynPS/2 Synaptics TouchPad”
MatchIsTouchpad “on”
MatchOS “Linux”
MatchDevicePath “/dev/input/event*”
Option “Ignore” “on”
EndSection
—-

2. However that still didn’t fix the “disable touchpad while typing” issue. I initially found that running “/usr/bin/syndaemon -i 1 -K -d” would work, it’d disable the touchpad for up to 1 second after the last keyboard button was pressed. It actually conflicts with the GUI settings application though, you have to uncheck “disable touchpad while typing” before running that syndaemon command, otherwise the settings “fight” and the touchpad gets completely disabled. However, that solution was crude at best and I still found I just didn’t enjoy the touchpad, it was much more usable now but it could be better, and I also wanted mouse gestures support, so I could 3 finger swipe to another workspace and maybe some pinch-to-zoom action, etc. So I ended up installing “xserver-xorg-input-libinput” which changed from the synaptics driver to the libinput driver. Much better.  You have to remember to disable the catch-all synaptics rule in 50-synaptics.conf. Once I was on libinput instead of synaptics though, that setting “disable touchpad while using keyboard” worked perfectly, so you don’t have to do that syndaemon thing anymore. Smooth.

Fix: “aptitude install xserver-xorg-input-libinput libinput-tools”  and then modify /usr/share/X11/xorg.conf.d/50-synaptics.conf and comment out this Section at the top:

—-

#Section “InputClass”
# Identifier “touchpad catchall”
# Driver “synaptics”
# MatchIsTouchpad “on”
## 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

—-

Then reboot.

3. I discovered issues with the touchscreen though, I then learned libinput was also trying to control the touchscreen. It turns out “evdev”, the driver that was previously handling the touchscreen, was better at it. So I ended up modifying 90-libinput.conf to disable handling of the touchscreen. So now I had a solid touchpad (libinput) and touchscreen (evdev). I still wanted gestures support though, but there was no package for libinput-gestures (arch linux has one), I ended up having to grab the source from git and compiling and installing it. And now I could suddenly 3-finger swipe between workspaces.  https://github.com/bulletmark/libinput-gestures

FIX 1: Modify /usr/share/X11/xorg.conf.d/90-libinput.conf and commenting out the touchscreen section at the bottom

#Section “InputClass”
#Identifier “libinput touchscreen catchall”
#MatchIsTouchscreen “on”
#MatchDevicePath “/dev/input/event*”
#Driver “libinput”
#EndSection

—-

(Hint, xinput list-props ##  should help you determine what driver is being used, my touchscreen (shown in xinput list) was id=12  so I just ran xinput list-props 12 and I saw a bunch of properties beginning with libinput, letting me know which driver was being used)

FIX 2: Install libinput-gestures


wget https://github.com/bulletmark/libinput-gestures/archive/master.zip
unzip master.zip
sudo apt-get install xdotool wmctrl
cd libinput-gestures-master
sudo gpasswd -a $USER input
sudo ./libinput-gestures-setup install

4. The fun’s not over though. I discovered that when I connected an external monitor, the touchscreen would be off alignment. You have to re-associate the touchscreen input to just the laptop’s monitor by running either “xsetwacom set “ELAN Touchscreen” MapToOutput eDP1″ or more eloquently “xinput –map-to-output 14 eDP1” or something like that. I had issues with the xsetwacom command, using xinput seemed cleaner. Running that command realigns the touchscreen to the LCD display, but… when you disconnect the external monitor it again becomes out of alignment. Running that command yet again fixes it. So it seems you have to run that command everytime you connect or disconnect the external monitor. I ended up creating a /etc/udev/rules.d/99-monitor-hotplug.rules file that would run that command everytime there was a card0 drm change action (aka connecting and disconnecting an external monitor). This works but it’s not perfect, it messes up once in a while and I have to run the command manually (I’ve mapped it to F7 so I can just tap F7 and it fixes the touchscreen), I’ve also discovered that when connecting the monitor it actually triggers 3 change events so the command gets executed 3 times. It’s odd. I’m still investigating these 2 issues (sometimes the command doesn’t work when run by udev and why it’s being executed 3 times on connect).

5. I was on the nvidia card, with the very latest nvidia drivers, but decided to try out the Intel graphics. I switched to intel. Not bad, it wasn’t choppy even when running the internal and the external 4k monitors. But then randomly when I connected or disconnected the external monitor, the whole thing would randomly ‘lock up’. I could see the mouse cursor and move it, but I couldn’t do anything else. Even ctrl+alt+backspace and/or ctrl+alt+f1 wouldn’t work. There was no way out of xorg, I was stuck. I had to hard power cycle the laptop. This happened multiple times and initially I thought it was all my playing around in udev but after undoing my changes one by one and still encountering the issue, I eventually remembered I was on the Intel graphics, when I switched back to nvidia, no more lock ups. I used the “Intel Graphics Update tool” from Intel to try and upgrade the Intel drivers to the latest, but then switching back to intel and rebooting and then testing a monitor connect or disconnect the problem reoccurred, worst yet it was no longer “randomly” happening, it seemed to happen every single time; ouch.  So those upgraded Intel graphics drivers made things worst. Switching back to nvidia the issue went away.
Update: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1597267  this, and subsquently this: https://github.com/linuxenko/ubuntu-skylake-i915-video-fix may solve the issue. From that github link I’ve downloaded their 20-intel.conf file and since I’m on the 4.4.x kernel I’ve also grabbed the 4.3 sklguc firmware and installed it. Theoretically the freezing problem may be resolved but I haven’t yet had the chance to test it.

6. I discovered the wifi only connects at 400mbps. This laptop has 802.11ac and should be capable of doing 1gbps, but it would only connect to the 802.11ac 5ghz AP at 400mbps. This has something to do with the iwlwifi driver, but I’ve tried various things and can’t seem to get it to connect any faster. I still haven’t “solved” this issue or tried other access points.
Update: It seems to be dependent on the Access Point. Using the uniquity wireless 802.11ac AP’s using Linux Mint 18.1 (Ubuntu 16.04 based) it only linked at 400mbps and speedtests confirmed it.  But going back down to Ubuntu 14.04 you could see it only link at 85mbps, and speedtests confirmed it (ouch!).  But… I’m now on an Asus 802.11ac Wireless Router and I’m linked at 866.7mbps. So the best I can tell is, it’s sensitive to the access point it’s talking to. Maybe something to do with the chipset.  I know the Ubiquity 802.11ac AP’s are capable of much more than 400mbps, but whatever. This issue has been downgraded, in my mind, to ‘minor annoyance’.

7. And lastly, I discovered kernel errors (see below). I initially thought it was the wifi but eventually traced it to nvidia when there’s an external monitor connected. Whenever I have an external monitor connected I’d get strange kernel messages indicating some kind of crash but it’s a very weird message and technically everything was working, even HDMI audio. I eventually discovered others having the issue with the latest Intel Skylake and such. There was a patch put into the 4.8.x kernels, which is crazy new, my laptop was running 4.4.x. There was no “easy” way to get to 4.8.x, I grabbed the deb files from Ubuntu (there was no ppa and nothing in any repository) and installed it but it had issues with some of the dkms stuff with nvidia and virtualbox. Apparently nvidia and virtualbox has some ‘kernel modifications’ that gets done and dkms helps those modifications persist across kernel changes. But these modifications did not like the bleeding edge 4.8.x kernel. I solved the nvidia problem, can’t remember how, but the virtualbox issue I couldn’t solve. However when running on the 4.8.x kernel the errors in the kernel logs when having an external monitor connected did go away.

So this is made me go “what the heck did Dell do to Ubuntu 14.04 to address all these issues” so I backed up everything important and reinstalled the factory Dell OS only to discover the majority of the issues still existed there, including the kernel errors. The touchpad stuff is still broken in Dell’s image. They did solve the touchscreen alignment issue though. I need to look into how they did that. But in general, Dell’s 14.04 image doesn’t have half the fixes, still seeing kernel errors (traced it to the nvidia drivers), and still not able to disable the touchscreen. Actually what was really “funny” was the wifi was now connecting to the Ubiquiti AP’s at 86.7mbps instead of 400mbps. It was horrific.   So I ran back to Mint 18.1 and re-implemented all those changes I mentioned above. The laptop is quite usable.

For now I’ve decided not to run the 4.8.x kernel, the dkms complications it introduces is not worth the hassle and while there are scary looking errors in the kernel log it doesn’t seemingly affect anything. Dell decided not to address it in their official Ubuntu 14.04 setup so I guess I won’t either for now. I did track it to the nvidia drivers, when using nouveau it didn’t show up in dmesg but the performance of the graphics card was poor. I do wish I could more easily switch to the Intel graphics card when running just the laptop display. Better battery life supposedly. I can switch to Intel but having to log out and back in is a pain. Locking up when connecting external monitors is a bigger pain.

What led me to understand Kernel 4.8 would “fix” it is this report: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1567417

[ 20.463084] ------------[ cut here ]------------
[ 20.463099] WARNING: CPU: 0 PID: 1567 at /build/linux-dcxD3m/linux-4.4.0/ubuntu/i915/intel_pm.c:3586 skl_update_other_pipe_wm+0x16c/0x180 [i915_bpo]()
[ 20.463100] WARN_ON(!wm_changed)
[ 20.463101] Modules linked in:
[ 20.463102] ctr ccm bbswitch(OE) bnep binfmt_misc nls_iso8859_1 arc4 nvidia_uvm(POE) snd_hda_codec_hdmi dell_led snd_hda_codec_realtek snd_hda_codec_generic snd_hda_intel i2c_designware_platform snd_hda_codec i2c_designware_core snd_hda_core snd_hwdep dell_wmi mxm_wmi snd_pcm nvidia_drm(POE) nvidia_modeset(POE) snd_seq_midi snd_seq_midi_event dell_rbtn iwlmvm snd_rawmidi dell_laptop dcdbas nvidia(POE) mac80211 snd_seq dell_smm_hwmon intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel uvcvideo videobuf2_vmalloc kvm videobuf2_memops videobuf2_v4l2 videobuf2_core snd_seq_device v4l2_common snd_timer videodev irqbypass media hid_multitouch btusb iwlwifi btrtl input_leds joydev serio_raw cfg80211 snd idma64 rtsx_pci_ms virt_dma soundcore memstick mei_me mei intel_lpss_pci shpchp processor_thermal_device
[ 20.463125] intel_soc_dts_iosf hci_uart btbcm int3403_thermal btqca btintel bluetooth intel_lpss_acpi intel_lpss wmi dell_smo8800 int3402_thermal int340x_thermal_zone int3400_thermal acpi_thermal_rel intel_hid acpi_als acpi_pad sparse_keymap kfifo_buf mac_hid industrialio parport_pc ppdev lp parport autofs4 btrfs xor raid6_pq drbg ansi_cprng algif_skcipher af_alg dm_crypt hid_logitech_hidpp dm_mirror dm_region_hash dm_log hid_logitech_dj usbhid rtsx_pci_sdmmc crct10dif_pclmul crc32_pclmul i915_bpo aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd intel_ips i2c_algo_bit drm_kms_helper syscopyarea psmouse sysfillrect sysimgblt fb_sys_fops nvme ahci drm rtsx_pci libahci i2c_hid hid pinctrl_sunrisepoint video pinctrl_intel fjes
[ 20.463146] CPU: 0 PID: 1567 Comm: Xorg Tainted: P W OE 4.4.0-31-generic #50-Ubuntu
[ 20.463147] Hardware name: Dell Inc. Precision 5510/08R8KJ, BIOS 1.2.14 08/31/2016
[ 20.463148] 0000000000000286 00000000e533d1cb ffff880892537938 ffffffff813f1143
[ 20.463149] ffff880892537980 ffffffffc0457c98 ffff880892537970 ffffffff81081102
[ 20.463150] ffff8808992bf000 ffff880891289d9c ffff8808992be000 ffff880891380378
[ 20.463152] Call Trace:
[ 20.463155] [<ffffffff813f1143>] dump_stack+0x63/0x90
[ 20.463158] [<ffffffff81081102>] warn_slowpath_common+0x82/0xc0
[ 20.463159] [<ffffffff8108119c>] warn_slowpath_fmt+0x5c/0x80
[ 20.463167] [<ffffffffc038969c>] skl_update_other_pipe_wm+0x16c/0x180 [i915_bpo]
[ 20.463174] [<ffffffffc0389836>] skl_update_wm+0x186/0x5f0 [i915_bpo]
[ 20.463186] [<ffffffffc04154ff>] ? intel_ddi_enable_transcoder_func+0x17f/0x260 [i915_bpo]
[ 20.463194] [<ffffffffc038d55e>] intel_update_watermarks+0x1e/0x30 [i915_bpo]
[ 20.463205] [<ffffffffc03f9571>] haswell_crtc_enable+0x321/0x8c0 [i915_bpo]
[ 20.463216] [<ffffffffc03f5f28>] intel_atomic_commit+0x5f8/0xdc0 [i915_bpo]
[ 20.463227] [<ffffffffc00c97de>] ? drm_atomic_check_only+0x18e/0x590 [drm]
[ 20.463234] [<ffffffffc00c9c17>] drm_atomic_commit+0x37/0x60 [drm]
[ 20.463238] [<ffffffffc0167b16>] drm_atomic_helper_set_config+0x76/0xb0 [drm_kms_helper]
[ 20.463245] [<ffffffffc00b8e42>] drm_mode_set_config_internal+0x62/0x100 [drm]
[ 20.463251] [<ffffffffc00bd362>] drm_mode_setcrtc+0x3d2/0x4f0 [drm]
[ 20.463256] [<ffffffffc00ae742>] drm_ioctl+0x152/0x540 [drm]
[ 20.463262] [<ffffffffc00bcf90>] ? drm_mode_setplane+0x1b0/0x1b0 [drm]
[ 20.463264] [<ffffffff81220c0f>] do_vfs_ioctl+0x29f/0x490
[ 20.463266] [<ffffffff8108e351>] ? __set_task_blocked+0x41/0xa0
[ 20.463267] [<ffffffff81090ce6>] ? __set_current_blocked+0x36/0x60
[ 20.463268] [<ffffffff81220e79>] SyS_ioctl+0x79/0x90
[ 20.463269] [<ffffffff81090f84>] ? SyS_rt_sigprocmask+0x74/0xc0
[ 20.463271] [<ffffffff8182db32>] entry_SYSCALL_64_fastpath+0x16/0x71
[ 20.463272] ---[ end trace 39089e4f3712369c ]---

 

Tags: , ,

2 Responses

  1. Eugene says:

    Thank you for this great tutorial on setting Ubuntu to Precision 5510. Several questions if you do not mind
    1. What is your current battery life? What improvements you expect with Intel graphics being used?
    This report states ~3h of running IntelliJ IDEA and browsing, which is pretty limited imo
    2. I read a lot of reports(http://en.community.dell.com/support-forums/laptop/f/3518/t/19676610?pi41097=1) that 5510 freezes in the early 2016, seem like it has something to do with buggy bios/nvme drivers. Did you experience this or have any information related?

    I’m thinking about purchasing 5510 some nearest time, FHD version, matte with extended battery, hoping to have at least ~5-6h of battery life.

  2. GlitcH says:

    1. Battery life is still in the 3-4 hour range. 5 if I used the intel and decreased the brightness to something like 50% and turn off the keyboard light. This laptop is a power house, and as a result you can’t expect 6-8 hours of battery life from it like a MacBook Pro. But the newest MacBook Pro is limited to 16gb of memory due to the use of LPDDR3 (Low Power DDR3) memory, and Intel only supports up to 16gb right now. The reason the Precision can go to 32gb is it chose to use DDR4 memory, so it’s faster memory and there’s more of it, it’s just low power. This laptop also has a better CPU in it. Considering the specs of this laptop the 3-4 hours of battery life is actually quite impressive. I knew when I got this that I’d have less battery life but 3-4 hours is fine for my needs, I’m not off or away from the charger for that long usually. I did pickup a Dell PowerBank, an external 18000mah battery, that will give the laptop hours of more power.

    The FHD screen will actually get you a little more battery life. So that’s a good choice. The matte display is also nice. Let me know what kind of battery life you get. Part of me wishes I’d gone with the FHD display. There’s a limitation in XOrg/XWindows where when you change “User Interface Scaling” to Double (Hi-DPI) it does it for all monitors. So if I connect a 1080p external monitor to this laptop everything is huge. There’s no way, due to a XOrg limitation, to do the Hi-DPI scaling for just one monitor but not another. This means I have to always use external 4k monitors, which is cool and annoying at the same time. Otherwise I have to change the scaling to 1x/normal and the text on the 4k laptop monitor is ridiculously small.

    2. I’ve had no issues with freezing (except with the Intel card and external monitors), nothing related to the BIOS anyways. Dell has released several BIOS updates for this laptop over the past couple of months so I know they’re actively fixing/solving issues. I think they got the majority of them. There is a similar story with the XPS 15’s, Dell released them when the hardware was ready but not really the firmware. Lots of early reviews and posts about all sorts of issues that got worked out over the course of a few months through BIOS updates. The same applies to the Precision 5510, so don’t trust some of the earlier reviews (not because they’re wrong, just because they’re outdated).

Leave a Reply

Deon's Playground

Placing whatever interests me and more