Skip to content

About

Tuxedo driver DKMS patch + DaVinci Resolve Studio installer for XMG/Schenker laptops on Fedora KDE (Wayland, hybrid NVIDIA/Intel)

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

19 Commits

Folders and files

Repository files navigation

Fedora KDE Setup Toolkit (XMG Pro 16 VE M25 & DaVinci Resolve)

OS - Fedora Hardware - XMG License - GPLv3

An all-in-one setup and maintenance toolkit for running Fedora KDE on the XMG Pro 16 VE M25 laptop (and compatible Clevo/Uniwill chassis with hybrid NVIDIA/Intel graphics), plus automated fixers for DaVinci Resolve Studio, Google Antigravity IDE, and Razer peripherals.


⚑ Quick Start (The Easiest Way)

You do not need to manually download or run individual scripts one by one. This repository includes an interactive master control menu:

# 1. Clone or download this repository
git clone https://github.com/DenisJosifoski/xmg-linux-scripts.git
cd xmg-linux-scripts

# 2. Launch the interactive master menu
./setup.sh
==================================================================
     Fedora KDE & XMG M25 Setup Toolkit (Master Menu)            
==================================================================
  [Core Laptop & Hardware]
   1) XMG M25 Drivers & TCC Patch             (fedora-xmg-m25.sh)
   2) Sleep & S2idle Battery Drain Fixes      (apply_fixes.sh)
   3) Install Keyboard Backlight Resume Hook  (xmg-backlight-resume.sh)

  [Applications & Workarounds]
   4) DaVinci Resolve Studio Full Installer   (fedora-resolve-installer.sh)
   5) DaVinci Resolve GPU & KDE Titlebar Fix  (fedora-resolve-fix.sh)
   6) Transcode Video Audio (AAC β†’ PCM)       (prepare-for-resolve.sh)
   7) Antigravity IDE Exit Crash Fixer        (fedora-antigravity-fix.sh)
   8) Affinity Extreme Zoom Freeze Fix        (apply-affinity-zoom-fix.sh)

  [Razer Peripherals (Optional)]
   9) OpenRazer Mouse Dock Pro Driver         (fedora-openrazer.sh)
  10) Razer USB Autosuspend / PowerTOP Fix    (fix-razer-autosuspend.sh)

  [Automated Workflows]
   G) Guided Setup Wizard (interactive step-by-step)
   A) Apply Recommended Core Laptop Fixes (1 + 2)
   Q) Quit
------------------------------------------------------------------

Beginner Tip: If you're not sure what you need, choose option G (Guided Setup Wizard). It will ask you simple Yes/No questions and configure only what matches your hardware!


πŸ–₯️ Tested Environment

  • Laptop Model: Schenker / XMG Pro 16 VE M25
  • Operating System: Fedora 44 KDE (Linux 64-bit)
  • Kernel: 7.0.x (tested on 7.0.11 and 7.0.12)
  • Display Server: Wayland with KDE Plasma 6
  • GPU: NVIDIA GeForce RTX 5070 Ti Laptop GPU + Intel Integrated Graphics (Hybrid PRIME)
  • DaVinci Resolve Studio: 21.x (Linux)

πŸ“‹ Prerequisites / Before You Run

If you are setting up a fresh Fedora installation, complete these 4 simple steps first. They ensure your graphics card and system libraries are ready.

Step A β€” Install NVIDIA Drivers

Fedora needs the official NVIDIA proprietary drivers to use your dedicated graphics card:

# 1. Enable RPM Fusion repositories (Free & Non-Free)
sudo dnf install -y \
  https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
  https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

# 2. Install NVIDIA driver and CUDA compute support
sudo dnf install -y akmod-nvidia xorg-x11-drv-nvidia-cuda

# 3. Wait for the background compiler to finish (~2-3 minutes), then verify:
modinfo -F version nvidia
# If a version number appears (e.g. 570.xx), the driver is ready β€” reboot!
# If blank, wait 1 more minute and re-test before rebooting.
sudo reboot

After rebooting, confirm NVIDIA is working:

nvidia-smi

Step B β€” Enable NVIDIA for Wayland & KDE Plasma

To make sure KDE Plasma Wayland uses your NVIDIA card smoothly for display output:

sudo grubby --update-kernel=ALL --args="nvidia-drm.modeset=1"
sudo reboot

After reboot, verify:

glxinfo | grep "OpenGL renderer"
# Should display your NVIDIA GeForce RTX GPU (not llvmpipe)

Step C β€” Install TUXEDO Control Center (TCC)

TUXEDO Control Center lets you manage fan profiles, keyboard backlights, and power modes. Install it from the official TUXEDO repository:

# 1. Add TUXEDO repository
sudo dnf config-manager addrepo --from-repofile="https://rpm.tuxedocomputers.com/fedora/tuxedo.repo"

# 2. Import their security key
sudo rpm --import https://rpm.tuxedocomputers.com/fedora/43/0x54840598.pub.asc

# 3. Install the Control Center app
sudo dnf install -y tuxedo-control-center

Note: The RPM package installs default tuxedo drivers. Our toolkit (fedora-xmg-m25.sh) will replace them with custom Schenker-whitelisted drivers so your XMG hardware is recognized.


Step D β€” Install Media Codecs

Fedora excludes certain audio/video codecs out of the box due to licensing. Install them so web videos, media players, and video editors play smoothly:

# 1. Swap limited ffmpeg for full-featured ffmpeg
sudo dnf swap -y ffmpeg-free ffmpeg --allowerasing

# 2. Install multimedia plugins (H.264, H.265, AAC, etc.)
sudo dnf update -y @multimedia --setopt="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin
sudo dnf group install -y sound-and-video

# 3. Enable hardware video decoding for Intel iGPU
sudo dnf swap -y mesa-va-drivers mesa-va-drivers-freeworld

πŸ—ΊοΈ How the Toolkit Works

[Fresh Fedora Install]
    β”‚
    β”œβ”€β”€ Step A: Install NVIDIA Drivers (RPM Fusion akmod-nvidia)
    β”œβ”€β”€ Step B: Enable Wayland Modeset (nvidia-drm.modeset=1)
    β”œβ”€β”€ Step C: Install TUXEDO Control Center (official repo)
    └── Step D: Install Full Media Codecs (ffmpeg & GStreamer)
    β”‚
    β–Ό [Reboot]
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      ./setup.sh                        β”‚
β”‚            (Interactive Master Control Menu)           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
    β”œβ”€β”€ [Option 1] fedora-xmg-m25.sh
    β”‚     β”œβ”€β”€ Schenker DMI whitelist bypass
    β”‚     β”œβ”€β”€ M25 TDP power limit tuning
    β”‚     └── Wayland / Electron crash patches for TCC
    β”‚
    β”œβ”€β”€ [Option 2] apply_fixes.sh
    β”‚     β”œβ”€β”€ Fixes S2idle battery drain during sleep
    β”‚     β”œβ”€β”€ Enables NVIDIA S0ix dynamic power saving
    β”‚     └── Fixes Wayland lock-screen freeze (nvidia-drm.fbdev=1)
    β”‚
    β”œβ”€β”€ [Option 3] xmg-backlight-resume.sh
    β”‚     └── Sleep hook to restore RGB backlight profiles on resume
    β”‚
    β”œβ”€β”€ [Option 4 / 5] DaVinci Resolve Studio Tools
    β”‚     β”œβ”€β”€ fedora-resolve-installer.sh (Automated 1-Click GUI Installer)
    β”‚     β”œβ”€β”€ fedora-resolve-fix.sh (NVIDIA PRIME & KDE Titlebar Fixer)
    β”‚     └── resolve-launch.sh (Reference launch script)
    β”‚
    β”œβ”€β”€ [Option 6] prepare-for-resolve.sh
    β”‚     └── Lossless AAC β†’ PCM audio transcoder with Dolphin context menu
    β”‚
    β”œβ”€β”€ [Option 7] fedora-antigravity-fix.sh
    β”‚     └── Replaces buggy @parcel/watcher node module to fix 90Β°C CPU exit spike
    β”‚
    β”œβ”€β”€ [Option 8] apply-affinity-zoom-fix.sh
    β”‚     └── Patched Direct2D (recursion cap) & WineFix (5M% zoom lock) to fix Wine canvas freezes
    β”‚
    └── [Option 9 / 10] Razer Peripherals (Optional)
          β”œβ”€β”€ fedora-openrazer.sh (Mouse Dock Pro relay driver with rollback)
          └── fix-razer-autosuspend.sh (Stops mouse & USB hub dropouts)

πŸ› οΈ Detailed Script Guide

Every script can either be run through ./setup.sh or executed individually:

1. Laptop Hardware & Power

fedora-xmg-m25.sh β€” XMG Drivers & TCC Patch

  • What it does: Downloads official Tuxedo drivers and applies 4 critical source patches:
    1. Schenker DMI Whitelist: Allows the driver to recognize Schenker / XMG motherboard IDs (X6PR5xxW_X6RP5xxW).
    2. LED Collision Patch: Disables conflicting ACPI LED registrations that crash tccd on newer Linux kernels.
    3. M25 TDP Limits: Tunes power limit profiles specifically for the M25 chassis.
    4. GCC 14 Pointer Fix: Resolves strict pointer compilation errors on newer GCC toolchains.
  • Standalone Run:
    sudo bash fedora-xmg-m25.sh

apply_fixes.sh β€” S2idle Sleep & Battery Drain Fix

  • The Problem: Modern Linux laptops use s2idle (Modern Standby). Without proper tuning, NVIDIA GPUs and rogue ACPI devices keep waking up the CPU, draining your battery inside your backpack and causing the laptop to run hot while sleeping.
  • What it does:
    • Configures NVIDIA Dynamic Power Management (0x02) and S0ix sleep states.
    • Adds nvidia-drm.fbdev=1 to kernel parameters to prevent screen freezing on wake.
    • Overrides SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=true to prevent Wayland desktop hangs during sleep.
    • Creates an automated systemd service (disable-acpi-wakeups.service) and sleep hook to disable rogue ACPI wakeup lines (PEG1, RP*), while preserving XHCI for USB & Bluetooth keyboard/mouse wakeups.
    • Rebuilds initramfs with dracut -f and updates SELinux contexts.
  • Standalone Run:
    sudo bash apply_fixes.sh

xmg-backlight-resume.sh β€” Keyboard Backlight Resume Hook

  • What it does: A systemd-sleep hook placed in /usr/lib/systemd/system-sleep/ that waits 5 seconds after waking from sleep, queries active user sessions, and re-applies custom RGB backlight profiles via Python.
  • Standalone Setup:
    sudo cp xmg-backlight-resume.sh /usr/lib/systemd/system-sleep/
    sudo chmod +x /usr/lib/systemd/system-sleep/xmg-backlight-resume.sh

2. DaVinci Resolve Studio

fedora-resolve-installer.sh β€” Automated 1-Click Installer

  • What it does:
    1. Shows an animated progress bar while extracting DaVinci_Resolve_Studio_*_Linux.zip.
    2. Automatically installs required legacy system dependencies (libxcrypt-compat).
    3. Runs Blackmagic's installer with SKIP_PACKAGE_CHECK=1 to bypass unsupported distro warnings.
    4. Automatically runs fedora-resolve-fix.sh after installation.
    5. Cleans up the temporary .run file when finished.
  • Requirements: Place the downloaded DaVinci_Resolve_Studio_*_Linux.zip in the same directory.
  • Standalone Run:
    bash fedora-resolve-installer.sh

fedora-resolve-fix.sh β€” GPU, Audio & Window Fixer

  • What it does:
    • Fixes crashes on Fedora: Moves conflicting bundled system libraries (libglib-2.0, libgio-2.0, etc.) to a disabled backup directory so Resolve uses Fedora's system libraries.
    • Configures NVIDIA PRIME: Ensures the desktop shortcuts and terminal launchers run Resolve on the discrete NVIDIA GPU.
    • KDE Window Title Bar Rule: DaVinci Resolve requests borderless mode by default on KDE. This script automatically adds a KWin window rule to force standard title bars and minimize/maximize buttons.
  • Standalone Run:
    bash fedora-resolve-fix.sh

prepare-for-resolve.sh β€” Lossless AAC β†’ PCM Audio Transcoder

  • The Problem: DaVinci Resolve on Linux has limited native support for AAC audio streams in MP4/MOV containers.
  • What it does: Instantly remuxes audio from AAC to uncompressed 16-bit PCM (pcm_s16le) while copying the video stream 100% untouched and losslessly (takes just seconds per gigabyte).
    • Supports .mp4, .mov, .mkv, .m4v, .avi, .webm, .ts.
    • Outputs ${filename}_resolve.mov (original files are never modified or overwritten).
    • Integrates with KDE Dolphin context menus (right-click β†’ Convert) and sends desktop notifications via notify-send.
  • Standalone Run:
    # Convert all videos in the current folder:
    ./prepare-for-resolve.sh
    
    # Or convert a specific folder or file:
    ./prepare-for-resolve.sh /path/to/videos

3. Affinity Suite (v3) on Linux

