Debian 11 on the Tuxedo Aura 15 Gen1 laptop

Buying a laptop from Tuxedo Computers

I upgraded to a laptop from Tuxedo Computers (german page). The nice thing about Tuxedo Computers is that

  • they provide GNU/Linux support for new hardware
  • they let you customise the laptop (e.g. CPU, SSD size, RAM configuration, keyboard layout)
  • the laptops are repairable/upgradeable
  • the laptops come with 2 years warranty

Also note that Tuxedo Computers are now a KDE patron.

I chose the Tuxedo Aura 15 Gen1 (german page) with an AMD Ryzen 7 4700U CPU and an AMD Radeon RX Vega 7 GPU. I selected the laptop because of

  • a keyboard with a number pad and backlight
  • 15.6 inch display
  • 8 core, 8 threads AMD CPU using only 15W power
  • no proprietary NVidia graphics drivers

It is recommended when choosing the RAM to use a multi-channel configuration for better performance. Also make sure to order enough RAM because some of it is used by the integrated graphics card. Finally doing parallelized builds on many cores requires more memory.

Note that there also is the Tuxedo Pulse 15 Gen1 which comes with a 8 core 16 threads AMD Ryzen 7 4800H. Also the Tuxedo Aura 15 Gen2 is due to arrive in April and also comes with 16 threads.

Here is an in-depth review in German language (and here is a shorter review). Also there is a Youtube video review in English below:

Installing Debian 11

On Reddit I got helpful information from Ferdinand from Tuxedo Computers on how to install Debian 11 on the Aura 15 Gen1. Also see Debian Wiki for some information. Debian is not supported by Tuxedo Computers but it works nonetheless on a Tuxedo Aura 15 Gen1. I followed the following steps (no warranty) to get Debian 11 running:

  • Download the latest Debian 11 unofficial image including non-free firmware and create a bootable USB stick using Rufus for example. The unofficial image comes with proprietary firmware for the AMD GPU and for the Wifi adapter.
  • Boot with the USB stick plugged in, press F7 and select the USB stick.
  • You need to plug in the network cable for installing the updates. The Wifi adapter is recognized but doesn't work during installation.
  • The Debian installer lets you choose which desktop (I chose KDE here).
  • After installation you need to comment out the cdrom entries in /etc/apt/sources.list.

Installing Tuxedo packages and other packages

  • You then need to add the Tuxedo package repository (see here for more information):
sudo nano /etc/apt/sources.list.d/tuxedocomputers.list
# Enter "deb https://deb.tuxedocomputers.com/ubuntu focal main" and save.
wget -O - https://deb.tuxedocomputers.com/0x54840598.pub.asc | sudo apt-key add -
sudo apt-get update

Then a few more tweaks:

  • I installed plasma-browser-integration and the corresponding browser addon (available for Firefox and Chrome/Chromium)
  • I installed ffmpegthumbs and kdegraphics-thumbnailers and then enabled the thumbnail generators in the Dolphin settings
  • I installed bleachbit and run it to clean up unused disk space

Finally you can list the installed packages on an old system to install them on the new machine. I.e. you can run the following command on the old machine:

echo aptitude install `aptitude search '!~M ~i' -F '%p'` > install.sh

Then you copy the resulting file install.sh to the target machine and run

sh ./install.sh

Enjoy!

Updates

  • Had to edit 40-libinput.conf to get touchpad tapping to work
  • Tuxedocomputers also gives you 10GByte of space on their Nextcloud server which you can mount using davfs2
  • Press F2 to enter the BIOS; press F7 to select the boot device
  • If you want to set up a Windows/Linux dual-boot (using Grub) you need to disable Bitlocker encryption
  • If you want to mount an NTFS partition you need to disable fast boot on Windows
  • The BIOS supports Flexicharger which lets you set charge limits to extend battery life
  • You can also set the keyboard backlight color using webketje/tuxedo-backlight-control

SpaceX Crew Dragon paper model

Sometime ago I discovered the AXM Paper Space Scale Models website. On the website Alfonso X Moreno published various paper scale models of the Space Shuttle, the ISS, the Tiangong, SpaceX Starship, and others.

I downloaded the SpaceX Crew Dragon paper model and I donated a bit of money for it. I used pdftk to split the PDF document into single- and double-sided jobs. Then I used doxdirect.com to get it printed, because they offer printing on 160gsm paper (normal office paper is only 80gsm and is not strong enough).

I couldn't find instructions on the website on how to build the docking version of the paper model. Finally I found an instructional video on Youtube:

Here is the finished Crew Dragon capsule (I will do the service module later).

I can really recommend to check out AXM's website if you are into paper models.

Enjoy and Merry Christmas!

Creating harmonica tabs with Lilypond

I play a bit of music using a Hohner Special 20 bluesharp. However I am not quick enough at reading sheet music, so I need to add tabs. Tabs basically tell you the number of the hole to play and whether to blow or draw (-). Lilypond is a concise programming language to generate sheet music. It turns out, that it is very easy to add lyrics using Lilypond. By putting the tabs in double quotes it is possible to add the tabs to the music. I found the tune Hard Times on the Internet and I used Lilypond to create a version with tabs. Here is the Lilypond code:

\version "2.22.0"
\header {
  title = "Hard Times"
  composer = "Stephen Foster"
  instrument = "Bluesharp"
}
\relative {
  r2 c'4 d
  e2 e4 d
  e8 g4.~ g4 e
  d4 c c d8 c
  e2 c'4 a
  g2 e8 c4.
  d4. c8 e4 d
  c1~
  c2 c4 d
  e2 e4 d
  e8 g4.~ g4 e
  d4 c c d8 c
  e2 c'4 a
  g2 e8 c4.
  d4. c8 e4 d
  c1~
  c2 e4 f4
  g2. g4
  g2 f4 g4
  a1
  g2 r2
  c2 a8 g4.
  e2 d8 c4.
  d4. c8 d4 e
  d2 c4 d
  e2 e4 d
  e8 g4.~ g4 e
  d4 c c d8 c
  e2 c'4 a
  g2 e8 c4.
  d4. c8 e4 d
  c1~
  c4 r4 r2
}

\addlyrics {
  "4" "-4" "5" "5" "-4" "5" "6" "5" "-4" "4" "4" "-4" "4" "5" "7" "-6" "6" "5" "4" "-4" "4" "5" "-4" "4"
  "4" "-4" "5" "5" "-4" "5" "6" "5" "-4" "4" "4" "-4" "4" "5" "7" "-6" "6" "5" "4" "-4" "4" "5" "-4" "4"
  "5" "-5" "6" "6" "6" "-5" "6" "-6" "6" "7" "-6" "6" "5" "-4" "4" "-4" "4" "-4" "5" "-4"
  "4" "-4" "5" "5" "-4" "5" "6" "5" "-4" "4" "4" "-4" "4" "5" "7" "-6" "6" "5" "4" "-4" "4" "5" "-4" "4"
}

Here is the output generated by Lilypond. Notice how the tabs and the notes are aligned to each other. You can click on the image to open the PDF file.

Hard Times music sheet

By the way, I can really recommend to sign up for David Barrett's harmonica videos to learn tongue blocking which is essential to play single notes as in this example.

Enjoy!

Update:

I added harmonica tabs for Silent Night:

Silent Night

Reversed-Z Rendering in OpenGL

By default the OpenGL 3D normalized device coordinates (NDC) are between -1 and +1. x is from left to right and y is from bottom to top of the screen while the z-axis is pointing into the screen.

normalized device coordinates

Usually the 3D camera coordinates of the object are mapped such that near coordinates are mapped to -1 and far values are mapped to +1. The near and far plane define the nearest and farthest point visualized by the rendering pipeline.

