Page 1 of 1

MX-17.1 on Dell XPS 13

Posted: Sat Oct 20, 2018 8:50 pm
by Jerry3904
The Dell XPS 13 is a wonderful machine:

Code: Select all

$ inxi -Fz
System:    Host: mxXPS Kernel: 4.15.0-1-amd64 x86_64 bits: 64 Desktop: Xfce 4.12.3 
           Distro: MX-17.1_x64 Horizon March 14  2018 
Machine:   Type: Laptop System: Dell product: XPS 13 9343 v: N/A serial: <filter> 
           Mobo: Dell model: 0TRX4F v: A00 serial: <filter> UEFI: Dell v: A15 date: 01/23/2018 
Battery:   ID-1: BAT0 charge: 40.2 Wh condition: 51.1/52.7 Wh (97%) 
CPU:       Topology: Dual Core model: Intel Core i5-5200U bits: 64 type: MT MCP L2 cache: 3072 KiB 
           Speed: 799 MHz min/max: 500/2700 MHz Core speeds (MHz): 1: 798 2: 798 3: 798 4: 798 
Graphics:  Device-1: Intel HD Graphics 5500 driver: i915 v: kernel 
           Display: x11 server: X.Org 1.19.2 driver: modesetting unloaded: fbdev,vesa 
           resolution: 1920x1080~60Hz 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 5500 (Broadwell GT2) v: 4.5 Mesa 13.0.6 
Audio:     Device-1: Intel Broadwell-U Audio driver: snd_hda_intel 
           Device-2: Intel Wildcat Point-LP High Definition Audio driver: snd_hda_intel 
           Sound Server: ALSA v: k4.15.0-1-amd64 
Network:   Device-1: Broadcom Limited BCM4352 802.11ac Wireless Network Adapter driver: wl 
           IF: wlan0 state: up mac: <filter> 
Drives:    Local Storage: total: 489.05 GiB used: 5.95 GiB (1.2%) 
           ID-1: /dev/sda vendor: Crucial model: CT525MX300SSD4 size: 489.05 GiB 
Partition: ID-1: / size: 19.10 GiB used: 5.95 GiB (31.1%) fs: ext4 dev: /dev/sda5 
Sensors:   System Temperatures: cpu: 48.0 C mobo: 41.5 C 
           Fan Speeds (RPM): N/A 
Info:      Processes: 194 Uptime: 9m Memory: 3.76 GiB used: 641.7 MiB (16.7%) Shell: bash inxi: 3.0.25  
I bought this version a few years ago at a good price because I need to run proprietary software now and then on Windows for business purposes. After I used it for a while, I began to want to be able to use it in dual boot with MX. There is a lot online, but much of it is dated at this point so I decided to prepare this how-to.

Installation

I shrank the Windows partition, creating space for a MX install. I was unable to get Grub to install correctly--others may well have no problem--so ended up using grub2win. That program has many idiosyncracies but can be made to work.

Bios and drivers

Upgrade Bios from the Windows side. Download and run
https://downloads.dell.com/FOLDER047981 ... 43_A15.exe
There may be a later driver available at some point in the future, so check
https://www.dell.com/support/home/us/en ... p/drivers
Type “Bios” in the Keyword box.

Also use that page to update any other drivers.

Kernel

I eventually discovered that using a recent liquorix kernel brought significant improvements. On this machine, for instance, Suspend worked correctly for the first time after upgrading the kernel to 4.18-17.

SSD

I upgraded the SSD from 128 GB. Bought the new 512 GB SSD from Crucial, whose online site is terrific. Then followed these excellent directions (with occasional hiccups and faint-hearted spells) to make the change. See my shaking hands in this pic:
SSD.jpg
Needed to adjust partition sizes afterwards.

Display

MX Tweak > Config Options, check to “Use Intel driver...” and reboot

Sound

The problem is that often only the HDMI output is listed. Enter BIOS > System Configuration > Audio: click “Load defaults,” then boot back into MX and use MX Select Sound to enable “PCH” -- ADDITIONAL: this only works sporadically.
From Arch Wiki: If you are dual-booting with Windows, you will have to do a cold boot twice into Linux before to have sound working in a dual-boot config. This seems to work

Drop-down terminal

F4 is dedicated to a multimedia device playback command, but I can use the Fn key and then it toggles correctly (with Fn-F4).

