Skip to content

Instantly share code, notes, and snippets.

View sxiii's full-sized avatar
🐧
Ask me any questions on free and open source software!

Dennis Ivanov sxiii

🐧
Ask me any questions on free and open source software!
View GitHub Profile
@sxiii
sxiii / README.md
Created July 31, 2021 04:49
Fedora 34 AMDGPU OpenCL Pro Driver (Based On Ubuntu Driver)

If you need to get working OpenCL on AMD Navi on Fedora, follow this steps:

sudo dnf -y groupinstall 'RPM Development Tools'
rpmdev-setuptree
cd ~/rpmbuild/SOURCES
wget --referer https://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-Driver-for-Linux-Release-Notes.aspx https://drivers.amd.com/drivers/linux/amdgpu-pro-20.45-1188099-ubuntu-20.04.tar.xz
cd ~/rpmbuild/SPECS
git clone https://github.com/secureworkstation/rpm-amdgpu-pro-opencl amdgpu-pro-opencl
cd amdgpu-pro-opencl
rpmbuild -ba amdgpu-pro-opencl.spec
@sxiii
sxiii / macbook-pulseaudio-fix.md
Last active June 23, 2021 00:40
Fix Pulseaudio dying on Macbook Pro and Fedora

Pulseaudio Dies On Macbook Pro 16,1 very often

I fixed it easily

Open this file: /etc/pulse/daemon.conf, for example:

sudo nano /etc/pulse/daemon.conf

Then find the lines realtime-scheduling = yes and realtime-priority = 5 and unomment them by removing ; at the beginning so it becomes:

realtime-scheduling = yes
realtime-priority = 5

Save the file

Re-run the pulseaudio and you're done!

@sxiii
sxiii / hardinfo-fedora.md
Last active March 2, 2024 03:18
Install HardInfo on Fedora/CentOS Linux

For some reason, the Fedora team decided to stop packaging Hardinfo in the repositories, so you’ll need to build it from sources as shown..

sudo dnf install glib-devel gtk+-devel zlib-devel libsoup-devel json-glib-devel gtk2-devel cmake
cd Downloads
git clone https://github.com/lpereira/hardinfo.git
cd hardinfo
mkdir build
cd build
cmake ..
make
@sxiii
sxiii / steamkill.sh
Created June 20, 2021 22:16
Kill all steam instances running on your computer in Linux
#!/bin/bash
# Kill all steam instances
sudo kill $(ps ax|grep "steam" | awk -F"\ " '{ print $1 }')
# Kill all wine instances
sudo wineserver -l
@sxiii
sxiii / replace-webcam-background-fedora.md
Last active June 18, 2021 10:34
Replace webcam background on Fedora Linux 32

How to replace webcam background with neural network processing on Linux

Starting requirements: Linux, Bash, Fedora

sudo dnf install wget git # Only if you don't have them already

We need RPM Fusion repos here for v4l2loopback

wget http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-32.noarch.rpm
sudo dnf install ./rpmfusion*rpm
sudo dnf update
sudo dnf install python3.6 ffmpeg v4l2loopback
git clone https://gitlab.com/parrot_parrot/ms-teams-replace-background
@sxiii
sxiii / 91-pulseaudio-custom.rules
Last active June 17, 2021 02:21
Add Audio Config to Macbook Pro with SH script
SUBSYSTEM!="sound", GOTO="pulseaudio_end"
ACTION!="change", GOTO="pulseaudio_end"
KERNEL!="card*", GOTO="pulseaudio_end"
SUBSYSTEMS=="pci", ATTRS{vendor}=="0x106b", ATTRS{device}=="0x1803", ENV{PULSE_PROFILE_SET}="apple-t2.conf"
LABEL="pulseaudio_end"
@sxiii
sxiii / chia-nvme-usage-statistics.md
Last active May 25, 2021 21:09
CHIA NVME Statistics Gathering Bash Oneliner Linux

This command gathers statistics on your NVME usage every 6 hours

You can also replace the delay (sleep 21600) with any other time in seconds

Don't forget to create folder ~/Chia-NVME/ before running

Also don't forget to change /dev/nvme0 to your actual device

while true; do sleep 21600; date >> ~/Chia-NNVME/stat.txt && sudo nvme smart-log /dev/nvme0 >> ~/Chia-NNVME/stat.txt; done
@sxiii
sxiii / install-anydesk-arch.md
Last active March 6, 2024 08:08
How to install AnyDesk on ArchLinux / Manjaro / Garuda so somebody can help you fix or configure it

How to install AnyDesk on ArchLinux / Manjaro / Garuda so somebody can help you fix or configure it


sudo pacman -Sy
sudo pacman -S glibc lib32-glibc
sudo pacman -S yay
yay -S anydesk-bin

@sxiii
sxiii / recover-arch.md
Created May 20, 2021 21:41
What to do if Arch / Manjaro linux has broken packages

If your Manjaro, ArchLinux, Garuda, EndeavourOS and other Arch-based distro has broken packages, use this command to reinstall them (via chroot or recovery CLI)


pacman -Syu $(pacman -Qnq) --overwrite "*"

Hope this helps. Good luck!

@sxiii
sxiii / readme.md
Created March 4, 2021 19:40
How to launch games via Proton from CLI (useful for debug)

How to launch games via Proton from CLI (useful for debug)

In just 2 steps

First. Run this:

export STEAM_COMPAT_DATA_PATH=~/.local/share/Steam/steamapps/compatdata

Second. Now in the same terminal, run your game (this example: Raft)

~/.local/share/Steam/steamapps/common/Proton\ 5.13/proton run ~/.local/share/Steam/steamapps/common/Raft/Raft.exe