Zum Inhalt

rephlex.de Posts

Asus ZenBook 13 (UX331UN) with Ubuntu: Battery drain while in suspend

When i got my shiny new ZenBook 13 UX331UN in July, i immediately wiped it and installed Ubuntu 18.04 (Bionic Beaver).

But I soon realized something was wrong with suspend: The laptop would go to sleep and over night the battery would either almost (10-ish percent) or completely drain, leaving the laptop completely powered off.

On other laptops the suspend state would eat about 5% charge per day, leaving you able to suspend around 3 weeks in theory, but something was using the battery in suspend here.

Here’s the problem analysis:

Suspend your laptop. Wake it up again. Now check the output of

sudo journalctl | grep „PM: suspend“ | tail -2

May 13 18:41:00 mex kernel: PM: suspend entry (s2idle)
May 13 20:52:36 mex kernel: PM: suspend exit

If you end up with 

Your laptop is only entering „s2idle“ sleep (which is basicallynot saving much more than with blanking out screen and disabling the network). What we really want instead is the „deep“ sleep.

You can also check

cat /sys/power/mem_sleep

which yields

[ s2idle] deep

meaning the s2idle state is active in standby, because it’s written in brackets.

The permanent fix:

Edit your grub bootloader config to add a parameter to your Linux kernel when it boots. Type

sudo gedit /etc/default/grub

and replace the line GRUB_CMDLINE_LINUX_DEFAULT=“quiet splash“ with

GRUB_CMDLINE_LINUX_DEFAULT=“quiet splash mem_sleep_default=deep“

Save the file and exit. Now run

sudo update-grub && sudo reboot

To apply the changes and reboot. Test. Done.

IMPORTANT: If you now have troble waking your laptop up, DO NOT USE THE NVIDIA DRIVERS. They suck. Use noveau.

EDIT: The above works and is tested, but i now have the problem that the laptop won’t resume when on battery. When it’s on power supply it can resume. Any ideas!?

EDIT: You’re  not alone: https://bugzilla.kernel.org/show_bug.cgi?id=201307 and https://askubuntu.com/questions/1071855/ubuntu-18-04-does-not-wake-up-from-suspend-on-asus-zenbook


Proxmox: “ perl: warning: Setting locale failed.“

If you run Proxmox and run into

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = „en_US.utf8“
are supported and installed on your system.
perl: warning: Falling back to the standard locale („C“).

here’s your solution:

export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
dpkg-reconfigure locales -u

Leave a Comment

my PS1

export PS1=“\[\033[38;5;11m\]\u\[$(tput sgr0)\]\[\033[38;5;15m\]@\h:\[$(tput sgr0)\]\[\033[38;5;6m\][\w]:\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]“


and it looks like this:

Leave a Comment

Spacewalk Client for Ubuntu 18.04 / bionic

You have to roll your own:

for shizzle in \
bionic/apt-spacewalk \
bionic/python-ethtool \
bionic/rhn-client-tools \
bionic/rhnlib \
bionic/rhnsd \
; do
cd $shizzle && debuild -uc -us ; \
cd ../../

I uploaded some binary packages (.deb) which work for me ™:


(This was originally uploaded for https://www.redhat.com/archives/spacewalk-list/2018-May/msg00009.html )

EDIT: If you are missing dependencies, use packages from artful




Exchange MoveRequest – REALLY FAST, ignore „stalled due to disk latency“

If you want to ignore Exchange stalling on your moverequest slow source/destination servers:

Get-MailboxDatabase „ex2013-db01“ | Get-Mailbox | select -first 5 | New-MoveRequest -TargetDatabase ex2016-db01 -BatchName gna -Priority Highest

Monitor with:

get-moverequest | get-moverequeststatistics

When they’re all Completed, cleanup

get-moverequest | remove-moverequest

Then repeat from step 1.


Leave a Comment

Example Netplan dual stack network configuration for Ubuntu 18.04

(08-15 example) srv01 ~ # cat /etc/netplan/01-netcfg.yaml 
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
  version: 2
  renderer: networkd
      addresses: [, "2a02:708:xx:xx::2/64"]
      gateway6: 2a02:708:xx:xx::1
        addresses: [, "2001:4860:4860::8888"]
      addresses: []

to apply the settings, use

netplan apply

to list your network interfaces (and their names) use

ip addr
Leave a Comment

DisplayLink-Driver / i-teck Docking Station Driver for Debian and Ubuntu

Long story short:


local mirror here (dated 2018/03/13)

See it in Action:

root@nb-fpanzer:~# ./displaylink-debian.sh

————————— displaylink-debian —————————-

DisplayLink driver installer for Debian based Linux distributions:

* Debian GNU/Linux
* Ubuntu
* Elementary OS
* Linux Mint
* Kali Linux
* Deepin



Select a key: [i/u/r/q]: I


Checking dependencies

unzip is installed
linux-headers-4.15.0-10-generic is installed
dkms is installed
lsb-release is installed
dpkg-query: Paket »linux-source« ist nicht installiert und es ist keine Information verfügbar
Verwenden Sie dpkg –info (= dpkg-deb –info) zum Untersuchen von Archiven
und dpkg –contents (= dpkg-deb –contents) zum Auflisten ihres Inhalts.
linux-source not found! Install? [Y/n] Y
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen…. Fertig
Die folgenden zusätzlichen Pakete werden installiert:
Vorgeschlagene Pakete:
libncurses-dev | ncurses-dev kernel-package libqt3-dev
Die folgenden NEUEN Pakete werden installiert:
linux-source linux-source-4.15.0
0 aktualisiert, 2 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
Es müssen 129 MB an Archiven heruntergeladen werden.
Nach dieser Operation werden 144 MB Plattenplatz zusätzlich benutzt.
Möchten Sie fortfahren? [J/n] J
Holen:1 http://de.archive.ubuntu.com/ubuntu bionic/main amd64 linux-source-4.15.0 all 4.15.0-10.11 [129 MB]
Holen:2 http://de.archive.ubuntu.com/ubuntu bionic/main amd64 linux-source all [2.272 B]
Es wurden 129 MB in 30 s geholt (4.278 kB/s).
Vormals nicht ausgewähltes Paket linux-source-4.15.0 wird gewählt.
(Lese Datenbank … 288228 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von …/linux-source-4.15.0_4.15.0-10.11_all.deb …
Entpacken von linux-source-4.15.0 (4.15.0-10.11) …
Vormals nicht ausgewähltes Paket linux-source wird gewählt.
Vorbereitung zum Entpacken von …/linux-source_4. …
Entpacken von linux-source ( …
linux-source-4.15.0 (4.15.0-10.11) wird eingerichtet …
linux-source ( wird eingerichtet …

Platform requirements satisfied, proceeding …


Please read the Software License Agreement
available at http://www.displaylink.com/downloads/file?id=1123
and accept here: [Y]es or [N]o: Y

Downloading DisplayLink Ubuntu driver:

–2018-03-13 15:55:17– http://www.displaylink.com/downloads/file?id=1123
Auflösen des Hostnamens www.displaylink.com (www.displaylink.com)…,,, …
Verbindungsaufbau zu www.displaylink.com (www.displaylink.com)||:80 … verbunden.
HTTP-Anforderung gesendet, auf Antwort wird gewartet … 303 See Other
Platz: http://assets.displaylink.com/live/downloads/software/f1123_DisplayLink%20USB%20Graphics%20Software%20for%20Ubuntu%204.2.zip?AWSAccessKeyId=AKIAJHGQWPVXWHEDJUEA&Expires=1520953530&Signature=NCBPWabnNZOkbSctW5sv5a4ksAE%3D [folgend]
–2018-03-13 15:55:17– http://assets.displaylink.com/live/downloads/software/f1123_DisplayLink%20USB%20Graphics%20Software%20for%20Ubuntu%204.2.zip?AWSAccessKeyId=AKIAJHGQWPVXWHEDJUEA&Expires=1520953530&Signature=NCBPWabnNZOkbSctW5sv5a4ksAE%3D
Auflösen des Hostnamens assets.displaylink.com (assets.displaylink.com)…
Verbindungsaufbau zu assets.displaylink.com (assets.displaylink.com)||:80 … verbunden.
HTTP-Anforderung gesendet, auf Antwort wird gewartet … 200 OK
Länge: 14112877 (13M) [application/octet-stream]
Wird in »DisplayLink_Ubuntu_4.2.zip« gespeichert.

DisplayLink_Ubuntu_4.2.zip 100%[===================================================================================================================================>] 13,46M 3,70MB/s in 3,7s

2018-03-13 15:55:21 (3,62 MB/s) – »DisplayLink_Ubuntu_4.2.zip« gespeichert [14112877/14112877]


Preparing for install

Archive: DisplayLink_Ubuntu_4.2.zip
inflating: 4.2/displaylink-driver-4.2.29.run
inflating: 4.2/LICENSE
creating: 4.2/__MACOSX/
inflating: 4.2/__MACOSX/._LICENSE
Creating directory displaylink-driver-4.2.29
Verifying archive integrity… 100% All good.
Uncompressing DisplayLink Linux Driver 4.2.29 100%

## NO suitable EVDI source found ##


Installing driver version: 4.2

DisplayLink Linux Software 4.2.29 install script called: install
Distribution discovered: Ubuntu Bionic Beaver (development branch)
Configuring EVDI DKMS module
Registering EVDI kernel module with DKMS
Building EVDI kernel module with DKMS
Installing EVDI kernel module to kernel tree
EVDI kernel module built successfully
Installing x64-ubuntu-1604/DisplayLinkManager
Installing libraries
Installing firmware packages
Installing licence file
Adding udev rule for DisplayLink DL-3xxx/5xxx devices

Please read the FAQ


Performing post install steps

Created symlink /etc/systemd/system/multi-user.target.wants/dlm.service → /lib/systemd/system/dlm.service.


Performing clean-up
Removing redundant: „DisplayLink_Ubuntu_4.2.zip“ file
Removing redundant: „4.2“ directory


Install complete, please reboot to apply the changes