Devuan on a Dell XPS 15 (9560, 2017)

I’ve  been a Linux Systems Administrator for more than two decades, and I’m intimately aware of what’s necessary to run Linux in the enterprise. I knew after the viral epidemic that is systemd, that the Linux ecosystem was inherently broken, and we needed a change.  At that point, I sought out a group of folks identifying themselves as the VUA, or Veteran Unix Administrators.  This group is vehemently opposed to systemd and began a fork of Debian without systemd, now known as Devuan (pronounced dev one.) Devuan is still in it’s infancy, only one major release under it’s belt, but it’s a massively capable server platform. My company is now running solely on Devuan Linux for all of our LAMP stack applications.  We are even using it for virtualization using vserver.  On the desktop side of things, it’s coming along quite nicely as well, but there are definitely some growing pains.  My company recently purchased a Dell XPS 15 (9560, 2017) for me, and it came with Ubuntu.  I figured it was time to “put my money where my mouth is,” and try an install of Devuan on this very new hardware that uses an NVME disk and boots via UEFI.  This is a journal of that experience.   I’m doing most of this from memory, so there may be some minor typos and/or mistakes. Feel free to reach out if something doesn’t seem correct.

To start, I had my Dell XPS 15 set to boot UEFI only with secure boot disabled, and a full DVD ISO of Devuan Linux on a 16GB thumb drive.  I downloaded the full DVD because for whatever reason, the netinstall ISO kernel could not load an effective driver for my NVME disk, nor bring any of my network devices online even though it appears it was running the same kernel as the full DVD.  With the netinstall, I could see the disk, but I could not manipulate the tables or partitions. This was alleviated using the full DVD. Full disclosure, I have no idea why it showed this behavior, they were seemingly running the same kernel.  During install, be sure to enable backports.  This will be very useful once you’re done installing and want to get some of your peripheral hardware online.

After booting to the thumb drive, I realized that although it appeared to be loading the ath10k driver module correctly, it was still not bringing my QCA6174A online.  I could see the card, it just couldn’t see any wireless networks.  I then tried to boot with a USB-C ethernet dongle, which was successfully brought online.  Once getting the ISO booted with network capabilities, I then ran the Devuan installer via “Expert Install” mode. This is not a step-by-step, but more of an overview, so the base install of Devuan is out of scope. There are a number of walk throughs for installing Devuan.  The keys here are disk partitioning and grub installation.  When you get to the disk partitioner, you need to create a 5MB grub-bios partition and a 200-500MB EFI partition in addition to your swap, root, and whatever other partitions you want to create. To do this, create the partitions and manipulate them via flags. The EFI partition has to be flagged as both EFI and bootable. Once you’ve completed this step and the base OS has been installed, it will ask if you want to install grub.  This will fail. To successfully install grub, you’ll have to do the following.  First, ctl-alt-F2 to get into a terminal, and then:

mount --bind /dev /target/dev
mount --bind /dev/pts /target/dev/pts
mount --bind /proc /target/proc
mount --bind /sys /target/sys
cp /etc/resolv.conf /target/etc
chroot /target /bin/bash

apt-get update
apt-get install grub-efi-amd64
update-grub
grub-install --target=x86_64-efi /dev/nvme0n1

This will install grub on your NVME disk and allow the OS to boot properly.  Now you can finish the installation and reboot.  After reboot, the system should come up without issue.  Now, hopefully you still have your USB-C dongle still plugged in because the wireless will still not be functional.  The ath10k module will be loaded, but it will not actually drive the Qualcomm Atheros QCA6174A wireless card in your system.  To get this functional, I had to upgrade to the backports kernel:

 apt-get install linux-image-4.9.0-0.bpo.5-amd64

Once I installed that, my wireless card was online.  Even with with the 3.16 kernel and the firmware-atheros package installed, it would not work prior to this. At this point, I have a very functional XFCE Devuan laptop.  The battery life is reasonable (5 +/- hours), and will be more so once I get these graphics issues figured out.  There was an Ubuntu based walk through for this same hardware.  You can find it here.  He installed the nvidia proprietary driver, which I’ve always had great success with, but it does not seem to help much here.  See the issues section below for what does and does not work.

Issues

Currently, I still have some issues with things we take for granted.  I will eventually debug these problems, but I just do not have the time right now. If you’ve ran into any of these, I always welcome constructive feedback.

Update

Apparently there is an issue with the libdrm-intel1 library that prevents video from working properly in the Optimus laptops.  I’m not going to go into detail here as there is an excellent write-up over at UnixMen.com.  However, to fix this, you have downgrade your libdrm files from version 2.4.58 to version 2.4.56.  You can find all ten of the files you need here.  You’ll have to install the packages and then mark them to be held.

Issues:

  • suspend/hibernate – does not work
    • acpid seems to be sending the correct messages, but the system just doesn’t seem to listen.
  • graphics – Intel with Nvidia 3D
    • This system has the hyrid graphics with both the base Intel card and the Nvidia 3D accelerator.  In Ubuntu, this worked like a champ with the nvidia 384 driver , but not so much in Devuan. The proprietary driver installs and drives 3D function, but that is the extent of it. I’ve also tested with nvidiafb and nouveau, but get all the same issues.
    • screen brightness +/- does not work with function keys. Again, this is a situation where acpid is sending the signal, but the kernel and/or driver module just isn’t listening.  I assume this is a driver issue.
    • HDMI is completely non-functioning.  When I plug an HDMI device it, it doesn’t even register with the kernel.  No dmesg, no syslog.   This may be a simple fix, it may not be.  Again, I’ll need time to debug all of this, but I’m covered at the moment with my paying job.  My initial though is that this is another driver issue.  I’ll update when I know more.

Conclusion

In conclusion, I now have a fully-functional, systemd-free, daily-use laptop.  I hope to get some of these graphics issues worked out.  I can live without suspend and/or hibernate, but I really need to be able to send video to a second screen via the HDMI port.  This is mostly so I can do sales demos.  Additionally, the screen brightness issue will significantly impact my daily work and battery life, so it’s going to be a top priority as well.  I hope this is useful to someone out there.  Until next time.

2 thoughts on “Devuan on a Dell XPS 15 (9560, 2017)

  1. Hi Mark,
    What I was thinking, is it possible to run `startx` with `optirun` and send the output to the external display over HDMI?

    And what you think about UEFI? Good or Bad? Was it necessary?

    Did you tried to lower the display brightness through the /sys/class/backlight/ interface?

    • In general, I think UEFI is horrid. I understand whey they migrated away from BIOS, but UEFI is a poor design and an even worse application. It’s nearly as bad as systemd. As far as the optimus setup goes, to applications, it doesn’t present my discrete or integrated video cards at all. Applications see a VMWare card. It’s strange. I will experiment with your suggestion running startx with optirun. However, currently, I need to roll back some of my libs. If you look at this blog:

      https://www.unixmen.com/how-to-make-nvidia-optimus-technology-work-properly-on-debian/

      You’ll see that there is an inherent flaw with the libdrm* version 2.4.58 in Debian, which is where Devuan gets all of it’s packages that don’t rely on systemd. They need to be rolled back to 2.4.56, but I cannot find these packages. I can download the Ubuntu versions, but it will break my apt. We, as in the Devuan team, will be releasing version 2.0.0 in the next couple months. I will upgrade. Hopefully there will be less conflicts with new lib versions. However, if I can find the necessary packages, I will experiment with you suggestion. Also, your write-up on the optimus configuration was awesome. Thanks for the great work.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s