<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Installation on Tarragon</title><link>https://tarrragon.github.io/blog/tags/installation/</link><description>Recent content in Installation on Tarragon</description><generator>Hugo -- gohugo.io</generator><language>zh-TW</language><copyright>Tarragon (CC BY 4.0)</copyright><lastBuildDate>Mon, 29 Jun 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://tarrragon.github.io/blog/tags/installation/index.xml" rel="self" type="application/rss+xml"/><item><title>Hyprland 安裝與環境建置</title><link>https://tarrragon.github.io/blog/linux/dotfile/05-hyprland-config/hyprland-installation/</link><pubDate>Mon, 29 Jun 2026 00:00:00 +0000</pubDate><guid>https://tarrragon.github.io/blog/linux/dotfile/05-hyprland-config/hyprland-installation/</guid><description>&lt;p>Hyprland 的安裝分三層：compositor（負責視窗管理與畫面合成的核心程式，詳見 &lt;a href="https://tarrragon.github.io/blog/linux/dotfile/04-window-management/wayland-explainer/" data-link-title="Wayland 顯示協議：為什麼 Hyprland 不跑在 X11 上" data-link-desc="想理解 Hyprland 底層的圖形架構、Wayland 跟 X11 的差異、XWayland 相容層、以及 2026 年 Wayland 已經是主流這件事時回來讀">Wayland 顯示協議&lt;/a>）本身、GPU 驅動、桌面配套工具。Compositor 只管視窗排列和畫面輸出，其餘功能（status bar、launcher、通知、音訊、藍牙、網路）都需要另外裝。本篇以 Arch Linux 為主要說明對象，其他發行版在最後簡述。&lt;/p>
&lt;h2 id="核心套件">核心套件&lt;/h2>





&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="ln">1&lt;/span>&lt;span class="cl">sudo pacman -S hyprland xorg-xwayland xdg-desktop-portal-hyprland&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>套件&lt;/th>
 &lt;th>角色&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;code>hyprland&lt;/code>&lt;/td>
 &lt;td>Compositor 本體，在 Arch 官方 &lt;code>extra&lt;/code> repo，不需要 AUR&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>xorg-xwayland&lt;/code>&lt;/td>
 &lt;td>X11 相容層，讓舊 X11 應用程式在 Wayland 環境裡正常運行&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>xdg-desktop-portal-hyprland&lt;/code>&lt;/td>
 &lt;td>Hyprland 專屬的 portal backend，處理 screen sharing 和檔案對話框&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;blockquote>
&lt;p>&lt;strong>[VM 可測試]&lt;/strong> 套件安裝本身在 VM 和實機上完全相同。&lt;/p>&lt;/blockquote>
&lt;h2 id="gpu-驅動">GPU 驅動&lt;/h2>
&lt;p>GPU 驅動決定 Hyprland 的渲染是走硬體加速還是軟體 fallback。AMD 和 Intel 開箱即用，NVIDIA 需要額外配置。&lt;/p>
&lt;h3 id="amd推薦開箱即用">AMD（推薦，開箱即用）&lt;/h3>





&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="ln">1&lt;/span>&lt;span class="cl">sudo pacman -S mesa vulkan-radeon libva-mesa-driver mesa-vdpau&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>mkinitcpio MODULES 加入：&lt;code>amdgpu&lt;/code>&lt;/p>
&lt;p>環境變數（放在 Hyprland 配置裡）：&lt;/p>





&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-lua" data-lang="lua">&lt;span class="line">&lt;span class="ln">1&lt;/span>&lt;span class="cl">&lt;span class="n">env&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">2&lt;/span>&lt;span class="cl"> &lt;span class="s2">&amp;#34;LIBVA_DRIVER_NAME, radeonsi&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">3&lt;/span>&lt;span class="cl"> &lt;span class="s2">&amp;#34;VDPAU_DRIVER, radeonsi&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">4&lt;/span>&lt;span class="cl"> &lt;span class="s2">&amp;#34;AMD_VULKAN_ICD, RADV&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">5&lt;/span>&lt;span class="cl">&lt;span class="p">}&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>AMD 是 Hyprland / Wayland 生態支援最好的 GPU。如果是新購硬體、有選擇的餘地，AMD 是最省事的選項。&lt;/p>
&lt;h3 id="intel開箱即用">Intel（開箱即用）&lt;/h3>





&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="ln">1&lt;/span>&lt;span class="cl">sudo pacman -S mesa vulkan-intel intel-media-driver&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>mkinitcpio MODULES 加入：&lt;code>i915&lt;/code>&lt;/p>





