2021-11-11 18:10:48 -08:00
# Cloning the repository
1. Get the SSH key. Save the content of the `.ssh/id_rsa` file to `~/.ssh/id_rsa`
2. Restrict the permissions for the file with `chmod 600 ~/.ssh/id_rsa`
3. Add the key to the agent:
```bash
eval $(ssh-agent -s) & & \
ssh-add ~/.ssh/id_rsa
```
4. Clone the repo with `git clone git@github.com:Jafner/dotfiles.git ~/Git/dotfiles`
2021-11-11 20:20:47 -08:00
5. Place the dotfiles where they need to be with `chmod +x install_dotfiles.sh && ./install_dotfiles.sh`
2021-11-11 22:00:53 -08:00
# Other Stuff
2021-11-12 09:19:11 -08:00
## Autostart
1. Set Spotify, PulseEffects, and Ferdi to start automatically.
2. `chmod +x window_reposition.sh`
2021-11-12 11:00:23 -08:00
3. `sudo cp .scripts/window_reposition.sh /usr/bin/window_reposition`
2021-11-12 09:19:11 -08:00
3. Run the window_reposition script at startup.
2021-11-11 22:00:53 -08:00
## Tiling and corner-snapping
Using GNOME, disable all extensions. Install [Tiling Assistant ](https://extensions.gnome.org/extension/3733/tiling-assistant/ )
2021-11-12 09:19:11 -08:00
Set Windows and Screen Edges gaps to 12px.
## Virtualization
Install `libvirt` .
`nano /etc/default/grub` and add `amd_iommu=on iommu=pt` to the `GRUB_CMDLINE_LINUX_DEFAULT` variable.
2021-11-12 09:19:45 -08:00
`sudo grub-mkconfig -o /boot/grub/grub.cfg` to update the bootloader.
2021-11-12 10:50:38 -08:00
Install QEMU, KVM, libvirt, virtmanager. `sudo pacman -S virt-manager qemu vde2 ebtables dnsmasq bridge-utils openbsd-netcat ovmf`
Configure `libvirtd`
```bash
sudo sed -i 's/#unix_sock_group = "libvirt"/unix_sock_group = "libvirt"/' /etc/libvirt/libvirtd.conf && \
sudo sed -i 's/#unix_sock_rw_perms = "0770"/unix_sock_rw_perms = "0770"/' /etc/libvirt/libvirtd.conf && \
sudo bash -c 'echo "log_filters=\"1:qemu\"" >> /etc/libvirt/libvirtd.conf' && \
sudo bash -c 'echo "log_outputs=\"1:file:/var/log/libvirt/libvirtd.log\"" >> /etc/libvirt/libvirtd.conf' && \
sudo usermod -aG libvirt $USER & & \
sudo systemctl enable libvirtd & & \
sudo systemctl start libvirtd & & \
sudo sed -i 's/#user = "root"/user = "joey"/' /etc/libvirt/qemu.conf && \
sudo sed -i 's/#group = "root"/group = "joey"/' /etc/libvirt/qemu.conf && \
sudo systemctl restart libvirtd
```
2021-11-12 11:00:23 -08:00
Reboot.
2021-11-12 22:57:37 -08:00
Set up the VM, following the [RisingPrism wiki ](https://gitlab.com/risingprismtv/single-gpu-passthrough/-/wikis ).
Open Nvidia X Server Settings, go to GPU 0 and check the VBIOS version.
Browse to https://www.techpowerup.com/vgabios/ and download the correct VBIOS file.
Rename the file to `vbios.rom` .
2021-11-15 19:58:24 -08:00
Actually, dump and patch your own ROM with techpowerup's nvflash and the Bless hex editor.
This will require unloading all of the nvidia kernel modules, so connect via SSH from another host.
Stop the display manager, then unload the nvidia kernel modules
`sudo systemctl stop gdm.service && sudo modprobe -r i2c_nvidia_gpu nvidia_uvm nvidia nvidia_drm`
Then dump the rom.
`sudo ./nvflash --save vbios.rom`
Reload the kernel modules and restart the display manager
`sudo modprobe i2c_nvidia_gpu nvidia_uvm nvidia nvidia_drm && sudo systemctl start gdm.service`
Open the new vbios file in Bless hex editor, search for 'VIDEO' in text mode. Delete all lines up to the `U` character on that line (exclusive). Save the patched version as `vbios_patched.rom` . Restrict its permissions with `chmod 660 vbios_patched.rom` then copy it to the share folder with `sudo cp vbios_patched.rom /usr/share/vbios/vbios.rom`
2021-11-12 22:57:37 -08:00
Place the VBIOS file.
```bash
sudo mkdir /usr/share/vbios & & \
sudo cp ~/Downloads/vbios.rom /usr/share/vbios/vbios.rom & & \
cd /usr/share/vbios & & \
sudo chmod -R 660 vbios.rom & & \
sudo chown joey:joey vbios.rom
```