Skip to content

Instantly share code, notes, and snippets.

@felipealfonsog
Created September 18, 2025 03:31
Show Gist options
  • Save felipealfonsog/9ef1c52b047c707d3b5f91409e2632f0 to your computer and use it in GitHub Desktop.
Save felipealfonsog/9ef1c52b047c707d3b5f91409e2632f0 to your computer and use it in GitHub Desktop.
Fix broadcom driver en Arch con broadcom-wl-dkms
#!/bin/bash
echo "🔧 Verificando conexión a Internet..."
if ping -c 1 archlinux.org &>/dev/null; then
echo "✅ Conexión detectada."
else
echo "❌ No hay conexión a Internet. Conecta un cable Ethernet y vuelve a intentarlo."
exit 1
fi
echo "📦 Instalando dkms y headers del kernel actual..."
KERNEL=$(uname -r)
if [[ "$KERNEL" == *lts* ]]; then
sudo pacman -S --needed dkms linux-lts-headers
else
sudo pacman -S --needed dkms linux-headers
fi
echo "🧹 Eliminando broadcom-wl anterior si existe..."
sudo pacman -Rns --noconfirm broadcom-wl
echo "🧰 Verificando si yay o paru está disponible..."
if command -v yay &>/dev/null; then
AUR_HELPER="yay"
elif command -v paru &>/dev/null; then
AUR_HELPER="paru"
else
echo "❌ No se encontró 'yay' ni 'paru'. Instala uno primero para continuar."
echo "Puedes instalar yay así:"
echo " git clone https://aur.archlinux.org/yay.git"
echo " cd yay"
echo " makepkg -si"
exit 1
fi
echo "📥 Instalando broadcom-wl-dkms desde AUR usando $AUR_HELPER..."
$AUR_HELPER -S --noconfirm broadcom-wl-dkms
echo "🔁 Cargando módulo wl..."
sudo modprobe -r wl 2>/dev/null
sudo modprobe wl
echo "✅ Proceso terminado. Puedes verificar con 'nmcli device' o reiniciar el sistema."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment