[RFC PATCH libinput] udev: add libinput_udev_rescan_devices()

David Herrmann dh.herrmann at gmail.com
Fri Mar 21 01:47:43 PDT 2014


On Fri, Mar 21, 2014 at 6:14 AM, Peter Hutterer
<peter.hutterer at who-t.net> wrote:
> On Fri, Mar 21, 2014 at 12:27:45AM -0400, Jasper St. Pierre wrote:
>> So you're saying that every time we're suspended, we simply throw out the
>> entire context and drop all the devices on the floor, as if you just
>> unplugged all of them?
> fwiw, this is effectively what happens internally anyway, you get removed
> events for every device on suspend, and added events on resume for those
> still there.
>> I suppose I just never thought of that. On first though, I don't see
>> anything wrong with that.
>> If that's what we should do, should we remove libinput_suspend /
>> libinput_resume then?
> libinput_suspend/resume only tear down the devices, but not anything
> else. there isn't much global state that's kept across suspend/resume yet
> (seats are one example though) but the biggest difference is that that you
> can't use _any_ object around after libinput_destroy(). suspend/resume
> keeps them alive until you unref them.

Just to verify the assumptions: Yes, the kernel throws away the whole
context, but in user-space you can try to keep your devices around and
just resync them on resume. At least that's what I did. And use the
real udev-events to decide when the device has really gone away.


More information about the wayland-devel mailing list