Touchpad
To get the pad disabled while typing, first try the usual Xfce method: click Settings > Mouse and Touchpad. Use the pull-down menu to select the driver beginning "DLL..." and check the box to disable while typing. This box does not appear if the Synaptics driver is selected.

That did not work for me, so I wrote a tiny script following caprea's (h/t) suggestion below:

Code: Select all

#!/bin/bash

##turns off touchpad while typing##

syndaemon -i 2 -d
Made it executable, then added it to Application Autostart.

Issues

I can’t stop Xfce Terminal from popping up on login, clearing Sessions in the Xfce settings doesn’t work.Well it now seems to work. Yeah!

Resources

Re: MX-17.1 on Dell XPS 13

Posted: Sat Oct 20, 2018 9:00 pm
by Stevo
Does the keyboard disabler in touchpad-indicator have the same problem as the XFCE disabler?

Re: MX-17.1 on Dell XPS 13

Posted: Sat Oct 20, 2018 9:26 pm
by Gordon Cooper
Impressive Jerry. Was a bit surprised that there was no comment about precautions against static electricty. I had similar Grub trouble when
setting up a Dell desktop using Win 7 for dual boot. Used Puppy to make Grub the grub file and place it on the MBR. Puppy's Grub4dos utility
includes a space for a Windows operating system even if you do not have Win installed.

Re: MX-17.1 on Dell XPS 13

Posted: Sat Oct 20, 2018 9:38 pm
by Jerry3904
Stevo wrote: Sat Oct 20, 2018 9:00 pm Does the keyboard disabler in touchpad-indicator have the same problem as the XFCE disabler?
Not sure what the question means...

Re: MX-17.1 on Dell XPS 13

Posted: Sun Oct 21, 2018 4:03 am
by chrispop99
I won a used XPS 13 on eBay for a good price recently. It's a previous generation 9394 model, with Core i7/8GB RAM/256GB SSD. I don't need Windows on it, so swapped out the SSD to retain the Windows install in case I get rid of the laptop.

Unfortunately it has the QHD touchscreen, with a resolution of 3200x1800. Whilst this looks great on Windows, with scaling of 2.5x, I've struggled to get it to look good with all software. I gave up on scaling in the end, and instead run it with HD resolution - 1920x1080. It's not a perfect solution, but it still looks pretty good.

I wish I could have found one with an HD screen, but still with the Core i7/8GB RAM specification. I looked on eBay for a long time, and didn't see one, let alone at a price I wanted to pay.

Chris

Re: MX-17.1 on Dell XPS 13

Posted: Sun Oct 21, 2018 11:08 am
by Old Giza
I can’t get the touchpad disabled when typing, Xfce settings don’t work.
Does XFCE just do the same things as "synclient TouchpadOff=1" from command line? If not, might be worth a try.

(Also, I think Stevo is referring to touchpad-indicator package available in Synaptic.)

Re: MX-17.1 on Dell XPS 13

Posted: Sun Oct 21, 2018 11:31 am
by Jerry3904
That command does toggle it off and on, thanks. Now just need to figure out a launcher to do that.

Re: MX-17.1 on Dell XPS 13

Posted: Sun Oct 21, 2018 11:55 am
by Jerry3904
I found a script that promises to toggle the touchpad, but it doesn't seem to work:

Code: Select all

#!/bin/bash

read TPdevice <<< $( xinput | sed -nre '/Touchpad/s/.*id=([0-9]*).*/\1/p' )
state=$( xinput list-props "$TPdevice" | grep "Device Enabled" | grep -o "[01]$" )

if [ "$state" -eq '1' ];then
    xinput --disable "$TPdevice" && notify-send -i emblem-nowrite "Touchpad" "Disabled"
    yad --info --text "Touchpad DISABLED" --timeout=2/code]
else
    xinput --enable "$TPdevice" && notify-send -i input-touchpad "Touchpad" "Enabled"
    yad -info --text "Touchpad ENABLED" --timeout=2 to
fi
It is promising, though, so I'm hoping someone might have a correction/alteration.

Re: MX-17.1 on Dell XPS 13

Posted: Sun Oct 21, 2018 12:11 pm
by clicktician
Jerry3904 wrote: Sun Oct 21, 2018 11:31 am That command does toggle it off and on, thanks. Now just need to figure out a launcher to do that.
It'd be really cool to have it triggered by the USB event so the touchpad shuts off when the mouse is present and turns back on when it's not.

