[SOLVED] Linux Mint on Framework

@dhmsjs Most of that is done automatically by the amazing 20.04 Ubuntu salt-stack script with the exception of the swapfile. Thanks for documenting the swapfile setup, I did that on my own but since it didn’t really affect usage until I wanted to use hibernate didn’t bother documenting it.

2 Likes

I just wanted to thank you for this. This is helpful for more than just Mint users, It is useful for pretty much any Debian derived distro. Using a swap file is better for a couple of reasons, and your post makes it super easy to configure for debian based distro users. Well done!!

2 Likes

Re: CUPS “server-error-internal-error” failure when trying to connect to a network printer on Linux Mint 20.3

This actually applies to Ubuntu 20.04 focal too, but I’m posting here just because, well, I’m using Mint. :slight_smile:

Got that rather unhelpful error message when trying to set up my Lexmark network printer – which installs just fine on Linux Mint 18.3.

This was a subtle one. Lots of online refs to that cryptic error message – some going all the way back to 2004 (!). Also many solutions which all come down to using the “AppSocket/HP Jet Direct” connection where you specify explicitly the printer’s IP address and port 9100. This connection method does work.

But the other options (Driverless IPP and DNS-SD) always fail with that cryptic error message.

Inspecting more detailed messages in /var/log/cups/error_log gives clues about not being able to get the ppd file from the printer itself.

Further investigations suggest the Avahi-daemon is not configured correctly to support dns-sd name resolution (e.g. when network names that have .local in the URL are used to poll the printer).

Apparently the real problem (and a solution) can be found here:
https://wiki.archlinux.org/title/avahi#systemd-resolved_prevents_nss-mdns_from_working

where it states:

nss-mdns only works if the DNS server listed in /etc/resolv.conf returns NXDOMAIN to SOA queries for the “local” domain.[1] Even if systemd-resolved is configured with MulticastDNS=no in resolved.conf(5), it will not return NXDOMAIN for these queries. See systemd issue 21659.

A solution is to use the full mdns NSS module instead of mdns_minimal and create /etc/mdns.allow to allow only the “local” domain. For example:

/etc/nsswitch.conf

hosts: mymachines mdns [NOTFOUND=return] resolve [!UNAVAIL=return] files myhostname dns

/etc/mdns.allow

.local.
.local

After editing /etc/nsswitch.conf to replace the existing “mdns4_minimal” with simply “mdns” and then creating a new /etc/mdns.allow file containing only the two lines above, the printer can now be added using all three connection options.

Note that after changing these files, each time I ran

sudo service network-manager restart

to make sure the changed files were re-read.

Renaming mdns.allow to something different restores the broken behavior, pretty much proving to me that systemd issue 21659 is the root cause of this problem.

In Ubuntu 20.04 it is identified as bug 1950850; see here for a good explanation if you care about details:

1 Like

@dhmsjs thanks for the awesome walk through!

:exclamation: Note (for future followers) that I had to add another step at the end of your process before hibernation would work for me. This is step 4 from this guide:

Namely:

RESUME_PARAMS="resume=UUID=$(findmnt / -o UUID -n) resume_offset=$(sudo filefrag -v /swapfile|awk 'NR==4{gsub(/\./,"");print $4;}') "
if grep resume /etc/default/grub>/dev/null; then echo -e "\nERROR: Hibernation already configured. Remove the existing configuration from /etc/default/grub and add these parameters instead:\n$RESUME_PARAMS";else sudo sed -i "s/GRUB_CMDLINE_LINUX_DEFAULT=\"/GRUB_CMDLINE_LINUX_DEFAULT=\"$RESUME_PARAMS/" /etc/default/grub;fi
sudo update-grub

The first step seems to circumvent the need to lookup the UUID and physical offset yourself.
The second step may throw an error, but should tell you how to resolve it (in my case, I had to change the UUID and physical offset).
After updating grub, reboot, then test to see if it hibernates (you can also ask the computer if it is able to hibernate by running busctl call org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager CanHibernate, to which it should hopefully answer “yes”).

2 Likes

How are you all getting the fingerprint reader to work out of the box? fprintd seems to see my reader okay but it doesn’t actually seem to register any of the times I touch it. I checked back through the posts I used when I originally tried to install Ubuntu last year and noticed that the Mint edge image is installing libfprint 1.90, while all of the Ubuntu fingerprint troubleshooting threads note that 1.94 is the first version that works with the Goodix reader on the Framework. Am I missing a step somewhere?

