-
Notifications
You must be signed in to change notification settings - Fork 0
3 ‐ Linux fixes
This page is a fix and troubleshooting guide that covers the issues I encounter along with my fixes.
This is my professional laptop.
There are just a few things I had to adjust to get things working perfectly.
Click to expand
Run the Following Script
Copy and paste the following script into the terminal:
View Fix Script
#!/bin/bash
# Nobara Legion Audio Fix Installer
# Logs to: ~/fix_audio_nobara.log
set -euo pipefail
LOG_FILE="$HOME/fix_audio_nobara.log"
MODPROBE_CONF="/etc/modprobe.d/snd_hda_intel.conf"
BLACKLIST_CONF="/etc/modprobe.d/blacklist-dmic.conf"
FIX_AUDIO_SCRIPT="/usr/local/bin/fix_audio_nobara.sh"
SYSTEMD_SERVICE_PATH="$HOME/.config/systemd/user/fix_audio.service"
SYSTEM_SOUND="/usr/share/sounds/alsa/Front_Center.wav"
exec > >(tee -a "$LOG_FILE") 2>&1
echo "=== [BEGIN] Audio Fix Installer ==="
date
sudo bash -c "cat > $MODPROBE_CONF" <<EOF
options snd_hda_intel model=alc3306 power_save=0 power_save_controller=N position_fix=1 probe_mask=1
EOF
sudo bash -c "cat > $BLACKLIST_CONF" <<EOF
blacklist snd_soc_skl
blacklist snd_soc_dmic
blacklist snd_sof_pci
EOF
sudo bash -c "cat > $FIX_AUDIO_SCRIPT" <<EOF
#!/bin/bash
set -euo pipefail
LOG_FILE="\$HOME/fix_audio_nobara.log"
exec > >(tee -a "\$LOG_FILE") 2>&1
echo "=== [fix_audio_nobara.sh] \$(date) ==="
echo "[INFO] Attempting to reload snd_hda_intel..."
if lsmod | grep -q snd_hda_intel; then
if ! sudo modprobe -r snd_hda_intel 2>/dev/null; then
echo "[WARN] snd_hda_intel is in use and could not be unloaded. Skipping reload."
exit 0
fi
else
echo "[INFO] snd_hda_intel not currently loaded. Proceeding..."
fi
sleep 1
if ! sudo modprobe snd_hda_intel model=alc3306 power_save=0; then
echo "[ERROR] Failed to load snd_hda_intel with ALC3306 parameters"
exit 1
fi
echo "[SUCCESS] snd_hda_intel reloaded successfully"
EOF
sudo chmod +x "$FIX_AUDIO_SCRIPT"
mkdir -p "$(dirname "$SYSTEMD_SERVICE_PATH")"
cat > "$SYSTEMD_SERVICE_PATH" <<EOF
[Unit]
Description=Fix ALC3306 Sound Card Recognition
After=graphical-session.target
[Service]
Type=oneshot
ExecStart=$FIX_AUDIO_SCRIPT
RemainAfterExit=true
[Install]
WantedBy=default.target
EOF
systemctl --user daemon-reexec
systemctl --user daemon-reload
systemctl --user enable fix_audio.service
systemctl --user start fix_audio.service || echo "[NOTE] fix_audio.service start returned non-zero (expected if audio is in use)"
CARD=$(pactl list short cards | grep -m1 'pci.*hda' | cut -f1 || true)
if [[ -n "$CARD" ]]; then
pactl set-card-profile "$CARD" output:analog-stereo || echo "[WARN] Profile set failed"
SINK=$(pactl list short sinks | grep "$CARD" | cut -f1 || true)
pactl set-default-sink "$SINK" || echo "[WARN] Sink set failed"
else
echo "[WARN] No valid HDA card found"
fi
systemctl --user restart pipewire pipewire-pulse || echo "[WARN] Restart failed"
if [[ -f "$SYSTEM_SOUND" ]]; then
aplay "$SYSTEM_SOUND" || echo "[WARN] aplay failed"
else
echo "[WARN] Test sound not found"
fi
echo "=== [COMPLETE] Audio fix applied ==="
echo "Log saved to: $LOG_FILE"
read -rp "Would you like to restart your system now to apply all changes? [y/N]: " response
case "$response" in
[yY][eE][sS]|[yY])
echo "Restarting system..."
systemctl reboot
;;
*)
echo "You can reboot later to apply all audio changes fully."
;;
esacVerification Tests
After applying the fix, verify the following:
Cold Boot with HDMI Plugged In
- Sound works immediately.
- "Pop" sound heard at boot.
- Confirm default device:
View Command
pactl get-default-sinkAudio Resume Test
- Pausing and unpausing audio should not drop the device.
HDMI Plug/Unplug Stress Test
- Internal speakers should remain default throughout.
System Updates & Kernel Changes
- After kernel updates, confirm GRUB config:
View Command
cat /etc/default/grub- Re-run the script if issues reoccur after updates.
How to Undo These Changes
Use the rollback script below to revert all changes:
View Rollback Script
#!/bin/bash
# Rollback ALC3306 Audio Fix
# Logs to: ~/fix_audio_nobara.log
set -euo pipefail
LOG_FILE="$HOME/fix_audio_nobara.log"
MODPROBE_CONF="/etc/modprobe.d/snd_hda_intel.conf"
BLACKLIST_CONF="/etc/modprobe.d/blacklist-dmic.conf"
FIX_AUDIO_SCRIPT="/usr/local/bin/fix_audio_nobara.sh"
SYSTEMD_SERVICE_PATH="$HOME/.config/systemd/user/fix_audio.service"
exec > >(tee -a "$LOG_FILE") 2>&1
echo "=== [BEGIN] Rollback Audio Fix ==="
date
[[ -f "$MODPROBE_CONF" ]] && sudo rm -f "$MODPROBE_CONF"
[[ -f "$BLACKLIST_CONF" ]] && sudo rm -f "$BLACKLIST_CONF"
[[ -f "$FIX_AUDIO_SCRIPT" ]] && sudo rm -f "$FIX_AUDIO_SCRIPT"
systemctl --user stop fix_audio.service || true
systemctl --user disable fix_audio.service || true
[[ -f "$SYSTEMD_SERVICE_PATH" ]] && rm -f "$SYSTEMD_SERVICE_PATH"
systemctl --user daemon-reload
if lsmod | grep -q snd_hda_intel; then
if sudo modprobe -r snd_hda_intel 2>/dev/null; then
sleep 1
sudo modprobe snd_hda_intel || echo "[WARN] Could not reload driver cleanly"
else
echo "[WARN] Driver in use; reboot recommended"
fi
fi
echo "=== [COMPLETE] Audio fix rolled back ==="
echo "Log saved to: $LOG_FILE"
read -rp "Would you like to restart your system now to apply rollback fully? [y/N]: " response
case "$response" in
[yY][eE][sS]|[yY])
echo "Restarting system..."
systemctl reboot
;;
*)
echo "Reboot later to ensure full rollback."
;;
esacThis suit currently does not like playing with wayland which powers the OS's windowing system.
Solution: Find Writer or what ever app you want to fix in the search, right click the app shortcut and 'Edit Application'.
Paste the following into the environmental variables: QT_QPA_PLATFORM=xcb
It should run fine now.