[TRACKING] 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 debian testing with automatic security updates from unstable · GitHub – 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 (11th Gen Intel® Core™)

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.

See also

4 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

1 Like

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?

2 Likes

@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

Hello from my Framework 12th Gen on Debian testing (I think)!

As soon as I booted into GNOME I got crazy graphical glitches. Wayland is used by default and X11 stabilized things a lot so I’m using that at the moment. I’d like to use Wayland.

I noticed that Settings - About - Graphics says “Software Rendering” which I’m guessing is a problem. Why is Debian not using the graphics hardware? Thank you!

I found this. I had to download a couple of missing firmware files (adlp_dmc_ver2_16.bin and adlp_guc_70.1.1.bin). I have hardware rendering and Wayland now!

1 Like

I’ve been using Xfce with Debian Testing for a couple months and just started having glitches with the trackpad and graphics under the latest kernel 6.0.0.4. If I move the cursor around for a few seconds, it will freeze and then the display will glitch/reset. Booting back to 6.0.0.2 fixes things. Anyone else seeing this? Seems like a regression, no real problems until now.

Looks like this is fixed with the latest apt upgrade. I’m guessing the newer i915/display firmware fixed it (firmware-misc-nonfree) since there wasn’t another kernel upgrade (still 6.0.0-4 / 6.0.8-1).

Report back:
I installed from Debian testing (bookworm, not rolling) from a netinst image with non-free firmware (weekly from 14th?). I ‘cc net.iso /dev/sda’ as root to a USB-A flashdrive, and booted from it.
The Debian installed picked up the wireless fine, then installed without issue. I’ve had a few minor glitches (freezing mainly) when testing Gnome Classic and Gnome Flashback, but since using Gnome “normal”, mostly fine. The screen does freeze sometimes, briefly, but then comes back after a couple of seconds or so.

Regarding brightness: I found the default automatic brightness too bright, so I worked around that by covering the light sensor, then turning off automatic brightness in Gnome. Then, to get the brightness keys to work I disabled the automatic light sensor (ALS) (put in file </etc/modprobe.d/framework-als-blacklist.conf> “blacklist hid_sensor_hub” (no quotes)), and then I /also/ had to run command “update-initramfs -u”, as just blacklisting the hid thing didn’t work.

I haven’t got around to messing with suspend yet, and can’t comment on power use at the minute. I also haven’t looked at the fingerprint reader or tested the microphone. Bluetooth works for what I tested.

Overall, most of my issues have been Gnome related (who’s stupid idea was it to make scroll, scroll the wrong way?!), rather than hardware. I haven’t messed with the default scaling, which I think is 200%.

While I’m running testing, when it goes stable, I’m staying with Bookworm.

If anyone has any questions, I’ll try to answer them.

1 Like

Just following this thread, thanks everyone.

I installed debian-bookworm-DI-alpha2-amd64-netinst.iso on my 12th gen Framework Laptop after having running Ubuntu 22.04 since October 2022. Some details:

  1. Non-graphical install
  2. Wifi identified and used for install
  3. No disk partitioning; re-used existing partitions
  4. Installed base system (no desktop, no ssh or http servers)
  5. After reboot everything worked, including wifi network connection although text size was quite small.
  6. performed apt-get update/upgrade; reboot
  7. Used tasksel to install desktop and gnome; reboot
  8. System worked as expected, including wifi network connection

However, gnome utilities for managing the wifi network report, “No Wi-Fi Adapter Found”. Which is strange since the wifi network connection is working, and has worked throughout the entire installation process.

My wifi issue is resolved. The file /etc/network/interfaces contained a block that defined a network connection for the wifi adapter. Deleting that block and rebooting resulted in the desired behavior: the usual gnome utilities for managing wifi network connections see the wifi adapter and function as desired.

I just received my DIY 12th gen i5 today, installed RAM and SSD I got separately, and installed bookworm from ISO. It worked nicely, wifi got picked up immediately, no problems to report. But after rebooting, I had very bad screen freezes. The display would freeze for 10-20 seconds at a time, keyboard and mouse would appear frozen but actually buffer input, and the screen would magically update after that long period. Input works for 5-10s, then freezes again. Obviously this made the machine unusable.
However, the strange thing is that if I played a video (like anything from YT in firefox), the screen stopped freezing.
This was on bookworm at first, then upgraded to unstable, and both had the same issue. I had upgraded BIOS to 3.06 before upgrading debian.

I’m not using wayland.

I’m using past tense because I’ve rebooted and added i915.enable_psr=0 to the kernel command line. This seems to have fixed the problem. Not sure how this is going to affect battery life, but at least I can use the computer :partying_face:

Curious to know if this is the “official” fix for such a problem or if there’s something better to do?

Hi @Laurent, great to hear that it works now with i915.enable_psr=0 as kernel paramater, so doing okay with Xorg at the moment yes? we officially support Ubuntu and Fedora for now, but inputs like yours along with OP’s guide to make debian testing workable is really appreciated. please do keep us updated.

1 Like

@Loell_Framework yes, I don’t mind missing out on wayland for now, my goal is just to have the same system as before, plain boring Debian sid, that just works :yawning_face: I’ll do more testing today with actual work and report back if I find anything useful. Thanks for being on it!