<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Daniel</title>
    <description>The latest articles on DEV Community by Daniel (@dannyslee1996).</description>
    <link>https://dev.to/dannyslee1996</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3736295%2Fc41729c2-867b-4a2f-8872-aefd4f417e5c.png</url>
      <title>DEV Community: Daniel</title>
      <link>https://dev.to/dannyslee1996</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dannyslee1996"/>
    <language>en</language>
    <item>
      <title>Fixing Low USB-C Audio on Fedora Linux: My Battle with the Razer Leviathan</title>
      <dc:creator>Daniel</dc:creator>
      <pubDate>Sun, 16 Aug 2026 19:35:00 +0000</pubDate>
      <link>https://dev.to/dannyslee1996/fixing-low-usb-c-audio-on-fedora-linux-my-battle-with-the-razer-leviathan-1bie</link>
      <guid>https://dev.to/dannyslee1996/fixing-low-usb-c-audio-on-fedora-linux-my-battle-with-the-razer-leviathan-1bie</guid>
      <description>&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; If you have a Razer Leviathan connected via USB-C on Linux and the volume is incredibly quiet even at 100%, PipeWire is likely crushing your ALSA hardware baseline on boot. Just paste this script into your terminal to automatically fix it every time you log in:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. Create the necessary directories&lt;/span&gt;
&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; ~/.local/bin
&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; ~/.config/autostart

&lt;span class="c"&gt;# 2. Write the volume-fixing script&lt;/span&gt;
&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;' &amp;gt; ~/.local/bin/fix-razer.sh
#!/bin/bash
# Wait for PipeWire to finish initializing
sleep 3

# Dynamically find the Leviathan's ALSA card ID
CARD=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="s1"&gt;'/Leviathan/ {print $1}'&lt;/span&gt; /proc/asound/cards | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-n1&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="sh"&gt;

if [ -n "&lt;/span&gt;&lt;span class="nv"&gt;$CARD&lt;/span&gt;&lt;span class="sh"&gt;" ]; then
    # Find the exact name of the volume control (e.g., 'PCM' or 'Speaker')
    CTRL=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;amixer &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="nv"&gt;$CARD&lt;/span&gt; scontrols | &lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="nt"&gt;-F&lt;/span&gt;&lt;span class="s2"&gt;"'"&lt;/span&gt; &lt;span class="s1"&gt;'NR==1 {print $2}'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="sh"&gt;
    # Max out the hardware baseline
    amixer -c &lt;/span&gt;&lt;span class="nv"&gt;$CARD&lt;/span&gt;&lt;span class="sh"&gt; sset "&lt;/span&gt;&lt;span class="nv"&gt;$CTRL&lt;/span&gt;&lt;span class="sh"&gt;" 100%
fi
&lt;/span&gt;&lt;span class="no"&gt;EOF

&lt;/span&gt;&lt;span class="c"&gt;# 3. Make the script executable&lt;/span&gt;
&lt;span class="nb"&gt;chmod&lt;/span&gt; +x ~/.local/bin/fix-razer.sh

&lt;span class="c"&gt;# 4. Create the desktop autostart entry&lt;/span&gt;
&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt; &amp;gt; ~/.config/autostart/razer-volume.desktop
[Desktop Entry]
Type=Application
Exec=&lt;/span&gt;&lt;span class="nv"&gt;$HOME&lt;/span&gt;&lt;span class="sh"&gt;/.local/bin/fix-razer.sh
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name=Fix Razer Volume
Comment=Max out Leviathan hardware volume on boot
&lt;/span&gt;&lt;span class="no"&gt;EOF
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  The Struggle: New Hardware Meets Linux Audio
&lt;/h2&gt;

&lt;p&gt;I recently picked up a Razer Leviathan speaker and plugged it right into my Fedora Linux machine via USB-C. I expected it to just work. At first glance, it seemed perfectly integrated: pressing the physical volume buttons on the Leviathan actually moved the volume slider on my screen. &lt;/p&gt;

&lt;p&gt;But there was one massive problem: &lt;strong&gt;even with my system volume cranked to 100%, the audio was basically a whisper.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I knew the USB connection was passing a pristine digital signal, so it wasn't a degraded cable issue. Instead, I had stumbled into the classic Linux audio tug-of-war between low-level drivers and modern session managers.&lt;/p&gt;

