Note: I Recommend System76 PopOS 20.04 which is based on Ubuntu 20.04
, you will find my other repo that describe the experience and fix any issues.
How to install Ubuntu on a Dell XPS 15 OLED 7590 model from 2019?
This page will explain how to fix a number of issues with Ubuntu 18.04, Ubuntu 19.10 and Ubuntu 20.04.
Note: the power management for the latest CPU generation works better on Ubuntu 19.10 and Ubuntu 20.04, which means very high power consumption and a CPU permanently at the thermal limit on older Ubuntu versions, but can be controlled with CPU Power Management solution below.
Problems addressed are:
- Killer Wifi driver
- CPU power management
- Changing brightness of OLED screen with brightness keys
- Suspend Draining battery fast
-
Download Ubuntu 18.04, Ubuntu 19.10 or Ubuntu 20.04.
-
Create Bootable usb stick using
Rufus
on Windows orStartup Disk Creator
on Ubuntu -
Change
SATA Mode
insideBIOS(UEFI)
fromRAID on
toAHCI
, this is done by:Power up
your machine then clickf12
, choiceBOIS Configurations
. -
Restart your machine then click
f12
again, then choice to boot from the usb stick. -
Follow Ubuntu installation window.
Note 1: It is recommended to also install 3rd party software for which your laptop needs to be connected to the internet. Wifi will not be available, Just use your phone tethering for now. will fix this issue later.
Note 2: After installation, in case of you didn't disable secure boot, the first restart you will see a blue window for
MOK Management
just choiceenroll
-
After the installation is complete, run
sudo apt update sudo apt dist-upgrade -y
to update the system to the latest versions.
Note: laptop will reboot at the end. so save your important work
- Open a terminal
- Run
cd /path/to/repo/dir/
- Run
sudo make
sudo make
+ one of the below- all (default). Note: laptop will reboot at the end. so save your important work
- uninstall Note: laptop will reboot at the end. so save your important work
- oled_xrandr_install
- oled_xrandr_uninstall
- oled_icc_install Note: require manual reboot or login again
- oled_icc_uninstall
- wifi_install Note: laptop will reboot at the end. so save your important work
- wifi_uninstall Note: laptop will reboot at the end. so save your important work
- power_management_install
- power_management_uninstall
- suspend_install
- suspend_uninstall
You can't live with out wifi. but the diver repo is missing so we are going to fix this now.
Note: When useing option install third party
on the installation process this solution won't be neccessery. but if you still don't have wifi then continue
Just run this commands and the issue will be fixed for you. Note: laptop will reboot at the end. so save your important work
- Open a terminal
- Run
cd /path/to/repo/dir/
- Run
sudo make wifi_install
we are going to add the right repo, so we are able to install the wifi driver. this is based on Killer Wifi Website. again just use your phone tethering for now until we install the driver.
- Open a terminal
- Run
sudo add-apt-repository ppa:canonical-hwe-team/backport-iwlwifi
- Run
sudo apt-get update
- Run
sudo apt-get install backport-iwlwifi-dkms
- Run
reboot
sudo make wifi_install
sudo make wifi_uninstall
Without further configuration the CPU will run quite hot and will quickly drain the battery. We are going to Install:
- Open a terminal
- Run
cd /path/to/repo/dir/
- Run
sudo make power_management_install
-
Open a terminal
-
Run
sudo apt install -y powertop thermald tlp
-
Run
sudo powertop
-
Click
Shift+TAB
to navigate to Tunables -
Click
Enter
on theBad
to change toGood
Probably not all of them have a big effect, I have not tried, but the processor related points are absolutely required. However, these changes are not permanent and will be reset at reboot. Instead let us create a service that will change these settings at boot time. The script and setup are taken from here.
-
Run below command to create a service file called
powertop.service
at/etc/systemd/system/
cat << EOF | sudo tee /etc/systemd/system/powertop.service [Unit] Description=PowerTOP auto tune [Service] Type=idle Environment="TERM=dumb" ExecStart=/usr/sbin/powertop --auto-tune [Install] WantedBy=multi-user.target EOF
-
Run below command to enable the service at boot time
sudo systemctl daemon-reload sudo systemctl enable powertop.service
-
Run
sudo tlp start
sudo make power_management_install
sudo make power_management_uninstall
When pressing the function keys to change the screen brightness, you will see the Ubuntu brightness icon and its brightness bar changing. However, the brightness of the screen will not change. Apparently, Ubuntu tries to change the background brightness of the screen. Since OLED screens do not have a background illumination, nothing happens. This is undesirable. Not only will the screen often be too bright, it will also age the display faster.
Note: That OLED displays only consume energy and age when the individual pixels are emitting light. Hence, it is advisable to choose dark background colors and install a dark scheme in your browser.
- Open a terminal
- Run
cd /path/to/repo/dir/
- Run
sudo make oled_xrandr_install
It is possible to change the brightness of the screen from the command line via.
xrandr --output $(xrandr --listmonitors | awk '$1 == "0:" {print $4}') --brightness 0.6
But you will need to change it from the command line every time.
Note: brightness range is between 0 and 1.
Careful: 0 is black and black on OLED displays is really all black.
The function keys can be used to change brightness. (Idea Taking from Lenovo Thinkpad), then the script is tweaked a little bit.
-
We are going to create 2 listeners for function keys brightness up and down.
- Open a terminal window
- Run below command to create a file (brightness up listener) called
dell-oled-brightness-up
inside/etc/acpi/events/
cat << EOF | sudo tee /etc/acpi/events/dell-oled-brightness-up event=video/brightnessup BRTUP 00000086 00000000 action=/etc/acpi/dell-oled-brightness.sh up EOF
- Run below command to create a file (brightness down listener) called
dell-oled-brightness-down
inside/etc/acpi/events/
.cat << EOF | sudo tee /etc/acpi/events/dell-oled-brightness-down event=video/brightnessdown BRTDN 00000087 00000000 action=/etc/acpi/dell-oled-brightness.sh down EOF
-
We are going to create an event handler.
- Open a terminal window
- Run below command to create a file called
dell-oled-brightness.sh
inside/etc/acpi/
.cat << EOF | sudo tee /etc/acpi/dell-oled-brightness.sh #!/bin/bash DISPLAYNAME=`xrandr --listmonitors | awk '$1 == "0:" {print $4}'` MIN=0 MAX=1 CURRENT_OLED_BRIGHTNESS=`xrandr --verbose | grep -m 1 -i brightness | cut -f2 -d ' '` CURRENT_INTEL_BRIGHTNESS=`cat /sys/class/backlight/intel_backlight/actual_brightness` MAX_INTEL_BRIGHTNESS=`cat /sys/class/backlight/intel_backlight/max_brightness` CURR_INTEL=`LC_ALL=C /usr/bin/printf "%.*f" 1 $CURRENT_INTEL_BRIGHTNESS` MAX_INTEL=`LC_ALL=C /usr/bin/printf "%.*f" 1 $MAX_INTEL_BRIGHTNESS` VAL=`echo "scale=2; $CURR_INTEL/$MAX_INTEL" | bc` if (( `echo "$VAL < $MIN" | bc -l` )); then VAL=$MIN elif (( `echo "$VAL > $MAX" | bc -l` )); then VAL=$MAX fi #set oled brightness to the caluclated value `xrandr --output $DISPLAYNAME --brightness $VAL` 2>&1 >/dev/null | logger -t oled-brightness logger -t OLED_XRANDR_BRIGHTNESS "CURRENT BRIGHTNESS: $VAL" EOF
- Give the file
excute
permission via.sudo chmod u+x /etc/acpi/dell-oled-brightness.sh
sudo make oled_xrandr_install
sudo make oled_xrandr_uninstall
script is taking from a different project just merged his code to this project to make it easy to use either ways
- Open a terminal
- Run
cd /path/to/repo/dir/
- Run
sudo make oled_icc_install
- Reboot your machine or Login again
sudo make oled_icc_install
sudo make oled_icc_uninstall
By default, the very inefficient s2idle
suspend variant is incorrectly selected. This is probably due to the BIOS. The much more efficient deep
variant should be selected instead.
- Open a terminal window
- Run
cd /path/to/repo/dir/
- Run
sudo make suspend_install
It is possible to change the suspend mode from the command line via.
echo deep| tee /sys/power/mem_sleep
- Open a terminal window
- Run
sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="[^"]*/& mem_sleep_default=deep/' /etc/default/grub
- Run
update-grub
sudo make suspend_install
sudo make suspend_uninstall
- system-monitor (gnome extention)
- CPU Power Manager (gnome extention)