&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-lua" data-lang="lua">&lt;span class="line">&lt;span class="ln">1&lt;/span>&lt;span class="cl">&lt;span class="n">env&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">2&lt;/span>&lt;span class="cl"> &lt;span class="s2">&amp;#34;LIBVA_DRIVER_NAME, iHD&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">3&lt;/span>&lt;span class="cl"> &lt;span class="s2">&amp;#34;VDPAU_DRIVER, va_gl&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">4&lt;/span>&lt;span class="cl">&lt;span class="p">}&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Intel 內顯在 Wayland 上表現穩定，適合筆電和輕度桌面使用。&lt;/p>
&lt;h3 id="nvidia需要額外配置非官方支援">NVIDIA（需要額外配置，非官方支援）&lt;/h3>
&lt;blockquote>
&lt;p>&lt;strong>[需實機測試]&lt;/strong> NVIDIA 的所有設定在 VM 中無意義——VM 使用 virtio-gpu 或軟體渲染，不走 NVIDIA 驅動。以下步驟只在實體機有 NVIDIA 顯卡時才需要。&lt;/p>&lt;/blockquote>
&lt;p>Hyprland 官方不支援 NVIDIA，但社群有成熟的 workaround。最低版本需求：&lt;/p>
&lt;ul>
&lt;li>NVIDIA driver &amp;gt;= 555（555 引入完整 GBM 支援和 explicit sync，是 Wayland 硬體渲染的最低依賴。535 系列有 explicit sync 問題，Wayland 下容易 flicker。590+ 修復多數 HDR 和多螢幕邊界問題）&lt;/li>
&lt;li>xorg-xwayland &amp;gt;= 24.1&lt;/li>
&lt;li>wayland-protocols &amp;gt;= 1.34&lt;/li>
&lt;/ul>
&lt;p>安裝：&lt;/p>





&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="ln">1&lt;/span>&lt;span class="cl">sudo pacman -S nvidia-dkms nvidia-utils libva-nvidia-driver
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">2&lt;/span>&lt;span class="cl">&lt;span class="c1"># 32-bit 支援（遊戲可能需要）：&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">3&lt;/span>&lt;span class="cl">sudo pacman -S lib32-nvidia-utils&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>mkinitcpio MODULES（依硬體配置選擇）：&lt;/p>
&lt;p>純 NVIDIA 桌機：&lt;/p>





&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-text" data-lang="text">&lt;span class="line">&lt;span class="ln">1&lt;/span>&lt;span class="cl">MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Intel + NVIDIA hybrid 筆電（Intel 排在 NVIDIA 前面）：&lt;/p>





&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-text" data-lang="text">&lt;span class="line">&lt;span class="ln">1&lt;/span>&lt;span class="cl">MODULES=(i915 nvidia nvidia_modeset nvidia_uvm nvidia_drm)&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>更新 initramfs：&lt;/p></description><content:encoded><![CDATA[<p>Hyprland 的安裝分三層：compositor（負責視窗管理與畫面合成的核心程式，詳見 <a href="/blog/linux/dotfile/04-window-management/wayland-explainer/" data-link-title="Wayland 顯示協議：為什麼 Hyprland 不跑在 X11 上" data-link-desc="想理解 Hyprland 底層的圖形架構、Wayland 跟 X11 的差異、XWayland 相容層、以及 2026 年 Wayland 已經是主流這件事時回來讀">Wayland 顯示協議</a>）本身、GPU 驅動、桌面配套工具。Compositor 只管視窗排列和畫面輸出，其餘功能（status bar、launcher、通知、音訊、藍牙、網路）都需要另外裝。本篇以 Arch Linux 為主要說明對象，其他發行版在最後簡述。</p>
<h2 id="核心套件">核心套件</h2>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl">sudo pacman -S hyprland xorg-xwayland xdg-desktop-portal-hyprland</span></span></code></pre></div><table>
  <thead>
      <tr>
          <th>套件</th>
          <th>角色</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td><code>hyprland</code></td>
          <td>Compositor 本體，在 Arch 官方 <code>extra</code> repo，不需要 AUR</td>
      </tr>
      <tr>
          <td><code>xorg-xwayland</code></td>
          <td>X11 相容層，讓舊 X11 應用程式在 Wayland 環境裡正常運行</td>
      </tr>
      <tr>
          <td><code>xdg-desktop-portal-hyprland</code></td>
          <td>Hyprland 專屬的 portal backend，處理 screen sharing 和檔案對話框</td>
      </tr>
  </tbody>
</table>
<blockquote>
<p><strong>[VM 可測試]</strong> 套件安裝本身在 VM 和實機上完全相同。</p></blockquote>
<h2 id="gpu-驅動">GPU 驅動</h2>
<p>GPU 驅動決定 Hyprland 的渲染是走硬體加速還是軟體 fallback。AMD 和 Intel 開箱即用，NVIDIA 需要額外配置。</p>
<h3 id="amd推薦開箱即用">AMD（推薦，開箱即用）</h3>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl">sudo pacman -S mesa vulkan-radeon libva-mesa-driver mesa-vdpau</span></span></code></pre></div><p>mkinitcpio MODULES 加入：<code>amdgpu</code></p>
<p>環境變數（放在 Hyprland 配置裡）：</p>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lua" data-lang="lua"><span class="line"><span class="ln">1</span><span class="cl"><span class="n">env</span> <span class="o">=</span> <span class="p">{</span>
</span></span><span class="line"><span class="ln">2</span><span class="cl">    <span class="s2">&#34;LIBVA_DRIVER_NAME, radeonsi&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="ln">3</span><span class="cl">    <span class="s2">&#34;VDPAU_DRIVER, radeonsi&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="ln">4</span><span class="cl">    <span class="s2">&#34;AMD_VULKAN_ICD, RADV&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="ln">5</span><span class="cl"><span class="p">}</span></span></span></code></pre></div><p>AMD 是 Hyprland / Wayland 生態支援最好的 GPU。如果是新購硬體、有選擇的餘地，AMD 是最省事的選項。</p>
<h3 id="intel開箱即用">Intel（開箱即用）</h3>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl">sudo pacman -S mesa vulkan-intel intel-media-driver</span></span></code></pre></div><p>mkinitcpio MODULES 加入：<code>i915</code></p>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lua" data-lang="lua"><span class="line"><span class="ln">1</span><span class="cl"><span class="n">env</span> <span class="o">=</span> <span class="p">{</span>
</span></span><span class="line"><span class="ln">2</span><span class="cl">    <span class="s2">&#34;LIBVA_DRIVER_NAME, iHD&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="ln">3</span><span class="cl">    <span class="s2">&#34;VDPAU_DRIVER, va_gl&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="ln">4</span><span class="cl"><span class="p">}</span></span></span></code></pre></div><p>Intel 內顯在 Wayland 上表現穩定，適合筆電和輕度桌面使用。</p>
<h3 id="nvidia需要額外配置非官方支援">NVIDIA（需要額外配置，非官方支援）</h3>
<blockquote>
<p><strong>[需實機測試]</strong> NVIDIA 的所有設定在 VM 中無意義——VM 使用 virtio-gpu 或軟體渲染，不走 NVIDIA 驅動。以下步驟只在實體機有 NVIDIA 顯卡時才需要。</p></blockquote>
<p>Hyprland 官方不支援 NVIDIA，但社群有成熟的 workaround。最低版本需求：</p>
<ul>
<li>NVIDIA driver &gt;= 555（555 引入完整 GBM 支援和 explicit sync，是 Wayland 硬體渲染的最低依賴。535 系列有 explicit sync 問題，Wayland 下容易 flicker。590+ 修復多數 HDR 和多螢幕邊界問題）</li>
<li>xorg-xwayland &gt;= 24.1</li>
<li>wayland-protocols &gt;= 1.34</li>
</ul>
<p>安裝：</p>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl">sudo pacman -S nvidia-dkms nvidia-utils libva-nvidia-driver
</span></span><span class="line"><span class="ln">2</span><span class="cl"><span class="c1"># 32-bit 支援（遊戲可能需要）：</span>
</span></span><span class="line"><span class="ln">3</span><span class="cl">sudo pacman -S lib32-nvidia-utils</span></span></code></pre></div><p>mkinitcpio MODULES（依硬體配置選擇）：</p>
<p>純 NVIDIA 桌機：</p>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="ln">1</span><span class="cl">MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)</span></span></code></pre></div><p>Intel + NVIDIA hybrid 筆電（Intel 排在 NVIDIA 前面）：</p>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="ln">1</span><span class="cl">MODULES=(i915 nvidia nvidia_modeset nvidia_uvm nvidia_drm)</span></span></code></pre></div><p>更新 initramfs：</p>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl">sudo mkinitcpio -P</span></span></code></pre></div><p>Modprobe 設定：</p>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="ln">1</span><span class="cl"># /etc/modprobe.d/nvidia.conf
</span></span><span class="line"><span class="ln">2</span><span class="cl">options nvidia_drm modeset=1</span></span></code></pre></div><p>GRUB kernel parameter：</p>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="ln">1</span><span class="cl"># /etc/default/grub
</span></span><span class="line"><span class="ln">2</span><span class="cl">GRUB_CMDLINE_LINUX_DEFAULT=&#34;... nvidia_drm.modeset=1 nvidia_drm.fbdev=1&#34;</span></span></code></pre></div><p>更新 GRUB：</p>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl">sudo grub-mkconfig -o /boot/grub/grub.cfg</span></span></code></pre></div><p>Hyprland 配置裡的 NVIDIA 環境變數：</p>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lua" data-lang="lua"><span class="line"><span class="ln">1</span><span class="cl"><span class="n">env</span> <span class="o">=</span> <span class="p">{</span>
</span></span><span class="line"><span class="ln">2</span><span class="cl">    <span class="s2">&#34;LIBVA_DRIVER_NAME, nvidia&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="ln">3</span><span class="cl">    <span class="s2">&#34;__GLX_VENDOR_LIBRARY_NAME, nvidia&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="ln">4</span><span class="cl">    <span class="s2">&#34;GBM_BACKEND, nvidia-drm&#34;</span><span class="p">,</span>         <span class="c1">-- 如果 Firefox crash，移除這行</span>
</span></span><span class="line"><span class="ln">5</span><span class="cl">    <span class="s2">&#34;NVD_BACKEND, direct&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="ln">6</span><span class="cl"><span class="p">}</span></span></span></code></pre></div><p>Cursor 修正（NVIDIA 常見的硬體 cursor 問題）：</p>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lua" data-lang="lua"><span class="line"><span class="ln">1</span><span class="cl"><span class="n">hl.config</span><span class="p">({</span>
</span></span><span class="line"><span class="ln">2</span><span class="cl">    <span class="n">cursor</span> <span class="o">=</span> <span class="p">{</span>
</span></span><span class="line"><span class="ln">3</span><span class="cl">        <span class="n">no_hardware_cursors</span> <span class="o">=</span> <span class="kc">true</span><span class="p">,</span>
</span></span><span class="line"><span class="ln">4</span><span class="cl">        <span class="n">allow_dumb_copy</span> <span class="o">=</span> <span class="kc">true</span><span class="p">,</span>
</span></span><span class="line"><span class="ln">5</span><span class="cl">    <span class="p">},</span>
</span></span><span class="line"><span class="ln">6</span><span class="cl"><span class="p">})</span></span></span></code></pre></div><p>Suspend/resume 支援：</p>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl">sudo systemctl <span class="nb">enable</span> nvidia-suspend.service nvidia-hibernate.service nvidia-resume.service</span></span></code></pre></div><h3 id="檢查-gpu-驅動狀態">檢查 GPU 驅動狀態</h3>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl">lspci -k <span class="p">|</span> grep -A <span class="m">3</span> VGA        <span class="c1"># 查看使用中的驅動</span>
</span></span><span class="line"><span class="ln">2</span><span class="cl">glxinfo <span class="p">|</span> grep <span class="s2">&#34;OpenGL renderer&#34;</span> <span class="c1"># 查看活躍的 renderer</span>
</span></span><span class="line"><span class="ln">3</span><span class="cl">vulkaninfo --summary             <span class="c1"># Vulkan 裝置資訊</span></span></span></code></pre></div><p>GPU 驅動相關的故障診斷（driver hang、畫面凍結、suspend/resume 後異常）見<a href="/blog/linux/dotfile/07-desktop-maintenance/" data-link-title="模組七：桌面環境維護與故障排除" data-link-desc="桌面凍結、compositor 掛了、或某個工具不回應時回來讀 — Linux 桌面的故障隔離模型、常見故障場景的恢復操作、日誌判讀與診斷工具">桌面環境維護與故障排除</a>。</p>
<h2 id="桌面配套套件">桌面配套套件</h2>
<p>Hyprland 只管視窗，以下是一個可用桌面需要的配套工具：</p>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln"> 1</span><span class="cl">sudo pacman -S <span class="se">\
</span></span></span><span class="line"><span class="ln"> 2</span><span class="cl"><span class="se"></span>  kitty waybar wofi mako <span class="se">\
</span></span></span><span class="line"><span class="ln"> 3</span><span class="cl"><span class="se"></span>  polkit-gnome grim slurp wl-clipboard cliphist <span class="se">\
</span></span></span><span class="line"><span class="ln"> 4</span><span class="cl"><span class="se"></span>  hyprpaper hyprlock hypridle <span class="se">\
</span></span></span><span class="line"><span class="ln"> 5</span><span class="cl"><span class="se"></span>  pipewire pipewire-alsa pipewire-jack pipewire-pulse wireplumber <span class="se">\
</span></span></span><span class="line"><span class="ln"> 6</span><span class="cl"><span class="se"></span>  pamixer pavucontrol brightnessctl <span class="se">\
</span></span></span><span class="line"><span class="ln"> 7</span><span class="cl"><span class="se"></span>  bluez bluez-utils blueman <span class="se">\
</span></span></span><span class="line"><span class="ln"> 8</span><span class="cl"><span class="se"></span>  networkmanager network-manager-applet <span class="se">\
</span></span></span><span class="line"><span class="ln"> 9</span><span class="cl"><span class="se"></span>  thunar gvfs <span class="se">\
</span></span></span><span class="line"><span class="ln">10</span><span class="cl"><span class="se"></span>  qt5-wayland qt6-wayland <span class="se">\
</span></span></span><span class="line"><span class="ln">11</span><span class="cl"><span class="se"></span>  ttf-meslo-nerd noto-fonts noto-fonts-cjk</span></span></code></pre></div><table>
  <thead>
      <tr>
          <th>類別</th>
          <th>套件</th>
          <th>用途</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>終端機</td>
          <td><code>kitty</code></td>
          <td>Hyprland 預設配置使用的 terminal emulator</td>
      </tr>
      <tr>
          <td>狀態列</td>
          <td><code>waybar</code></td>
          <td>JSON config + CSS styling 的 status bar</td>
      </tr>
      <tr>
          <td>啟動器</td>
          <td><code>wofi</code></td>
          <td>Wayland 原生 app launcher</td>
      </tr>
      <tr>
          <td>通知</td>
          <td><code>mako</code></td>
          <td>輕量 notification daemon</td>
      </tr>
      <tr>
          <td>認證代理</td>
          <td><code>polkit-gnome</code></td>
          <td>GUI 權限提升（sudo 對話框）</td>
      </tr>
      <tr>
          <td>截圖</td>
          <td><code>grim</code> + <code>slurp</code></td>
          <td>截圖工具 + 選區工具</td>
      </tr>
      <tr>
          <td>剪貼簿</td>
          <td><code>wl-clipboard</code> + <code>cliphist</code></td>
          <td>剪貼簿存取 + 歷史記錄</td>
      </tr>
      <tr>
          <td>桌布</td>
          <td><code>hyprpaper</code></td>
          <td>靜態桌布</td>
      </tr>
      <tr>
          <td>鎖屏</td>
          <td><code>hyprlock</code></td>
          <td>Hyprland 配套鎖屏</td>
      </tr>
      <tr>
          <td>Idle</td>
          <td><code>hypridle</code></td>
          <td>閒置偵測（觸發鎖屏/休眠）</td>
      </tr>
      <tr>
          <td>音訊</td>
          <td><code>pipewire</code> + <code>wireplumber</code> + <code>pipewire-pulse</code></td>
          <td>音訊 server（取代 PulseAudio）</td>
      </tr>
      <tr>
          <td>音量控制</td>
          <td><code>pamixer</code>（CLI）+ <code>pavucontrol</code>（GUI）</td>
          <td>音量調整</td>
      </tr>
      <tr>
          <td>亮度</td>
          <td><code>brightnessctl</code></td>
          <td>螢幕亮度（筆電）</td>
      </tr>
      <tr>
          <td>藍牙</td>
          <td><code>bluez</code> + <code>bluez-utils</code> + <code>blueman</code></td>
          <td>藍牙協定 + GUI 管理</td>
      </tr>
      <tr>
          <td>網路</td>
          <td><code>networkmanager</code> + <code>nm-applet</code></td>
          <td>網路管理 + system tray 圖示</td>
      </tr>
      <tr>
          <td>檔案管理</td>
          <td><code>thunar</code> + <code>gvfs</code></td>
          <td>圖形檔案管理器 + 回收筒/遠端掛載</td>
      </tr>
      <tr>
          <td>Qt 相容</td>
          <td><code>qt5-wayland</code> + <code>qt6-wayland</code></td>
          <td>Qt 應用在 Wayland 下正常運行</td>
      </tr>
      <tr>
          <td>字型</td>
          <td><code>ttf-meslo-nerd</code> + <code>noto-fonts-cjk</code></td>
          <td>Nerd Font（waybar icon 需要）+ CJK 字型</td>
      </tr>
  </tbody>
</table>
<p>AUR 補充套件（用 <code>yay</code> 或 <code>paru</code>）：</p>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl">yay -S grimblast-git   <span class="c1"># Hyprland 截圖 wrapper</span>
</span></span><span class="line"><span class="ln">2</span><span class="cl">yay -S swww            <span class="c1"># 動態桌布（hyprpaper 的替代）</span>
</span></span><span class="line"><span class="ln">3</span><span class="cl">yay -S rofi-wayland    <span class="c1"># 功能比 wofi 更豐富的 launcher</span></span></span></code></pre></div><blockquote>
<p><strong>[已驗證]</strong> 套件安裝在 VM 中完全可執行。waybar、wofi、mako、hyprlock 在 virtio-gpu-gl-pci 加速下正常 render（Hyprland 0.55 + UTM 4.7.5 實測）。</p>
<p><strong>[需實機測試]</strong> 藍牙（<code>bluez</code>）、亮度（<code>brightnessctl</code>）、音訊裝置偵測（<code>pipewire</code>）需要實際硬體。</p></blockquote>
<h2 id="登入管理器">登入管理器</h2>
<p>Hyprland 預設不含登入管理器。三個選項：</p>
<h3 id="從-tty-直接啟動最簡單">從 TTY 直接啟動（最簡單）</h3>
<p>登入文字介面後直接執行 <code>Hyprland</code>。建議用 wrapper script 設定必要的環境變數：</p>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl"><span class="cp">#!/bin/sh
</span></span></span><span class="line"><span class="ln">2</span><span class="cl"><span class="cp"></span><span class="c1"># ~/start-hyprland.sh</span>
</span></span><span class="line"><span class="ln">3</span><span class="cl"><span class="nb">export</span> <span class="nv">XDG_SESSION_TYPE</span><span class="o">=</span>wayland
</span></span><span class="line"><span class="ln">4</span><span class="cl"><span class="nb">export</span> <span class="nv">XDG_CURRENT_DESKTOP</span><span class="o">=</span>Hyprland
</span></span><span class="line"><span class="ln">5</span><span class="cl"><span class="nb">export</span> <span class="nv">XDG_SESSION_DESKTOP</span><span class="o">=</span>Hyprland
</span></span><span class="line"><span class="ln">6</span><span class="cl"><span class="nb">exec</span> Hyprland</span></span></code></pre></div>




<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl">chmod +x ~/start-hyprland.sh
</span></span><span class="line"><span class="ln">2</span><span class="cl">~/start-hyprland.sh</span></span></code></pre></div><h3 id="greetd--tuigreet推薦">greetd + tuigreet（推薦）</h3>
<p>greetd 是一個輕量的登入管理器，tuigreet 是它的 TUI 前端：</p>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl">sudo pacman -S greetd greetd-tuigreet</span></span></code></pre></div><p>設定 <code>/etc/greetd/config.toml</code>：</p>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="ln">1</span><span class="cl"><span class="p">[</span><span class="nx">terminal</span><span class="p">]</span>
</span></span><span class="line"><span class="ln">2</span><span class="cl"><span class="nx">vt</span> <span class="p">=</span> <span class="mi">1</span>
</span></span><span class="line"><span class="ln">3</span><span class="cl">
</span></span><span class="line"><span class="ln">4</span><span class="cl"><span class="p">[</span><span class="nx">default_session</span><span class="p">]</span>
</span></span><span class="line"><span class="ln">5</span><span class="cl"><span class="nx">command</span> <span class="p">=</span> <span class="s2">&#34;tuigreet --cmd Hyprland&#34;</span>
</span></span><span class="line"><span class="ln">6</span><span class="cl"><span class="nx">user</span> <span class="p">=</span> <span class="s2">&#34;greeter&#34;</span></span></span></code></pre></div><p>自動登入（可選）：</p>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="ln">1</span><span class="cl"><span class="p">[</span><span class="nx">initial_session</span><span class="p">]</span>
</span></span><span class="line"><span class="ln">2</span><span class="cl"><span class="nx">command</span> <span class="p">=</span> <span class="s2">&#34;Hyprland&#34;</span>
</span></span><span class="line"><span class="ln">3</span><span class="cl"><span class="nx">user</span> <span class="p">=</span> <span class="s2">&#34;yourusername&#34;</span></span></span></code></pre></div><p>啟用服務：</p>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl">sudo systemctl <span class="nb">enable</span> greetd</span></span></code></pre></div><h3 id="sddm">SDDM</h3>
<p>如果已經有 KDE 或偏好圖形化登入介面：</p>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl">sudo pacman -S sddm
</span></span><span class="line"><span class="ln">2</span><span class="cl">sudo systemctl <span class="nb">enable</span> sddm</span></span></code></pre></div><p>SDDM 會自動偵測到 Hyprland 並在登入畫面顯示它作為 session 選項。</p>
<blockquote>
<p><strong>[VM 可測試]</strong> 登入管理器的設定在 VM 中可完整測試。</p></blockquote>
<h2 id="首次啟動常見問題">首次啟動常見問題</h2>
<table>
  <thead>
      <tr>
          <th>症狀</th>
          <th>原因</th>
          <th>修正</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>黑屏、沒有 cursor</td>
          <td>缺少 polkit agent 或 seatd service</td>
          <td><code>sudo systemctl enable --now seatd</code> 或安裝 <code>polkit-gnome</code></td>
      </tr>
      <tr>
          <td>開不了 terminal</td>
          <td>預設 keybind 用的是 kitty，但 kitty 沒裝</td>
          <td><code>sudo pacman -S kitty</code> 或改 keybind 指向已安裝的 terminal</td>
      </tr>
      <tr>
          <td>Cursor 不見（NVIDIA）</td>
          <td>硬體 cursor 問題</td>
          <td>設定 <code>cursor { no_hardware_cursors = true }</code></td>
      </tr>
      <tr>
          <td>Portal 衝突，screen share 失敗</td>
          <td>同時裝了多個 portal backend</td>
          <td>移除 <code>xdg-desktop-portal-gnome</code> 和 <code>xdg-desktop-portal-gtk</code></td>
      </tr>
      <tr>
          <td>沒有音訊</td>
          <td>PipeWire 服務未啟動</td>
          <td><code>systemctl --user enable --now pipewire wireplumber</code></td>
      </tr>
      <tr>
          <td>Config 報錯但不影響使用</td>
          <td>自動產生的預設 config 語法不完整</td>
          <td>emergency keybind 仍可用：SUPER+Q 開 terminal、SUPER+M 離開</td>
      </tr>
  </tbody>