Re: MX-17.1 on Dell XPS 13

Posted: Sun Oct 21, 2018 1:24 pm
by caprea
If you want to disable the touchpad only while typing on the keyboard, you could also try syndaemon
syndaemon -i 1 -d
The one is one second locking time
Possible to put it into startup,

Re: MX-17.1 on Dell XPS 13

Posted: Sun Oct 21, 2018 1:32 pm
by dolphin_oracle
try this

toggle-touchpad.sh (make executable)

Code: Select all

#!/bin/bash

#toggle touchpad on and off

STATUS=$(synclient |grep TouchpadOff |cut -d= -f2)

RET=$(echo $STATUS)

case $RET in

    0)  synclient TouchpadOff=1
        notify-send "Touchpad Off"
        ;;

    1)  synclient Touchpadoff=0
        notify-send "Touchpad On"
        ;;

esac


exit 0

Re: MX-17.1 on Dell XPS 13

Posted: Sun Oct 21, 2018 2:41 pm
by Jerry3904
Thanks, I will try that when I get home.

Re: MX-17.1 on Dell XPS 13

Posted: Sun Oct 21, 2018 2:47 pm
by Stevo
clicktician wrote: Sun Oct 21, 2018 12:11 pm
Jerry3904 wrote: Sun Oct 21, 2018 11:31 am That command does toggle it off and on, thanks. Now just need to figure out a launcher to do that.
It'd be really cool to have it triggered by the USB event so the touchpad shuts off when the mouse is present and turns back on when it's not.
For what it's worth, touchpad-indicator (provided by the touchpad-indicator package) also has an option for that, and also sets itself up to autostart.

Re: MX-17.1 on Dell XPS 13

Posted: Sun Oct 21, 2018 3:01 pm
by Jerry3904
I installed that, then launched it but nothing happened. Should try again

Code: Select all

$ /opt/extras.ubuntu.com/touchpad-indicator/bin/touchpad-indicator
/opt/extras.ubuntu.com/touchpad-indicator/bin/touchpad-indicator:29: PyGIWarning: Notify was imported without specifying a version first. Use gi.require_version('Notify', '0.7') before import to ensure that the right version gets loaded.
  from gi.repository import Notify
<gettext.GNUTranslations object at 0x7fdf65555978>
/opt/extras.ubuntu.com/touchpad-indicator/share/touchpad-indicator/touchpad_indicator.py:30: PyGIWarning: AppIndicator3 was imported without specifying a version first. Use gi.require_version('AppIndicator3', '0.1') before import to ensure that the right version gets loaded.
  from gi.repository import AppIndicator3 as appindicator
#####################################################
No LSB modules are available.
#####################################################
Distributor ID:	MX
Description:	MX 17 Horizon
Release:	17
Codename:	Horizon
Version:	x86_64
#####################################################

Touchpad-Indicator version: 1.1.0-1mx17+1-src
#####################################################
pidof syndaemon

Re: MX-17.1 on Dell XPS 13

Posted: Sun Oct 21, 2018 3:10 pm
by Stevo
Hmmm....a little touchpad icon is supposed to pop up in the system tray.

Re: MX-17.1 on Dell XPS 13

Posted: Sun Oct 21, 2018 3:34 pm
by Jerry3904
It did, but only registered disable and never changed

BTW: I have this working correctly now. It turned out that there are two drivers for the touchpad
touchpad.png
The DLL one alone had a box to disable pad while typing, so I enabled it there and it worked. Thanks for everybody's help.

Re: MX-17.1 on Dell XPS 13

Posted: Sun Oct 21, 2018 5:16 pm
by clicktician
Stevo wrote: Sun Oct 21, 2018 2:47 pm For what it's worth, touchpad-indicator (provided by the touchpad-indicator package) also has an option for that, and also sets itself up to autostart.
Wow, man. Thanks for turning me on to touchpad-indicator. Works great.

Re: MX-17.1 on Dell XPS 13

Posted: Fri Oct 26, 2018 8:13 am
by Jerry3904
caprea wrote: Sun Oct 21, 2018 1:24 pm If you want to disable the touchpad only while typing on the keyboard, you could also try syndaemon
syndaemon -i 1 -d
The one is one second locking time
Possible to put it into startup,
I ended up using this, as other solutions seemed unreliable. Thanks.

