From: Mario Limonciello <mario.limonciello@amd.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Michal Pecio <michal.pecio@gmail.com>
Cc: Jiri Kosina <jikos@kernel.org>,
Benjamin Tissoires <bentiss@kernel.org>,
Pierre-Loup Griffais <pgriffais@valvesoftware.com>,
open list <linux-kernel@vger.kernel.org>,
"open list:HID CORE LAYER" <linux-input@vger.kernel.org>,
"open list:USB SUBSYSTEM" <linux-usb@vger.kernel.org>,
Curtis Vogt <curtis.vogt@gmail.com>
Subject: Re: [PATCH 2/3] HID: valve-index: Reboot headset on system power transitions
Date: Fri, 11 Sep 2026 10:12:34 -0500 [thread overview]
Message-ID: <2d4b2c51-ac5f-4fbc-82aa-8d573d095687@amd.com> (raw)
In-Reply-To: <2026091106-footing-antelope-7ceb@gregkh>
On 9/11/26 04:23, Greg Kroah-Hartman wrote:
> On Fri, Sep 11, 2026 at 11:16:52AM +0200, Michal Pecio wrote:
>> On Fri, 11 Sep 2026 07:54:12 +0200, Greg Kroah-Hartman wrote:
>>>> +What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/reboot
>>>> +Date: October 2026
>>>> +Contact: linux-input@vger.kernel.org
>>>> +Description:
>>>> + Writing a boolean true value reboots the Valve Index headset to
>>>> + recover its EDID service. Writing a boolean false value has no
>>>> + effect. This file is write-only.
>>>
>>> Shouldn't this just be a debugfs file? Making it a sysfs file seems
>>> "risky" as it's not a normal operation.
>>
>> Not sure what's "risky" about it, it's hopefully a root-only thing?
>>
>> And it's the only supported way for userspace to recover buggy devices
>> from certain failure condition, it's been suggested that this could be
>> run by udev scripts. Isn't it more "risky" to ask userspace to mount
>> and tinker with debugfs as a matter of routine?
>
> You are creating an "odd" user/kernel api that is used for debugging,
> that's not what sysfs is for. sysfs is to show attributes that a device
> has NOT to cause the device to go off and do some random thing (yes,
> there are exceptions, but generally that's the rule.)
>
> debugfs is "do whatever you want", so that's a better place for this.
>
> thanks,
>
> greg k-h
I suppose an alternative path we can build to all of this reset handling
at power state transitions and sysfs/debugfs is a callback system for a
failed EDID read.
Something like DRM drivers can send a notify to a global queue when an
EDID read failed. Other drivers could subscribe to that notify and
react. I guess this would only work if the USB reset sequence to the
HMD looks like an HPD event to DRM though.
Also it wouldn't be perfect. If the HMD was connected and the read
failed on an unrelated monitor on the system the HMD would reset needlessly.
Eh, I think I'm talking myself back into this approach the patch does
now. I have no qualms moving the on demand knob to debugfs.
next prev parent reply other threads:[~2026-09-11 15:12 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 17:02 [PATCH 0/3] Add 'hid-valve-index' reset driver Mario Limonciello
2026-09-10 17:02 ` [PATCH 1/3] HID: Add shutdown callback for device drivers Mario Limonciello
2026-09-10 17:02 ` [PATCH 2/3] HID: valve-index: Reboot headset on system power transitions Mario Limonciello
2026-09-10 20:04 ` Michal Pecio
2026-09-10 20:43 ` Mario Limonciello
2026-09-10 20:52 ` Michal Pecio
2026-09-10 20:58 ` Mario Limonciello
2026-09-12 14:07 ` Curtis Vogt
2026-09-11 4:54 ` Curtis Vogt
2026-09-11 9:08 ` Michal Pecio
2026-09-11 5:54 ` Greg Kroah-Hartman
2026-09-11 6:01 ` Mario Limonciello
2026-09-11 9:16 ` Michal Pecio
2026-09-11 9:23 ` Greg Kroah-Hartman
2026-09-11 15:12 ` Mario Limonciello [this message]
2026-09-11 18:20 ` Michal Pecio
2026-09-10 17:02 ` [PATCH 3/3] USB: quirks: Ignore remote wakeup from the Valve Index breakout box hub Mario Limonciello
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2d4b2c51-ac5f-4fbc-82aa-8d573d095687@amd.com \
--to=mario.limonciello@amd.com \
--cc=bentiss@kernel.org \
--cc=curtis.vogt@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=michal.pecio@gmail.com \
--cc=pgriffais@valvesoftware.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox