I did PCI passthrough on Archlinux and Debian with the old PCI-stub method (this was pre-4.0 era). And later I did PCI passthrough on the 4.1+ kernels on Arch and Ubuntu (16.10 I think?).
This is my attempt at doing the same on Nixos.
{ config, lib, pkgs, ... }: | |
{ | |
imports = [ | |
<nixpkgs/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix> | |
]; | |
nixpkgs = { | |
crossSystem.system = "armv7l-linux"; | |
}; |
I did PCI passthrough on Archlinux and Debian with the old PCI-stub method (this was pre-4.0 era). And later I did PCI passthrough on the 4.1+ kernels on Arch and Ubuntu (16.10 I think?).
This is my attempt at doing the same on Nixos.
Xft.dpi: 150 | |
Xft.antialias: true | |
Xft.hinting: true | |
Xft.rgba: rgb | |
Xft.hintstyle: hintslight | |
rofi.color-enabled: true | |
rofi.font: Hack Bold 16 | |
rofi.modi: window,run,ssh | |
rofi.opacity: 90 |
Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.
Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache
as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.
Check the gist's comments for any further tips and instructions, especially if you are running into problems!
Results after following the guide as of 11.01.2017 13:08:
qemu-system-x86_64 \ | |
-enable-kvm -M q35 -localtime -usb -name Windows `# General options` \ | |
-monitor /dev/tty -nographic -vga none -serial none `# Graphic options` \ | |
-cpu host,kvm=off -smp 1,sockets=1,cores=1,threads=1 `# CPU Options` \ | |
-m 1024 `# Memory` \ | |
-bios /usr/share/qemu/bios.bin `# BIOS` \ | |
-device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 `# PCIe Bus` \ | |
-device vfio-pci,host=02:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on `# Graphics card` \ | |
-device vfio-pci,host=02:00.1,bus=root.1,addr=00.1 `# Graphics card sound` \ | |
-soundhw hda `# Sound` \ |
#!/bin/bash | |
xhost local:root > /dev/null | |
if ! [ -d /sys/fs/cgroup/cpuset/windows ]; then | |
sudo cgcreate -t $USER:users -a $USER:users -g cpuset:windows | |
fi | |
/bin/echo "2-7" > /sys/fs/cgroup/cpuset/windows/cpuset.cpus | |
/bin/echo "0" > /sys/fs/cgroup/cpuset/windows/cpuset.mems |
I ran into this issue while at work and came up with this solution. This gist is mostly just documentation for myself so I can remember what I did 6 months from now. I am in no way saying that this is the right way to fix things but I'll be thrilled if this is in any way helpful to others. That being said, I make no guarantees that bad things will not happen to your machine if you follow these directions. Proceed at your own risk.
Although, I mention using the following setup to resolve an issue I was having using xmonad as my windows manager, I don't think there's anything special about it. It should be possible to use the following steps with any windows manager.
Setting up multiple monitors in xmonad requires defining the screen configuration using xrandr. The problem is that xmonad does not respond to a laptop being placed or removed from a docking station. Obviously, the solution is to update the monitor configuration on the
# Block Skype ads | |
127.0.0.1 *.msads.net | |
127.0.0.1 *.msecn.net | |
127.0.0.1 *.rad.msn.com | |
127.0.0.1 a.ads2.msads.net | |
127.0.0.1 ac3.msn.com | |
127.0.0.1 ad.doubleclick.net | |
127.0.0.1 adnexus.net | |
127.0.0.1 adnxs.com | |
127.0.0.1 ads1.msn.com |
Graphic via State of Florida CFO Vendor Payment Search (flair.myfloridacfo.com)
This is a quick command I use to snapshot webpages that have a fun image I want to keep for my own collection of WTFViz. Why not just right-click and save the image? Oftentimes, the webpage in which the image is embedded contains necessary context, such as captions and links to important documentation just incase you forget what exactly that fun graphic was trying to explain.
DWORD dLastError = GetLastError(); | |
LPCTSTR strErrorMessage = NULL; | |
FormatMessage( | |
FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_ARGUMENT_ARRAY | FORMAT_MESSAGE_ALLOCATE_BUFFER, | |
NULL, | |
dLastError, | |
0, | |
(LPWSTR) &strErrorMessage, | |
0, |