Type something to search...

Block Linux driver with PCI Device ID

1. Find the device ID to blacklist

nick@swae-ws:~$ lspci | grep VGA
43:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Device 7448
63:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Device 7448

In this case let’s blacklist 43:00

2. Find all devices on bus

Look for the bus ID, which should reveal all devices attached to the GPU PCI-E bus

nick@swae-ws:~$ lspci -nn | grep 43:00
43:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:7448]
43:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:ab30] 

Note down the device IDs, in this case its 1002:7448 and 1002:ab30

3. Update GRUB boot args

sudo nano /etc/default/grub
# Update the line that starts with "GRUB_CMDLINE_LINUX_DEFAULT"
# Append to the end: "vfio-pci.ids=1002:7448,1002:ab30"
# The result should look like this:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash vfio-pci.ids=1002:7448,1002:ab30"
# Ctrl+X -> Y -> Enter
sudo update-grub

Reboot the system, after reboot, the device will not be handed over to the driver. Make sure displays continue to work (Eg connect to another adapter)

4. Validate

lspci -nnv

Find the device in question, find the line Kernel driver in use: . It should show vfio-pci

Tags :

Related Posts

Session Space

When debugging Windows kernels, sometimes you see addresses that “looks” like kernel space memory. It begins with 0xffff, resides within module presen

read more

!pte "Levels not implemented for this platform"

!pte command comes from extension kdexts.dll, which is bundled with debuggers for Windows package. The command performs machine type check with t

read more

Recursively Debug User-Mode Child Process

When you enable “debug child process” in WinDbg, it only attempts to debug the children. 0:000> sxe -c ".childdbg 1;bu wlanapi!WlanQueryInterfac

read more

Rundown Protection

Acquire with nt!ExAcquireRundownProtection. 0: kd> uf fffff802`148c8d80 nt!ExAcquireRundownProtection [minkernel\ntos\ex\rundown.c @ 333]: 3

read more

DISPATCHER_HEADER

See DISPATCHER_HEADER (geoffchappell.com)

read more

Power IRP Source

All Windows drivers / component / internally dispatch Power IRP with the routine. 0: kd> dt nt!PoRequestPowerIrp PoRequestPowerIrp long ( _D

read more

WDF

WDF is object based, the objects have to be created and manipulated by function calls to WDF itself. WDF objects are used by handles! Not their ptr t

read more

WinDbg System Uptime

Trace print code of “System Uptime” unicode string. 0:007> !for_each_module s-u @#Base @#End "System Uptime" 00007ffe`d8ec8e30 0053 0079 0073

read more

NT Wait Times

NT Wait Time OS store shared data as nt!_KUSER_SHARED_DATA . It is always mapped to 0xfffff78000000000 in all process. It is done through page t

read more

Self-Signed WHQL Certificate for Testing

Root Certificate $params = @{ Type = 'Custom' SerialNumber = '28cc3a25bfba44ac449a9b586b4339aa' KeyAlgorithm = 'RSA' HashAlgo

read more

When entering S3/S4, GFX receives D0 request

What is the D0? Set BP on our handler, and filter by cond BP for set power state 12: kd> bl 0 e Disable Clear fffff802`7b359020 000

read more