[Intel-gfx] unbinding graphics driver
jbarnes at virtuousgeek.org
Wed Oct 5 09:38:09 PDT 2011
On Tue, 4 Oct 2011 18:50:18 -0700
"Kay, Allen M" <allen.m.kay at intel.com> wrote:
> I'm working on assigning Intel graphics to a guest OS in Xen/KVM environment. Before assigning the device to the guest OS, I need to first unbind the i915 driver from the device in the host kernel.
> If I unbind the i915 driver by doing "echo -n 0000:00:02.0 > /sys/bus/pci/devices/0000:00:02.0/driver/unbind", I get a kernel oops with no stack trace. Is this something theoretically allowed?
It can be unloaded, but you also have to unbind it from the console:
$ echo 0 > /sys/class/vtconsole/vtcon1/bind # or whatever is your fbcon
and of course it has to be unused. You can't unbind it if X is running
for example. That said, I've never tested the unbind functionality as
above, I only ever unload the module. So we could have undiscovered
> I have also tried to prevent the i915 driver from loading by renaming the drm directory in /lib/modules to drm.0. However, i915 driver is still loaded from somewhere, I don't know how it can happen. Is there a easy way to disable the i915 driver in the kernel?
Probably getting loaded by your initrd image. After you've renamed it
in /lib/modules (or removed it) you can re-generate your initrd using
mkinitrd or mkinitramfs (depending on distro).
Jesse Barnes, Intel Open Source Technology Center
More information about the Intel-gfx