Everything else on Mint Edge is working great so far, no WiFi issues and I’m going to work on setting up hibernation tomorrow.

1 Like

There’s a giant thread here about building 1.92 from source - I’ll see if I can find it.

Here it is.

It was confirmed earlier in that thread that 1.92 was the minimum required for it to work.

1 Like

Just used the new mintupgrade script to successfully update LM 20.3 on my 11th gen Framework laptop to LM 21!

$ neofetch
             ...-:::::-...                 user@host 
          .-MMMMMMMMMMMMMMM-.              ------------------ 
      .-MMMM`..-:::::::-..`MMMM-.          OS: Linux Mint 21 x86_64 
    .:MMMM.:MMMMMMMMMMMMMMM:.MMMM:.        Host: Laptop A6 
   -MMM-M---MMMMMMMMMMMMMMMMMMM.MMM-       Kernel: 5.15.0-43-generic 
 `:MMM:MM`  :MMMM:....::-...-MMMM:MMM:`    Uptime: 3 mins 
 :MMM:MMM`  :MM:`  ``    ``  `:MMM:MMM:    Packages: 2860 (dpkg) 
.MMM.MMMM`  :MM.  -MM.  .MM-  `MMMM.MMM.   Shell: bash 5.1.16 
:MMM:MMMM`  :MM.  -MM-  .MM:  `MMMM-MMM:   Resolution: 2256x1504 
:MMM:MMMM`  :MM.  -MM-  .MM:  `MMMM:MMM:   DE: Cinnamon 
:MMM:MMMM`  :MM.  -MM-  .MM:  `MMMM-MMM:   WM: Mutter 
.MMM.MMMM`  :MM:--:MM:--:MM:  `MMMM.MMM.   WM Theme: Mint-Y 
 :MMM:MMM-  `-MMMMMMMMMMMM-`  -MMM-MMM:    Theme: Mint-Y [GTK2/3] 
  :MMM:MMM:`                `:MMM:MMM:     Icons: Mint-Y [GTK2/3] 
   .MMM.MMMM:--------------:MMMM.MMM.      Terminal: gnome-terminal 
     '-MMMM.-MMMMMMMMMMMMMMM-.MMMM-'       CPU: 11th Gen Intel i7-1165G7 (8) @  
       '.-MMMM``--:::::--``MMMM-.'         GPU: Intel TigerLake-LP GT2 [Iris Xe 
            '-MMMMMMMMMMMMM-'              Memory: 966MiB / 15787MiB 
               ``-:::::-``
                                                                  
                      

This is the first time a major upgrade did not destroy the previous installation. Usually I have to reinstall.

The tool is very thorough though. It will undo any changes you have made in /etc, uninstall any packages you have installed outside of the official repos and remove incompatible PPAs. You can tell it to ignore some packages and leave them though.

It removed the interim 5.15 kernels but installed finalized 5.15 kernels, so no real change there.

Worked well! On to my desktop!

1 Like

Same as @Fraoch my upgrade from Linux Mint 20.3 to 21 went smoothly. I was glad to see my hibernate setup survived the update process. (Hibernate writes the system state to my swap partition)

1 Like

Glad to hear it @Eph!

I did this yesterday on my much more complicated desktop and I got more experience with the migration tool. This is definitely the best migration tool they’ve ever developed and yes, I have a fully updated and fully working desktop system now.

But as I said - pay attention to 3rd party repositories, any customized files in /etc (for packages installed through the repos) and any programs you’ve installed yourself outside of the repos. It will want to uninstall all programs you’ve installed outside of the repos, downgrade any programs where you’ve installed a version more advanced than what’s in the repos, and deactivate any 3rd party repositories or PPAs not compatible with Ubuntu 22.04 “jammy” as opposed to 20.04 “focal”. If you put anything in the exclude list it will respect it, and it will keep 3rd party repos or PPAs in the sources list, just deactivated. Edit them later if you wish.

I am on Mint 21. I noticed that my display configuration is not saved after it resumes from suspend. There’s a bug report

Did anyone encounter this problem?

1 Like

I’m also experiencing this issue on Mint 21. The temporary fixed provided in the comments of that github post works well enough. The two issues I’ve experienced with it have been that if I sudo apt update && sudo apt upgrade -y it will break the fix. Second, this fix prevents my framework from booting into the desktop environment from hibernation. Hibernation works again when I remove the fix but then my fractional scaling/display config resets.

I followed your instructions here, hibernate and suspend seem to work great now (fresh install of linux mint 21 XFCE on 12th gen) , thanks for putting this together! I’m still wondering:

  • Is there a way to test if suspend-then-hibernate works? I’m super new to linux, the only thing I can think to do is suspend laptop, shut lid, wait for two hours, then check system logs
  • what part of those steps tells the system to go from suspend to hibernate after 2 hours? Is this 2 hour window configurable? I wouldn’t want to change it necessarily, just want to make sure I understand what was done

EDIT: questions above were based on my misunderstanding of what the steps in @dhmsjs 's post were accomplishing. The steps described in that post allow hibernation and suspension, and they make both options available in the power menu, but they don’t automatically activate suspend-then-hibernate, I was mixed up because suspend-then-hibernate was mentioned in this post about idle drain.

In addition to the steps in the post quoted above, I followed steps described in the top answer here to enable suspend-then-hibernate on lid close. Will test tonight when I try to benchmark the drain to make sure it works.

I’m still not quite clear on how I can set the system to use suspend-then-hibernate after inactivity, rather than just suspend, I would appreciate any advice on that.

@Devraj I don’t think I can give you a useful answer to your specific questions. I’m still on 20.3 and as far as I remember I configured my suspend/hibernation behavior entirely in the GUI (under Power Settings). If it is plugged in, then it just suspends. If it is on battery only then closing the lid hibernates immediately.

Occasionally it will do some weirdness on resume (e.g. keyboard or trackpad not working right) – particularly if I close the lid and then reopen quickly. But generally if I just force it to re-hibernate by closing the lid again, it comes back okay. Or if that doesn’t work then holding down the power button to force power off will, when I power back up, generally go through the resume from disk process. So it’s like it thinks it has powered down, but actually hasn’t completely finished the process.

@dhmsjs I had edited my comment before I saw your reply, I’m still trying to work out the best approach for my usage habits but a couple things others may find useful:

  • I was getting prompted to authenticate if I let my screen lock before the suspend time (15 minutes on my system) elapsed, following the steps in the top answer here fixed that
  • I tested out using a symlink to make my laptop always suspend-then-hibernate whenever “suspend” is selected in the power-manager GUI as described here. This doesn’t fully fit my usecase as I would like to only suspend-then-hibernate when using battery power and just suspend when on AC power, but it works, in case it helps anyone else

Update: Linux Mint 21.1 “Vera” was released today.

Our friend @Matt_Hartley indicates it runs fine even when it was in beta.

Update instructions from 21.0 should be out in a few days. Usually these upgrades are easy.

2 Likes

Yep, we were testing it early so it would be ready come release day.

2 Likes

Just installed Mint today (system info hidden below) and after following all the steps in the guide, I got a login loop with fingerprint reader.

Since the logs mentioned in the tutorial were no help, I looked online and found this post on the mint forums suggesting this was related with home folder encryption.

Re-installed mint without Home folder encryption and fingerprint scanner now works for login!

Not a permanent fix for some, but I hope that might help those who don’t require home folder encryption.

Full System Info

System:
Kernel: 5.15.0-56-generic x86_64 bits: 64 compiler: gcc v: 11.3.0 Desktop: Cinnamon 5.6.5
tk: GTK 3.24.33 wm: muffin dm: LightDM Distro: Linux Mint 21.1 Vera base: Ubuntu 22.04 jammy
Machine:
Type: Laptop System: Framework product: Laptop (12th Gen Intel Core) v: A6
serial:
Mobo: Framework model: FRANMACP06 v: A6 serial: UEFI: INSYDE v: 03.05
date: 08/23/2022
Battery:
ID-1: BAT1 charge: 39.1 Wh (71.4%) condition: 54.8/55.0 Wh (99.7%) volts: 15.9 min: 15.4
model: NVT Framewo serial: status: Discharging
CPU:
Info: 12-core (4-mt/8-st) model: 12th Gen Intel Core i7-1260P bits: 64 type: MST AMCP
arch: Alder Lake rev: 3 cache: L1: 1.1 MiB L2: 9 MiB L3: 18 MiB
Speed (MHz): avg: 679 high: 1004 min/max: 400/4700:3400 cores: 1: 1004 2: 844 3: 680 4: 421
5: 736 6: 449 7: 789 8: 903 9: 681 10: 751 11: 544 12: 874 13: 604 14: 588 15: 504 16: 492
bogomips: 79872
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
Device-1: Intel Alder Lake-P Integrated Graphics driver: i915 v: kernel ports: active: eDP-1
empty: DP-1, DP-2, DP-3, DP-4 bus-ID: 00:02.0 chip-ID: 8086:46a6
Display: x11 server: X.Org v: 1.21.1.3 driver: X: loaded: modesetting unloaded: fbdev,vesa
gpu: i915 display-ID: :0 screens: 1
Screen-1: 0 s-res: 2256x1504 s-dpi: 96
Monitor-1: eDP-1 model: BOE Display res: 2256x1504 dpi: 201 diag: 343mm (13.5")
OpenGL: renderer: Mesa Intel Graphics (ADL GT2) v: 4.6 Mesa 22.0.5 direct render: Yes
Audio:
Device-1: Intel Alder Lake PCH-P High Definition Audio driver: snd_hda_intel v: kernel
bus-ID: 00:1f.3 chip-ID: 8086:51c8
Sound Server-1: ALSA v: k5.15.0-56-generic running: yes
Sound Server-2: PulseAudio v: 15.99.1 running: yes
Sound Server-3: PipeWire v: 0.3.48 running: yes
Network:
Device-1: Intel Wi-Fi 6 AX210/AX211/AX411 160MHz driver: iwlwifi v: kernel pcie: speed: 5 GT/s
lanes: 1 bus-ID: a6:00.0 chip-ID: 8086:2725
IF: wlp166s0 state: up mac:
Bluetooth:
Device-1: Intel AX210 Bluetooth type: USB driver: btusb v: 0.8 bus-ID: 3-10:4 chip-ID: 8087:0032
Report: hciconfig ID: hci0 rfk-id: 0 state: up address:
Drives:
Local Storage: total: 465.76 GiB used: 13.66 GiB (2.9%)
ID-1: /dev/nvme0n1 vendor: Western Digital model: WD BLACK SN770 500GB size: 465.76 GiB
speed: 63.2 Gb/s lanes: 4 serial: temp: 30.9 C
Partition:
ID-1: / size: 456.89 GiB used: 13.65 GiB (3.0%) fs: ext4 dev: /dev/nvme0n1p2
ID-2: /boot/efi size: 511 MiB used: 5.2 MiB (1.0%) fs: vfat dev: /dev/nvme0n1p1
Swap:
ID-1: swap-1 type: file size: 2 GiB used: 0 KiB (0.0%) priority: -2 file: /swapfile
Sensors:
System Temperatures: cpu: 43.8 C mobo: 40.8 C
Fan Speeds (RPM): N/A
Repos:
Packages: apt: 2143
No active apt repos in: /etc/apt/sources.list
Active apt repos in: /etc/apt/sources.list.d/balena-etcher.list
1: deb [signed-by=/usr/share/keyrings/balena-etcher-archive-keyring.gpg] https: //dl.cloudsmith.io/public/balena/etcher/deb/linuxmint vanessa main
2: deb-src [signed-by=/usr/share/keyrings/balena-etcher-archive-keyring.gpg] https: //dl.cloudsmith.io/public/balena/etcher/deb/linuxmint vanessa main
Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list
1: deb http: //packages.linuxmint.com vera main upstream import backport
2: deb http: //archive.ubuntu.com/ubuntu jammy main restricted universe multiverse
3: deb http: //archive.ubuntu.com/ubuntu jammy-updates main restricted universe multiverse
4: deb http: //archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse
5: deb http: //security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
Info:
Processes: 356 Uptime: 7m Memory: 15.34 GiB used: 2.8 GiB (18.3%) Init: systemd v: 249
runlevel: 5 Compilers: gcc: 11.3.0 alt: 11 Client: Cinnamon v: 5.6.5 inxi: 3.3.13

3 Likes

Yes, this is not something included in the guide. But your work here is helpful and will definitely help others who might find themselves in a similar situation with Home folder encryption.

Appreciate your post on this. :slight_smile:

3 Likes

is no one else having an issue with the brightness controls? ive gone through all the guides related to it and none had any effect on it in any way, so i’m starting to think that the ryzen version of the framework 13 has some kind of driver issue with linux mint

Using the 2023 Intel version 13th gen 13" I have
module_blacklist=hid_sensor_hub
in the kernel parameter list since week 1, although I don’t remember what the problem was…