Dell XPS 15 9560 and MX 18

Message
Author
fladd
Posts: 57
Joined: Thu Mar 24, 2016 6:24 pm

Dell XPS 15 9560 and MX 18

#1 Post by fladd »

I am a bit sad to say this, but trying to use MX 18 on a Dell XPS 15 9560 over the last couple of days has probably been the worst Linux experience I had in the last 15 years.

This post is meant as both feedback, as well as information for new users who might have the same laptop. The Dell XPS 15 9560 is a rather popular laptop. Ubuntu and Arch (and possibly other Linux distributions) seem to run fine on it. Unfortunately, it does not work properly with MX 18, though. Here is a list of things I observed:

1. [FIX] There are a couple of things that need to be done before Linux can even be booted (this is not specific to MX):
  • UEFI: Secure boot needs to be turned off
  • UEFI: SATA Mode needs to be set from the default "RAID" to "AHCI"
  • The Nouveau drivers will not work with this machine and one has to add the following boot parameters in grub:

    Code: Select all

    nouveau.modeset=0
2. [FIX] Since the open Nouveau drivers do not work, and MX will hence only use the integrated Intel card (while the Nvida one is still on and uses battery), one needs to install the proprietary Nvidia drivers. Using MX tools to install them, however, will result in a kernel panic after reboot: viewtopic.php?f=104&t=47928
The kernel panic can be fixed by adding the following boot parameters in grub (using MX Tools --> Maintenance --> Boot Options):

Code: Select all

