Skip to content

Instantly share code, notes, and snippets.

@tatumroaquin
Last active April 7, 2023 15:37
Show Gist options
  • Save tatumroaquin/f47aa6d40230b1799036713343e8f7d0 to your computer and use it in GitHub Desktop.
Save tatumroaquin/f47aa6d40230b1799036713343e8f7d0 to your computer and use it in GitHub Desktop.

Linux Problems

popping sound when playing audio on headphones

  • this is caused by 'power-saving' enabled by default on audio devices.
  • when playback is paused the audio device gets turned off, and upon resuming playback the devices gets a surge of power which causes the speaker drums to pop.

TLP solution:

sudo pacman -S tlp tlp-rdw
sudo systemctl enable tlp --now
sudo systemctl enable NetworkManager-dispatcher --now
sudo tlp-stat

sudo nvim /etc/tlp.conf
--------------------------
# change the following lines
SOUND_POWER_SAVE_ON_AC=0
SOUND_POWER_SAVE_ON_BAT=0
--------------------------

other solutions:

alternatively you can directly disable power saving from the snd_hda_intel parameters

sudo echo 0 > /sys/module/snd_hda_intel/parameters/power_save
sudo echo 0 > /sys/module/snd_hda_intel/parameters/power_save_controller

blank screen after 5-10 minutes of inactivity

  • this is related to the Energy Star settings of the Xorg screen saver settings.
  • to fix the problem we can disable the screen saver altogether along with the DPMS features
  • keep in mind that disabling screen blanking will increase the burden on the screen.
  • it is possible to get a permanent positive markings on the screen, when constantly displaying the same image for long periods of time.

Xorg Solution

sudo xset s off
sudo xset -dpms

systemd-resolve mDNS not working

  • iptables-nft firewall may be blocking the traffic (thread)
sudo nft flush ruleset
  • ensure that the following settings are enabled in /etc/systemd/resolved.conf
MulticastDNS=yes
LLMNR=yes

Hash Sum Mismatch

  • when performing the standard sudo apt update and installing a package often you might see an error message that stating it failed to fetch the package due to checksum mismatch
  • upon further researh on the ubuntu forms, the issues seems to be related to SHA256 optimization introduced from libcrypt20

gcrypt solution:

sudo zsh
mkdir /etc/gcrypt
echo all >> /etc/gcrypt/hwf.deny
  • the /etc/gcrypt/hwf.deny file disables specific hardware features of the the gcrypt component of gnupg.
  • essentially this solution disable the optimization causing the checksum mismatch.

unknown terminal type 'st-256color'

  • typing clear or any other commands via ssh may sometimes output a strange error messages, depending on the terminal being used by the client.

'st-256color': unknown terminal type.

st solution, generate terminfo files

cd /usr/src/st-0.9/
tic -sx st.info

yay fails to install on a fresh lxc container

install: failed to clone '/home//yay/pkg/yay/usr/bin/yay' from 'yay': Operation not permitted make: *** [Makefile:92: install] Error 1
==> ERROR: A failure occurred in package().

  • the problem is a coreutils bug in version 9.2, according to this article downgrading to 9.1-3 is the temporary fix.
pacman -U https://archive.archlinux.org/packages/c/coreutils/coreutils-9.1-3-x86_64.pkg.tar.zst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment