Installing Kali Linux on a Dell XPS 9550 (updated)

I’ve used Kali Linux as a daily driver on my Dell XPS 15 for most of the last year, and it works well for that purpose. There are a couple of things you need to do when setting it up to get it to run smoothly though.

Before you start

You need to change the following two settings in the BIOS. Now is a good time to set a BIOS password if you haven’t already.

  • BIOS > Secure Boot > Disabled
  • BIOS > System Configuration > SATA Operation > Switch RAID to AHCI

You can upgrade the BIOS using the boot menu and a FREEDOS-formatted usb stick with the latest firmware .EXE. Firmware versions 1.2.10 through 1.2.16 of the firmware have been associated with a series of bugs, but with December’s news about Meltdown and Spectre you will want to update to 1.6.1 or greater so that you have the mitigations for those exploits.

Installation

Install Kali Linux with a USB. I used rufus on Windows to DD a copy of the amd64 ISO directly onto the USB stick. Etcher is another fine choice. I chose to use the whole disk – I’ll virtualize Windows rather than dual boot it.

Whilst installing, you will get a request for additional firmware – brcmfmac43602-pcie.txt, which I’ve been unable to find. Some guides reference using brcmfmac43602-pcie.bin instead, but the installer doesn’t accept that in place of the .txt file. Just skip this, and wireless will work fine anyway. You may find the bluetooth doesn’t work that well – I chose to spend $15 and get an Intel AC8260 card and replaced the existing one.

After the initial installation, make sure your installation is up to date.

This will take some time, and you should reboot afterwards.

Everyday user

Some programs (VLC, Google Chrome, Visual Studio Code, etc.) object to being run as root, and I want to use different programs depending on what I’m doing, so I create a normal user for daily use.

Optimus

Since this laptop has an intel and nvidia graphics card, installing optimus will allow you to access the nvidia card for those programs that require it. Reboot after installing. In my case I had to reboot twice – it failed to boot the first time for some reason.

You will need to add your everyday user to the bumblebee group as well

Once that’s done, it’s time to update some config files. Firstly, edit /etc/bumblebee/bumblebee.conf and change line 22 from:

Then run ‘lspci | grep NVIDIA’ to get your graphics card’s BusID. Mine is:

Then edit /etc/bumblebee/xorg.conf.nvidia, uncomment the BusID line, and update it if yours is different.

This should get everything working. You can see the two cards working by running:

If you run glxgears with both, you’ll notice the performance is about the same, which isn’t right. To fix this, install VirtualGL, which has to be downloaded separately. Go to https://sourceforge.net/projects/virtualgl/files/ and download the latest amd64.deb, and install it:

After that, you can run glxgears / optirun glxgears, and you should see a noticeable difference. If you have an everyday user account you want to use in a similar fashion, you’ll need to add it to the bumblebee group. This now gives you the ability to use the nvidia card for password cracking, but note that in most cases, offloading password cracking to a cloud instance is a better approach than running it on a laptop.

Fans

So that the OS can tell the temperature it’s operating at, and control the fans, you will need to install lm-sensors, and activate them

When sensors-detect asks if you want to make changes to /etc/modules automatically, say yes. Then make sure it loads on next boot:

 

Scaling

Run the following to set precise screen dimensions:

The hidpi display is readable in its initial state, but if you prefer different settings, you can go into gnome-tweak and alter the scaling size of the font and windows.

In a similar vein, to avoid a tiny GRUB screen, edit /etc/default/grub, and add GRUB_GFXMODE=1024×768. You’ll probably also want to set the timeout to zero to make it boot faster. Once that’s done, run sudo update-grub.

You have the option of scaling QT programs, such as VLC. I personally don’t use this setting, and instead look for GTK3 software, with the knowledge that it will support scaling. You can scale QT programs by creating a script in /etc/profile.d/, called qt-hidpi.sh. In that file, put:

The results are usable, but not great. Read this article for more info.

Other Stuff

Fix smartd

smartd monitors your SMART capable devices for temperature and errors. Unfortunately, NVMe support is still experimental for smartd, so it doesn’t scan for it by default, and fails on boot. You can fix this by telling it to scan for NVMe drives by adding -d nvme to /etc/smartd.conf in the DEVICESCAN line. Make the first uncommented line in /etc/smartd.conf look like this:

Touchpad/Touchscreen Gestures

To get pinch, zoom, and other gestures working, we need to install libinput-gestures, which has some dependencies, and requires a config file.

Then you will need to switch to your everyday user account and create the following config file in  .config/libinput-gestures.conf :

Then, as your everyday user account:

Enable Printing

This requires the cups service to be installed and started:

Get rid of the On Screen Keyboard

Install this Gnome Extension: block-caribou. This is a bug, and you won’t need the extension permanently.

Save Power

First, install the following packages  tlp tlp-rdw powertop . The first two are a for a power tuning daemon for laptops. You can activate it by enabling the service:

Powertop is a power usage analyser, which will recommend settings that you can apply. Ideally you should create unit files and configuration changes for each recommendation, but for a quick and practical approach, you can have powertop make all the changes for you. Create the following file  /etc/systemd/system/powertop.service and input the following:

Then issue the following commands to let systemd see it and activate it:

And finally, confirm by running powertop that all settings are set to good by default.

With all of the above done, you should have a reasonably stable and working machine. There are still a few bugs that have been fixed upstream which will improve your experience as they come through to kali. I’ll post another update if I discover anything new worth sharing.

 

Things that don’t work

Bluetooth

First step is to install bluetooth support with apt install bluetooth and rebooting. According to this post, you also need to download the windows firmware, and copy it into /lib/firmware/brcm . Enable the bluetooth service and reboot.

After a reboot, bluetooth will somewhat work. I was able to pair with a Logitech Anywhere MX 2 mouse, and use it with a small amount of lag, but I also tried Bose Soundsport wireless headphones, and they don’t work at all. I’m ordering an Intel 9260 wireless card to see if that solves the problem.

 

References

 

1 comment

Leave a Reply