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

Hi, @lightrush you just commented on my post about wifi not working after a 22.04 update. As I said in that post, I resolved that issue by updating the BIOS, but I’m now running into an issue that I saw after I initially setup Ubuntu when I received my batch 4 Framework. After I suspend, when I wake, my OS will lock up. I solved this (I think) initially by removing the mem_sleep_default=deep option from my grub config after following this guide. If I’m remembering correctly, it turned out that deep sleep was already enabled and that seemed to be causing the issues. My system ran stably since then. After updating to 22.04 yesterday, my OS would again would lock up after resuming from suspend. If I dropped into tty, I’d get an endless stream of EXT4-fs errors seemingly when trying to read from the disk. I tried running your script (which I did not do when I setup my laptop), and it didn’t resolve it. I also added the mem_sleep_default=deep to grub again, but this did not resolve it. I’ve since installed 22.04 from scratch (and am using Gnome instead of i3-gaps as I was previously), and I’m now having similar–but different–issues. Now, after resuming from sleep, the OS will drop into tty, and print an endless stream of messages saying the file system is read only. From some Googling, I’m seeing very few other people running into the same issue, and most of them either magically start working after some time or suggestions that the disk is failing. This is a brand new Saberent disk, so I’d be surprised if that was the case. I’m still not sure if the cause of this is the 22.04 update or the BIOS update.

EDIT: Forgot to mention that I’m now reinstalling 21.10 from scratch and running your post install script once it’s done. The /etc/default/grub.h/hibernate.cfg that the script sets up puts my grub config in the same place that it was before upgrading to 22.04.

Just verified that downgrading to 21.10 solves the issue. I’m wondering if this is some kind of hardware/kernel issue with my disk maybe??? The disk is a Sabrent 512GB Rocket NVMe PCIe M.2 2280. I’m thinking about reinstalling 22.04 and mailing my /var/log directory to Framework. I can’t parse anything useful from the logs myself. This is a batch 4 DIY and I supplied my own disk and RAM. It’s incredibly odd that I seem to be an outlier here. Trying to think of things that may set my laptop apart from others.

Certainly sounds like one or the other. Try a different SSD. Something from WD or Samsung.

Unfortunately, I’ve only got one other NVME disk, and it’s being used on my gaming rig.

Added installation of HiRes codecs for PulseAudio to use with Bluetooth receivers and headsets. Both versions of gstreamer and PulseAudio in Ubuntu 22.04 now support this but the gstreamer plugins aren’t installed by default due to licensing issues. Tested with my FiiO BTR3K - it uses aptX automatically.

Just wanted to provide an update on my issue. I bought a Samsung 980 Pro, and the system is no longer locking up after suspend. So it looks like the disk is the problem, though I still don’t know what the actual problem is. Wish me luck trying to get an RMA with Sabrent support.

1 Like

Suspend/resume is notoriously problematic in general for device drivers and especially firmware. Not sure whether it’s complexity of implementation or just a use case that manufactures don’t test much for assuming they won’t end up in a laptop, and thus full of bugs. That’s actually one of the reasons I don’t use S3 (mem_sleep_default=deep) and instead use the more power hungry s2idle. Usually that trips fewer bugs in firmware. If it’s a firmware problem, a replacement would probably be the same. That said, the drive might be perfectly fine in a desktop that doesn’t do suspend. Or converted to an external SSD using an enclosure.

Congrats on the 980 Pro! Spectacular hardware even if pricey.

1 Like

Would this work on ubuntu-based distros as well?

Sorry for the probably-incredibly-dumb question but I’m completely new to linux in general.
Would love to try pop os but I’m not sure i’m brave enough to start messing with individual fixes instead of running this simple formula :sweat_smile:

Thanks for your help!

@James2k60 it might. :smiley: It depends how much have System76 touched. I haven’t and can’t test it. If you’re feeling lucky some evening, give it a try and let us know. Luckily Salt has great log output so just by looking at that you’ll know if it applied cleanly or something went wrong, as well as exactly what.

On a separate but related note, if you’re a new user, you’d do well by sticking with Ubuntu LTS and ignoring the noise (snap flame wars, other loud noises). Learn to use Ubuntu LTS by using it for more and more things, solve problems along the way. You’ll benefit from the mountains of information and software written for it and you won’t have to ask whether some of it would work on your setup. Just two cents from a 17 year Linux user. :smiling_face:

3 Likes

The post-install scripts have made an enormous positive impact on the behaviour of Ubuntu 22.04 on my Framework (i5, 16GB RAM and 500GB disk). The hibernate script reports a successful run.

Like Vizual_Commander, I have a fresh install of 22.04 and after two runs of the script there is still a 2GB swapfile (though memory use runs at about 20% and swap use at less than 1%). I ran the script again just now and still only a 2GB swapfile shows afterwards. I have a copy of the output from this run, but it’s too big to post here - would any part of it be useful?

Try to post the log here. All we need is the complete output of running the salt formula, however you run it. Others have posted logs in earlier posts.

You can probably use one of these
To hide long log text.

Like this:

Thanks for the guidance - though the log is still identified as too long, so I will do it in two parts.

Part One

wget -O /tmp/framework-laptop-tldr.sh https://raw.githubusercontent.com/lightrush/framework-laptop-formula/main/framework-laptop-tldr.sh && bash /tmp/framework-laptop-tldr.sh --enable-hibernate
–2022-04-27 11:13:01-- https://raw.githubusercontent.com/lightrush/framework-laptop-formula/main/framework-laptop-tldr.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)… 185.199.110.133, 185.199.108.133, 185.199.111.133, …
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.110.133|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 868 [text/plain]
Saving to: ‘/tmp/framework-laptop-tldr.sh’

/tmp/framework-lapt 100%[===================>] 868 --.-KB/s in 0s

2022-04-27 11:13:01 (37.0 MB/s) - ‘/tmp/framework-laptop-tldr.sh’ saved [868/868]

