PSA: StarMade Linux Troubleshooting with Nvidia GPUs

    TheDerpGamerX

    Lord of Lawnmowers
    Joined
    Sep 18, 2017
    Messages
    215
    Reaction score
    215
    • Legacy Citizen 7
    • Community Content - Bronze 2
    After I had my own issues with Nvidia and Linux on my gaming laptop, I decided to make a PSA to help people who had the same issue I had.
    Note: As of 5/1/2025, there are other known issues with StarMade on Linux such as shader and credential issues. A fix for these is in the works and will be released soon.

    StarMade Linux Troubleshooting with Nvidia GPUs


    If you have a Linux computer with a Nvidia GPU and StarMade runs poorly, this may be due to your system selecting the wrong GPU (such as an integrated GPU on gaming laptops) rather than a high performance dedicated one.
    You can verify if this is happening by looking near the top of the latest log file (StarMade/logs/logstarmade.0.log):
    Code:
    Adapter: null
    Driver Version: null
    Vendor: Intel
    OpenGL Version: 4.6 (Compatibility Profile) Mesa 23.2.1-1ubuntu3.1~22.04.3
    Renderer: Mesa Intel(R) Xe Graphics (TGL GT2)
    If you happen to see something like this, rather than your dedicated GPU, this guide may prove useful.

    Prerequisites

    Before starting, identify your NVIDIA GPU model:

    Code:
    lspci | grep -i nvidia
    Ensure you have administrator (sudo) privileges on your system.

    Installing NVIDIA Drivers

    Ubuntu/Debian-based distributions:

    Code:
    sudo apt update
    sudo apt install nvidia-driver-570  # Use the latest version available (570 as of 04/01/2025)
    Fedora/RHEL-based distributions:

    Code:
    sudo dnf install akmod-nvidia
    Arch Linux:

    Code:
    sudo pacman -S nvidia
    After installation, reboot your system:

    Code:
    sudo reboot
    Verifying Driver Installation

    Check if your NVIDIA GPU is recognized:

    Code:
    nvidia-smi
    This should display information about your GPU, including model, driver version, and usage statistics.

    Troubleshooting Driver Issues

    Driver Not Communicating

    If you see this error:
    Code:
    NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
    Follow these steps:

    1. Check if NVIDIA drivers are installed:

    For Debian/Ubuntu:
    Code:
    dpkg -l | grep nvidia
    For Fedora/RHEL:
    Code:
    rpm -qa | grep nvidia
    2. Reinstall the drivers:

    For Ubuntu/Debian:
    Code:
    sudo apt purge *nvidia*
    sudo apt autoremove
    sudo apt install nvidia-driver-535  # Use the latest version
    For Fedora:
    Code:
    sudo dnf remove *nvidia*
    sudo dnf install akmod-nvidia
    For Arch:
    Code:
    sudo pacman -Rs nvidia
    sudo pacman -S nvidia
    Dealing with Secure Boot

    Secure Boot can prevent NVIDIA drivers from loading:

    1. Check Secure Boot status:
    Code:
    mokutil --sb-state
    2. If enabled, you have two options:
    - Disable Secure Boot in BIOS/UEFI
    - Sign the NVIDIA modules (advanced users)

    Blacklisting Nouveau Driver

    The open-source Nouveau driver might conflict with NVIDIA's proprietary driver:

    1. Check if Nouveau is loaded:
    Code:
    lsmod | grep nouveau
    2. Blacklist it:
    Code:
    sudo bash -c "echo 'blacklist nouveau' >> /etc/modprobe.d/blacklist.conf"
    sudo bash -c "echo 'options nouveau modeset=0' >> /etc/modprobe.d/blacklist.conf"
    3. Update initramfs:

    For Ubuntu/Debian:
    Code:
    sudo update-initramfs -u
    For Fedora/RHEL:
    Code:
    sudo dracut --force
    4. Reboot your system:
    Code:
    sudo reboot
    Configuring StarMade to use your GPU

    1. Via Steam launch options:
    - Right-click on StarMade in your Steam library
    - Select "Properties"
    - Click "SET LAUNCH OPTIONS" and add either:
    Code:
    prime-run %command%
    OR
    Code:
    __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia %command%
    Making GPU Selection Permanent

    Create a configuration file to always use your NVIDIA GPU:

    Code:
    sudo nano /etc/X11/xorg.conf.d/10-nvidia.conf
    Add these lines:

    Code:
    Section "OutputClass"
        Identifier "nvidia"
        MatchDriver "nvidia-drm"
        Driver "nvidia"
        Option "AllowEmptyInitialConfiguration"
        Option "PrimaryGPU" "yes"
    EndSection
    For a system-wide setting to make all OpenGL applications use the NVIDIA GPU by default:

    Code:
    sudo nano /etc/environment.d/nvidia.conf
    Add these lines:
    Code:
    __NV_PRIME_RENDER_OFFLOAD=1
    __GLX_VENDOR_LIBRARY_NAME=nvidia
    Then restart your system.

    Verifying GPU Usage

    While running StarMade check if it's using the NVIDIA GPU by running in a terminal:

    Code:
    nvidia-smi
    You should see your application in the processes list with GPU usage.

    You can also check the previously mentioned log file, and look for something like this:
    Code:
    Adapter: null
    Driver Version: null
    Vendor: NVIDIA Corporation
    OpenGL Version: 4.6.0 NVIDIA 570.133.07
    Renderer: NVIDIA GeForce GTX 1650/PCIe/SSE2
    [hr]

    If you encounter specific problems not covered here, ask for help in the #support channel in the StarMade Discord or consult your distribution's documentation or the NVIDIA forums for additional assistance.
     
    • Like
    Reactions: Valck
    Joined
    Jun 27, 2013
    Messages
    897
    Reaction score
    166
    Not affected (been weaned off Nvidia for well over a decade now), but thank you for the continued and in-depth Linux support, it is much appreciated.