From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-06.mail-europe.com (mail-06.mail-europe.com [85.9.210.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8144640F734 for ; Fri, 28 Aug 2026 10:42:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=85.9.210.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787913763; cv=none; b=OFeFevxIGuf3mWVrbbrNVBmFFliFkYjKYGiDAIqYp5xZ/4QQNndKtbTd7rgJ7nJGF4UYDMy0KIpvXVVd+dLvs8Kw8wyN5rLJGyJd9eroOO/WbMYkOdhn48JB5psT/6KJ6y1NF1D7EmcQveizUqxUMtCnpGCmu3c9UuuxvwqglQ8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787913763; c=relaxed/simple; bh=TMHhiKGJhiixMSSefGOX3mKwji8XqB0Qoz5YBH/RdOk=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=tUNXVT3LWNT813dDMowWbljtG5BsbadLVyd5EYrnXjD/Z8eC5byFE85MVDlDJyqDoQXERA2qAdR1WZRl6xjt6hFhHVQsaMkZ1NCg/zM1BcCqCOFquUZ9bqCJgrClh830Qgxd/v2LclgPzKMHggeyglUll6P7VBXy8frDabdh9YA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ghoul.dev; spf=pass smtp.mailfrom=ghoul.dev; dkim=pass (2048-bit key) header.d=ghoul.dev header.i=@ghoul.dev header.b=C0nv9J6+; arc=none smtp.client-ip=85.9.210.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ghoul.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ghoul.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ghoul.dev header.i=@ghoul.dev header.b="C0nv9J6+" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ghoul.dev; s=protonmail2; t=1787913748; x=1788172948; bh=4hx4DF9Ze1/WdDlpBQe0Jt7BHNmSlbucflyx8vSRHPA=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=C0nv9J6+xnL88keL6RFHxMcwwxw1Rm++AAcHLvRxTaRujUGgRDse+g2iNvzu7epjh 93rRptz4dK+kVaTC3+nKp8PMmj0tzOLEpBobGju2HUd5fA2NMWLqObHBeyQMCtx2bi iqVoV80VEfmBJ5esHd1CaQDtZ5z85sRRtulHuSsNolTpwKONkd87NJWRoz7cLXNw8V mpK4IWAsbTpq+eiRBTZyTHQkzpDmG9daxCiNsdtEE/7Yg3h93UJvTxTRGzT5dt924s eWRU/LjF5kXjHD9ROTGd968se3iJGFwkzEq5Agp5YaL+0JTl64yHp01VFUEU2qtZqU 1jjYaiIzu1JYw== Date: Fri, 28 Aug 2026 10:42:21 +0000 To: Jiri Kosina , Benjamin Tissoires From: Ahmed Yaseen Cc: Denis Benato , Antheas Kapenekakis , =?utf-8?Q?Ilpo_J=C3=A4rvinen?= , Dmitry Torokhov , Alan Stern , Kerim Kabirov , GameBurrow , regressions@lists.linux.dev, linux-usb@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Ahmed Yaseen , stable@vger.kernel.org Subject: [PATCH v2] HID: usbhid: skip interrupt IN polling for devices with no input reports Message-ID: <20260828104159.62399-2-yaseen@ghoul.dev> In-Reply-To: <20260828104159.62399-1-yaseen@ghoul.dev> References: <20260828104159.62399-1-yaseen@ghoul.dev> Feedback-ID: 177610485:user:proton X-Pm-Message-ID: 601481af4ca6df679a1c95ab7ef3110b170d05fa Precedence: bulk X-Mailing-List: regressions@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable usbhid starts polling a device's interrupt IN endpoint on open (usbhid_open() -> hid_start_in()). If the report descriptor declares no input reports there is nothing to read there, so the poll is useless, and on some composite devices it is also harmful. The ASUS ROG N-Key keyboards expose a second, input-less interface used only for RGB control via feature reports. Opening its hidraw node (any hidraw reader does, including SDL/Steam Input or a plain cat) starts the pointless IN poll and keypress reports on the keyboard interface get dropped for as long as the node stays open: a lost key-down drops a letter, a lost key-up leaves the key stuck. usbmon shows the dropped reports never reach the URB layer. The useless poll itself is long-standing; commit 4ac74ea68f64 ("HID: asus: early return for ROG devices") is what exposes it on these devices by keeping the input-less interface alive instead of ejecting it, so its hidraw node can be opened and the poll started. Skip the poll in usbhid_open() when the device has no input reports. Feature reports and hidraw output keep working over the control and OUT endpoints, so the interface is otherwise unaffected. Fixes: 4ac74ea68f64 ("HID: asus: early return for ROG devices") Link: https://discuss.cachyos.org/t/keyboard-input-issues-on-asus-rog-strix= -16-2025-with-cachyos-during-gaming/30823 Link: https://github.com/ublue-os/bazzite/issues/4590 Cc: stable@vger.kernel.org Tested-by: Kerim Kabirov Tested-by: GameBurrow Signed-off-by: Ahmed Yaseen Reviewed-by: Denis Benato --- drivers/hid/usbhid/hid-core.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index 96b0181cf819..d7cf2b56e117 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c @@ -688,7 +688,14 @@ static int usbhid_open(struct hid_device *hid) =20 =09set_bit(HID_OPENED, &usbhid->iofl); =20 -=09if (hid->quirks & HID_QUIRK_ALWAYS_POLL) { +=09/* +=09 * ALWAYS_POLL devices are already polled from usbhid_start(), and a +=09 * device with no input reports has nothing to send on the interrupt +=09 * IN endpoint. In some cases polling is harmful: on the ASUS ROG +=09 * N-Key keyboards it makes the sibling interface drop keypresses. +=09 */ +=09if ((hid->quirks & HID_QUIRK_ALWAYS_POLL) || +=09 list_empty(&hid->report_enum[HID_INPUT_REPORT].report_list)) { =09=09res =3D 0; =09=09goto Done; =09} base-commit: 8d3ae59288f1e7d58d76558a6ee96d533bc5019f --=20 2.55.0