Skip to content

Instantly share code, notes, and snippets.

@JanGalek
Last active February 26, 2025 21:47
Show Gist options
  • Save JanGalek/560cbea69f5543413b7b505ec201f65f to your computer and use it in GitHub Desktop.
Save JanGalek/560cbea69f5543413b7b505ec201f65f to your computer and use it in GitHub Desktop.

.ssh Permisions

  • .ssh directory 700 (drwx------)
  • public key (.pub file) 644 (-rw-r--r--)
  • private key (id_rsa) 600 (-rw-------)
  • lastly your home directory should not be writeable by the group or others (at most 755 (drwxr-xr-x)).

zsh fix for snap, ...

write to /etc/zsh/zprofile

emulate sh -c 'source /etc/profile'

logout/reboot

Memory info

sudo dmidecode --type memory

Git

Change commit author

git rebase -i HEAD~1

set edit for commit, and than run

git commit --amend --author="username <[email protected]>" --no-edit
git rebase --continue

Oh my zsh

Insecure completion-dependent directories detected

compaudit | xargs chmod g-w

USB support (v1-3)

sudo vim /etc/default/grub
GRUB_CMDLINE_LINUX="iommu=soft"
sudo grub2-mkconfig -o /boot/grub2/grub.cfg

reboot

(AMD Radeon R9 390)

sudo vim /etc/default/grub
GRUB_CMDLINE_LINUX="rhgb quiet iommu=pt amd_iommu=on amdgpu.modeset=1 amdgpu.cik_support=1 radeon.cik_support=0 amdgpu.dc=1 pci=nommconf"

sudo grub2-mkconfig -o /boot/grub2/grub.cfg

Version Lock

kernel-6.13.4 (fixed issue when proton game crashed pc)

sudo dnf versionlock add kernel-6.13.4*

and for unlock (if need)

sudo dnf versionlock delete kernel-6.13.4*

Spotify + other app listen

sudo vim /etc/pulse/default.pa

comment line with load-module module-role-cork

reboot

Automatic mount disc

To make the partition auto-mount, first find out the UUID of /dev/sda3 by doing:

sudo blkid

I'll assume you're using ext4 on /dev/sda3. Open up gedit like so:

sudo -H vim /etc/fstab

Now you want to add a line to the bottom of that file. It should look something like this (UUID will be different):

UUID=03ec5dd3-45c0-4f95-a363-61ff321a09ff /works ext4 defaults  0      2

For more info on fstab, this is a good resource - https://wiki.archlinux.org/index.php/Fstab.

Steam

Crash on startup

steam --reset

Steam Library-Must be on a filesystem mounted with execute permissions

Deleting Windows hibernate metadata As an alternative to above clean shutdown method, there is a way to completely destroy NTFS metadata that was saved after hibernating. This method is only feasible if you are not able or unwilling to boot into Windows and shut it down completely. This is by placing remove_hiberfile option when you are mounting your NTFS file system using ntfs-3g.

mount -t ntfs-3g -o remove_hiberfile /dev/your_NTFS_partition /mount/point

Proton-tricks

https://github.com/Matoking/protontricks

Proton - Sound

I tried the WINEPREFIX solution mentioned above to no avail, ended up finding protontricks that stratus mentioned on github soon after.

Here is what worked for me:

Fetch protontricks from github and mark executable wget https://raw.githubusercontent.com/Sirmentio/protontricks/master/protontricks && chmod +x protontricks

move protontricks to /usr/bin so it can be ran from terminal sudo mv protontricks /usr/bin/protontricks

setup xact for banished on steam protontricks 242920 xact

run winecfg for banished prefix using protontricks protontricks 242920 winecfg

click on libraries and add xact and xaudio2_7, leave them with native, builtin https://i.imgur.com/lvguBoG.png

this is with Ubuntu 18.04, WINEPREFIX solutions did not work for me in this case, but this did.

Video memory size

env WINEPREFIX="/home/warfacez/Games/SteamLibrary/steamapps/common/Proton 4.11/dist/share/default_pfx" WINEPATH="/home/warfacez/Games/SteamLibrary/steamapps/common/Proton 4.11/dist/bin/wine64" winetricks videomemorysize=2048

Game performance

mesa_glthred

https://www.gamingonlinux.com/wiki/Performance_impact_of_Mesa_glthread

GameMode

https://github.com/FeralInteractive/gamemode

ARK

put this into console (tab)

r.bloomquality 0
r.lightshafts 0

Docker

Permissions

sudo usermod -aG docker $USER

Git

whispering of branch after slash dont work

exec bash
source ~/.bashrc
exec zsh
source ~/.zshrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment