Skip to content

Instantly share code, notes, and snippets.

@margual56
Last active April 18, 2023 09:10
Show Gist options
  • Save margual56/27a229df85cbd6fa18aebceb1a316832 to your computer and use it in GitHub Desktop.
Save margual56/27a229df85cbd6fa18aebceb1a316832 to your computer and use it in GitHub Desktop.
Some notes on common problems and tips after installing arch

Tips

Optimize power usage on start

You can either use:

  • powertop:
    • Create a service file (/etc/systemd/system/powertop.service):
       [Unit]
       Description=Powertop tunings
      
       [Service]
       Type=oneshot
       ExecStart=/usr/bin/powertop --auto-tune
      
       [Install]
       WantedBy=multi-user.target
    • Enable de service: sudo systemctl enable powertop.service
  • TLP: sudo systemctl enable tlp.service (no need to create the service)

The latter does not turn off PCI components.

Remember to do `powertop --calibrate

Battery optimization, hibernation, suspension and more

Follow this amazing blog: https://austingwalters.com/increasing-battery-life-on-an-arch-linux-laptop-thinkpad-t14s/

It includes how to correctly set up hibernation and sleep. Very much recommended!

Install hardware video acceleration libraries

Follow this instructions.

My console/programming font suck!

Yup, you should be using either:


Common problems

Loadkeys says "Couldn't get a file descriptor referring to the console"

I can't recall how I fixed this. It had to do with deleting a line or a file regarding the locale...

If you know, please leave a comment.

All emojis appear as empty blocks (like this: ▯)

There is probably missing fonts: paru --needed -S noto-fonts-emoji

With pipewire videos do not play on youtube (or other)

Source

If doing sudo systemctl restart pipewire solves the issue (temporarily), then it is a problem due to pipewire-media-session getting removed and the wireplumber dependency that is around now not playing well with pulse.

By switching to pipewire-pulse you can completely move to pipewire or if you want to stay on pulseaudio disable wireplumber with: systemctl --user mask wireplumber --now

Virtualization (VirtualBox) does not work

Source

You will need to install:

  • For the linux kernel, choose virtualbox-host-modules-arch
  • For any other kernel (including linux-lts), choose virtualbox-host-dkms

You will also need the headers for the kernel (e.g. linux-lts-headers, linux-zen-headers, etc)

Firefox on Wayland

Firefox by default runs on X11 (aka XWayland). In order to make it use Wayland, we need to set the environment variable: MOZ_ENABLE_WAYLAND=1

To make this change permanent, we need to copy the desktop file /usr/share/applications/firefox.desktop to $HOME/.local/share/applications/firefox.desktop. This is in order to customize the desktop file, and avoid it being overwritten when firefox updates.

Then, you need to edit the local desktop file and in every line that says Exec=..., put env MOZ_ENABLE_WAYLAND=1 before the existing command.

An example Exec line would be: Exec=env MOZ_ENABLE_WAYLAND=1 /usr/lib/firefox/firefox %u

I'm on KDE and all Firefox dialogs are from Gnome

Go to about:config and search for XDG. A value of "1" will equal kde dialogs. A value of "2" will equal gnome.

KDE Discover can't install 'system' packages (only flatpak)

Source

You need to install one of the backends first using pacman. You need packagekit-qt5 for "normal" packages, flatpak for Flatpaks and fwupd for firmware updates.

pacman -S packagekit-qt5 flatpak fwupd

Note: packagekit-qt5 is not recommended by Arch or Plasma. Anything other than pacman is usually going to have the potential to create partial upgrades, which are not supported.

GTK flatpak apps' fonts appear "blocky"

You need to install xdg-desktop-portal-gtk (sudo pacman --needed -S xdg-desktop-portal-gtk)

Otherwise, just try installing Flatseal and removing the X11 socket (assuming you are on wayland).

NTFS

I can't mount my NTFS drive or USB!

You need to install the ntfs-3g package.

It says the partition is broken and it can't be mounted

Don't panic. Just write sudo ntfsfix -b -d /dev/<drive>. That should do it.


Others

Matplotlib is currently using agg, which is a non-GUI backend

Source You need a matplotlib backend. One of:

  • Qt5Agg
  • GTKAgg
  • Qt4Agg

For example: sudo pacman -S python-pyqt5 and/or pip install pyqt5

If now the error is:

qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""

and you are using the flatpak version of pycharm, just use the normal version. That will solve the error.

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