User:Firelizzard/Framework 16

From Gentoo Wiki
Jump to:navigation Jump to:search

GPU

CODE Capture the dGPU with a stub driver
softdep drm pre: pci-stub
options pci-stub ids=1002:7480,1002:ab30
CODE Fix issue with vfio driver
options vfio_iommu_type1 allow_unsafe_interrupts=1

Touchpad

The touchpad does not appear in /dev/input/by-id. The touchpad does not have ID_BUS, but more importantly it doesn't have bInterfaceNumber. The fact that the rule has the latter suggests that the rule will not work for non-USB devices (since bInterfaceNumber is a USB attribute). The following rules will add a by-id link:

FILE /etc/udev/rules.d/60-touchpad-events.rules
# determine class name for persistent symlinks
ENV{ID_INPUT_KEYBOARD}=="?*", ENV{.INPUT_CLASS}="kbd"
ENV{ID_INPUT_MOUSE}=="?*", ENV{.INPUT_CLASS}="mouse"
ENV{ID_INPUT_TOUCHPAD}=="?*", ENV{.INPUT_CLASS}="mouse"
ENV{ID_INPUT_TABLET}=="?*", ENV{.INPUT_CLASS}="mouse"
ENV{ID_INPUT_JOYSTICK}=="?*", ENV{.INPUT_CLASS}="joystick"

# set the bus ID
SUBSYSTEMS=="i2c", ENV{ID_BUS}=="", ENV{ID_BUS}="i2c"

# by-id links
KERNEL=="event*", ENV{ID_BUS}=="i2c", ENV{.INPUT_CLASS}=="?*", ATTRS{name}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$attr{name}-event-$env{.INPUT_CLASS}"

VM

CODE GPU passthrough (graphics, audio)
<hostdev mode="subsystem" type="pci" managed="yes">
  <source>
    <address domain="0x0000" bus="0x03" slot="0x00" function="0x0"/>
  </source>
  <address type="pci" domain="0x0000" bus="0x04" slot="0x00" function="0x0"/>
</hostdev>
<hostdev mode="subsystem" type="pci" managed="yes">
  <source>
    <address domain="0x0000" bus="0x03" slot="0x00" function="0x1"/>
  </source>
  <address type="pci" domain="0x0000" bus="0x05" slot="0x00" function="0x0"/>
</hostdev>

Add grab="all" grabToggle="ctrl-ctrl" to the keyboard to capture all inputs on ctrl-ctrl.

CODE Keyboard
<input type="evdev">
  <source dev="/dev/input/by-id/usb-Framework_Laptop_16_Keyboard_Module_-_ANSI_FRAKDKEN0100000000-if02-event-kbd" grab="all" grabToggle="ctrl-ctrl" repeat="on"/>
</input>
<input type="evdev">
  <source dev="/dev/input/by-id/usb-Framework_Laptop_16_Numpad_Module_FRAKDKEN0100000000-if02-event-kbd" repeat="on"/>
</input>