# Linux Kernel Module Cheat

#### 14.4.1. X11 Buildroot mouse not moving

TODO 9076c1d9bcc13b6efdb8ef502274f846d8d4e6a1 I’m 100% sure that it was working before, but I didn’t run it forever, and it stopped working at some point. Needs bisection, on whatever commit last touched x11 stuff.

- https://askubuntu.com/questions/730891/how-can-i-get-a-mouse-cursor-in-qemu

- https://stackoverflow.com/questions/19665412/mouse-and-keyboard-not-working-in-qemu-emulator

`-show-cursor` did not help, I just get to see the host cursor, but the guest cursor still does not move.

Doing:

    watch -n 1 grep i8042 /proc/interrupts

shows that interrupts do happen when mouse and keyboard presses are done, so I expect that it is some wrong either with:

- QEMU. Same behaviour if I try the host’s QEMU 2.10.1 however.

- X11 configuration. We do have `BR2_PACKAGE_XDRIVER_XF86_INPUT_MOUSE=y`.

`/var/log/Xorg.0.log` contains the following interesting lines:

    [    27.549] (II) LoadModule: "mouse"
    [    27.549] (II) Loading /usr/lib/xorg/modules/input/mouse_drv.so
    [    27.590] (EE) <default pointer>: Cannot find which device to use.
    [    27.590] (EE) <default pointer>: cannot open input device
    [    27.590] (EE) PreInit returned 2 for "<default pointer>"
    [    27.590] (II) UnloadModule: "mouse"

The file `/dev/inputs/mice` does not exist.

Note that our current link:kernel_confi_fragment sets:

    # CONFIG_INPUT_MOUSE is not set
    # CONFIG_INPUT_MOUSEDEV_PSAUX is not set

for gem5, so you might want to remove those lines to debug this.