Hit:1 Index of /ubuntu jammy InRelease
Get:2 Index of /ubuntu jammy-updates InRelease [109 kB]
Get:3 Index of /ubuntu jammy-security InRelease [110 kB]
Hit:4 Index of /m-grant-prg/utils/ubuntu jammy InRelease
Hit:5 Index of /ubuntu jammy-backports InRelease
Get:6 Index of /ubuntu jammy-updates/main i386 Packages [12.9 kB]
Get:7 Index of /ubuntu jammy-updates/main amd64 Packages [48.4 kB]
Get:8 Index of /ubuntu jammy-updates/main amd64 DEP-11 Metadata [6,636 B]
Get:9 Index of /ubuntu jammy-updates/universe amd64 Packages [13.6 kB]
Get:10 Index of /ubuntu jammy-updates/universe i386 Packages [10.7 kB]
Get:11 Index of /ubuntu jammy-updates/universe amd64 DEP-11 Metadata [19.2 kB]
Get:12 Index of /ubuntu jammy-security/main amd64 DEP-11 Metadata [6,632 B]
Get:13 Index of /ubuntu jammy-updates/universe amd64 c-n-f Metadata [476 B]
Fetched 338 kB in 1s (264 kB/s)
Reading package lists… Done
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
Calculating upgrade… Done
The following packages will be upgraded:
gdm3 gir1.2-gdm-1.0 gir1.2-gtk-4.0 libfribidi0 libgdm1 libgtk-4-1
libgtk-4-bin libgtk-4-common
8 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
1 standard security update
Need to get 6,993 kB of archives.
After this operation, 1,024 B of additional disk space will be used.
Get:1 Index of /ubuntu jammy-updates/main amd64 libfribidi0 amd64 1.0.8-2ubuntu3.1 [26.1 kB]
Get:2 Index of /ubuntu jammy-updates/main amd64 gdm3 amd64 42.0-1ubuntu7 [314 kB]
Get:3 Index of /ubuntu jammy-updates/main amd64 libgdm1 amd64 42.0-1ubuntu7 [61.6 kB]
Get:4 Index of /ubuntu jammy-updates/main amd64 gir1.2-gdm-1.0 amd64 42.0-1ubuntu7 [9,878 B]
Get:5 Index of /ubuntu jammy-updates/main amd64 libgtk-4-common all 4.6.2+ds-1ubuntu3 [661 kB]
Get:6 Index of /ubuntu jammy-updates/main amd64 libgtk-4-1 amd64 4.6.2+ds-1ubuntu3 [2,850 kB]
Get:7 Index of /ubuntu jammy-updates/main amd64 gir1.2-gtk-4.0 amd64 4.6.2+ds-1ubuntu3 [217 kB]
Get:8 Index of /ubuntu jammy-updates/main amd64 libgtk-4-bin amd64 4.6.2+ds-1ubuntu3 [2,854 kB]
Fetched 6,993 kB in 6s (1,181 kB/s)
Preconfiguring packages …
(Reading database … 213499 files and directories currently installed.)
Preparing to unpack …/0-libfribidi0_1.0.8-2ubuntu3.1_amd64.deb …
Unpacking libfribidi0:amd64 (1.0.8-2ubuntu3.1) over (1.0.8-2ubuntu3) …
Preparing to unpack …/1-gdm3_42.0-1ubuntu7_amd64.deb …
Unpacking gdm3 (42.0-1ubuntu7) over (42.0-1ubuntu6) …
Preparing to unpack …/2-libgdm1_42.0-1ubuntu7_amd64.deb …
Unpacking libgdm1 (42.0-1ubuntu7) over (42.0-1ubuntu6) …
Preparing to unpack …/3-gir1.2-gdm-1.0_42.0-1ubuntu7_amd64.deb …
Unpacking gir1.2-gdm-1.0:amd64 (42.0-1ubuntu7) over (42.0-1ubuntu6) …
Preparing to unpack …/4-libgtk-4-common_4.6.2+ds-1ubuntu3_all.deb …
Unpacking libgtk-4-common (4.6.2+ds-1ubuntu3) over (4.6.2+ds-1ubuntu2) …
Preparing to unpack …/5-libgtk-4-1_4.6.2+ds-1ubuntu3_amd64.deb …
Unpacking libgtk-4-1:amd64 (4.6.2+ds-1ubuntu3) over (4.6.2+ds-1ubuntu2) …
Preparing to unpack …/6-gir1.2-gtk-4.0_4.6.2+ds-1ubuntu3_amd64.deb …
Unpacking gir1.2-gtk-4.0:amd64 (4.6.2+ds-1ubuntu3) over (4.6.2+ds-1ubuntu2) …
Preparing to unpack …/7-libgtk-4-bin_4.6.2+ds-1ubuntu3_amd64.deb …
Unpacking libgtk-4-bin (4.6.2+ds-1ubuntu3) over (4.6.2+ds-1ubuntu2) …
Setting up libgdm1 (42.0-1ubuntu7) …
Setting up libfribidi0:amd64 (1.0.8-2ubuntu3.1) …
Setting up libgtk-4-common (4.6.2+ds-1ubuntu3) …
Processing triggers for libglib2.0-0:amd64 (2.72.1-1) …
Processing triggers for libc-bin (2.35-0ubuntu3) …
Processing triggers for man-db (2.10.2-1) …
Processing triggers for dbus (1.12.20-2ubuntu4) …
Setting up libgtk-4-1:amd64 (4.6.2+ds-1ubuntu3) …
Setting up libgtk-4-bin (4.6.2+ds-1ubuntu3) …
Setting up gir1.2-gdm-1.0:amd64 (42.0-1ubuntu7) …
Setting up gir1.2-gtk-4.0:amd64 (4.6.2+ds-1ubuntu3) …
Setting up gdm3 (42.0-1ubuntu7) …
Processing triggers for libc-bin (2.35-0ubuntu3) …
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
salt-common is already the newest version (3004.1+dfsg-2).
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
–2022-04-27 11:13:28-- https://github.com/lightrush/framework-laptop-formula/archive/refs/heads/main.zip
Resolving github.com (github.com)… 140.82.121.4
Connecting to github.com (github.com)|140.82.121.4|:443… connected.
HTTP request sent, awaiting response… 302 Found
Location: https://codeload.github.com/lightrush/framework-laptop-formula/zip/refs/heads/main [following]
–2022-04-27 11:13:28-- https://codeload.github.com/lightrush/framework-laptop-formula/zip/refs/heads/main
Resolving codeload.github.com (codeload.github.com)… 140.82.121.10
Connecting to codeload.github.com (codeload.github.com)|140.82.121.10|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: unspecified [application/zip]
Saving to: ‘framework-laptop-formula-main.zip’

framework-laptop-fo [ <=> ] 355.00K 725KB/s in 0.5s

2022-04-27 11:13:29 (725 KB/s) - ‘framework-laptop-formula-main.zip’ saved [363515]

