Skip to content

Instantly share code, notes, and snippets.

@digikar99
Last active August 9, 2023 21:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save digikar99/63c211bad0853ad1999260f1a233647e to your computer and use it in GitHub Desktop.
Save digikar99/63c211bad0853ad1999260f1a233647e to your computer and use it in GitHub Desktop.
Ubuntu 22.04 customization reference for myself

Ubuntu 22.04 Customization

It’s been almost 4 years since my last linux OS upgrade. Last time it was Ubuntu 18.04, this time it is Ubuntu 22.04. Unfortunately, I do a lot of customization which can take plenty of post-installation time. This is one such list made primarily for self-reference later; it’d probably still be incomplete since I’m relying on memory.

Contents

Softwares

Default APT repositories

sudo apt update
sudo apt upgrade
sudo reboot
sudo apt install cpufrequtils xfce4 dolphin ark vlc sbcl kdeconnect timeshift texlive pdfgrep

Other APT repositories

Emacs packaged in the official ubuntu 22.04 repositories is version 27, while at the time of this writing, all the packages, .emacs and .emacs.d is tested for emacs 28.

sudo apt remove --autoremove emacs emacs-common
sudo add-apt-repository ppa:kelleyk/emacs
sudo apt install emacs28

Hardware accelerated ffmpeg

I also do a fair bit of video processing from time to time. Having a capable GPU is handy; but putting it to use can be a bit of work. Fortunately, in this ubuntu version, I was able to get it to work in less than an hour or two.

Use a combination of the instructions at the following two pages:

Make sure to have hevc_nvenc for h265 encoding.

nvtop might be useful for checking GPU usage to see if the GPU is actually being used.

Other softwares

These include

  • latest SBCL
  • Mullvad VPN
  • Zoom
  • Google Chrome
  • Syncthing
  • Telegram

Speeding up boot times

Install systemd-boot

Disable snapd

Check with systemd-analyze blame to see the evil impact of snaps on boot time.

If convinced, follow the instructions at the following page or similar to disable snap: https://ubuntuhandbook.org/index.php/2022/04/remove-snap-block-ubuntu-2204/

Hibernate

Someone said that if boot speed is actually that much important, then one should consider hibernation instead of fooling oneself with fast startup.

Hibernation did work by default; I ended up using a swap partition.

  • One needs to edit the /etc/fstab to point to the swap partition.
  • And specify a resume=UUID=[swap-partition-uuid] option to the GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub, or equivalently in /boot/efi/loader/entries/[interesting-entry.conf] for systemd-boot.

Miscellaneous Issues

Freezes

Ubuntu 22.04 (too) showed a tendency to have random freezes. Though, fortunately, the issue seems distinct from those involving graphic drivers. In my case, I’m using XPS 9570, and the freezes happened during boot, before login, soon after login, as well as a few minutes after login, but also after suspend.

Perhaps there are two aspects here -

Freezes after suspend with XFCE4 but not with GNOME Desktop

The solution as suggested here and that also worked for me is the following

sudo apt remove xfce4-screensaver
sudo apt install light-locker
# This additional fix seems required because I started with a Ubuntu 22.04
# base system instead of Xubuntu 22.04; so, both might be competing with
# each other in some respects
sudo apt remove xfce4-power-manager

Seemingly random freezes unless booted in safe mode

Ubuntu 22.04 shipped with kernel 6.2 and 5.19. Unfortunately, the problem occured with both of them. The exact problem is still a mystery, but at the time of this writing, a suggestion to install kernel 6.0 seems to have yielded success and stop the freezing behaviors.

See instructions on a page such as this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment