JshKlsn's Blog

My list of Linux fixes.

Since this article is becoming longer with time, I have decided to re-write it and group issues/fixes within categories. So in other words these issues/fixes are NOT in chronological order anymore. So the newest fix wont always be at the bottom.

Here is a collection of fixes for common issues I face with most distros. I am mostly writing this to help my future self for when I inevitably distro hop again or reinstall my current one and forget about all of the fixes I needed to do. Plus anyone else who may find this useful. I will continue to update this post with new fixes. Think of this page as a checklist/setup guide for issues I face frequently. Any niche or specialty fixes will get their own blog post.

  1. Davinci Resolve
  2. OBS-Studio
  3. Gaming
  4. Server Stuff
  5. Conclusion

Davinci Resolve


Installing Davinci Resolve on Fedora

Issue: Installing Davinci Resolve on Fedora results in Davinci not launching/working.
Fix: Force system to use system libraries by moving the libraries Davinci ships with.

Normally I'd use something like Davinci-Helper by H3rz3n, but unfortunately the project has been seemingly abandoned and does not work with Fedora 43. So I am forced to manually install Davinci, which is more annoying and difficult than it should be.

Firstly, you need to install the dependencies;

sudo dnf install -y libxcrypt-compat libcurl libcurl-devel mesa-libGLU fuse-libs

Download Davinci from their website and open the .run file with the terminal command;

chmod +x ./DaVinci_Resolve_Studio_*_Linux.run && SKIP_PACKAGE_CHECK=1 ./DaVinci_Resolve_Studio_*_Linux.run

This will install Davinci and skip the package check which is important as Fedora has deprecated the zlib library.

Once Davinci is installed, you need to then (re)move a bunch of Glib libraries that Davinci ships with, as they are old and do not work with Fedora. This will force Davinci to use our system libraries.

Make a new directory;

sudo mkdir /opt/resolve/libs/disabled_libraries

and move the old files to that directory;

cd /opt/resolve/libs && sudo mv libglib* libgio* libgmodule* disabled_libraries/

Sometimes this makes Davinci Resolve open and work without issue, and sometimes not. If your Davinci opens and then crashes, you may need to create a wrapper to force Python 3.11. This is what I had to do, and I found the helpful tip from bob490 on the official Davinci forums. Just in case that thread ever gets deleted, here are the steps;

sudo dnf install python3.11 python3.11-libs

Then create a wrapper to force Python 3.11;

sudo nano /usr/local/bin/resolve-wrapper
#!/bin/bash
export LD_PRELOAD=/usr/lib64/libpython3.11.so.1.0
/opt/resolve/bin/resolve "$@"

and of course make it executable

sudo chmod +x /usr/local/bin/resolve-wrapper

and then what I did was edit the Davinci Resolve app launch command to launch the script we just made

/usr/local/bin/resolve-wrapper

Now Davinci should be installed and working perfectly.


Davinci Resolve USB microphone fix

Issue: Davinci Resolve doesn't detect USB microphones.
Fix: Install pulseaudio-alsa.

sudo dnf install alsa-plugins-pulseaudio

Sometimes this doesn't work (thanks, Linux!) and you may need to try installing pipewire-alsa instead (or also)

sudo dnf install pipewire-alsa

Keep in mind, Davinci Resolve will still label your mic as an ALSA input (1-8) but one of them should work now.


Converting files with AAC audio to work with Davinci Resolve Studio

Issue: Davinci Resolve Free/Studio on Linux does not support AAC audio.
Fix: Create a script to convert these files to a compatible format.

This is one of the most frustrating issues for content creators that have switched to Linux. This is a big issue because, like it or not, a large amount of devices record with the AAC audio codec with no ability to change it. From phones, to cameras, to dash cams.

While I am aware of this limitation and adjust my workflow where I can to get around it, like selecting OPUS in OBS vs AAC, some devices are stubborn and fixed. Like my dash cam.

I use Davinci Resolve Studio to view footage from my dash cam, and having audio support is extremely important because I use the audio waveform to remember where in the 10 minute clip I pressed the "save" button.

