On Sat, 2016-12-10 at 17:00 +0000, marmuta wrote:
> There was an update to https://bugs.launchpad.net/bugs/989419 today, which had
> me thinking if tablet-mode could be detected by a disabled/missing keyboard
> device. I came across this for the Yoga 2 before:
> "The keyboard and touch pad are automatically locked when the screen is opened
> beyond 190 degrees (approximately).".
I've tried hard to find a simple way. But unfortunately, no. I've not been able
to come up with anything. And this is just for my hardware. I'm not sure if
other variants, and other hardware, will have different issues.
> Is this possibly done in "hardware" or still by some (Windows) driver reading
> a sensor in software?
>
Initially, when I was investigating the iio sensor support for the kernel, I
believe reading somewhere that the 4 modes (Normal, Tent, Tablet, ....) were
done in Lenovo Software, and NOT by Windows. Which could be true, because this
laptop was factory installed with Windows 8.
> @Ritesh, could you check if the list of evdev or xinput devices changes
> between tablet- and laptop mode?
> $ sudo evtest
> $ xinput
Here are the outputs. No device listings change.
rrs@learner:~$ xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ ELAN Touchscreen id=9 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=13 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Power Button id=8 [slave keyboard (3)]
↳ Lenovo EasyCamera id=10 [slave keyboard (3)]
↳ Ideapad extra buttons id=11 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=12 [slave keyboard (3)]
2016-12-11 / 00:06:33 ♒♒♒ ☺
rrs@learner:~$ Now switching to Tablet Mode^C
2016-12-11 / 00:06:47 ♒♒♒ ☹ => 130
rrs@learner:~$ xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ ELAN Touchscreen id=9 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=13 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Power Button id=8 [slave keyboard (3)]
↳ Lenovo EasyCamera id=10 [slave keyboard (3)]
↳ Ideapad extra buttons id=11 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=12 [slave keyboard (3)]
2016-12-11 / 00:07:14 ♒♒♒ ☺
rrs@learner:~$ sudo evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0: AT Translated Set 2 keyboard
/dev/input/event1: Power Button
/dev/input/event2: Lid Switch
/dev/input/event3: Power Button
/dev/input/event4: Video Bus
/dev/input/event5: SynPS/2 Synaptics TouchPad
/dev/input/event6: Ideapad extra buttons
/dev/input/event7: PC Speaker
/dev/input/event8: HDA Digital PCBeep
/dev/input/event9: HDA Intel PCH Mic
/dev/input/event10: HDA Intel PCH Front Headphone
/dev/input/event11: HDA Intel HDMI HDMI/DP,pcm=3
/dev/input/event12: HDA Intel HDMI HDMI/DP,pcm=7
/dev/input/event13: HDA Intel HDMI HDMI/DP,pcm=8
/dev/input/event14: ELAN Touchscreen
/dev/input/event15: Lenovo EasyCamera
Select the device event number [0-15]: ^C
2016-12-11 / 00:07:57 ♒♒♒ ☹ => 130
rrs@learner:~$ sudo evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0: AT Translated Set 2 keyboard
/dev/input/event1: Power Button
/dev/input/event2: Lid Switch
/dev/input/event3: Power Button
/dev/input/event4: Video Bus
/dev/input/event5: SynPS/2 Synaptics TouchPad
/dev/input/event6: Ideapad extra buttons
/dev/input/event7: PC Speaker
/dev/input/event8: HDA Digital PCBeep
/dev/input/event9: HDA Intel PCH Mic
/dev/input/event10: HDA Intel PCH Front Headphone
/dev/input/event11: HDA Intel HDMI HDMI/DP,pcm=3
/dev/input/event12: HDA Intel HDMI HDMI/DP,pcm=7
/dev/input/event13: HDA Intel HDMI HDMI/DP,pcm=8
/dev/input/event14: ELAN Touchscreen
/dev/input/event15: Lenovo EasyCamera
Select the device event number [0-15]: ^C
2016-12-11 / 00:08:40 ♒♒♒ ☹ => 130
rrs@learner:~$
Besides this, here's some (unsolved) thought. Upon mode switch from tablet to normal,
a scan code is generated (log below).
We could fix it, for this hardware variant, with a proper keycode. If that
works, then onboard (or someone else) will have to build a list of such devices
with such quirks.
But the problem is that upon switch to tablet mode, there's no such event. As
you see below, both these events (press and release) are triggered only during
mode switch from tablet to normal.
[ 1523.920674] atkbd serio0: Unknown key pressed (translated set 2, code 0xbe on
isa0060/serio0).
[ 1523.920680] atkbd serio0: Use 'setkeycodes e03e <keycode>' to make it known.
[ 1523.930007] atkbd serio0: Unknown key released (translated set 2, code 0xbe
on isa0060/serio0).
[ 1523.930013] atkbd serio0: Use 'setkeycodes e03e <keycode>' to make it known.
- --
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."
-----BEGIN PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
On Sat, 2016-12-10 at 17:00 +0000, marmuta wrote: /bugs.launchpad .net/bugs/ 989419 today, which had
> There was an update to https:/
> me thinking if tablet-mode could be detected by a disabled/missing keyboard
> device. I came across this for the Yoga 2 before:
> "The keyboard and touch pad are automatically locked when the screen is opened
> beyond 190 degrees (approximately).".
I've tried hard to find a simple way. But unfortunately, no. I've not been able
to come up with anything. And this is just for my hardware. I'm not sure if
other variants, and other hardware, will have different issues.
> Is this possibly done in "hardware" or still by some (Windows) driver reading
> a sensor in software?
>
Initially, when I was investigating the iio sensor support for the kernel, I
believe reading somewhere that the 4 modes (Normal, Tent, Tablet, ....) were
done in Lenovo Software, and NOT by Windows. Which could be true, because this
laptop was factory installed with Windows 8.
> @Ritesh, could you check if the list of evdev or xinput devices changes
> between tablet- and laptop mode?
> $ sudo evtest
> $ xinput
Here are the outputs. No device listings change.
rrs@learner:~$ xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ ELAN Touchscreen id=9 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=13 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Power Button id=8 [slave keyboard (3)]
↳ Lenovo EasyCamera id=10 [slave keyboard (3)]
↳ Ideapad extra buttons id=11 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=12 [slave keyboard (3)]
2016-12-11 / 00:06:33 ♒♒♒ ☺
rrs@learner:~$ Now switching to Tablet Mode^C
2016-12-11 / 00:06:47 ♒♒♒ ☹ => 130
rrs@learner:~$ xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ ELAN Touchscreen id=9 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=13 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Power Button id=8 [slave keyboard (3)]
↳ Lenovo EasyCamera id=10 [slave keyboard (3)]
↳ Ideapad extra buttons id=11 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=12 [slave keyboard (3)]
2016-12-11 / 00:07:14 ♒♒♒ ☺
rrs@learner:~$ sudo evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0: AT Translated Set 2 keyboard
/dev/input/event1: Power Button
/dev/input/event2: Lid Switch
/dev/input/event3: Power Button
/dev/input/event4: Video Bus
/dev/input/event5: SynPS/2 Synaptics TouchPad
/dev/input/event6: Ideapad extra buttons
/dev/input/event7: PC Speaker
/dev/input/event8: HDA Digital PCBeep
/dev/input/event9: HDA Intel PCH Mic
/dev/input/event10: HDA Intel PCH Front Headphone
/dev/input/event11: HDA Intel HDMI HDMI/DP,pcm=3
/dev/input/event12: HDA Intel HDMI HDMI/DP,pcm=7
/dev/input/event13: HDA Intel HDMI HDMI/DP,pcm=8
/dev/input/event14: ELAN Touchscreen
/dev/input/event15: Lenovo EasyCamera
Select the device event number [0-15]: ^C
2016-12-11 / 00:07:57 ♒♒♒ ☹ => 130
rrs@learner:~$ sudo evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0: AT Translated Set 2 keyboard
/dev/input/event1: Power Button
/dev/input/event2: Lid Switch
/dev/input/event3: Power Button
/dev/input/event4: Video Bus
/dev/input/event5: SynPS/2 Synaptics TouchPad
/dev/input/event6: Ideapad extra buttons
/dev/input/event7: PC Speaker
/dev/input/event8: HDA Digital PCBeep
/dev/input/event9: HDA Intel PCH Mic
/dev/input/event10: HDA Intel PCH Front Headphone
/dev/input/event11: HDA Intel HDMI HDMI/DP,pcm=3
/dev/input/event12: HDA Intel HDMI HDMI/DP,pcm=7
/dev/input/event13: HDA Intel HDMI HDMI/DP,pcm=8
/dev/input/event14: ELAN Touchscreen
/dev/input/event15: Lenovo EasyCamera
Select the device event number [0-15]: ^C
2016-12-11 / 00:08:40 ♒♒♒ ☹ => 130
rrs@learner:~$
Besides this, here's some (unsolved) thought. Upon mode switch from tablet to normal,
a scan code is generated (log below).
We could fix it, for this hardware variant, with a proper keycode. If that
works, then onboard (or someone else) will have to build a list of such devices
with such quirks.
But the problem is that upon switch to tablet mode, there's no such event. As
you see below, both these events (press and release) are triggered only during
mode switch from tablet to normal.
[ 1523.920674] atkbd serio0: Unknown key pressed (translated set 2, code 0xbe on
isa0060/serio0).
[ 1523.920680] atkbd serio0: Use 'setkeycodes e03e <keycode>' to make it known.
[ 1523.930007] atkbd serio0: Unknown key released (translated set 2, code 0xbe
on isa0060/serio0).
[ 1523.930013] atkbd serio0: Use 'setkeycodes e03e <keycode>' to make it known.
- -- www.researchut. com
Ritesh Raj Sarraf
RESEARCHUT - http://
"Necessity is the mother of invention."
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiE EQCVDstmIVAB/ Yn02pjpYo/ LhdWkFAlhMTrgAC gkQpjpYo/ Lh LVXqpY0oFSf04eQ A1NcBPawKjjSjoa PS54wPjajo4qtxd VqEF N1YVj4+ uT89xR7l29G1OKw vgf2gaAGluwxBxc dLV3uASmgbUXavT RL8 lV+7wOEDZCegAe7 eUOTjRXCfW24+ TSTWp0RxfPDExW5 P0tMjm 0T+MKVzJNHq76To pEgs7/G651gOaXW fHsqvTmD5zFKG7B OJ6s 7MA1x3LWqn+ 64NExlhyoiJhN33 Gt8nFkLj0ZMzKTW WxaGGVFj fWTu4vqxY1KJZ7p yOqZltAStOJVzYP OW0OuMQJDMEpaxG RxcS zwCY94qkjAkR8zK 38t0bWt8JpuptY5 86BU44dV2dUozzj SMUA YcLRoUIKm6lSd0a YChr7llV0df18b8 GzJUlxQJRXAutyA 9JBBYL FPY72BjHeDpnyzb pJUXGjOoufpXiY1 R316HmYWFzoRdWV 2+QB Sn9i3C8v+ UjaRd26jNnSRwPM B+WnTGWBTFON1Tn s3QPNOm7uu i4mTuyv3/ rylBNCiDaSa2mqt CbI7BIB07j9g=
dWl6ZBAApZ5M8tV
yIAHaE6I+
Yz2/r87ErxwtXbG
HVBD2Tdw37qx6tQ
iz9yJQpiUvby4Rc
krg2EuUPlOJ7PS2
Hs6yYHHUTiUIpGE
jYI2n/bPOduk/
GGjAp0cHdEm8l60
4mnYWx1KhQugEJi
Gbu1Yb2Ldyyqb81
=MAwe
-----END PGP SIGNATURE-----