Archive: framework-laptop-formula-main.zip
12dcfc2ae09b2d90f21e272916f88d42a1c7e492
inflating: framework-laptop-formula-main/.gitignore
inflating: framework-laptop-formula-main/LICENSE
inflating: framework-laptop-formula-main/README.md
inflating: framework-laptop-formula-main/framework-laptop-tldr.sh
inflating: framework-laptop-formula-main/framework-laptop/defaults.yaml
inflating: framework-laptop-formula-main/framework-laptop/files/10-framework-sec-trim.rules
inflating: framework-laptop-formula-main/framework-laptop/files/com.ubuntu.enable-hibernate.pkla
inflating: framework-laptop-formula-main/framework-laptop/files/fingerprint-reader/libfprint_delete_device_prints.py
inflating: framework-laptop-formula-main/framework-laptop/files/fingerprint-reader/prebuilt/debian.libfprint.install.patch
inflating: framework-laptop-formula-main/framework-laptop/files/fingerprint-reader/prebuilt/debian.rules.patch
inflating: framework-laptop-formula-main/framework-laptop/files/fingerprint-reader/prebuilt/fprintd-doc_1.94.0-1_all.deb
inflating: framework-laptop-formula-main/framework-laptop/files/fingerprint-reader/prebuilt/fprintd_1.94.0-1_amd64.deb
inflating: framework-laptop-formula-main/framework-laptop/files/fingerprint-reader/prebuilt/gir1.2-fprint-2.0_1.94.1-1_amd64.deb
inflating: framework-laptop-formula-main/framework-laptop/files/fingerprint-reader/prebuilt/libfprint-2-2_1.94.1-1_amd64.deb
inflating: framework-laptop-formula-main/framework-laptop/files/fingerprint-reader/prebuilt/libfprint-2-doc_1.94.1-1_all.deb
inflating: framework-laptop-formula-main/framework-laptop/files/fingerprint-reader/prebuilt/libpam-fprintd_1.94.0-1_amd64.deb
inflating: framework-laptop-formula-main/framework-laptop/files/intel-audio-workaround.conf
inflating: framework-laptop-formula-main/framework-laptop/files/intel-ax210-workaround.conf
inflating: framework-laptop-formula-main/framework-laptop/files/intel-ax210-workaround.service
inflating: framework-laptop-formula-main/framework-laptop/files/touchpad-suspend-workaround
inflating: framework-laptop-formula-main/framework-laptop/fingerprint-reader.sls
inflating: framework-laptop-formula-main/framework-laptop/framework-sec-trim-enable.sls
inflating: framework-laptop-formula-main/framework-laptop/grub-cleanup.sls
inflating: framework-laptop-formula-main/framework-laptop/grub-decrease-menu-timeout.sls
inflating: framework-laptop-formula-main/framework-laptop/hibernate.sls
inflating: framework-laptop-formula-main/framework-laptop/hpet-disable.sls
inflating: framework-laptop-formula-main/framework-laptop/init.sls
inflating: framework-laptop-formula-main/framework-laptop/intel-audio-workaround.sls
inflating: framework-laptop-formula-main/framework-laptop/intel-ax210-workaround.sls
inflating: framework-laptop-formula-main/framework-laptop/intel-xe-tearing-workaround.sls
inflating: framework-laptop-formula-main/framework-laptop/map.jinja
inflating: framework-laptop-formula-main/framework-laptop/mem-sleep-default.sls
inflating: framework-laptop-formula-main/framework-laptop/mouse-accel-profile.sls
inflating: framework-laptop-formula-main/framework-laptop/oscodenamemap.yaml
inflating: framework-laptop-formula-main/framework-laptop/osfamilymap.yaml
inflating: framework-laptop-formula-main/framework-laptop/osmap.yaml
inflating: framework-laptop-formula-main/framework-laptop/pillar.example
inflating: framework-laptop-formula-main/framework-laptop/post-resume-power-draw-workaround.sls
inflating: framework-laptop-formula-main/framework-laptop/pulseaudio-bt-hires-codecs.sls
inflating: framework-laptop-formula-main/framework-laptop/salt-masterless.sls
inflating: framework-laptop-formula-main/framework-laptop/tlp.sls
inflating: framework-laptop-formula-main/framework-laptop/touchpad-click-method.sls
inflating: framework-laptop-formula-main/framework-laptop/touchpad-suspend-workaround.sls
inflating: framework-laptop-formula-main/framework-laptop/vmware-graphics-acceleration.sls
[ERROR ] Failed to import module pip, this is due most likely to a syntax error:
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/salt/loader/lazy.py”, line 766, in _load_module
mod = self.run(spec.loader.load_module)
File “/usr/lib/python3/dist-packages/salt/loader/lazy.py”, line 1201, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File “/usr/lib/python3/dist-packages/salt/loader/lazy.py”, line 1216, in _run_as
return _func_or_method(*args, **kwargs)
File “”, line 548, in _check_name_wrapper
File “”, line 1063, in load_module
File “”, line 888, in load_module
File “”, line 290, in _load_module_shim
File “”, line 719, in _load
File “”, line 688, in _load_unlocked
File “”, line 883, in exec_module
File “”, line 241, in _call_with_frames_removed
File “/usr/lib/python3/dist-packages/salt/modules/pip.py”, line 87, in
import pkg_resources # pylint: disable=3rd-party-module-not-gated
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 3267, in
def _initialize_master_working_set():
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 3241, in _call_aside
f(*args, **kwargs)
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 3279, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 573, in _build_master
ws.require(requires)
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 891, in require
needed = self.resolve(parse_requirements(requirements))
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 777, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The ‘contextvars’ distribution was not found and is required by salt
[ERROR ] Failed to import states pip_state, this is due most likely to a syntax error:
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/salt/loader/lazy.py”, line 766, in _load_module
mod = self.run(spec.loader.load_module)
File “/usr/lib/python3/dist-packages/salt/loader/lazy.py”, line 1201, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File “/usr/lib/python3/dist-packages/salt/loader/lazy.py”, line 1216, in _run_as
return _func_or_method(*args, **kwargs)
File “”, line 548, in _check_name_wrapper
File “”, line 1063, in load_module
File “”, line 888, in load_module
File “”, line 290, in _load_module_shim
File “”, line 719, in _load
File “”, line 688, in _load_unlocked
File “”, line 883, in exec_module
File “”, line 241, in _call_with_frames_removed
File “/usr/lib/python3/dist-packages/salt/states/pip_state.py”, line 32, in
import pkg_resources
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 3267, in
def _initialize_master_working_set():
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 3241, in _call_aside
f(*args, **kwargs)
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 3279, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 573, in _build_master
ws.require(requires)
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 891, in require
needed = self.resolve(parse_requirements(requirements))
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 777, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The ‘contextvars’ distribution was not found and is required by salt
local:

      ID: fingerprint-reader-pkgs-prebuilt-purged