acpi_osi=! acpi_osi='Windows 2009'
The machine will now boot, with the Intel card activated, and the Nvidia card deactivated.
If you are interested in also using the Nvidia card for some applications with 'primusrun', then you will need to apply a hack to prevent another bug (https://bugs.debian.org/cgi-bin/bugrepo ... bug=876033):
  • In /etc/environment add

    Code: Select all

    __GLVND_DISALLOW_PATCHING=1
  • In /etc/bumblebee/bumblebee.conf, change the library path to

    Code: Select all

    LibraryPath=/usr/lib/x86_64-linux-gnu:/usr/lib/i386-linux-gnu
After sourcing /etc/environment 'primusrun' should work.

3. [FIX] Scrolling in Firefox results in graphic glitches.
The solution is to set "Use Intel driver [...]" in MX Tewak (MX Tools --> Setup --> Tweak --> Config Options)

4. [FIX] Sometimes (randomly, around 50% of the times), the system freezes when shutting down: viewtopic.php?f=104&t=47927
This seems to have been fixed with the acpi boot parameters from issue 2 above.

5. [FIX] The display brightness buttons might work.
This is also related to the acpi boot parameters. If you have used MX Tools --> Maintenance --> Boot Options for any other changes after the acpi_osi settings when fixing issue 2 above, then this tool will have removed the single quotes in acpi_osi='Windows 2009'". Either make sure you re-add them ever time you use the tool, or just edit the grub config file manually and update grub afterwards (like in the fix for the following issue 6).

6. [FIX] Waking up from hibernation does not work with encrypted swap: viewtopic.php?f=104&t=47905
The way MX decrypts the swap partition does not allow for suspending from the encrypted swap, because swap is encrypted too late to be seen as a resume device (see also https://gist.github.com/HacKanCuBa/b856 ... 75ee836857). This can be fixed by decrypting via initramfs rather than via crypttab:
  • Adapt '/etc/initramfs-tools/conf.d/resume' to read

    Code: Select all

    RESUME=/dev/mapper/swapfs
  • In '/etc/crypttab' comment out the line that starts with "swapfs"
  • Create the file '/etc/initramfs-tools/hooks/cp_passdev' with the following content:

    Code: Select all

    #!/bin/sh
    
    PREREQ=""
    prereqs()
    {
       echo "$PREREQ"
    }
    
    case $1 in
    prereqs)
       prereqs
       exit 0
       ;;
    esac
    
    . /usr/share/initramfs-tools/hook-functions
    # Begin real processing below this line
    
    copy_exec /lib/cryptsetup/scripts/passdev /lib/cryptsetup/scripts/ >&2
  • Make the file executable by running the following in a terminal:

    Code: Select all

    sudo chmod a+x /etc/initramfs-tools/hooks/cp_passdev
  • Add the following boot parameters to ''GRUB_CMDLINE_LINUX_DEFAULT' in '/etc/defaults/grub':

    Code: Select all

    resume=/dev/mapper/swapfs cryptopts=source=/dev/<ROOT-PARTITION>,target=rootfs cryptopts=source=/dev/<SWAP-PARTITION>,target=swapfs,keyscript=/lib/cryptsetup/scripts/passdev,key=/dev/mapper/rootfs:/root/keyfile
    Replace <ROOT-PARTITION> and <SWAP-PARTITION> with the correct partitions.
  • Update grub and initramfs by running the following in a terminal:

    Code: Select all

    sudo update-grub && sudo update-initramfs -u -k all
Hibernation should now work.
If you are also interested in having the machine do Hybrid Sleep whenever you close the lid (like it behaves under Windows; i.e. it hibernates but then suspends, so in case you run out of battery while on suspend, the machine can resume from the hibernation when you have power again):
  • Create the file '/etc/acpi/lid.sh' with the following content:

    Code: Select all

    #!/bin/sh
    grep -q close /proc/acpi/button/lid/*/state
    if [ $? = 0 ]; then
        pm-suspend-hybrid
    fi
  • Make the script executable by running the following in a terminal:

    Code: Select all

    sudo chmod a+x /etc/acpi/lid.sh
  • Create the file '/etc/acpi/events/lm_lid' with the following content:

    Code: Select all

    event=button/lid.*
    action=/etc/acpi/lid.sh
  • Restart ACPI by running the following in a terminal:

    Code: Select all

    sudo /etc/init.d/acpid restart
Closing the lid should now put the machine into Hybrid Sleep.

7. [FIX] Inverting scroll direction of the touchpad does only invert the vertical direction: viewtopic.php?f=104&t=47930
This is apparently a bug in Xfce (https://bugs.launchpad.net/ubuntu/+sour ... ug/1409347)
The easiest fix is to setup inverted scrolling manually by running the following two commands in a terminal:

Code: Select all

synclient VertScrollDelta=-46
synclient HorizScrollDelta=-46
To have them run automatically when you Xfce session starts, put each of them into Autostart (Settings-->System-->Session and Startup-->Application Autostart)

8. [WORKAROUND] When using several monitors, the monitor configuration is not remembered: viewtopic.php?f=104&t=47903
A simple workaround is to set up the monitor arrangement in a script (e.g. '~/bin/monitor_setup.sh'):

Code: Select all

#!/bin/sh

second_output="DP1-2"

if [ -n "`DISPLAY:0 xrandr | sed -n "/$second_output connected/p"`" ]; then
  DISPLAY:0 xrandr --output $second_output --pos 0x0
  DISPLAY:0 xrandr --output eDP1 --pos 1920x0
fi
This will check if a second monitor is connected on the output "DP1-2" (which is a monitor connected to a docking station; change accordingly) and then put it left to the internal monitor ("eDP1"; change positions for a different setup).
The script can then be bound to a global shortcut (Settings-->Hardware-->Keyboard-->Application Shortcuts).

9. [WORKAROUND] Sometimes (randomly), the mouse cursor becomes huge, but only in some programmes: viewtopic.php?f=104&t=47907
This seems to be related to having a second monitor connected. Setting up monitor arrangement with a script seems to solve this. If not, manipulating the cursor size setting (Settings-->Hardware-->Mouse and Touchpad-->Theme) will fix it).


There are some other things that I consider not so problematic:

- I experienced two random system freezes (or at least my mouse and keyboard were not responding anymore). This hasn't happened in a while now, though.

- MX does something with the hardware clock, since the time changes in Windows if I boot into this after installing MX (not a big issue since Windows corrects for this after a couple of minutes automatically)
Last edited by fladd on Sun Jan 20, 2019 1:43 pm, edited 13 times in total.

User avatar
Stevo
Developer
Posts: 12774
Joined: Fri Dec 15, 2006 8:07 pm

Re: Dell XPS 15 9560 and MX 18

#2 Post by Stevo »

If your laptop locks up during boot when starting the graphical display you may need to add a kernel parameter to set acpi_osi="!Windows 2015" or some variant.

This is a known ACPI problem with 2017 Dell XPS 15 and others. Refer to Bumblebee github issue #764.
Debian Bumblebee wiki.

fladd
Posts: 57
Joined: Thu Mar 24, 2016 6:24 pm

Re: Dell XPS 15 9560 and MX 18

#3 Post by fladd »

Thanks, that solved the kernel panic. There was another bug in primusrun that can be fixed with a hack. See also viewtopic.php?f=104&t=47928. I also updated the original post above with the relevant information.

fladd
Posts: 57
Joined: Thu Mar 24, 2016 6:24 pm

Re: Dell XPS 15 9560 and MX 18

#4 Post by fladd »

I found a fix for the inverted horizontal mouse scrolling, which is apparently an Xfce bug. See also viewtopic.php?f=104&t=47930. I also updated the original post above with the relevant information.

User avatar
Jerry3904
Administrator
Posts: 21881
Joined: Wed Jul 19, 2006 6:13 am

Re: Dell XPS 15 9560 and MX 18

#5 Post by Jerry3904 »

Thanks for the detailed post about the XPS 15. I had a bunch of trouble with the XPS 13 9343 that I documented in some detail, but not as much as you have had.
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox and Windows 10
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

fladd
Posts: 57
Joined: Thu Mar 24, 2016 6:24 pm

Re: Dell XPS 15 9560 and MX 18

#6 Post by fladd »

I changed some of the fixes to better versions.

fladd
Posts: 57
Joined: Thu Mar 24, 2016 6:24 pm

Re: Dell XPS 15 9560 and MX 18

#7 Post by fladd »

I updated the original post with a workaround for the monitor arrangement and some formatting.

fladd
Posts: 57
Joined: Thu Mar 24, 2016 6:24 pm

Re: Dell XPS 15 9560 and MX 18

#8 Post by fladd »

I updated the original post with a fix for the hibernation, and rearranged the issues a bit.

mg979
Posts: 29
Joined: Fri Jan 05, 2018 10:37 am

Re: Dell XPS 15 9560 and MX 18

#9 Post by mg979 »

Just FYI, I could install MX18 on a Dell laptop (G3 17) and faced similar issues but now it's working with no noticeable issues (besides some ACPI errors at boot).

I didn't try to install nvidia drivers (just using Intel card), and I had to deactivate nvidia with modprobe.blacklist=nouveau.

Maybe you're asking too much from Linux in a relatively new machine with an Nvidia card. In my laptop at least, I think the Nvidia GPU is the source of 99% of the problems, and probably I won't install the drivers. Luckily there's the Intel card so the laptop works.

User avatar
Stevo
Developer
Posts: 12774
Joined: Fri Dec 15, 2006 8:07 pm

Re: Dell XPS 15 9560 and MX 18

#10 Post by Stevo »

Other users with new G5's have got Bumblebee working, so it's not a lost cause. It also "just works" now on a MSI GP63 with similar hardware (i7-8750H and GeForce GTX 1050 Ti Mobile), so Dells do have some quirks.

Post Reply

Return to “General”