NitroPC Pro 2 met externe GPU

Notitie

Deze gids werkt alleen als je het Qubes OS OEM GPU image van Nitrokey gebruikt dat je hier kunt bouwen ``_.

Deze handleiding legt uit hoe je je NitroPC kunt gebruiken met een externe grafische kaart (GPU) met Qubes OS.

Waarschuwing

Het volgen van deze gids kan leiden tot veiligheidsproblemen binnen Qubes OS. Volg het op eigen risico.

Een Windows Qube maken

Notitie

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.

Dit onderdeel maakt gebruik van ElliotKillick project.

  1. Open een terminal in dom0 en zorg ervoor dat je internetverbinding hebt.

  2. Installeer de Qubes Windows Tools, in dom0 : sudo qubes-dom0-update qubes-windows-tools-4.1.69 druk op y en enter.

    Notitie

    Bekijk de beveiligingsimplicatie van het installeren van QWT.

  3. Maak het installatiescript uitvoerbaar, in dom0 : sudo chmod +x /install.sh

  4. Start het installatiescript, in dom0 : /install.sh

    Als je dit bericht ziet : [+] Installation complete! dan kun je doorgaan.

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

    Hiervoor moeten we het ~/qvm-create-windows-qube/windows/isos/mido.sh script van de windows-mgmt Qube kopiëren naar een wegwerp Qube met internetverbinding.

  5. Start een nieuwe DVM (wegwerp) Qube en geef deze minstens 10 GB aan privéopslag.

  6. Start de windows-mgmt Qube en kopieer het script, in windows-mgmt Qube : qvm-copy qvm-create-windows-qube/windows/isos/mido.sh selecteer vervolgens de DVM Qube (dispXXXX).

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

    Notitie

    In deze handleiding installeren we Windows 10, maar er zijn ook andere Windows-versies beschikbaar. Je kunt ze opnoemen met ./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.

    Eenmaal gekopieerd kunt u uw DVM Qube sluiten.

  9. In de windows-mgmt Qube : mv QubesIncoming/dispXXXX/win10x64.iso qvm-create-windows-qube/windows/isos/ (vervang ‘dispXXXX’ door de naam van de wegwerp-Qube die je hebt gemaakt).

  10. Dan in dom0 : qvm-create-windows-qube -n sys-firewall -oy -i win10x64.iso -a win10x64-pro.xml work-win10

    Notitie

    Je kunt elk pakket vooraf installeren vanaf deze site. Bijvoorbeeld: qvm-create-windows-qube -n sys-firewall -oyp firefox,notepadplusplus,office365proplus -i win10x64.iso -a win10x64-pro.xml work-win10

    Als het script stopt of vastloopt, probeer dan opnieuw totdat je dit bericht ziet: [+] Completed successfully!

  11. Nu moet je je GPU koppelen aan de Windows Qube, om dit te doen ga je naar de Qube Manager en de Windows 10 Qube opties (zorg ervoor dat de Qube is uitgeschakeld), onder het tabblad Apparaten selecteer je je grafische kaart en geef deze door naar rechts klik dan op de Configure strict reset for PCI devices selecteer dan je kaart en klik op OK.

  12. Nu je grafische kaart is aangesloten op je Windows Qube moet je de stuurprogramma’s van je kaart installeren. Zoek naar Check for updates in de zoekbalk en klik dan op Check for updates (je zult een paar keer opnieuw moeten opstarten).

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.

Eenmaal klaar kun je een secundair beeldscherm aansluiten op de grafische kaart.

Als je een speciale muis of toetsenbord wilt gebruiken voor de Windows Qube, dan moet je sys-usb gebruiken en het gewenste apparaat erop aansluiten.

Een Linux Qube maken

Debian

  1. Ga naar de Qube manager en maak een nieuwe standalone Qube aan en start de instellingen na het aanmaken.

  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. Sluit de instellingen en start de Qube.

  5. Voeg non-free toe aan je bronnenlijst: 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

Nu zou het secundaire scherm aan moeten gaan en een Debian XFCE bureaublad moeten tonen.

Als je een speciale muis of toetsenbord wilt gebruiken voor de Linux Qube, dan moet je sys-usb gebruiken en het gewenste apparaat erop aansluiten.