Function: pkg.purged
  Result: True
 Comment: All specified packages (matching specified versions) are already absent
 Started: 11:13:42.809229
Duration: 28.912 ms
 Changes:   

      ID: fingerprint-reader-pkgs-installed
Function: pkg.latest
  Result: True
 Comment: All packages are up-to-date (fprintd, fprintd-doc, gir1.2-fprint-2.0, libfprint-2-2, libfprint-2-doc, libfprint-2-tod1, libpam-fprintd).
 Started: 11:13:42.842696
Duration: 1850.408 ms
 Changes:   

      ID: fingerprint-reader-service-enabled
Function: service.enabled
    Name: fprintd
  Result: True
 Comment: Service fprintd is already enabled, and is in the desired state
 Started: 11:13:44.694062
Duration: 34.083 ms
 Changes:   

      ID: fingerprint-reader-pam-auth-enabled
Function: cmd.run
    Name: pam-auth-update --enable fprintd
  Result: True
 Comment: unless condition is true
 Started: 11:13:44.729237
Duration: 265.164 ms
 Changes:   

      ID: fingerprint-reader-delete-device-prints-util-installed
Function: file.managed
    Name: /usr/local/bin/libfprint_delete_device_prints.py
  Result: True
 Comment: File /usr/local/bin/libfprint_delete_device_prints.py is in the correct state
 Started: 11:13:44.994639
Duration: 15.443 ms
 Changes:   

      ID: fingerprint-reader-pam-config
Function: file.replace
    Name: /etc/pam.d/common-auth
  Result: True
 Comment: No changes needed to be made
 Started: 11:13:45.010382
Duration: 1.348 ms
 Changes:   

      ID: framework-sec-trim-enable-udev-rule-installed
Function: file.managed
    Name: /etc/udev/rules.d/10-framework-sec-trim.rules
  Result: True
 Comment: File /etc/udev/rules.d/10-framework-sec-trim.rules is in the correct state
 Started: 11:13:45.011799
Duration: 1.134 ms
 Changes:   

      ID: grub_decrease_menu_timeout_config
Function: file.replace
    Name: /etc/default/grub
  Result: True
 Comment: No changes needed to be made
 Started: 11:13:45.012992
Duration: 1.59 ms
 Changes:   

      ID: grub_decrease_menu_timeout_grub_update
Function: cmd.run
    Name: update-grub
  Result: True
 Comment: State was not run because none of the onchanges reqs changed
 Started: 11:13:45.014845
Duration: 0.001 ms
 Changes:   

      ID: hibernate_create_swap_file
Function: cmd.run
    Name: fallocate -l 16G /swapfile
  Result: True
 Comment: unless condition is true
 Started: 11:13:45.014874
Duration: 8.284 ms
 Changes:   

      ID: hibernate_chmod_swap
Function: file.managed
    Name: /swapfile
  Result: True
 Comment: File /swapfile exists with proper permissions. No changes made.
 Started: 11:13:45.023438
Duration: 0.767 ms
 Changes:   

      ID: hibernate_make_swap
Function: cmd.run
    Name: mkswap /swapfile
  Result: True
 Comment: State was not run because none of the onchanges reqs changed
 Started: 11:13:45.024526
Duration: 0.001 ms
 Changes:   

      ID: hibernate_swap_on
Function: cmd.run
    Name: swapon /swapfile
  Result: True
 Comment: unless condition is true
 Started: 11:13:45.024773
Duration: 13.201 ms
 Changes:   

      ID: hibernate_swap_fstab
Function: file.append
    Name: /etc/fstab
  Result: True
 Comment: unless condition is true
 Started: 11:13:45.038418
Duration: 10.892 ms
 Changes:   

      ID: hibernate_grub_resume_old_config_line
Function: file.replace
    Name: /etc/default/grub
  Result: True
 Comment: No changes needed to be made
 Started: 11:13:45.049397
Duration: 1.173 ms
 Changes:   

      ID: hibernate_grub_resume_old_config
Function: file.replace
    Name: /etc/default/grub
  Result: True
 Comment: No changes needed to be made
 Started: 11:13:45.050875
Duration: 1.146 ms
 Changes:   

      ID: hibernate_grub_resume_offset_old_config
Function: file.replace
    Name: /etc/default/grub
  Result: True
 Comment: No changes needed to be made
 Started: 11:13:45.052201
Duration: 1.107 ms
 Changes:   

      ID: hibernate_grub_resume
Function: file.managed
    Name: /etc/default/grub.d/hibernate.cfg
  Result: True
 Comment: File /etc/default/grub.d/hibernate.cfg is in the correct state
 Started: 11:13:45.053483
Duration: 0.905 ms
 Changes:   

      ID: hibernate_update_grub
Function: cmd.run
    Name: update-grub
  Result: True
 Comment: State was not run because none of the onchanges reqs changed
 Started: 11:13:45.054985
Duration: 0.001 ms
 Changes:   

      ID: hibernate_polkit_enabled
Function: file.managed
    Name: /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
  Result: True
 Comment: File /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla is in the correct state
 Started: 11:13:45.055014
Duration: 1.299 ms
 Changes:   

      ID: hibernate-hibernate-delay-sec
Function: file.replace
    Name: /etc/systemd/sleep.conf
  Result: True
 Comment: No changes needed to be made
 Started: 11:13:45.056614
Duration: 1.249 ms
 Changes:   

      ID: hibernate-suspend-mode
Function: file.replace
    Name: /etc/systemd/sleep.conf
  Result: True
 Comment: No changes needed to be made
 Started: 11:13:45.058089
Duration: 1.183 ms
 Changes:   

      ID: hibernate-suspend-state
Function: file.replace
    Name: /etc/systemd/sleep.conf
  Result: True
 Comment: No changes needed to be made
 Started: 11:13:45.059497
Duration: 1.222 ms
 Changes:   

      ID: hibernate-handle-suspend-key
Function: file.replace
    Name: /etc/systemd/logind.conf
  Result: True
 Comment: No changes needed to be made
 Started: 11:13:45.060946
Duration: 1.654 ms
 Changes:   

      ID: hibernate-handle-lid-switch
Function: file.replace
    Name: /etc/systemd/logind.conf
  Result: True
 Comment: No changes needed to be made
 Started: 11:13:45.062828
Duration: 1.278 ms
 Changes:   

      ID: hibernate-handle-lid-switch-external-power
Function: file.replace
    Name: /etc/systemd/logind.conf
  Result: True
 Comment: No changes needed to be made
 Started: 11:13:45.064346
Duration: 1.252 ms
 Changes:   

      ID: intel_audio_workaround_modprobe_conf_installed
