From: Carlos Garnacho <carlosg@gnome.org>
To: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: linux-acpi@vger.kernel.org
Subject: Re: [PATCH 0/5] hooking udev to SW_TABLET_MODE changes
Date: Tue, 17 Dec 2013 13:06:44 +0100 [thread overview]
Message-ID: <1387282004.15078.59.camel@sacarino> (raw)
In-Reply-To: <20131217000332.GA10466@khazad-dum.debian.net>
Hey Henrique,
On lun, 2013-12-16 at 22:03 -0200, Henrique de Moraes Holschuh wrote:
> On Tue, 17 Dec 2013, Carlos Garnacho wrote:
> > The following patches make it possible to have udev/userspace notified when
> > SW_TABLET_MODE changes on the switch device, without having to resort to
> > poll()/select() for such sparse events. I've got udev patches locally to
> > complement this.
>
> I don't like this. We moved away from uevents for this kind of stuff (in
> the general sense) because they, to put it lightly, are NOT appropriate for
> input-event-like events.
I would like to know... not appropriate how? I can understand this rule
applies for too often events, as some input devices can get quite
chatty, but the frequency of these uevents is tremendously low. FWIW,
there is precedence of uevents on input devices in the asus-laptop
module [1], where the accelerometer reports uevents on "coarse
orientation changes".
>
> Moving any sort of input event back to uevents is something I do NOT want to
> support, ever. Any userspace that wants it for backwards compatibility can,
> and DOES synthesize uevents from input events.
I'm not proposing "moving back", but "complementing", the device still
has to be poked. The problem I see with awaiting for input events in
userspace in this case is that there is no good place to have this done.
My first attempt time ago was doing this in UPower, because it is
already in the business of reading input events, but it was deemed too
unrelated [2]. The next option is having a dedicated daemon, listening
for an event that's very probably not doing to happen at all during
uptime... sounds pretty wasteful to me.
>
> So, can you make a very strong case for this uevent?
>
Well, the above. I could add that the accelerometer uevent I pointed out
is put in use in udev and the GNOME stack, I think it makes sense to
give tablet-mode changes a similar treatment, so establishing policies
and whatnot is saner. And I think most of the userspace that's
interested in these events would want that too, with maybe exotic
exceptions.
Carlos
[1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/platform/x86/asus-laptop.c#n1564
[2] https://bugs.freedesktop.org/show_bug.cgi?id=43935
next prev parent reply other threads:[~2013-12-17 12:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-16 23:00 [PATCH 0/5] hooking udev to SW_TABLET_MODE changes Carlos Garnacho
2013-12-16 23:00 ` [PATCH 1/5] thinkpad_acpi: Send uevent when " Carlos Garnacho
2013-12-16 23:00 ` [PATCH 2/5] hp-wmi: " Carlos Garnacho
2013-12-16 23:00 ` [PATCH 3/5] xo15-ebook: " Carlos Garnacho
2013-12-16 23:00 ` [PATCH 4/5] classmate-laptop: " Carlos Garnacho
2013-12-16 23:00 ` [PATCH 5/5] fujitsu-tablet: " Carlos Garnacho
2013-12-17 0:03 ` [PATCH 0/5] hooking udev to " Henrique de Moraes Holschuh
2013-12-17 12:06 ` Carlos Garnacho [this message]
2013-12-17 19:16 ` Henrique de Moraes Holschuh
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=1387282004.15078.59.camel@sacarino \
--to=carlosg@gnome.org \
--cc=hmh@hmh.eng.br \
--cc=linux-acpi@vger.kernel.org \
/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