Re: MX-17.1 on Dell XPS 13

Posted: Sun Oct 28, 2018 12:00 pm
by Jerry3904
I installed the liquorix 4.18 kernel from Package Installer in an effort to iron out some bumps, and was very happy to see the OS boot up to the desktop without a twitch. Anything else I need to install to go along with it?

Re: MX-17.1 on Dell XPS 13

Posted: Sun Oct 28, 2018 12:36 pm
by fehlix
Jerry3904 wrote: Sun Oct 28, 2018 12:00 pm Anything else ...
Yes. As you mentioned having issues with grub, would you mind to run

Code: Select all

sudo update-grub
And post any error message if any.
Background: I'm about hunting for a bug within uefi-grub, which might be the cause for not generating a proper grub-menu within UEFI booted MX (and also with MX installer/MX Boot repair). At least I can reproduce the bug within my UEFI environment, but would like to have further confirmation before report and provide a potential fix.
Thanks
fehlix

Re: MX-17.1 on Dell XPS 13

Posted: Sun Oct 28, 2018 12:47 pm
by Jerry3904
Pfeifend sauber:

Code: Select all

$ sudo update-grub
[sudo] password for jb: 
Generating grub configuration file ...
using custom appearance settings
Found background image: /usr/share/backgrounds/MXLinux/grub/MX-Gold1080P.png
Found linux image: /boot/vmlinuz-4.18.0-14.1-liquorix-amd64
Found initrd image: /boot/initrd.img-4.18.0-14.1-liquorix-amd64
Found linux image: /boot/vmlinuz-4.15.0-1-amd64
Found initrd image: /boot/initrd.img-4.15.0-1-amd64
Found memtest86+ image: /boot/memtest86+.bin
Found Windows Boot Manager on /dev/sda1@/efi/Microsoft/Boot/bootmgfw.efi
done

Re: MX-17.1 on Dell XPS 13

Posted: Sun Oct 28, 2018 1:01 pm
by fehlix
Jerry3904 wrote: Sun Oct 28, 2018 12:47 pm Pfeifend sauber:

Code: Select all

$ sudo update-grub
[sudo] password for jb: 
Generating grub configuration file ...
using custom appearance settings
Found background image: /usr/share/backgrounds/MXLinux/grub/MX-Gold1080P.png
Found linux image: /boot/vmlinuz-4.18.0-14.1-liquorix-amd64
Found initrd image: /boot/initrd.img-4.18.0-14.1-liquorix-amd64
Found linux image: /boot/vmlinuz-4.15.0-1-amd64
Found initrd image: /boot/initrd.img-4.15.0-1-amd64
Found memtest86+ image: /boot/memtest86+.bin
Found Windows Boot Manager on /dev/sda1@/efi/Microsoft/Boot/bootmgfw.efi
done
Hmm, something is missing:
Can you check x-bit of/etc/grub.d/30_uefi-firmware

Code: Select all

ls -al  /etc/grub.d/30_uefi-firmware
And if unset, do

Code: Select all

sudo chmod +x /etc/grub.d/30_uefi-firmware
sudo update-grub
Reason: 30_uefi-firmware errored, in some UEFI's and would not allow to boot in into MX after installation.
Thanks

Re: MX-17.1 on Dell XPS 13

Posted: Sun Oct 28, 2018 1:11 pm
by Jerry3904

Code: Select all

-rwxr-xr-x 1 root root 1416 Oct 15 08:37 /etc/grub.d/30_uefi-firmware
Remember that I needed to use grub2dos, since no grub would launch after installation.

Re: MX-17.1 on Dell XPS 13

Posted: Sun Oct 28, 2018 1:33 pm
by fehlix
Jerry3904 wrote: Sun Oct 28, 2018 1:11 pm

Code: Select all

-rwxr-xr-x 1 root root 1416 Oct 15 08:37 /etc/grub.d/30_uefi-firmware
Remember that I needed to use grub2dos, since no grub would launch after installation.
OK, last one, would this reading of UEFI-firmware produce any value

Code: Select all

printf %x \'"$(sudo cat /sys/firmware/efi/vars/OsIndicationsSupported-8be4df61-93ca-11d2-aa0d-00e098032b8c/data | cut -b1)"

Re: MX-17.1 on Dell XPS 13

Posted: Sun Oct 28, 2018 1:36 pm
by Jerry3904

Code: Select all

$ printf %x \'"$(sudo cat /sys/firmware/efi/vars/OsIndicationsSupported-8be4df61-93ca-11d2-aa0d-00e098032b8c/data | cut -b1)"
[sudo] password for jb: 
cat: /sys/firmware/efi/vars/OsIndicationsSupported-8be4df61-93ca-11d2-aa0d-00e098032b8c/data: No such file or directory
BTW: with this kernel the laptop suspends correctly, and comes out of it with no residual problems as far as I can see.

Re: MX-17.1 on Dell XPS 13

Posted: Sun Oct 28, 2018 1:40 pm
by fehlix
Jerry3904 wrote: Sun Oct 28, 2018 1:36 pm cat: /sys/firmware/efi/vars/OsIndicationsSupported-8be4df61-93ca-11d2-aa0d-00e098032b8c/data: No such file or directory
[/code]
Ok, thanks. So the DELL UEFI-fw does not provide an option to boot into fw-setup from Grub,
and in this case was not the issue for not booting into MX in the first place.

Re: MX-17.1 on Dell XPS 13

Posted: Sun Oct 28, 2018 3:41 pm
by Stevo
Can you see any difference in the battery life between the Debian backported 4.15 kernel and the Liquorix one?

I can't really see any myself, though it's said that the Liquorix should use more power overall, due to its lower latency and because it uses cpufreq instead of p_state for CPU power control. (Install indicator-cpufreq if you want to have fine-grained control over the CPU speeds with the Liquorix kernel.)

Re: MX-17.1 on Dell XPS 13

Posted: Sun Oct 28, 2018 4:00 pm
by piperdan
Jerry3904 wrote: Fri Oct 26, 2018 8:13 am
caprea wrote: Sun Oct 21, 2018 1:24 pm If you want to disable the touchpad only while typing on the keyboard, you could also try syndaemon
syndaemon -i 1 -d
The one is one second locking time
Possible to put it into startup,
I ended up using this, as other solutions seemed unreliable. Thanks.
This has worked well for me:

Create a bash script "touchpadt.sh"

Code: Select all

cat>touchpadt.sh

Code: Select all

#!/bin/bash

read TPdevice <<< $( xinput | sed -nre '/TouchPad/s/.*id=([0-9]*).*/\1/p' )
state=$( xinput list-props "$TPdevice" | grep "Device Enabled" | grep -o "[01]$" )

if [ "$state" -eq '1' ];then
    xinput --disable "$TPdevice" && notify-send -i emblem-nowrite "Touchpad" "Disabled"
else
    xinput --enable "$TPdevice" && notify-send -i input-touchpad "Touchpad" "Enabled"
fi
Make it executable:

Code: Select all

chmod +x touchpadt.sh
I copied it over to the /usr/bin/ directory, then went to settings > keyboard > application shortcuts to create a new shortcut key that matches my keyboard for the touchpad (F5 in my case).

Re: MX-17.1 on Dell XPS 13

Posted: Sun Oct 28, 2018 4:12 pm
by fehlix
piperdan wrote: Sun Oct 28, 2018 4:00 pm This has worked well for me...
Yes, it works, if you have only one touchpad device listed by xinput. For more than one it would need to loop through those attached devices.

Re: MX-17.1 on Dell XPS 13

Posted: Sun Oct 28, 2018 4:26 pm
by Jerry3904
I finally figured out that F5 (which here means pressing Fn-F5) was already set up OOTB as a toggle for the touchpad.

Re: MX-17.1 on Dell XPS 13

Posted: Sun Oct 28, 2018 4:58 pm
by Stevo
Jerry3904 wrote: Sun Oct 28, 2018 4:26 pm I finally figured out that F5 (which here means pressing Fn-F5) was already set up OOTB as a toggle for the touchpad.
Sometimes a newer kernel gets those working when they did nothing before. Those are ACPI controlled, I'm pretty sure. The airplane mode hotkey combo on the MSI does nothing with the 4.15 kernel, but works fine with the 4.18. However, the touchpad on-off hotkey doesn't work with either, but is not necessary with touchpad-indicator working.