&lt;h2&gt;
  
  
  The First Clue: Uncovering the Double Volume Limit
&lt;/h2&gt;

&lt;p&gt;In Linux, there are often two volume limits happening at once when dealing with USB audio gear: a software limit (what you see on your desktop) and a hardware limit (controlled deep in the system). &lt;/p&gt;

&lt;p&gt;I opened my terminal and fired up &lt;code&gt;alsamixer&lt;/code&gt;, the low-level audio interface. Sure enough, when I selected the Razer Leviathan, I found a hidden volume slider sitting at the bottom. By pushing that slider to 100, the room-shaking volume instantly returned. My desktop slider and the speaker were finally synced.&lt;/p&gt;

&lt;p&gt;Problem solved, right? &lt;/p&gt;

&lt;p&gt;Not quite.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Amnesia Problem: Fighting Reboots and Sleep States
&lt;/h2&gt;

&lt;p&gt;Every time I restarted my Fedora machine, or even if the speaker just went to sleep and woke back up, the volume would plummet back to a whisper. It was infuriating. Linux was treating the speaker as a brand-new device every time it initialized, dropping the hardware floor back down to its ultra-quiet default.&lt;/p&gt;

&lt;p&gt;Here is a quick rundown of all the things I tried that &lt;strong&gt;completely failed&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;sudo alsactl store&lt;/code&gt;:&lt;/strong&gt; I tried saving the ALSA state permanently. It worked until a reboot, at which point modern Linux audio demons intervened.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Writing rigid &lt;code&gt;udev&lt;/code&gt; rules:&lt;/strong&gt; I grabbed the vendor and product ID (&lt;code&gt;1532:054a&lt;/code&gt;) and wrote a strict kernel rule to force the ALSA volume to 100% the millisecond the device reconnected. But it still got steamrolled.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The PipeWire Soft-Mixer Hack:&lt;/strong&gt; I learned that WirePlumber (PipeWire's session manager) was loading &lt;em&gt;after&lt;/em&gt; my &lt;code&gt;udev&lt;/code&gt; rules, misinterpreting the Leviathan's hardware volume curve, and aggressively crushing the sound. I wrote a custom &lt;code&gt;wireplumber.conf.d&lt;/code&gt; rule to force a "soft-mixer" and ignore hardware decibel limits. That severed the connection entirely, locking the speaker at its low boot volume permanently.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The Winning Solution: The Delayed Autostart Script
&lt;/h2&gt;

&lt;p&gt;The core issue was a timing conflict. PipeWire needed to finish booting up and applying its broken hardware limits &lt;em&gt;before&lt;/em&gt; I could safely override them.&lt;/p&gt;

&lt;p&gt;I realized I needed a script that could dynamically find the speaker, identify its ALSA control name, and push it to 100%—but it had to run automatically, slightly delayed, every time I logged in.&lt;/p&gt;

&lt;p&gt;That's where the TL;DR script at the top of this post comes in. &lt;/p&gt;

&lt;p&gt;It drops a tiny bash script (&lt;code&gt;fix-razer.sh&lt;/code&gt;) into your &lt;code&gt;~/.local/bin/&lt;/code&gt; folder. The magic is in the &lt;code&gt;sleep 3&lt;/code&gt; command at the start, which gives PipeWire enough time to completely initialize and settle. Then, the script uses &lt;code&gt;awk&lt;/code&gt; to dynamically hunt down the Razer Leviathan's current USB card ID, finds the correct volume channel name, and uses &lt;code&gt;amixer&lt;/code&gt; to force the hardware baseline to 100%. &lt;/p&gt;

&lt;p&gt;Finally, it creates a &lt;code&gt;.desktop&lt;/code&gt; autostart entry so the GNOME/desktop environment triggers the script silently in the background right after login.&lt;/p&gt;

&lt;p&gt;No more manual terminal tweaking. No more whisper-quiet YouTube videos. Just booming sound every time I boot up Fedora.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>fedora</category>
      <category>audio</category>
      <category>bash</category>
    </item>
  </channel>
</rss>
