Bug 15258 - Toshiba tablet events not available -- Toshiba Portege R400
Toshiba tablet events not available -- Toshiba Portege R400
Status: RESOLVED OBSOLETE
Product: Drivers
Classification: Unclassified
Component: Platform
All Linux
: P1 normal
Assigned To: acpi_platform-drivers@kernel-bugs.osdl.org
:
Depends on:
Blocks: 56331
  Show dependency treegraph
 
Reported: 2010-02-08 10:51 UTC by Thomas Ibbotson
Modified: 2013-11-20 13:26 UTC (History)
3 users (show)

See Also:
Kernel Version: -
Tree: Mainline
Regression: No


Attachments
output of acpidump (108.53 KB, application/octet-stream)
2010-02-08 10:51 UTC, Thomas Ibbotson
Details

Description Thomas Ibbotson 2010-02-08 10:51:49 UTC
Created attachment 24951 [details]
output of acpidump

Attached is the output of acipdump on a Toshiba Portege R400 as reequested on the linux-acpi mailing list thread: "Rotating tablet screen updates lid state but doesn't generate an event".
Comment 1 Zhang Rui 2010-02-21 09:11:30 UTC
this is the url to this thread.
http://marc.info/?l=linux-acpi&m=126555579324067&w=2

_L08 {
...
  If (\_SB.MEM.GP71)
  {
    Store (0x00, \_SB.MEM.GP71)
    Notify (\_SB.LID, 0x80)
    Notify (\_SB.PCI0.FNC0.TBLT, 0x01)
  }
...
}

this is the only place that we can get the Lid notification. This means that this piece of code is invoked when in the normal mode but not invoked in the tablet mode...

this seems to be a firmware problem to me.
ideally, it should be:

  If (Lid events)
  {
    If (In normal mode)
    {
      Notify (\_SB.LID, 0x80)
    }
    Else /* in tablet mode*/
    {
      Notify (\_SB.LID, 0x80)
      Notify (\_SB.PCI0.FNC0.TBLT, 0x01)
    }
  }

right?
Comment 2 Zhang Rui 2010-03-02 08:43:52 UTC
another question.
is this design on purpose?
I mean do we really want the lid event when closing the lid in tablet mode?

Usually, we check the lid states when a lid event is fired, and either turn off the LCD backlight or go to S3 if lid is closed.

Are you sure this is what you want?

So IMO, this is not a bug at all. what do you think?
Comment 3 Thomas Ibbotson 2010-03-02 13:34:09 UTC
No we wouldn't want the lid event when closing the lid in tablet mode. However there should be a rotate event so that we can change the screen orientation to portrait mode when in tablet mode.
Comment 4 Zhang Rui 2010-03-03 01:37:19 UTC
(In reply to comment #3)
> No we wouldn't want the lid event when closing the lid in tablet mode.

I see.

> However
> there should be a rotate event so that we can change the screen orientation to
> portrait mode when in tablet mode.

This seems to be some platform specific stuff, as the ratate event is not defined in the ACPI spec.

there must be some platform driver that can catch this event, right?
If no, this just means that the feature is not supported in Linux yet.
If yes, could you tell me the driver name please?

Anyway, this doesn't seem like a Linux ACPI core problem.
Comment 5 Zhang Rui 2010-03-10 03:39:03 UTC
okay, I think this is a feature miss in Linux toshiba-laptop drivers.

the toshiba-laptop driver should be able to recognize the ACPI device TBLT (HID WACF004) as an Toshiba tablet device, and register an notification callback for this devices.
So we can get "TBLT" event 0x01 when the lid is closed in tablet mode.
Comment 6 Zhang Rui 2010-03-10 05:39:22 UTC
maybe this is not a platform driver issue.
From
http://blogs.technet.com/deploymentguys/archive/2008/05/23/implementing-the-windows-xp-tablet-pc-edition-2005-single-image-deployment-supplemental-guide-process-in-mdt-2008.aspx
we can see that WACF004, WACF008, MAI3310, FUJ02E5 are tablet devices.

probably we need such a driver in Linux, like the wmi stuff?
Need a discussion with Len about this.
Comment 7 Zhang Rui 2010-03-10 05:45:49 UTC
(In reply to comment #6)
> maybe this is not a platform driver issue.
> From
> http://blogs.technet.com/deploymentguys/archive/2008/05/23/implementing-the-windows-xp-tablet-pc-edition-2005-single-image-deployment-supplemental-guide-process-in-mdt-2008.aspx
> we can see that WACF004, WACF008, MAI3310, FUJ02E5 are tablet devices.
> 
> probably we need such a driver in Linux, like the wmi stuff?

or maybe you need some out kernel drivers
like the one discussed here:
http://aiptektablet.sourceforge.net/kernel.html
http://www.nodevice.com/driver/category/Tablet.html

I don't have time to read the details, but will you please check if there are some drivers available?
Because, from the ACPI's point of view, all the these are not defined in the ACPI spec, thus there is nothing we (Linux/ACPI) can do here.
Comment 8 Matthew Garrett 2010-03-10 21:36:43 UTC
The WACF* devices are claimed by the ACPI serial driver, so it's not appropriate to add it there. We could potentially have the toshiba driver register for notifications on it anyway. I haven't seen anyone else using Wacom devices send the notifications like this, so I don't think there's a more generic place for it.
Comment 9 Matthew Garrett 2010-03-10 22:11:54 UTC
Looking at it further, it's not clear to me that this is useful - we only get sent the status event for one transition direction. This mechanism also isn't used on any other Toshiba tablets. Given that, I don't think there's any sensible way to make use of the notification in a driver.
Comment 10 Zhang Rui 2010-03-11 07:55:32 UTC
As stated in comment #3, at least we need a notification when the laptop enters tablet mode.
so what we need is to register a notify callback for this device in the toshiba driver and exports the SW_TABLET_MODE input events to user space.
Comment 11 Matthew Garrett 2010-03-11 13:36:00 UTC
We can only send SW_TABLET_MODE if we have a notification on both entry to and exit from tablet mode, and also a way of telling the difference between the two. As far as I can tell, we don't have that?
Comment 12 Zhang Rui 2010-03-12 02:36:19 UTC
I'm afraid we don't have that.

how about this?
1. SW_TABLET_MODE + Lid open ----- exit from tablet mode
2. SW_TABLET_MODE + Lid closed --- enter tablet mode
Comment 13 Alan 2012-08-29 17:22:38 UTC
Can I close this one as obsolete ?

Note You need to log in before you can comment on or make changes to this bug.