Index: uspace/drv/hid/ps2mouse/ps2mouse.c
===================================================================
--- uspace/drv/hid/ps2mouse/ps2mouse.c	(revision f2d88f3fc01df99a1e5292a3a395c0754a4ef3fa)
+++ uspace/drv/hid/ps2mouse/ps2mouse.c	(revision af7b85bb59db696cbde621017721740cf7612ff6)
@@ -49,4 +49,5 @@
 #define PS2_MOUSE_SET_SAMPLE_RATE   0xf3
 #define PS2_MOUSE_ENABLE_DATA_REPORT   0xf4
+#define PS2_MOUSE_DISABLE_DATA_REPORT   0xf5
 #define PS2_MOUSE_ACK   0xfa
 
@@ -165,4 +166,26 @@
 	}
 
+	/* Disable mouse data reporting. */
+	uint8_t report = PS2_MOUSE_ENABLE_DATA_REPORT;
+	size_t nwr;
+	rc = chardev_write(mouse->chardev, &report, 1, &nwr);
+	if (rc != EOK) {
+		ddf_msg(LVL_ERROR, "Failed to enable data reporting.");
+		rc = EIO;
+		goto error;
+	}
+
+	/* Drain input buffer */
+	size_t nread;
+	uint8_t b;
+	do {
+		rc = chardev_read(mouse->chardev, &b, 1, &nread, chardev_f_nonblock);
+		if (rc != EOK) {
+			ddf_msg(LVL_ERROR, "Failed to drain input buffer.\n");
+			rc = EIO;
+			goto error;
+		}
+	} while (nread > 0);
+
 	/* Probe IntelliMouse extensions. */
 	errno_t (*polling_f)(void *) = polling_ps2;
@@ -175,6 +198,5 @@
 
 	/* Enable mouse data reporting. */
-	uint8_t report = PS2_MOUSE_ENABLE_DATA_REPORT;
-	size_t nwr;
+	report = PS2_MOUSE_ENABLE_DATA_REPORT;
 	rc = chardev_write(mouse->chardev, &report, 1, &nwr);
 	if (rc != EOK) {
@@ -184,5 +206,4 @@
 	}
 
-	size_t nread;
 	rc = chardev_read(mouse->chardev, &report, 1, &nread, chardev_f_none);
 	if (rc != EOK || report != PS2_MOUSE_ACK) {
