Dell XPS 15 with Fedora Linux

Fedora Linux on Dell XPS 15

Using Fedora Linux with Dell XPS 15 with 4k display

Dmitry Safonov
8 min readMay 5, 2020

--

I have used Dell XPS 15 and Fedora Linux for software development for about 5 months already, and it’s seems like a good combination. There were some pitfalls, however, which took some time to handle. They are covered below.

Specs

Laptop: Dell XPS 7590 4k\i9–9980HK\32Gb RAM\1Tb SSD
Dock station: Dell WD19TB
External monitor: Dell UltraSharp U2718Q UHD 27"

Why Fedora

I needed a Linux system. Previously I was using Ubuntu LTS with Cinnamon desktop environment and was happy with it, but there were reports of Wi-Fi problems with XPS 15 7590 Killer Wi-Fi adapter in Ubuntu, so I searched for a distribution which moves faster with kernel upgrades, and ended up with Fedora 31. This great article convinced me that Fedora is a viable option, and helped me a lot with further configuration.

NVIDIA Drivers

This Dell XPS 15 is an optimus laptop which uses both embedded Intel GPU and discrete GeForce GTX 1650 GPU for rendering. It appears that there are several ways to setup proprietary NVIDIA drivers to make use of discrete GPU. In the end I went with packages from RPM Fusion project. Project site provides instructions on how to enable the RPM Fusion repository and install the drivers, and there is some useful info about optimus as well. In short:

  • adding the repository for rpmfusion:
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
  • installing driver packages:
sudo dnf install akmod-nvidia
sudo dnf install xorg-x11-drv-nvidia-cuda
  • reboot and test the drivers:
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxinfo | grep vendor

The above should output something like this if NVIDIA drivers were successfully installed:

server glx vendor string: NVIDIA Corporation
client glx vendor string: NVIDIA Corporation
OpenGL vendor string: NVIDIA Corporation

Actually,

__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia <some-program>

is a simple way to force rendering of a program on GPU.

WD19TB Dock Station

After checking various reviews of the dock stations for Dell XPS I decided to go for thunderbolt station WD19TB, which works perfectly. It was recognized out of the box, but at first I was unable to connect some devices (e.g. USB Ethernet adapter) through dock station’s USB ports. It turned out that there is some kind of security check for devices being connected through thunderbolt. Ideally OS should have shown me a confirmation dialog on first connection attempt, but there was none. Luckily BIOS provides an option to disable thunderbolt security checks, which allowed to connect all necessary devices.

Desktop Environment

As stated earlier, I used a Cinnamon desktop environment before, and I was totally happy with it. Luckily, it can be installed to Fedora without any troubles. But there were some unexpected troubles to make Thunderbird (an email app which I prefer to use) correctly hide to the system tray. See below.

Getting Thunderbird to Hide into System Tray

UPD: I’ve found a better option: https://github.com/gyunaev/birdtray
Long story short:

  • if you have Thunderbird installed by package manager, remove it;
  • find a Thunderbird 60.8.0.x rpm binary somewhere on the internet (the version is really important);
  • manually install that version by
sudo rpm -Uvh <thunderbird-rpm-package>
  • configure the dnf package manager not to update thunderbird by adding a line exclude=thunderbird into [main] section of /etc/dnf/dnf.conf;
  • get a patched FireTray extension from here;
  • install the extension into Thunderbird using “Install addon from file” method;
  • restart the Thunderbird;
  • enjoy.

Here is a little background. Thunderbird does not support working with system tray out of the box, so many people used an addon called FireTray for this. It went out of support some time ago, but there were people who made necessary patches to make it compatible with newer Thunderbird versions. Unfortunately, at some point of time it became too hard to keep up with Thunderbird updates, probably due to some additional security limitations for addons introduced in newer versions. So it is required to get an older Thunderbird version and appropriate FireTray addon version to make hiding Thunderbird to system tray work. Maybe there are other solutions, but I didn’t notice them.

Fractional Scaling in Cinnamon Desktop Environment

At the moment Cinnamon supports only 2x scaling for Hi Dpi displays. 2x scaling is fine when I work only with my laptop screen. But when I use both 27-inch external monitor as main screen and laptop as secondary, I want something like 1.5 scaling on external monitor to fit more content, and 2.5 scaling on laptop screen because it is located relatively far from me and I want bigger fonts.

This article from Arch Linux wiki helped me to find a solution for this, though it’s not perfect. The idea is to use xrandr functionality to virtually change the display size for rendering, and then scale the rendered image to the physical screen. I came up with the following scale factors to achieve my requirements:

xrandr --output DP-1–1–1 --scale 1.26x1.26
xrandr --output eDP-1–1 --scale 0.72x0.72

where DP-1–1–1 is identifier for my exteral monitor, and eDP-1–1 is my laptop screen.

  • A little tip: after changing the scale you may face some visual artifacts which can be eliminated by resetting the Cinnamon: open “Run command” dialog using Alt+R and then type r and press enter.

The are two drawbacks with this solution:

  1. Scaling have some negative effects on picture quality, but to me it seems negligible.
  2. I noticed a clearly recognizable lags when moving windows around the desktop with enabled scaling (can be solved).

Problem 2 was solved by making an Nvidia GPU used by default (remember, Dell XPS 7590 uses optimus technology which enables discrete GPU only when requested to save power). The increased power consumption is not a problem for me. Using Nvidia by default can be achieved by creating (or editing) a file /etc/X11/xorg.conf.d/nvidia.conf with the following content:

#This file is provided by xorg-x11-drv-nvidia
#Do not edit
Section "OutputClass"
Identifier "nvidia"
MatchDriver "nvidia-drm"
Driver "nvidia"
Option "AllowEmptyInitialConfiguration"
Option "SLI" "Auto"
Option "BaseMosaic" "on"
Option "PrimaryGPU" "yes"
EndSection
Section "ServerLayout"
Identifier "layout"
Option "AllowNVIDIAGPUScreens"
EndSection

The important part here is Option "PrimaryGPU" "yes"

Unnatural Colors

UPD: the real reason behind unnatural colors was that wide gamut display of Dell XPS 15 requires color correctly present common content designer for sRGB color space, see https://dmitry-s-safonov.medium.com/full-screen-color-correction-in-linux-f2925be58f97

Out of the box the colors on laptop screen where very unnatural compared to the external display and a retina MacBook Pro which I also have. Display was “yellowish”. I don’t have a color calibrator myself, so I searched icc color profiles for Dell XPS 15 4k on the internet with the hope that some of them will fit me. Color profiles are easy to install with “Color” program available by default. None of found profiles gave the desired results, but some made the picture subjectively better, and I only wanted the same but with slightly colder color temperature.

Redshift software helped me to solve this. Normally it is used to change the color temperature of the display depending on a day time, but I just provided equal settings for day and night color temperature in ~/.conifg/redshift.conf:

[redshift]
; Set the day and night screen temperatures
temp-day=6750
temp-night=6750
location-provider=manual
transition=0
[manual]
lat=53.44
lon=59.05

With this I finally started to love my laptop screen. It’s truly great, but only when you put some effort in it.

Touchpad Gestures in Linux

I have a MacBook Pro as well, and to me the touchpad experience on a MacBook is very nice. I especially got used to switching the virtual desktops by three-finger swipe. I wanted this on a Dell laptop as well. Libinput-Gestures helped me to get this whith the following configuration in ~/.config/libinput-gestures.conf:

gesture swipe left _internal ws_up
gesture swipe right _internal ws_down
gesture swipe up xdotool key ctrl+alt+Up
gesture swipe down xdotool key ctrl+alt+Up

Heating Problem

Overheating and throttling under heavy load is a common problem for relatively small laptops, Dell XPS 15 with core i9 is no exception and can get really hot under load. To help this somehow, I slightly undervolted it with intel-undervolt (a warning: read the Disclaimer for inter-undervolt, undervolting may get the system unstable or damage it). I came up with the following settings in /etc/intel-undervolt.conf:

# Enable or Disable Triggers (elogind)
# Usage: enable [yes/no]
enable no# CPU Undervolting
# Usage: undervolt ${index} ${display_name} ${undervolt_value}
# Example: undervolt 2 'CPU Cache' -25.84
undervolt 0 'CPU' -110
undervolt 1 'GPU' -110
undervolt 2 'CPU Cache' -110
undervolt 3 'System Agent' 0
undervolt 4 'Analog I/O' 0
# Critical Temperature Offset Alteration
# Usage: tjoffset ${temperature_offset}
tjoffset 15
balance_performance# Daemon Update Interval
# Usage: interval ${interval_in_milliseconds}
interval 5000# Daemon Actions
# Usage: daemon action[:option...]
# Actions: undervolt, power, tjoffset
# Options: once
daemon undervolt:once
daemon power
daemon tjoffset

Please note the line tjoffset 15. It alters the CPU critical temperature (the temperature at which CPU starts to run slower in order not to overheat). By default critical temperature seems to be 100 degrees celsius. tjoffset 15 makes it 85 degrees. Decreasing critical temperature makes the laptop a bit slower, e.g. for one of my java projects it increases full compilation time from 3:30 (min:sec) to 4:15, but without limiting the temperature keyboard may get really hot under frequent heavy load, which is uncomfortable. Performance penalty can be seen only in long running heavy tasks which I don’t do too often. And when I absolutely want the fastest performance, I temporarily change the tjoffset value in /etc/intel-undervolt.conf to zero and use sudo intel-undervolt apply

Turn off Wi-Fi When Ethernet is Plugged

I can connect to corporate network through both wi-fi and ethernet cable, which is connected to the dock. I prefer ethernet connection when I’m at my desk, but when I’m off the desk, I obviously need wi-fi. So I wanted my laptop to automatically use ethernet when it is available and wi-fi when it is not. The easiest solution that I’ve found is to disable the wi-fi when ehternet is connected and enable when it is not using this helpful answer from Super User portal. I created a file /etc/NetworkManager/dispatcher.d/99-wlan with the following content:

#!/bin/bashif [[ "$1" == "ens1u2u4" ]] ; then
case "$2" in
up)
nmcli radio wifi off
;;
down)
nmcli radio wifi on
;;
esac
fi

where ens1u2u4 is the identifier of ethernet adpter in a dock station, and it worked perfectly

Experimenting with LG Ultrafine 5K Display (partially works)

A little bit off-topic here, but just for the record: I had a chance to try the LG Ultrafine 5K Display with my laptop. The display was recognized automatically and worked when connected to thunderbolt port, but only in 4K mode. I didn’t manage to get 5K mode working, the best I could get is some form of corrupted image as reported in this freedesktop bug.

Gaming

I tried to run some games under wine as well. Some games that I tried did not run on vanilla wine, and then I discovered a Lutris project, which managed to get them running. One interesting observation is that FPS seems to be 10–15% higher when using “Windowed mode (virtual desktop)” option in Lutris “Runner options”. I didn’t perform thorough verification of this however, so this may be just my impression.

Conclusion

After fixing some troubles the combination of Dell XPS 15 7590 4K + Fedora Linux 31 + Cinnamon Desktop are working really nice together and look great. I hope that provided information will help someone to save a bit of time during setup and configuration.

--

--

Dmitry Safonov
0 Followers

Software engineer, IT enthusiast