Function: file.managed
    Name: /etc/modprobe.d/intel-audio-workaround.conf
  Result: True
 Comment: unless condition is true
 Started: 11:13:45.065660
Duration: 31.539 ms
 Changes:   

      ID: intel_audio_workaround_initramfs_updated
Function: cmd.run
    Name: update-initramfs -u
  Result: True
 Comment: State was not run because none of the onchanges reqs changed
 Started: 11:13:45.098106
Duration: 0.005 ms
 Changes:   

      ID: intel_ax210_workaround_linux_generic_latest
Function: pkg.latest
    Name: linux-generic-hwe-20.04
  Result: True
 Comment: Package linux-generic-hwe-20.04 is already up-to-date
 Started: 11:13:45.098202
Duration: 1729.859 ms
 Changes:   

      ID: intel_ax210_workaround_service_dead
Function: service.dead
    Name: intel-ax210-workaround
  Result: True
 Comment: The named service intel-ax210-workaround is not available
 Started: 11:13:46.828199
Duration: 3.571 ms
 Changes:   

      ID: intel_ax210_workaround_service_removed
Function: file.absent
    Name: /etc/systemd/system/intel-ax210-workaround.service
  Result: True
 Comment: File /etc/systemd/system/intel-ax210-workaround.service is not present
 Started: 11:13:46.832128
Duration: 0.338 ms
 Changes:   

      ID: intel_ax210_workaround_service_removed
Function: module.run
    Name: service.systemctl_reload
  Result: True
 Comment: State was not run because none of the onchanges reqs changed
 Started: 11:13:46.832734
Duration: 0.002 ms
 Changes:   

      ID: intel_ax210_workaround_firmware_restored
Function: cmd.run
    Name: /bin/sh -c "mv -f /lib/firmware/iwlwifi-ty-a0-gf-a0.pnvm.renamed-by-salt /lib/firmware/iwlwifi-ty-a0-gf-a0.pnvm ; rmmod iwlmvm ; rmmod iwlwifi ; modprobe iwlwifi"
  Result: True
 Comment: unless condition is true
 Started: 11:13:46.832849
Duration: 4.478 ms
 Changes:   

      ID: intel_ax210_workaround_firmware_reinstalled
Function: pkg.installed
    Name: linux-firmware
  Result: True
 Comment: unless condition is true
 Started: 11:13:46.837505
Duration: 4.358 ms
 Changes:   

      ID: intel_ax210_workaround_modprobe_conf_removed
Function: file.absent
    Name: /etc/modprobe.d/intel-ax210-workaround.conf
  Result: True
 Comment: File /etc/modprobe.d/intel-ax210-workaround.conf is not present
 Started: 11:13:46.841936
Duration: 0.304 ms
 Changes:   

      ID: intel_ax210_workaround_initramfs_updated
Function: cmd.run
    Name: update-initramfs -u
  Result: True
 Comment: State was not run because none of the onchanges reqs changed
 Started: 11:13:46.842514
Duration: 0.002 ms
 Changes:   

      ID: intel_xe_tearing_workaround_grub_old_config_line
Function: file.replace
    Name: /etc/default/grub
  Result: True
 Comment: No changes needed to be made
 Started: 11:13:46.842543
Duration: 1.079 ms
 Changes:   

      ID: intel_xe_tearing_workaround_grub_old_config
Function: file.replace
    Name: /etc/default/grub
  Result: True
 Comment: No changes needed to be made
 Started: 11:13:46.843882
Duration: 1.065 ms
 Changes:   

      ID: intel_xe_tearing_workaround_linux_generic_latest
Function: pkg.latest
    Name: linux-generic-hwe-20.04
  Result: True
 Comment: Package linux-generic-hwe-20.04 is already up-to-date
 Started: 11:13:46.845008
Duration: 2109.679 ms
 Changes:   

      ID: intel_xe_tearing_workaround_grub_config
Function: file.absent
    Name: /etc/default/grub.d/intel-xe-tearing-workaround.cfg
  Result: True
 Comment: File /etc/default/grub.d/intel-xe-tearing-workaround.cfg is not present
 Started: 11:13:48.954807
Duration: 0.45 ms
 Changes:   

      ID: intel_xe_tearing_workaround_grub_update
Function: cmd.run
    Name: update-grub
  Result: True
 Comment: State was not run because none of the onchanges reqs changed
 Started: 11:13:48.955817
Duration: 0.002 ms
 Changes:   

      ID: mem_sleep_default_grub_config_removed
Function: file.replace
    Name: /etc/default/grub
  Result: True
 Comment: No changes needed to be made
 Started: 11:13:48.955850
Duration: 1.2 ms
 Changes:   

      ID: mem_sleep_default_grub_config_removed_default
Function: file.replace
    Name: /etc/default/grub
  Result: True
 Comment: No changes needed to be made
 Started: 11:13:48.957305
Duration: 0.997 ms
 Changes:   

      ID: mem_sleep_default_grub_config_file
Function: file.managed
    Name: /etc/default/grub.d/mem-sleep-default.cfg
  Result: True
 Comment: File /etc/default/grub.d/mem-sleep-default.cfg is in the correct state
 Started: 11:13:48.958430
Duration: 8.076 ms
 Changes:   

      ID: mem_sleep_default_grub_update
Function: cmd.run
    Name: update-grub
  Result: True
 Comment: State was not run because none of the onchanges reqs changed
 Started: 11:13:48.968046
Duration: 0.006 ms
 Changes:   

And this is the second part. Many thanks.

Part Two

ID: tlp_service_dead
Function: service.dead
Name: tlp
Result: True
Comment: The named service tlp is not available
Started: 11:13:48.968149
Duration: 16.023 ms
Changes:

      ID: tlp_package_purged
Function: pkg.purged
    Name: tlp
  Result: True
 Comment: All specified packages are already absent
 Started: 11:13:48.984913
Duration: 1.234 ms
 Changes:   

      ID: touchpad-suspend-workaround
Function: file.managed
    Name: /lib/systemd/system-sleep/touchpad-suspend-workaround
  Result: True
 Comment: File /lib/systemd/system-sleep/touchpad-suspend-workaround is in the correct state
 Started: 11:13:48.986325
Duration: 4.022 ms
 Changes:   

      ID: grub-cleanup
Function: cmd.run
    Name: sed -i "$(for line in $(grep -Pn '^GRUB_CMDLINE_LINUX_DEFAULT=.*$' /etc/default/grub | cut -d':' -f1 | tail -n +2); do echo -n ${line}d '; ' ; done)" /etc/default/grub
  Result: True
 Comment: unless condition is true
 Started: 11:13:48.990571
Duration: 19.419 ms
 Changes:   

      ID: post_resume_power_draw_workaround_grub_config_file
Function: file.managed
    Name: /etc/default/grub.d/post-resume-power-draw-workaround.cfg
  Result: True
 Comment: File /etc/default/grub.d/post-resume-power-draw-workaround.cfg is in the correct state
 Started: 11:13:49.010711
Duration: 8.653 ms
 Changes:   

      ID: post_resume_power_draw_workaround_grub_update
Function: cmd.run
    Name: update-grub
  Result: True
 Comment: State was not run because none of the onchanges reqs changed
 Started: 11:13:49.022288
Duration: 0.017 ms
 Changes:   

      ID: pulseaudio-bt-hires-codecs-pkgs-installed
Function: pkg.latest
  Result: True
 Comment: Package gstreamer1.0-plugins-bad is already up-to-date
 Started: 11:13:49.022588
Duration: 5679.83 ms
 Changes:   

Summary for local

Succeeded: 52
Failed: 0

Total states run: 52
Total run time: 11.871 s
[ERROR ] Failed to import module pip, this is due most likely to a syntax error:
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/salt/loader/lazy.py”, line 766, in _load_module
mod = self.run(spec.loader.load_module)
File “/usr/lib/python3/dist-packages/salt/loader/lazy.py”, line 1201, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File “/usr/lib/python3/dist-packages/salt/loader/lazy.py”, line 1216, in _run_as
return _func_or_method(*args, **kwargs)
File “”, line 548, in _check_name_wrapper
File “”, line 1063, in load_module
File “”, line 888, in load_module
File “”, line 290, in _load_module_shim
File “”, line 719, in _load
File “”, line 688, in _load_unlocked
File “”, line 883, in exec_module
File “”, line 241, in _call_with_frames_removed
File “/usr/lib/python3/dist-packages/salt/modules/pip.py”, line 87, in
import pkg_resources # pylint: disable=3rd-party-module-not-gated
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 3267, in
def _initialize_master_working_set():
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 3241, in _call_aside
f(*args, **kwargs)
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 3279, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 573, in _build_master
ws.require(requires)
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 891, in require
needed = self.resolve(parse_requirements(requirements))
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 777, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The ‘contextvars’ distribution was not found and is required by salt
[ERROR ] Failed to import states pip_state, this is due most likely to a syntax error:
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/salt/loader/lazy.py”, line 766, in _load_module
mod = self.run(spec.loader.load_module)
File “/usr/lib/python3/dist-packages/salt/loader/lazy.py”, line 1201, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File “/usr/lib/python3/dist-packages/salt/loader/lazy.py”, line 1216, in _run_as
return _func_or_method(*args, **kwargs)
File “”, line 548, in _check_name_wrapper
File “”, line 1063, in load_module
File “”, line 888, in load_module
File “”, line 290, in _load_module_shim
File “”, line 719, in _load
File “”, line 688, in _load_unlocked
File “”, line 883, in exec_module
File “”, line 241, in _call_with_frames_removed
File “/usr/lib/python3/dist-packages/salt/states/pip_state.py”, line 32, in
import pkg_resources
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 3267, in
def _initialize_master_working_set():
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 3241, in _call_aside
f(*args, **kwargs)
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 3279, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 573, in _build_master
ws.require(requires)
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 891, in require
needed = self.resolve(parse_requirements(requirements))
File “/usr/lib/python3/dist-packages/pkg_resources/init.py”, line 777, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The ‘contextvars’ distribution was not found and is required by salt
local:

      ID: fingerprint-reader-pkgs-prebuilt-purged
Function: pkg.purged
  Result: True
 Comment: All specified packages (matching specified versions) are already absent
 Started: 11:14:13.471309
Duration: 28.127 ms
 Changes:   

      ID: fingerprint-reader-pkgs-installed
Function: pkg.latest
  Result: True
 Comment: All packages are up-to-date (fprintd, fprintd-doc, gir1.2-fprint-2.0, libfprint-2-2, libfprint-2-doc, libfprint-2-tod1, libpam-fprintd).
 Started: 11:14:13.503981
Duration: 2624.839 ms
 Changes:   

      ID: fingerprint-reader-service-enabled
Function: service.enabled
    Name: fprintd
  Result: True
 Comment: Service fprintd is already enabled, and is in the desired state
 Started: 11:14:16.129754
Duration: 17.058 ms
 Changes:   

      ID: fingerprint-reader-pam-auth-enabled
Function: cmd.run
    Name: pam-auth-update --enable fprintd
  Result: True
 Comment: unless condition is true
 Started: 11:14:16.152069
Duration: 1452.211 ms
 Changes:   

      ID: fingerprint-reader-delete-device-prints-util-installed
Function: file.managed
    Name: /usr/local/bin/libfprint_delete_device_prints.py
  Result: True
 Comment: File /usr/local/bin/libfprint_delete_device_prints.py is in the correct state
 Started: 11:14:17.604471
Duration: 15.303 ms
 Changes:   

      ID: fingerprint-reader-pam-config
Function: file.replace
    Name: /etc/pam.d/common-auth
  Result: True
 Comment: No changes needed to be made
 Started: 11:14:17.620105
Duration: 1.365 ms
 Changes:   

      ID: framework-sec-trim-enable-udev-rule-installed
Function: file.managed
    Name: /etc/udev/rules.d/10-framework-sec-trim.rules
  Result: True
 Comment: File /etc/udev/rules.d/10-framework-sec-trim.rules is in the correct state
 Started: 11:14:17.621540
Duration: 1.312 ms
 Changes:   

      ID: grub_decrease_menu_timeout_config
Function: file.replace
    Name: /etc/default/grub
  Result: True
 Comment: No changes needed to be made
 Started: 11:14:17.622913
Duration: 1.377 ms
 Changes:   

      ID: grub_decrease_menu_timeout_grub_update
Function: cmd.run
    Name: update-grub
  Result: True
 Comment: State was not run because none of the onchanges reqs changed
 Started: 11:14:17.624549
Duration: 0.002 ms
 Changes:   

      ID: hibernate_create_swap_file
Function: cmd.run
    Name: fallocate -l 16G /swapfile
  Result: True
 Comment: unless condition is true
 Started: 11:14:17.624579
Duration: 4.356 ms
 Changes:   

      ID: hibernate_chmod_swap
Function: file.managed
    Name: /swapfile
  Result: True
 Comment: File /swapfile exists with proper permissions. No changes made.
 Started: 11:14:17.629221
Duration: 0.664 ms
 Changes:   

      ID: hibernate_make_swap
Function: cmd.run
    Name: mkswap /swapfile
  Result: True
 Comment: State was not run because none of the onchanges reqs changed
 Started: 11:14:17.630231
Duration: 0.002 ms
 Changes:   

      ID: hibernate_swap_on
Function: cmd.run
    Name: swapon /swapfile
  Result: True
 Comment: unless condition is true
 Started: 11:14:17.630497
Duration: 5.069 ms
 Changes:   

      ID: hibernate_swap_fstab
Function: file.append
    Name: /etc/fstab
  Result: True
 Comment: unless condition is true
 Started: 11:14:17.635928
Duration: 4.511 ms
 Changes:   

      ID: hibernate_grub_resume_old_config_line
Function: file.replace
    Name: /etc/default/grub
  Result: True
 Comment: No changes needed to be made
 Started: 11:14:17.640515
Duration: 1.03 ms
 Changes:   

      ID: hibernate_grub_resume_old_config
Function: file.replace
    Name: /etc/default/grub
  Result: True
 Comment: No changes needed to be made
 Started: 11:14:17.641798
Duration: 0.977 ms
 Changes:   

      ID: hibernate_grub_resume_offset_old_config
Function: file.replace
    Name: /etc/default/grub
  Result: True
 Comment: No changes needed to be made
 Started: 11:14:17.642928
Duration: 0.955 ms
 Changes:   

      ID: hibernate_grub_resume
Function: file.managed
    Name: /etc/default/grub.d/hibernate.cfg
  Result: True
 Comment: File /etc/default/grub.d/hibernate.cfg is in the correct state
 Started: 11:14:17.644059
Duration: 1.012 ms
 Changes:   

      ID: hibernate_update_grub
Function: cmd.run
    Name: update-grub
  Result: True
 Comment: State was not run because none of the onchanges reqs changed
 Started: 11:14:17.645664
Duration: 0.002 ms
 Changes:   

      ID: hibernate_polkit_enabled
Function: file.managed
    Name: /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
  Result: True
 Comment: File /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla is in the correct state
 Started: 11:14:17.645695
Duration: 1.108 ms
 Changes:   

      ID: hibernate-hibernate-delay-sec
Function: file.replace
    Name: /etc/systemd/sleep.conf
  Result: True
 Comment: No changes needed to be made
 Started: 11:14:17.647097
Duration: 1.241 ms
 Changes:   

      ID: hibernate-suspend-mode
Function: file.replace
    Name: /etc/systemd/sleep.conf
  Result: True
 Comment: No changes needed to be made
 Started: 11:14:17.648567
Duration: 1.182 ms
 Changes:   

      ID: hibernate-suspend-state
Function: file.replace
    Name: /etc/systemd/sleep.conf
  Result: True
 Comment: No changes needed to be made
 Started: 11:14:17.649970
Duration: 1.223 ms
 Changes:   

      ID: hibernate-handle-suspend-key
Function: file.replace
    Name: /etc/systemd/logind.conf
  Result: True
 Comment: No changes needed to be made
 Started: 11:14:17.651440
Duration: 1.368 ms
 Changes:   

      ID: hibernate-handle-lid-switch
Function: file.replace
    Name: /etc/systemd/logind.conf
  Result: True
 Comment: No changes needed to be made
 Started: 11:14:17.653035
Duration: 1.274 ms
 Changes:   

      ID: hibernate-handle-lid-switch-external-power
Function: file.replace
    Name: /etc/systemd/logind.conf
  Result: True
 Comment: No changes needed to be made
 Started: 11:14:17.654536
Duration: 1.317 ms
 Changes:   

      ID: intel_audio_workaround_modprobe_conf_installed
Function: file.managed
    Name: /etc/modprobe.d/intel-audio-workaround.conf
  Result: True
 Comment: unless condition is true
 Started: 11:14:17.655918
Duration: 6.996 ms
 Changes:   

      ID: intel_audio_workaround_initramfs_updated
Function: cmd.run
    Name: update-initramfs -u
  Result: True
 Comment: State was not run because none of the onchanges reqs changed
 Started: 11:14:17.663253
Duration: 0.002 ms
 Changes:   

      ID: intel_ax210_workaround_linux_generic_latest
Function: pkg.latest
    Name: linux-generic-hwe-20.04
  Result: True
 Comment: Package linux-generic-hwe-20.04 is already up-to-date
 Started: 11:14:17.663289
Duration: 1578.411 ms
 Changes:   

      ID: intel_ax210_workaround_service_dead
Function: service.dead
    Name: intel-ax210-workaround
  Result: True
 Comment: The named service intel-ax210-workaround is not available
 Started: 11:14:19.241795
Duration: 3.486 ms
 Changes:   

      ID: intel_ax210_workaround_service_removed
Function: file.absent
    Name: /etc/systemd/system/intel-ax210-workaround.service
  Result: True
 Comment: File /etc/systemd/system/intel-ax210-workaround.service is not present
 Started: 11:14:19.245605
Duration: 0.331 ms
 Changes:   

      ID: intel_ax210_workaround_service_removed
Function: module.run
    Name: service.systemctl_reload
  Result: True
 Comment: State was not run because none of the onchanges reqs changed
 Started: 11:14:19.246199
Duration: 0.002 ms
 Changes:   

      ID: intel_ax210_workaround_firmware_restored
Function: cmd.run
    Name: /bin/sh -c "mv -f /lib/firmware/iwlwifi-ty-a0-gf-a0.pnvm.renamed-by-salt /lib/firmware/iwlwifi-ty-a0-gf-a0.pnvm ; rmmod iwlmvm ; rmmod iwlwifi ; modprobe iwlwifi"
  Result: True
 Comment: unless condition is true
 Started: 11:14:19.246315
Duration: 4.241 ms
 Changes:   

      ID: intel_ax210_workaround_firmware_reinstalled
Function: pkg.installed
    Name: linux-firmware
  Result: True
 Comment: unless condition is true
 Started: 11:14:19.250733
Duration: 4.156 ms
 Changes:   

      ID: intel_ax210_workaround_modprobe_conf_removed
Function: file.absent
    Name: /etc/modprobe.d/intel-ax210-workaround.conf
  Result: True
 Comment: File /etc/modprobe.d/intel-ax210-workaround.conf is not present
 Started: 11:14:19.254956
Duration: 0.298 ms
 Changes:   

      ID: intel_ax210_workaround_initramfs_updated
Function: cmd.run
    Name: update-initramfs -u
  Result: True
 Comment: State was not run because none of the onchanges reqs changed
 Started: 11:14:19.255525
Duration: 0.002 ms
 Changes:   

      ID: intel_xe_tearing_workaround_grub_old_config_line
Function: file.replace
    Name: /etc/default/grub
  Result: True
 Comment: No changes needed to be made
 Started: 11:14:19.255556
Duration: 1.158 ms
 Changes:   

      ID: intel_xe_tearing_workaround_grub_old_config
Function: file.replace
    Name: /etc/default/grub
  Result: True
 Comment: No changes needed to be made
 Started: 11:14:19.257031
Duration: 1.065 ms
 Changes:   

      ID: intel_xe_tearing_workaround_linux_generic_latest
Function: pkg.latest
    Name: linux-generic-hwe-20.04
  Result: True
 Comment: Package linux-generic-hwe-20.04 is already up-to-date
 Started: 11:14:19.258159
Duration: 1548.363 ms
 Changes:   

      ID: intel_xe_tearing_workaround_grub_config
Function: file.absent
    Name: /etc/default/grub.d/intel-xe-tearing-workaround.cfg
  Result: True
 Comment: File /etc/default/grub.d/intel-xe-tearing-workaround.cfg is not present
 Started: 11:14:20.806613
Duration: 0.358 ms
 Changes:   

      ID: intel_xe_tearing_workaround_grub_update
Function: cmd.run
    Name: update-grub
  Result: True
 Comment: State was not run because none of the onchanges reqs changed
 Started: 11:14:20.807507
Duration: 0.001 ms
 Changes:   

      ID: mem_sleep_default_grub_config_removed
Function: file.replace
    Name: /etc/default/grub
  Result: True
 Comment: No changes needed to be made
 Started: 11:14:20.807538
Duration: 1.368 ms
 Changes:   

      ID: mem_sleep_default_grub_config_removed_default
Function: file.replace
    Name: /etc/default/grub
  Result: True
 Comment: No changes needed to be made
 Started: 11:14:20.809173
Duration: 1.035 ms
 Changes:   

      ID: mem_sleep_default_grub_config_file
Function: file.managed
    Name: /etc/default/grub.d/mem-sleep-default.cfg
  Result: True
 Comment: File /etc/default/grub.d/mem-sleep-default.cfg is in the correct state
 Started: 11:14:20.810272
Duration: 38.614 ms
 Changes:   

      ID: mem_sleep_default_grub_update
Function: cmd.run
    Name: update-grub
  Result: True
 Comment: State was not run because none of the onchanges reqs changed
 Started: 11:14:20.850545
Duration: 0.006 ms
 Changes:   

      ID: tlp_service_dead
Function: service.dead
    Name: tlp
  Result: True
 Comment: The named service tlp is not available
 Started: 11:14:20.850651
Duration: 7.236 ms
 Changes:   

      ID: tlp_package_purged
Function: pkg.purged
    Name: tlp
  Result: True
 Comment: All specified packages are already absent
 Started: 11:14:20.858670
Duration: 1.331 ms
 Changes:   

      ID: touchpad-suspend-workaround
Function: file.managed
    Name: /lib/systemd/system-sleep/touchpad-suspend-workaround
  Result: True
 Comment: File /lib/systemd/system-sleep/touchpad-suspend-workaround is in the correct state
 Started: 11:14:20.860206
Duration: 3.846 ms
 Changes:   

      ID: grub-cleanup
Function: cmd.run
    Name: sed -i "$(for line in $(grep -Pn '^GRUB_CMDLINE_LINUX_DEFAULT=.*$' /etc/default/grub | cut -d':' -f1 | tail -n +2); do echo -n ${line}d '; ' ; done)" /etc/default/grub
  Result: True
 Comment: unless condition is true
 Started: 11:14:20.864255
Duration: 11.54 ms
 Changes:   

      ID: post_resume_power_draw_workaround_grub_config_file
Function: file.managed
    Name: /etc/default/grub.d/post-resume-power-draw-workaround.cfg
  Result: True
 Comment: File /etc/default/grub.d/post-resume-power-draw-workaround.cfg is in the correct state
 Started: 11:14:20.875918
Duration: 1.431 ms
 Changes:   

      ID: post_resume_power_draw_workaround_grub_update
Function: cmd.run
    Name: update-grub
  Result: True
 Comment: State was not run because none of the onchanges reqs changed
 Started: 11:14:20.877797
Duration: 0.002 ms
 Changes:   

      ID: pulseaudio-bt-hires-codecs-pkgs-installed
Function: pkg.latest
  Result: True
 Comment: Package gstreamer1.0-plugins-bad is already up-to-date
 Started: 11:14:20.877847
Duration: 1905.199 ms
 Changes:   

Summary for local

Succeeded: 52
Failed: 0

Total states run: 52
Total run time: 9.289 s

Can you post the output of this?

free -h

EDIT: Just checked my test 22.04 install and it looks like the formula managed to create swap correctly when I tested it a few days ago.

$ free -h
total used free shared buff/cache available
Mem: 15Gi 2.1Gi 10Gi 862Mi 2.9Gi 12Gi
Swap: 2.0Gi 0B 2.0Gi

So this is odd. It looks like the hibernate state isn’t removing the original /swapfile. It checks for its size and if it’s equal or smaller than your RAM it should remove it. It did so on my test setup, but it looks like it didn’t on yours. Could you do the following in a single terminal and post the result:

sudo -i
echo $(($(getconf _PHYS_PAGES) * $(getconf PAGE_SIZE) / (1024 * 1024 * 1024)))
echo $((($(swapon -s | grep '/swapfile ' | tr -s '[:blank:]' ',' | cut -d ',' -f 3) / 1024 + 1) / 1024))

Here’s the results:

echo $(($(getconf _PHYS_PAGES) * $(getconf PAGE_SIZE) / (1024 * 1024 * 1024)))

15

echo $((($(swapon -s | grep '/swapfile ’ | tr -s ‘[:blank:]’ ‘,’ | cut -d ‘,’ -f 3) / 1024 + 1) / 1024))

2

I’m guessing that the results above suggest that something is awry. I haven’t been doing anything particular with my system (installed some software, loaded about 180gb of data (docs, music, photos, movies) on a new install of 22.04 done last week. However, this was all done before I ran your script. If it is worth doing, I am happy to do a fresh install again, update the system, and then run your script before doing anything else. Might belp get to the bottom of it??

No, no, were not running Amateur Hour here - if there’s a bug we gotta find it. :grin: The formula should handle this even if it’s not a fresh install. And after a brief look I think I may have found the snafu. Stay tuned.

2 Likes

OK. Awaiting developments…