docs: update hardware/setup docs and add install script

Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
ja
2026-05-20 10:49:07 +02:00
co-authored by Junie
parent bab92f0292
commit cdb0730280
4 changed files with 161 additions and 4 deletions
+116
View File
@@ -0,0 +1,116 @@
#!/bin/bash
# install-hyprland.sh - Install Hyprland with Wayland on Manjaro (NVIDIA)
# Run: bash scripts/install-hyprland.sh
set -euo pipefail
echo "=== Hyprland Installation for mw-manjaro-pf ==="
echo "GPU: NVIDIA GTX 1050 Ti (595.71.05)"
echo "Monitors: 3x (DP-1 + HDMI-A-1 + DVI-D-1)"
echo ""
# Step 1: Install core packages
echo "[1/5] Installing Hyprland and core Wayland packages..."
sudo pacman -S --needed --noconfirm \
hyprland \
hyprlock \
hypridle \
hyprshot \
hyprcursor \
xdg-desktop-portal-hyprland \
waybar \
wofi \
dunst \
kitty \
cliphist \
wl-clipboard \
brightnessctl \
pipewire \
pipewire-pulse \
wireplumber \
pavucontrol
echo "[1/5] Done."
# Step 2: NVIDIA-specific package verification
echo "[2/5] Verifying NVIDIA packages..."
pacman -Q nvidia-utils >/dev/null 2>&1 && echo " nvidia-utils: OK" || echo " nvidia-utils: MISSING"
pacman -Q egl-wayland >/dev/null 2>&1 && echo " egl-wayland: OK" || echo " egl-wayland: MISSING"
echo "[2/5] Done."
# Step 3: Config directory (already created)
echo "[3/5] Verifying configuration..."
if [ -f ~/.config/hypr/hyprland.conf ]; then
echo " hyprland.conf: OK ($(wc -l < ~/.config/hypr/hyprland.conf) lines)"
else
echo " hyprland.conf: MISSING - create it first!"
exit 1
fi
echo "[3/5] Done."
# Step 4: Enable DRM KMS for NVIDIA (critical for Wayland)
echo "[4/5] Configuring NVIDIA DRM KMS..."
if grep -q "nvidia-drm.modeset=1" /etc/modprobe.d/*.conf 2>/dev/null; then
echo " nvidia-drm.modeset=1: Already configured"
else
echo " Adding nvidia-drm.modeset=1 to /etc/modprobe.d/nvidia.conf..."
echo "options nvidia-drm modeset=1" | sudo tee -a /etc/modprobe.d/nvidia.conf
echo " IMPORTANT: Reboot required after installation."
fi
# Early loading of NVIDIA modules
if grep -q "nvidia" /etc/mkinitcpio.conf 2>/dev/null; then
echo " mkinitcpio modules: Already configured"
else
echo " Adding NVIDIA modules to mkinitcpio..."
sudo sed -i 's/^MODULES=(/MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm /' /etc/mkinitcpio.conf
sudo mkinitcpio -P
fi
echo "[4/5] Done."
# Step 5: Register Hyprland session
echo "[5/5] Verifying session registration..."
if [ -f /usr/share/wayland-sessions/hyprland.desktop ]; then
echo " Session file: OK"
else
echo " Session file: Creating..."
sudo tee /usr/share/wayland-sessions/hyprland.desktop > /dev/null << 'DESKTOP'
[Desktop Entry]
Name=Hyprland
Comment=An intelligent dynamic tiling Wayland compositor
Exec=Hyprland
Type=Application
DesktopNames=Hyprland
DESKTOP
fi
echo "[5/5] Done."
echo ""
echo "=== Installation Complete ==="
echo ""
echo "NEXT STEPS:"
echo " 1. REBOOT to apply NVIDIA DRM KMS changes"
echo " 2. Select 'Hyprland' from the login manager (SDDM)"
echo " 3. If monitors are wrong, check names with: hyprctl monitors"
echo " and adjust in ~/.config/hypr/hyprland.conf"
echo ""
echo "MONITOR NAMES may differ from X11:"
echo " X11 name -> Wayland name (expected)"
echo " DP-0 -> DP-1"
echo " HDMI-0 -> HDMI-A-1"
echo " DVI-D-0 -> DVI-D-1"
echo ""
echo "KEY BINDINGS (SUPER = Windows key):"
echo " SUPER+Return = Terminal (kitty)"
echo " SUPER+D = Launcher (wofi)"
echo " SUPER+E = File manager (dolphin)"
echo " SUPER+L = Lock screen"
echo " SUPER+Q = Close window"
echo " SUPER+F = Fullscreen"
echo " SUPER+1-9 = Switch workspace"
echo " SUPER+Arrows = Focus monitor"
echo ""
echo "TROUBLESHOOTING:"
echo " - Cursor issues: WLR_NO_HARDWARE_CURSORS=1 is set"
echo " - Blank screen: Check 'nvidia-drm.modeset=1' in kernel params"
echo " - Flickering: Try disabling blur in hyprland.conf"
echo " - Monitor names: Run 'hyprctl monitors' after first launch"