Comment 61 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 Sat, 2017-01-28 at 21:04 +0000, marmuta wrote:
> > @marmuta. Can you please share your fix in revision 2217 ?
>
> It was commit 2215 and 2216, actually, sorry. I have 2217 only locally here
> and I can't recommend it yet, but the error isn't supposed to be happening in
> 2216 anymore.
>
> The debug output doesn't seem to show rev. 2216, though. That
>  "HardwareSensorTracker global key press 23 received"
> should print both keycode and keyval (aka. keysym) now.
>

Oh!. I had only handpicked revision 2216 and not 2215.

> Did you
> bzr branch lp:onboard   # initially
> cd onboard
>
> bzr pull # for getting the latest sources
>
> Then either
> ./setup.py build
> ./onboard    # must run from source directory
> or
> debuild binary  # for packages, install with dpkg -i
> ?
>

Did it now. Thanks for mentioning it. I've now built it with your latest changes
in master, i.e. rev. 2219

It seems to be working fine with the exception that on first trigger of the
mode, it doesn't detect. Perhaps because, for the ideapad driver, no acpi event
is generated, nor do I have acpid installed.

Jan 29 15:28:32 learner org.onboard.Onboard[11716]: 15:28:32.703 WARNING HardwareSensorTracker: Failed to connect to acpid, SW_TABLET_MODE detection disabled. ('/var/run/acpid.socket': [Errn
Jan 29 15:28:33 learner gnome-shell[11870]: JS LOG: loading default theme (Adwaita)

But after the first invocation, onboard shows perfectly in tablet mode, in text input fields.

By the way, I was wondering if having a "Debug" checkbox in the onboard config
gui window would make sense ? Otherwise, users need to ensure that the running
instance of onboard is killed, before running in debug mode. Would you be okay
to add such a feature ? Should I file a separate bug report for it ?

> > rrs@learner:~$ cat /sys/bus/platform/devices/VPC2004:00/tablet_mode
> > 0
>
> Cool :) but wouldn't VPC2004:00 be prone to change? Is it available from
> elsewhere, similar to
> /sys/devices/platform/thinkpad_acpi/hotkey_tablet_mode
> ?
>

I just checked into the ideapad sources and that device id string (VPC2004) is
hardcoded. So I'm assuming that'll remain the same.

Other than that path, there's nowhere else is sysfs where it writes, that could
be useful from an unprivileged user point of view.

> I see you already found in
> gsettings :)
>
> I can't say much about the kernel changes, that's up to the kernel
> people. I feel the Yoga firmware must have a dedicated path to determine
> tablet-mode, but if no one knows the correct way, than your approach
> seems like the second best thing to do. I wish you luck getting it
> accepted.
>

I am not very hopeful either but I will still send it to the mailing lists. If
it is outrightly rejected, a counter patch could be to just expose the touchpad
on/off state in sysfs (non /s/k/debug path) and then onboard could still rely on
that ?

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

iQIzBAEBCgAdFiEEQCVDstmIVAB/Yn02pjpYo/LhdWkFAliNxjIACgkQpjpYo/Lh
dWmoKg//Z5NYZ7jPavXTlsPRjxruh5AGeG8dreqgWUyBmGJ1Cub5KRVXbdwHmi3c
IpbkxbjD9cVz5vVyk3c6fBm5w/DNzsfDyzDSf7/ydP9Fe2CmObvzypo76F8+fB5L
bCEZueEcmYkU0P1hOT8lNbYXxWDdhz6pFxPhReDzPx4cHbQBmfsP3+gcNDx8Mniz
KZ4xv7oSQaEthqHE1EqyK3qxqnz1vun1iyzMgcJtby9INkmT1V6rZV3TFDeq+I95
olzh1OXafq3qJZpafz/rmm5kxyjlxs2qxYuuEuT0XaSkED/+G3c4R9mvd8Zir6e2
x+4KnA3rK2mnaxYIkmmata98sH6WPjOug7xQW89Ms2SkHNL6FxlY+pJl4jX/fPxV
4KxrUQ9Bt3WIdzmppi1m6BwY/8OzANzt36uzOKK/QddMed+kuC1oBqEOi699Z2Xw
INWfNLVUwOwZokbs7png+Shwh5iGrhVHqQA8zsdreMbSlm5QSXRQ1bT94MdpjvV/
XmiMb34PF5YEjrErHsRFDX3tkguHGwpsMkIyUzZ1AFvFtUT7w1gpnVzAoVk/06m0
oat+Hxlub2nm9g9VjvQo54vb62lunjkzs8N5ysPOpwDRNBN1dOowfWbav4bFRJzv
g1CgRRa0BccKro0Mega+0EckhrnazQbmAiLWJ0Cy4rElKt1Bg6U=
=nV82
-----END PGP SIGNATURE-----