Debian testing on the Framework Laptop

preparation

i recommend updating to the latest BIOS before installing debian, as the BIOS update will overwrite your EFI boot list.

installation

download the latest testing iso with nonfree firmware (needed for wireless to work) from here: https://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/weekly-builds/amd64/iso-cd/firmware-testing-amd64-netinst.iso – at the time of this writing, the weekly-live-builds were not detecting the AX210 wireless card correctly (possibly due to the AX210 bluetooth regression in some kernels).

write the iso to a medium of your choice. i use “Popsicle” available on Flathub for this step. etcher and dd should also work fine. insert the medium into your laptop and power on. i used an old USB-A flash drive and plugged that into a USB-A expansion port.

follow the prompts and perform an installation as you normally would. i tend to use most defaults and encrypted LVM with the exception of removing the swap partition and expanding the root volume group to use the entire disk.

keep the installation medium around, as you will need it in order to recover your boot menu after installing BIOS updates via EFI.

first boot

on first boot, most things are working correctly: mouse, keyboard, function/media keys, touchpad, microphone, camera, USB-C alt mode, various USB peripherals. so far nothing out of the ordinary.

i turned off automatic brightness correction as it was a bit abrupt.

setup sudo and install a few essential packages:

$ su -
Password:
# adduser <user> sudo
# apt install -y vim screen curl

package management

i like to use a rolling testing rather than pinning to a single release (such as bookworm). this provides much more up to date packages than stable.

however, there are risks with testing, as it receives security updates considerably later than both stable and unstable.

you can work around this by following https://gist.github.com/khimaros/21db936fa7885360f7bfe7f116b78daf – this will use debsecan to automatically pull security updates from unstable if needed.

if you follow the instructions above, you can install firefox from unstable rather than using the extended support release. this will track the upstream releases pretty closely:

# apt install firefox
# apt purge --autoremove firefox-esr

bios updates

you can check the version of your BIOS with dmidecode -s bios-version

you can prevent EFI var deletion from breaking boot when you update the firmware by running grub-install --removable. this should only need to be done once.

follow Linux (beta) instructions for installing the BIOS updates from EFI: Framework Laptop BIOS and Driver Releases

fixing bootloader

if you have performed a firmware update without installing grub in removable mode (see above), you can still recover your installation.

boot from your original installation media and choose Advanced Options -> Rescue Mode from the boot menu.

follow the prompts. decrypt your drive if needed, choose yes to mounting the separate /boot and /boot/efi partitions. select “Rebuild GRUB Bootloader” and when prompted for a device enter /dev/nvme0. finally, choose “Reboot”.

fingerprint reader

install required packages:

# apt install fprintd libpam-fprintd

you can configure fingerprints via the Users section of GNOME settings or you can enroll with sudo fprintd-enroll $USER

power management

by default, the laptop will not enter S3 sleep.

you can enable it temporarily with echo deep > /sys/power/mem_sleep and verify that it behaves correctly. if you don’t have any problems, you can enable permanently by creating /etc/default/grub.d/sleep.cfg with the following contents:

GRUB_CMDLINE_LINUX_DEFAULT="${GRUB_CMDLINE_LINUX_DEFAULT} mem_sleep_default=deep"

and then running update-grub and rebooting

NOTE: some have reported resume issues with specific SSDs. i have had success with the WD850 (1TB). however, i did run into an issue with the trackpad which I was able to workaround by disabling PS/2 emulation in the BIOS.

tweaks

if you would like to use fractional scaling, enable experimental support in mutter:

$ gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']"

after you log out/in you can then visit Settings → Display for the new scaling options. i find that 125% is just about right with default font sizes. see also: HiDPI - ArchWiki

if you want to use the same fractional DPI for gdm, you’ll need to run the following commands:

# su - Debian-gdm -s /bin/sh -c "export \`dbus-launch\`; gsettings set org.gnome.mutter experimental-settings \"['scale-monitor-framebuffer']\"; kill \$DBUS_SESSION_BUS_PID"
# cp ~youruser/.config/monitors.xml ~Debian-gdm/.config/
# chown Debian-gdm:Debian-gdm ~Debian-gdm/.config/monitors.xml