I wrote a script to batch convert all files from my dash cam from AAC audio to 24-bit PCM audio.

I have created two different scripts

This first one asks you to type in the name of the directory you would like your converted files to be put into, which is useful if you want to run the file from the same directory each time, but have the converted files sorted into different directories without modifying the script each time.

A couple things to note;

#!/bin/bash
# Input for directory
read -p "Name of folder you want the files to be put into (will be created if it does not exist): " OUTPUT_DIR

AUDIO_CODEC="pcm_s24le"  # Specify audio codec - See list here: https://trac.ffmpeg.org/wiki/audio%20types

EXT=".MP4"
mkdir -p "$OUTPUT_DIR"

# Check if ffmpeg is installed
if ! command -v ffmpeg &> /dev/null; then
    echo "ffmpeg could not be found. Please install it and try again: https://ffmpeg.org/download.html"
    exit 1
fi

for f in *$EXT; do
    if [ -e "$f" ]; then
        NAME=$(basename "$f" "$EXT")
        OUTPUT="$OUTPUT_DIR/${NAME}.MP4"

        # Convert the file while preserving metadata
        if ! ffmpeg -i "$f" -movflags use_metadata_tags -map 0 -vcodec copy -acodec "$AUDIO_CODEC" -f mov "$OUTPUT"; then
            echo -e "\e[1;91mFailed to convert: \e[1;94m$f \e[1;92m.\e[0m"
            continue
        fi

        # Preserve the modified date of the original file
        MODIFIED_DATE=$(stat -c %y "$f")  # Get the modified date
        touch -d "$MODIFIED_DATE" "$OUTPUT"  # Set the modified date

        echo -e "\e[1;92mConverted: \e[1;94m$f \e[1;97mto \e[1;94m$OUTPUT \e[1;92mwith original modified date retained.\e[0m"
    fi
done

# Completion message
echo -e "\e[1;93mAll conversions finished! Check the \e[1;91m$OUTPUT_DIR \e[1;93mdirectory for the output files.\e[0m"
echo -e "\e[1;37;44mScript by JshKlsn\e[0m"

And the second script I created is nearly identical to the first one, except it just automatically converts all files into a directory called "converted". No input required. This can be changed by replacing the "converted" on line 2 to any other name.

#!/bin/bash
OUTPUT_DIR="converted"
AUDIO_CODEC="pcm_s24le"  # Specify audio codec - See list here: https://trac.ffmpeg.org/wiki/audio%20types

EXT=".MP4"
mkdir -p $OUTPUT_DIR

# Check if ffmpeg is installed
if ! command -v ffmpeg &> /dev/null; then
    echo "ffmpeg could not be found. Please install it and try again: https://ffmpeg.org/download.html"
    exit 1
fi

for f in *$EXT; do
    if [ -e "$f" ]; then
        NAME=$(basename "$f" "$EXT")
        OUTPUT="$OUTPUT_DIR/${NAME}.MP4"

        # Convert the file while preserving metadata
        if ! ffmpeg -i "$f" -movflags use_metadata_tags -map 0 -vcodec copy -acodec "$AUDIO_CODEC" -f mov "$OUTPUT"; then
            echo -e "\e[1;91mFailed to convert: \e[1;94m$f \e[1;92m.\e[0m"
            continue
        fi

        # Preserve the modified date of the original file
        MODIFIED_DATE=$(stat -c %y "$f")  # Get the modified date
        touch -d "$MODIFIED_DATE" "$OUTPUT"  # Set the modified date

        echo -e "\e[1;92mConverted: \e[1;94m$f \e[1;97mto \e[1;94m$OUTPUT \e[1;92mwith original modified date retained.\e[0m"
    fi
done

# Completion message
echo -e "\e[1;93mAll conversions finished! Check the \e[1;91m$OUTPUT_DIR \e[1;93mdirectory for the output files.\e[0m"
echo -e "\e[1;37;44mScript by JshKlsn\e[0m"

Be sure to make the script executable by running;

chmod +x name_of_script.sh

Something important to note is that these settings are ideal for MY dash cam which uses .MP4 container and 1 audio track. I could also use pcm_s16le instead of pcm_s24le, but the file size difference isn't much and doesn't bother me.

If your dash cam uses a different container, codec, or even multiple audio tracks, you should modify the script accordingly. FFMPEG is very powerful and can be adjusted to your needs.

You can add this script to the right-click context menu in KDE by creating a new .desktop file in /usr/share/kio/servicemenus with the following;

[Desktop Entry]
Type=Service
ServiceTypes=KonqPopupMenu/Plugin
MimeType=video/mp4;
Actions=ConvertToMP4;
X-KDE-Priority=TopLevel
X-KDE-Submenu=Convert Video
Icon=video-x-generic
X-KDE-StartupNotify=false

[Desktop Action ConvertToMP4]
Name=Convert Dashcam AAC to PCM24LE
Exec=sh ~/Scripts/convert-dashcam-aac-pcm24le-AUTO.sh %F
Icon=video-x-generic

Note that the .desktop file is looking for a script named convert-dashcam-aac-pcm24le-AUTO.sh in ~/Scripts

Now when you right click a .mp4 file, you'll get the option to run the script and convert it.


Fixing Playback/Recording audio streams flickering when Davinci is open

Issue: Davinci Resolve causes a bunch of ALSA plug-in streams to flicker quickly, resulting in zero sound inside Davinci itself.
Fix: Plug in and enable a microphone.

After upgrading to Fedora 44 I noticed I my computer UI would flicker when Davinci was open, and Davinci itself had no playback audio. After a bunch of troubleshooting and reinstalling of packages, Davinci, etc. I finally found the solution posted on the EndeavourOS forums of all places.

Video of issue · JshKlsn

Thanks to Bink on the forum, I learned that the fix is simply enabling your microphone.

I suppose you could setup a dummy input device to fix this issue, but that's something I am not going to do. Unfortunately my RODE AI-1 AMP requires me to unplug and replug it in every time my computer boots up, and the scripts I have tried to create to digitally "unplug" and "replug" my AMP in have not been successful yet. Maybe one day I will put more effort into solving that, and if/when I do, you can be sure to find the fix in this article.


Using system fonts with Davinci

By default Davinci Resolve detects its own packaged fonts, as well as LOCAL fonts installed on the system. However, if you're like me, you install your own fonts system wide for better compatibility with some apps (I've found OBS Studio prefers system installed fonts over user installed fonts).

The fix is really simple, it's just buried in awkward menus in typical Resolve fashion.

SystemFonts:;/usr/local/share/fonts/

This is where system fonts are installed by default on Fedora.

Make sure you click save, and restart Davinci. For some reason on Linux you need to restart Davinci for it to detect new fonts, so every time you install a new font, you need to restart Davinci. I think it's odd that Windows lets you install fonts while the program is running, but Linux does not. Especially since Linux lets you move and rename files on your system while they are open, while Windows does not. I assume this is some quirk of Davinci on Linux, considering BlackMagic does not treat their Linux users equal.


OBS-Studio

OBS-Studio extreme GPU usage

Issue: OBS-Studio is using between 60-150% more GPU than Windows.
Fix: Uninstall plugins.

Nobara Linux ships with an installer for OBS-Studio which by default installs 9 plugins along with it (technically more, but some of them are included in the main package). These plugins are;

Now I don't know which one(s) were the culprit because I decided to uninstall all of the ones I didn't have a need for anyway. The ones I uninstalled were;

If you didn't install OBS via the Nobara recommended additions (if you're installing manually, do NOT install the flatpak! as the flatpak version doesn't have full hardware support for things like ROCm and CUDA or hardware encode/decode support via VAAPI and NVENC in applications that support them), or if your distro maintainer doesn't include all this bloat, you most likely wont have these issues.


Gaming

GameSir G7 SE Controller not working/keeps disconnecting

Issue: GameSir G7 SE controller isn't detected, or it is, but it keeps disconnecting/reconnecting every few seconds. Also the LED may not be lit.
Fix: Install xone: github.com/dlundqvist/xone

Follow the install instructions on the GitHub (install prerequisites, clone repo, run install script)

Some distros work out of the box; some distros simply don't recognise the controller at all; and some will recognise some input, but will disconnect/reconnect multiple times per minute and the power LED wont be lit.

Installing the xone kernel driver immediately fixes this issue and the controller begins to function fully, stops disconnecting, and the power LED lights up. Keep in mind this is only required for some controllers. Many controllers, even from the same company, work fine right out of the box.


GameSir G7 Pro Controller not working

Issue: GameSir G7 Pro controller isn't detected.
Fix: Switch to xinput mode (and maybe install steam-devices)

It's a lot easier to get Linux to recognize the G7 Pro vs the G7 SE. All you have to do is hold the share + menu button for a few seconds. The Xbox logo will blink and it'll now be in xinput mode. In this mode everything works EXCEPT rumble. Now hold share + xbox button to switch to "generic xbox controller" mode. In this mode rumble should begin working in wireless mode.

Your system should recognise the controller without issue now. Unless you have Steam flatpak installed. If you have Steam installed via flatpak, you need to install steam-devices. This is something Steam prompts you with upon first launch, but if you're like me, you forgot, and now you're wondering why your G7 Pro isn't working with Steam.

sudo dnf install steam-devices

Reboot your computer after running this command and Steam should now recognise your controller. Be aware the steam-devices package is only available in the Fedora nonfree repo.


Getting MangoHUD (flatpak) to work with Steam and/or MangoJuice

Issue: MangoHUD isn't working with Steam games, even with MANGOHUD=1 %command% and ManjoJuice isn't affecting config file.
Fix: Create override and adjust permissions.

For some reason trying to get MangoHUD (Fedora package, Flathub Flatpak, etc) working with Steam is unsuccessful. The only way I have been able to get it to work is to install the VulkanLayer version via terminal. I picked the 25.08 branch at the time of writing this, which works great.

flatpak install org.freedesktop.Platform.VulkanLayer.MangoHud

and then create an override for the Steam package

flatpak override --user --env=MANGOHUD=1 com.valvesoftware.Steam

This automatically works great, but funny enough MangoHUD cannot see the config file, so modifying it does nothing. You need to allow MangoHUD access to the config file located outside of the flatpak container.

flatpak override --user --filesystem=xdg-config/MangoHud:ro

After that, MangoHUD was automatically detected by every Steam game without requiring a launch command, and MangoJuice (Or Goverlay/manually) can freely edit the config file.


Getting MangoHUD to work with 32-bit/Linux native games

Issue: MangoHUD does not work with 32-bit games, or Linux native games.
Fix: Manually install MangoHUD from GitHub, which includes 32-bit dependencies.

MangoHUD wouldn't work for me in some games, no matter if it was the RPM or Flatpak version. Turns out MangoHUD from RPM or Flatpak does not include 32-bit dependencies, so it cannot hook into 32-bit or native Linux games properly. Manually downloading MangoHUD from GitHub and installing it fixes these issues.

Download the latest MangoHUD from GitHub (at the time of writing, MangoHud-0.8.2.r0.ga37b007.tar.gz is the latest one that I can confirm works)

Extract the archive, make the script executable, and run it with the install command.

chmod +x mangohud-setup.sh && ./mangohud-setup.sh install

Now MangoHUD should work with 32-bit and Linux native games.


Server Stuff

Rust Desk unattended access on KDE Wayland

flatpak permission-set kde-authorized remote-desktop com.rustdesk.RustDesk yes

YOU'VE REACHED THE END 🎉

That's all for now.

Again, this post is for issues that I face across many distros and how I fixed them. Like I said, this post will be updated when a new issue arises and a fix is found. I will use this space to document any issues - big or small - that I have, as my goal is to make a "things to do after a fresh install" type guide.

If this post helped you, that's awesome, but keep in mind this isn't a "how to fix your issue" guide, so if my fixes don't work for you, I am sorry, but I can't help.