The absolute accuracy of floating point values is highest when the values are near zero. This leads to the depth accuracy to be highest somewhere between the near and far plane which is suboptimal.

A better solution is to map near coordinates to 1 and far coordinates to 0. In this case the higher precision near zero is used to compensate for the large range of distances covered towards the far plane.

zero to one mapping

Fortunately OpenGL 4.5 provides a way to perform reversed-z rendering:

using 0 to 1 z values

Let x, y, z, 1 be the homogeneous coordinate of the 3D point and x', y', z', w' the homogeneous NDC. Normally the 3D point uses a right-handed coordinate system where the z-axis points out of the screen.

frustum

This means that x and y are projected using negative z, i.e. w' = -z.

The camera projection equations are x'/w' = fw x/-z and y'/w' = fh y/-z.

Substituting w' = -z we get x' = fw x and y' = fh y.

Setting z' = a + b z we get the following matrix equation:

When z = -near, we want z'/w' = 1.

When z = -far, we want z'/w' = 0.

For z = -near we get: z' = w' => a + b z = -z => a - b near = near.

For z = -far we get: z' = 0 => a + b z = 0 => a - b far = 0 <=> b = a / far.

Substituting b we get: a - a near / far = near <=> a = near far / (far - near)

This means b = a / far = near / (far - near).

I.e. we get:

and

Finally we set fw = 1 / tan(fov / 2) where fov is the horizontal field of view angle (e.g. 60 degrees in radians).

fh then needs to be chosen such that fh / fw = w / h, where w and h are the width and height of the screen.

Installing Debian 11 (bullseye) on a physical machine

This is a summary on how to install Debian on a physical machine (as opposed to a VM).

I installed Debian 11 with KDE desktop on my HP 255 G3 notebook.

Because my computer has an AMD GPU it is recommended to download the unofficial Debian image with firmware. The unofficial image also helps with Wireless adapters which frequently require proprietary firmware. I downloaded the image which is 4 GByte in size and wrote it to a USB stick:

sudo dd if=firmware-11.0.0-amd64-DVD-1.iso of=/dev/sdb

Replace /dev/sdb with your correct USB location! You can see the location in the log (run sudo dmesg) after plugging it in. Under Windows you can use a tool such as Rufus to create a bootable USB stick.

I usually create a list of packages of my current system so that I can later install the same packages on the new system.

aptitude search '!~M ~i' -F '%p' > install.txt

I rebooted the computer. My laptop uses UEFI secure boot so you need to press Escape and then F9 to get a list of bootable devices. The Debian installer image on the USB stick should show up in the list. Select it and press return. I proceeded to use the graphical installer.

The Debian installer can shrink Windows partitions if you want to set up dual boot. Note that you need to disable Windows fast startup, otherwise your Windows file system will be in a hibernated state.

On my machine I created a swap partition about the same size as the computer memory. I already have a 16 GByte root (/) ext4 partition (should be a bit bigger ideally) and a large home (/home) ext4 partition. I just format the root partition and simply mount the home partition without formatting. After setting up the users I can already continue using the system.

I noticed that even the unofficial image is missing some firmware. So I cloned the Linux firmware repository and copied the firmware files:

git clone --depth 1 https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
cd linux-firmware
sudo make install

I then proceeded with the instructions on how to set up Plymouth boot splash.

Furthermore I added deb-multimedia.org to the package sources and updated the multimedia software.

Finally a few more tweaks:

  • I installed plasma-browser-integration and the corresponding browser addon (available for Firefox and Chrome/Chromium)
  • I installed ffmpegthumbs and kdegraphics-thumbnailers and then enabled the thumbnail generators in the Dolphin settings
  • I installed bleachbit and run it to clean up unused disk space
  • You can reduce the system swappiness to 10
  • In the BIOS I was able to change the order of the UEFI boot files so that Debian/Grub is started by default

I hope this installation summary is useful to you! Enjoy!