set your system-wide default background/theme:

# update-alternatives --set desktop-theme /usr/share/desktop-base/futureprototype-theme

note: sometimes grub backgrounds will not work correctly with luks encrypted lvm root partitions: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1004514

this should not be necessary, but the easiest way to work around this bug is to cp /usr/share/images/desktop-base/desktop-grub.png /boot/grub/desktop-grub.png and create /etc/default/grub.d/background.cfg with the following contents:

GRUB_BACKGROUND="/boot/grub/desktop-grub.png"

if you’d prefer a plain black background, clear dconf key /org/gnome/desktop/background/picture-uri and set /org/gnome/desktop/background/primary-color to #000000 (or your color of choice)

i tend to prefer setting the application theme to Adwaita-Dark. you can set this in the Tweaks app. there are also ways to make this default for all users by editing the relevant dconf-defaults files.

if you prefer to invert your trackpack scroll direction, you can disable natural scrolling in the Mouse settings.

enable splash screen during boot (bootsplash):

# apt install -y plymouth plymouth-themes
# plymouth-set-default-theme --rebuild-initrd futureprototype

add the following to /etc/default/grub.d/splash.cfg:

GRUB_CMDLINE_LINUX_DEFAULT="${GRUB_CMDLINE_LINUX_DEFAULT} splash"

update the grub config:

# update-grub

you can disable the logo on gdm add the following to /usr/share/gdm/dconf/99-local-settings:

[org/gnome/login-screen]
logo=''

embedded controller

fetch fw-ectool from the github repo and build the ectool utility. you will need to disable secure boot in order to access and write to the EC.

3 Likes

this might be a duplicate, but also a valuable addition to this thread:
Setting up Debian sid on the Framework
what do you think about merging the threads?

EDIT: my bad, i thought testing and unstable were the same thing

I renamed this thread’s title “Debian testing (rolling release)” to “Debian testing on the Framework Laptop” to align other distro threads on “Linux” category. I also wanted to emphasize this thread is for testing branch but not for unstable (sid) branch for now.

For the 3 kind of branches, unstable (sid), testing and stable branches, you can see the following documents.

If you think one thread to manage both unstable (sid) and testing branches are enough, I am happy to see this thread to be merged to above “Setting up Debian sid on the Framework” thread (now the title was renamed to “Debian unstable (sid) on the Framework Laptop”).

Debian people, what do you think?

1 Like

@junaruga – thank you. is there any way for me to continue editing this? i was planning to add some details about deep sleep here but can’t seem to edit any longer.

1 Like

We can ask @nrp to add the wiki function to this thread. My guess is when Framework people changed the thread’s category systematically recently, they didn’t change the owner info of the thread properly. As a result, you cannot edit your 1st content on this thread any more, even when you are the owner of the thread.

1 Like

Restoring the EFI entries is as easy as running these from live boot:

mount /dev/<rootpart> /mnt
mount /dev/<efipart> /mnt/boot/efi
for i in /dev /sys /proc; do mount --bind $i /mnt$i; done
chroot /mnt
sudo grub-install
sudo update-grub

for anybody wanting to upgrade BIOS after installing any linux distro.

I have made the first post a wiki. Let us know if you would like to merge threads.

2 Likes

Just installed debian testing on my new framework, on dual-boot with windows (still need it at tax time, sigh…). My main difficulty was not realizing that windows does not properly turn the wireless card off when restarting, which means it does not get recognized by the netinstall software. One needs a real shutdown + power-on. Or better, make windows behave, following en:users:drivers:iwlwifi [Linux Wireless]

@khimaros - beyond the wireless issue mentioned above, another issue worth discussing in your list on top may be that the problems with overly large power drain after S2idle can be solved with a kernel parameter – see Linux battery life tuning - #156 by technical27

1 Like