</table>
<h2 id="配置格式lua-取代-hyprlangv055">配置格式：Lua 取代 hyprlang（v0.55+）</h2>
<p>Hyprland v0.55（2026 年 4 月）起，配置格式從 hyprlang（<code>.conf</code>）遷移到 <strong>Lua</strong>（<code>.lua</code>）。舊的 <code>hyprland.conf</code> 在沒有 <code>.lua</code> 檔案時仍然可用，但 hyprlang 已被標記為 deprecated，預計在後續版本移除。</p>
<table>
  <thead>
      <tr>
          <th>格式</th>
          <th>檔案</th>
          <th>狀態</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Lua（新）</td>
          <td><code>~/.config/hypr/hyprland.lua</code></td>
          <td>推薦</td>
      </tr>
      <tr>
          <td>hyprlang（舊）</td>
          <td><code>~/.config/hypr/hyprland.conf</code></td>
          <td>deprecated</td>
      </tr>
  </tbody>
</table>
<p>遷移工具：<code>hyprlang2lua</code>（Go，有瀏覽器版）、<code>hyprconf2lua</code>（Python pip）、<code>hypr-migrate</code>。</p>
<p>本系列後續文章（<a href="/blog/linux/dotfile/05-hyprland-config/hyprland-core-config/" data-link-title="Hyprland 核心配置" data-link-desc="Hyprland 的配置檔該怎麼組織、monitor 怎麼設定、keybind 怎麼設計、輸入裝置和環境變數怎麼配時回來讀">Hyprland 核心配置</a>、<a href="/blog/linux/dotfile/05-hyprland-config/workspace-rules-appearance/" data-link-title="Workspace、Window Rules 與外觀" data-link-desc="Hyprland 的 workspace 綁定螢幕、window rules 設定浮動例外、外觀動畫調教、layout 選型、autostart 和 plugin 管理時回來讀">Workspace 與外觀</a>、<a href="/blog/linux/dotfile/06-rice-design/caelestia-overview/" data-link-title="Caelestia 總覽：預組裝的 Hyprland 桌面 Shell" data-link-desc="考慮用 Caelestia 取代手動拼裝 waybar&#43;wofi&#43;mako、或評估預組裝桌面 shell 的 trade-off 時回來讀">Caelestia</a>）都使用 Lua 格式。如果在網路上看到 <code>.conf</code> 格式的教學，多數仍然可用，但建議儘早遷移到 Lua。</p>
<p>拆分配置用 Lua 原生的 <code>require()</code>：</p>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lua" data-lang="lua"><span class="line"><span class="ln">1</span><span class="cl"><span class="c1">-- hyprland.lua</span>
</span></span><span class="line"><span class="ln">2</span><span class="cl"><span class="n">require</span><span class="p">(</span><span class="s2">&#34;keybinds&#34;</span><span class="p">)</span>    <span class="c1">-- 載入同目錄下的 keybinds.lua</span>
</span></span><span class="line"><span class="ln">3</span><span class="cl"><span class="n">require</span><span class="p">(</span><span class="s2">&#34;rules&#34;</span><span class="p">)</span>       <span class="c1">-- 載入同目錄下的 rules.lua</span>
</span></span><span class="line"><span class="ln">4</span><span class="cl"><span class="n">require</span><span class="p">(</span><span class="s2">&#34;appearance&#34;</span><span class="p">)</span></span></span></code></pre></div><p>詳細的配置語法和設定邏輯在<a href="/blog/linux/dotfile/05-hyprland-config/hyprland-core-config/" data-link-title="Hyprland 核心配置" data-link-desc="Hyprland 的配置檔該怎麼組織、monitor 怎麼設定、keybind 怎麼設計、輸入裝置和環境變數怎麼配時回來讀">核心配置</a>和 <a href="/blog/linux/dotfile/05-hyprland-config/workspace-rules-appearance/" data-link-title="Workspace、Window Rules 與外觀" data-link-desc="Hyprland 的 workspace 綁定螢幕、window rules 設定浮動例外、外觀動畫調教、layout 選型、autostart 和 plugin 管理時回來讀">Workspace、Window Rules 與外觀</a>。</p>
<h2 id="其他發行版">其他發行版</h2>
<h3 id="fedora">Fedora</h3>
<p>Fedora 39 起即在官方 repo。安裝：</p>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl">sudo dnf install hyprland</span></span></code></pre></div><p>JaKooLit 提供自動化安裝腳本（<code>github.com/JaKooLit/Fedora-Hyprland</code>），Fedora 42+ 運作良好。</p>
<h3 id="nixos">NixOS</h3>
<p>NixOS 有官方 module，在 <code>configuration.nix</code> 加入：</p>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-nix" data-lang="nix"><span class="line"><span class="ln">1</span><span class="cl"><span class="n">programs</span><span class="o">.</span><span class="n">hyprland</span><span class="o">.</span><span class="n">enable</span> <span class="o">=</span> <span class="no">true</span><span class="p">;</span></span></span></code></pre></div><p>Home Manager 也有對應 module，可以宣告式管理 Hyprland 配置。</p>
<h3 id="ubuntu">Ubuntu</h3>
<p>不推薦。Ubuntu 的 point-release 模型跟 Hyprland 的 bleeding-edge 更新節奏衝突。沒有官方 PPA，從 source 編譯可行但維護成本高。如果一定要用 Debian 系，Arch 的 rolling release 或 Fedora 的半年週期更適合 Hyprland。</p>
<h2 id="安裝後的下一步">安裝後的下一步</h2>
<p>安裝完成後，VM 環境的額外設定（環境變數、效能調整、測試矩陣）見 <a href="/blog/linux/dotfile/05-hyprland-config/hyprland-vm-setup/" data-link-title="Hyprland VM 環境設定與測試矩陣" data-link-desc="要在 VM 裡測試 Hyprland 配置、或判斷某個設定該在 VM 還是實機驗證時回來讀">VM 環境設定與測試矩陣</a>。配置檔的組織方式和 keybind 設計見 <a href="/blog/linux/dotfile/05-hyprland-config/hyprland-core-config/" data-link-title="Hyprland 核心配置" data-link-desc="Hyprland 的配置檔該怎麼組織、monitor 怎麼設定、keybind 怎麼設計、輸入裝置和環境變數怎麼配時回來讀">Hyprland 核心配置</a>。</p>
]]></content:encoded></item></channel></rss>