apply-affinity-zoom-fix.sh β€” Extreme Zoom Freeze & Direct2D Fixer

  • The Problem: When zooming deeply or rapidly scrolling in Affinity Suite (Photo, Designer, Publisher) under Wine on Linux, Direct2D's bezier hit-testing (d2d_point_on_bezier_segment / d2d_geometry_intersect_bezier_bezier) breaks down as transformed coordinates exceed float32 mantissa precision (2^23 β‰ˆ 8,388,608%). At this point, curve subdivision error estimates stop shrinking, leading to unbounded infinite recursion loops that completely freeze the CPU rendering thread and lock up the application.
  • What it does:
    • Direct2D Recursion & Split Budget: Deploys a patched d2d1.dll with recursion depth caps and bezier split budgets so hit-testing never enters an infinite loop.
    • WineFix 5M% Zoom Lock: Deploys a patched WineFix.dll plugin with MaxZoomLock (capped at 5,000,000% zoom) to guarantee coordinates stay safely within 32-bit floating point precision.
    • Startup Crash Prevention: Enables synchronous font enumeration in winefix.toml to prevent WPF typeface layout crashes on startup.
    • Automated Launcher: Updates ~/.local/share/applications/Affinity.desktop to run through AffinityHook.exe with native Direct2D overrides (WINEDLLOVERRIDES="d2d1=n,b").
    • Non-destructive Backups: Preserves original DLLs with .bak-orig extensions.
  • Standalone Run:
    bash apply-affinity-zoom-fix.sh

4. Developer Tools

fedora-antigravity-fix.sh β€” IDE Exit Crash & CPU Spike Fixer

  • The Problem: Google Antigravity IDE bundles @parcel/watcher v2.5.1, which has a known teardown race condition on Linux. When closing the IDE, it triggers a background SIGSEGV crash that causes systemd-coredump to write multi-gigabyte coredumps to disk, pegging the CPU at 100% and spiking temperatures past 90Β°C.
  • What it does: Surgically replaces the buggy native Node module with stable @parcel/watcher v2.5.6 from NPM, installs desktop shortcuts, and eliminates the exit crash entirely.
  • Standalone Run:
    sudo bash fedora-antigravity-fix.sh

5. Razer Peripherals (Optional)

fedora-openrazer.sh β€” Mouse Dock Pro Relay Driver (PR #2817)

  • What it does: For owners of the Razer Mouse Dock Pro and compatible wireless mice (Basilisk V3 Pro, Cobra Pro, Naga V2 Pro). Clones and installs the experimental PR #2817 branch with full mouse-to-dock pass-through relay support.
  • Includes Rollback: Automatically creates backups and allows 1-command rollback:
    # Install PR #2817 driver:
    bash fedora-openrazer.sh install
    
    # Restore official OpenRazer 3.12.4:
    bash fedora-openrazer.sh rollback

fix-razer-autosuspend.sh β€” USB Autosuspend & PowerTOP Fix

  • What it does: Configures /etc/udev/rules.d/99-usb-power.rules to prevent Linux USB autosuspend from putting the Razer Basilisk V3 Pro (1532:00ab) or its internal USB hub (05e3:0610) to sleep, preventing mouse lag and disconnects. Also updates powertop-tuning.service if present.
  • Standalone Run:
    sudo bash fix-razer-autosuspend.sh

❓ Frequently Asked Questions (FAQ)

What happens after a kernel update (dnf upgrade)?

Because fedora-xmg-m25.sh and fedora-openrazer.sh install through DKMS (Dynamic Kernel Module Support), your drivers are automatically recompiled for new kernels in the background. You do not need to re-run the scripts after normal updates.

What if a DNF package update overwrites the Tuxedo driver?

If tuxedo-drivers gets updated directly from the Tuxedo repository during a system upgrade, simply launch ./setup.sh and select option 1 (fedora-xmg-m25.sh). The script will re-apply the custom Schenker DMI patches cleanly.

Can I run only one specific script?

Yes! Every script in this repository is completely independent. If you only want the DaVinci Resolve fix, simply run fedora-resolve-fix.sh. If you only want the Antigravity fix, run fedora-antigravity-fix.sh.


πŸ›‘οΈ Disclaimer & License

These scripts are provided in good faith to assist Linux laptop users. Always back up your important data.

Released under the GNU General Public License v3 (GPLv3). You are free to inspect, modify, and distribute this software under the same license terms.

About

Tuxedo driver DKMS patch + DaVinci Resolve Studio installer for XMG/Schenker laptops on Fedora KDE (Wayland, hybrid NVIDIA/Intel)

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages