Automated post-install setup of Ubuntu 20.04 and 22.04 on the Framework

@CJ_Elevated has already done so!
First, download this install script -
then run
cd ./Downloads
and then
bash ./

1 Like

Thanks! But did he write that for 20.04 or 21.04. You can’t just assume something for 21.04 will work for 20.04.

̶F̶a̶i̶r̶ ̶p̶o̶i̶n̶t̶,̶ ̶b̶u̶t̶ ̶I̶ ̶r̶a̶n̶ ̶i̶t̶ ̶o̶n̶ ̶P̶o̶p̶!̶_̶O̶S̶ ̶2̶1̶.̶0̶4̶ ̶(̶a̶l̶b̶e̶i̶t̶,̶ ̶n̶o̶t̶ ̶k̶n̶o̶w̶i̶n̶g̶ ̶m̶y̶ ̶m̶i̶s̶t̶a̶k̶e̶,̶ ̶I̶ ̶a̶m̶ ̶v̶e̶r̶y̶ ̶m̶u̶c̶h̶ ̶a̶ ̶L̶i̶n̶u̶x̶ ̶n̶o̶o̶b̶)̶,̶ ̶a̶n̶d̶ ̶i̶t̶ ̶w̶o̶r̶k̶e̶d̶ ̶p̶e̶r̶f̶e̶c̶t̶l̶y̶ ̶f̶i̶n̶e̶.̶

I totally misread your reply. I thought you were TELLING me he wrote it for 20.04. He did write it for 21.04, his video can be found here.

Yep I’ve seen the video. Repos will be different between the two versions and so I don’t think we can assume this will be applicable here.

@nrp as this salt script continues to get fleshed out, could we pin this? I think MANY people would prefer using a LTS distro, and this will correctly help make the process of getting setup on their Framework much easier.

1 Like

To be clear I just added to the work of others and tweaked the script so it should work on most Ubuntu/Debian based distros. The original Debian packages were built for 20.04. I did this so I had a tool to quickly test multiple distros, however, I highly encourage anyone who is trying to build knowledge in Linux to manually work through @Brett_Kosinski solution here.


This is a good resource. Thanks! I’ll probably try to backport the Ubuntu packages from 21.04 or 21.10 first, assuming they work. Failing that it seems this would do as well.

EDIT: Scratch that, libfprint only goes to 1.90.7 in impish. Oh well, building debs or reusing the existing ones it is then.

EDIT2: Or applying the patch mentioned here atop of the Ubuntu libfprint package. That would probably be easiest and most reliable.


It uses prebuilts I grabbed from here. I couldn’t get it to work properly by just applying the patch from Fedora to libfprint atop of Ubuntu’s libfprint since fprintd also needs a patch. Instead I lazied it out and did it using the prebuilt debs. Seems to work. Unfortunately I can’t seem to edit the original post anymore to indicate that the fingerprint reader is also handled.

1 Like

I haven’t dug too deep but if I want to use your script to configure hibernation but do not want it set and suspend to RAM and the swapfile, is it possible to just leave it s2idle deep and then manually allow hibernation?

I always setup hibernation with a swap partition instead of a file. This was because adjusting a swapfile next to LUKs was an archaic mess and I didn’t even bother. So your script doing the heavy lifting there is nice!

@2disbetter just pushed an update that parametrizes the hibernate state along with a few others. You can now choose whether you want just hibernate, hybrid-sleep or suspend-then-hibernate. I made the last one the default since I think it’s the best compromise and I don’t want to think whether to hibernate or suspend. I want to close my lid and the computer to do the right thing to not waste power and not lose my data. If you want hibernate only, you can change the default by editing defaults.yaml. Documentation is in-line. Unfortunately GNOME got rid of the Hibernate option in the menu so you’d have to install an extension if you want that. So with that change, I think it will do what you want.

Overall I’m pretty happy with the way this turned out. I can roll the whole thing out on the next Framework in the family with 3 commands (which could obviously be rolled into 1 :sweat_smile:).

Idling at 4.2W. Crazy. :sweat_smile:


SO yesterday I installed Ubuntu 20.04.3. I installed Brave, and then installed Dash to Panel and Arc Menu extensions. Then I sudo apt full-update’d the thing and rebooted.

After rebooting I installed salt and downloaded your script. Ran it per the TL:DR instructions above. It had a bunch of errors and when I rebooted nothing was fixed.

Based on that lackluster description is there any reason coming to you on why it would have failed?

It’s all in the output log - what comes out in the terminal. I’ve most likely made some mistake somewhere that doesn’t take into account something. Re-run salt-call and paste the log here. Something that I haven’t mentioned is that you can re-run state.apply as may times is you like. If the changes were already done, it would do nothing.

EDIT: I ran a quick install and rolled the formula over it. I did break the AX210 state with a change yesterday as well as there’s a bug in the fingerprint state where it doesn’t install the new library because the Ubuntu version is already installed.

EDIT2: Actually no, I had a config difference in my Salt master which made the AX210 correct on mine but not on masterless machine like you’re running it. Fixed. Also I know what’s going on with the fingerprint states. I’ll fix them after work. Still if you post a log, I’ll know if anything else is broken.

As with ALL scripts you download from strangers on the Internet, instructions should really be:

  • Download script
  • Examine script so you understand what it does
  • Run script

Or words to that effect. I’m sure it’s safe, but downloading and running unknown scripts is a dicy habit to get into.

1 Like

Ideally. Which is why the instruction starts with go and read the “Get the source by downloading it” is under TL;DR. Also if you understand what it does, fix bugs and contribute. As is the case with most open source. Unfortunately that’s not an option for a lot of users as often what you download requires domain knowledge. Especially novices. :pensive:

Alright. Fixed after a bit of rework in the failing states, I’ve pushed the changes. Tested them on a different SSD with clean Ubuntu 20.04.3 install on it. It should work.

@2disbetter could you re-download and try again?

Also, idling with WD SN550 instead of SN750 and fewer running services:

1 Like

OK, tomorrow I’ll try again. I tried Fedora 35 and while it seemed to work out of the bag, I came to realize once again why I love the LTS releases the most.

Those words have come out of my mouth so many times over the years. :rofl: I think I stopped installing non-LTSes after 12.04 or 14.04.

Ok, so I’ve got Ubuntu 20.04 back on the Framework and it is all setup beside a few SSH connections I still need to add, but this time the salt script seemed to work. Of the 20 actions it was supposed to do it said that 19 were successful. I think the 1 second timeout on the grub menu is what failed. My guess is because this is a dual boot with Ubuntu installed after Windows.

As a side note for anyone trying to get hibernation working in a similar situation as me (Windows and Linux installed), you have to disable secure boot or hibernation will not be available to the kernel. Hopefully they fix that.

Not a big deal as the main reason I installed Linux was so I could have standard suspend to RAM functionality.

Thanks again for your efforts! So nice to have a LTS distro fully set up again.

1 Like

Much better. Thanks for verifying!

Interesting. I disable secure boot habitually in order to not hit any unsolved corner cases. I didn’t know that hibernation is one of those.

I do wonder how things with 20.04 are going to be handled when 22.04 LTS comes out. 22 will include power profiles and already have some battery management stuff included.

Not too worried, I’m quite comfy on 20.04.

Thanks once again for the help. I do wonder why the grub timeout failed though. Do you think it has to do with me installing Windows first on the machine, such that grub is not the only bootloader found?