外部GPU搭載NitroPC Pro 2

注釈

このガイドは、NitrokeyのQubes OS OEM GPUイメージ(`こちら`_からビルドできます)を使用する場合のみ有効です。

このガイドでは、NitroPCに外部グラフィックカード(GPU)を搭載し、Qubes OSで使用する方法を説明します。

警告

このガイドに従うと、Qubes OS にセキュリティ上の問題が生じる可能性があります。自己責任で従ってください。

Windows Qubeの作成

注釈

This will install a Windows Qube from the official trial ISO. If you want a full Windows experience then you will need to add a license key.

この部分は`ElliotKillick project<https://github.com/elliotkillick/qvm-create-windows-qube>`__ を使用しています。

  1. dom0でターミナルを開き、インターネットに接続していることを確認する。

  2. Qubes Windows Tools をインストールします。dom0 で、sudo qubes-dom0-update qubes-windows-tools-4.1.69 と聞かれたら、y と入力してください。

    注釈

    QWT をインストールする際の`セキュリティ上の影響<https://github.com/QubesOS/qubes-secpack/blob/master/QSBs/qsb-091-2023.txt>`__ をご覧ください。

  3. `sudo chmod +x /install.sh`インストール・スクリプトを実行可能にする。

  4. `/install.sh`インストール・スクリプトを起動する。

    [+] Installation complete! と表示されたら、続行できます。

    At this point the script created a new Qube called windows-mgmt now we will download the ISO to create the Windows Qube.

    そのためには、windows-mgmt Qubeの``~/qvm-create-windows-qube/windows/isos/mido.sh``スクリプトを、インターネットに接続できる使い捨てのQube内にコピーする必要がある。

  5. 新しいDVM(使い捨て)Qubeを起動し、少なくとも10 GBのプライベートストレージを与えます。

  6. windows-mgmt Qubeを起動し、スクリプトをコピーします。windows-mgmt Qubeの``qvm-copy qvm-create-windows-qube/windows/isos/mido.sh``で、DVM Qube (dispXXXX)を選択します。

  7. Once the script is copied launch it, in dispXXXX : ./QubesIncoming/windows-mgmt/mido.sh win10x64

    注釈

    このガイドではWindows 10をインストールするが、他のWindowsバージョンも利用可能である。``./QubesIncoming/windows-mgmt/mido.sh``を使用してそれらをリストすることができる。

  8. If you get a success message then you will need to copy the downloaded ISO from the DVM to the windows-mgmt Qube, in dispXXXX : qvm-copy QubesIncoming/windows-mgmt/win10x64.iso and choose the windows-mgmt Qube.

    コピーしたら、DVM Qubeを閉じることができます。

  9. windows-mgmt Qube :mv QubesIncoming/dispXXXX/win10x64.iso qvm-create-windows-qube/windows/isos/ (「dispXXXX」を作成した使い捨て Qube の名前に置き換えます)。

  10. 次に dom0 :qvm-create-windows-qube -n sys-firewall -oy -i win10x64.iso -a win10x64-pro.xml work-win10 である。

    注釈

    `このサイト<https://community.chocolatey.org/packages>`__ から任意のパッケージをプリインストールできます。例:qvm-create-windows-qube -n sys-firewall -oyp firefox,notepadplusplus,office365proplus -i win10x64.iso -a win10x64-pro.xml work-win10.

    スクリプトが停止したり、スタックした場合は、次のメッセージが表示されるまで再試行してください:[+] Completed successfully!`

  11. 次に、GPU を Windows Qube に取り付ける必要があります。取り付けるには、Qube Manager と Windows 10 Qube オプションにアクセスし(Qube がシャットダウンされていることを確認します)、[Devices] タブでグラフィックカードを選択し、右側に移動して``Configure strict reset for PCI devices`` をクリックし、カードを選択して``OK`` をクリックします。

  12. グラフィックカードがWindows Qubeに接続されたら、カードのドライバをインストールする必要があります。検索バーで「Check for updates」を検索し、「Check for updates」をクリックしてください(何度か再起動する必要があります)。

Now Windows will install all the drivers you will need to use your external graphic card. If you're experiencing some problems make sure that you have enough space in your Windows Qube while installing updates.

完了したら、グラフィックカードにセカンダリーディスプレイを接続することができます。

Windows Qube専用のマウスやキーボードを使用したい場合は、sys-usbを使用し、目的のデバイスを接続する必要があります。

Linux Qubeの作成

Debian

  1. Qube マネージャで新規スタンドアロン Qube を作成し、作成後に設定を起動します。

  2. In the "Advanced" tab change the mode to HVM and disable memory balancing and choose the amount of RAM you want.

  3. In the devices tab select the GPU and pass it to the right then click on the Configure strict reset for PCI devices then select your card and click OK.

  4. 設定を閉じて、Qubeを起動します。

  5. ソースリストに non-free を追加する:sudo sed -i '1 s/.*/& non-free/' /etc/apt/sources.list

  6. sudo apt update`

  7. sudo apt install nvidia-driver dbus-x11`

    Now you will need to create 3 different files:

    screen.conf::

    Section "Device"
    Identifier  "GPU"
    
    # name of the driver to use. Can be "amdgpu", "nvidia", or something else
    Driver      "nvidia"
    
    # The BusID value will change after each qube reboot.
    BusID       "PCI:0:8:0"
    EndSection
    
    Section "Screen"
    Identifier "GPU screen"
    Device     "GPU"
    EndSection
    

    xorgX1.sh::

    #!/bin/bash
    
    binary=${1:?binary required}
    
    # Find the correct BusID of the AMD GPU, then set it in the Xorg configuration file
    pci=$(lspci | grep "VGA" | grep -E "NVIDIA|AMD/ATI" | cut -d " " -f 1 | cut -d ":" -f 2 | cut -d "." -f 1 | cut -d "0" -f 2)
    sed -i 's/"PCI:[^"]*"/"PCI:0:'$pci':0"/g' /home/user/screen.conf
    
    # Start the Xorg server for the X screen number 1.
    # The X screen n°0 is already used for QubesOS integration
    sudo startx "$binary" -- :1 -config /home/user/screen.conf
    

    xfce.sh::

    #!/bin/bash
    sleep 5 && sudo setxkbmap -display :1 fr &
    /bin/sudo -u user PULSE_SERVER=unix:/run/user/1000/pulse/native bash -c 'sudo xhost + local:;/usr/bin/startxfce4'
    
  8. sudo chmod +x xorgX1.sh xfce.sh`

  9. sudo ./xorgX1.sh ./xfce.sh`

これでセカンダリスクリーンがオンになり、Debian XFCE デスクトップが表示されるはずです。

Linux Qubeで専用のマウスやキーボードを使用したい場合は、sys-usbを使用して目的のデバイスを接続する必要がある。