Comment 28 for bug 1366421

Revision history for this message
Ritesh Raj Sarraf (rrs) wrote : Re: [Bug 1366421] Re: d-bus method for setting the auto-show option

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On Mon, 2016-12-05 at 14:58 +0000, marmuta wrote:
> We're already using AT-SPI2 on D-Bus for auto-show, word-suggestions and
> auto-capitalization, but I'm not sure it can help with detecting tablet-
> mode. At least I haven't found anything in that direction.
>

Yes. I use this mode, here, on Debian too.

> /etc/acpi/events/ seems more promising. As I understand it, devices can
> generate key-strokes on rotation and/or changing from/to tablet-mode. One can
> then run arbitrary scripts when that happens. See for example
> https://bugs.launchpad.net/ubuntu/+source/acpid/+bug/1210823
>

Umm.. I'm not sure if acpi events really trap that event.

On my Debian box, these are the contents. And these are all provided by Laptop
Mode Tools, which is only involved for power savings.

rrs@learner:/var/tmp$ ls /etc/acpi/events/
lm_ac_adapter  lm_battery  lm_lid
2016-12-05 / 23:42:07 ♒♒♒  ☺

> There doesn't seem to exist a standardized interface for all possible
> devices, though. Each might have its own set of events. We probably
> can't easily add that part to Onboard.
>
> Unless someone runs tests on a convertible device, that is. Perhaps
> dbus-monitor can uncover some action when tablet-mode is entered/left.
>
> What we could do is add PauseAutoshow() (as mentioned in #2) to
> Onboard's D-Bus interface, ready to be called from scripts in
> /etc/acpi/events/.

I don't have the full context, but as I understand, you are looking for a way to
determine if the convertible is in normal or table mode.

Are you looking for something like the following ?

Connected to D-Bus.

Received reply from :1.5
  Arguments: [Variant(QString): "normal"]
Received reply from :1.5
  Arguments: [Variant(QString): "right-up"]
Received reply from :1.5
  Arguments: [Variant(QString): "bottom-up"]
Received reply from :1.5
  Arguments: [Variant(QString): "normal"]

iio-sensor-proxy can provide orientation information over dbus, provided your
device has the supported sensors.

PS: I have a convertible laptop (Lenovo Yoga 2 13). If there is anything I can
help with to improve onboard, please let me know. But the OS running on it will
be Debian.

- --
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEQCVDstmIVAB/Yn02pjpYo/LhdWkFAlhFr/0ACgkQpjpYo/Lh
dWlLfQ/+IG9b9Vp30QHeBnsjcHKfhpbda1rm6Nfk3aN8Y9GegNM/5JkePr8muBzu
6DKrtkI0v6BY5LMSM5RoDLKF4RYdvG0RCWOD1OZ7LXkrvyHewm5Nz0Rczky+KqFM
HPqdlDZBfAGMqfJUOUc6E7JwvC1pm+xlGLIxjBauc20vz6l83Hd787VemDsoTHPO
4qm08NEScRTh6b8yl/cIdojbSMhRPVAPBZkp28WAr12lyf9/3ssKrwKeFVHgFSns
Wi/ETaktFvc4oJfDlR1a3KgnNSmxna9b0PtfhCbg73mvBpGMYcaOWB+3dtX5eDp3
jLjnUKvlHOYfDvTuFO/VdKnIB/ZiqB3AnuyuNbYpJNVb/gMBjhalcIn0PuCx3Znt
yEtIe7aLHroPvkubvbpj1z7sAeifS27Okg73rxRTSngmy03odryjJoiOqpzNXpw4
twdG9zbL2RFx1u6GINMSaxDK+/iSSCbG1Kn3sMCYL6dY1Y+xY+2wueycHbMcQKe8
FhUI5cLQ3nVtkI3fR5juO1XLsG3Y96mewctKQqKjvHF2pDgOIZEnD1zSM9R1jhCm
ACVT6x+IHneNARD04OEhv91StGqkyzqBU9zdRymhzSi2WIdHCqSdHxYjkQmmj9E7
GcPKnaiz9Y0aFT+hfYkR8FjuI7FbsdurZh18WvnmE6WvYSrzP9s=
=DHgZ
-----END PGP SIGNATURE-----