Comment 43 for bug 1366421

Revision history for this message
marmuta (marmuta) wrote :

Thank you both. I've been searching and experimenting some more and slowly feel more confident about all the bits and pieces. My current plan is to

1) rely on acpid for the SW_TABLET_MODE switch
2) allow for optional additional hotkey events from xinput, e.g. for ideapad-laptop, where SW_TABLET_MODE isn't available
3) read the current state of tablet mode from (very few) known sysfs paths
4) detect connected keyboard devices with udev (has been requested elsewhere)

I believe only a single source will be strictly necessary, but the more the better, because some will work better than others.

2) will be available only on X, the others on Wayland/MIR too

> Here's the output you asked for:
> rrs@learner:~/rrs-home/Community/linux-upstream_GIT (broken-mmc)$ xinput test-xi2 3
That's promising. Keys 200/201 are XF86TouchpadOn/XF86TouchpadOff.

> root@learner:/sys/kernel/debug/ideapad# cat status
> And this status is wrong. Because my wifi is on.
Thanks. Touchpad status might have been interesting too, but I realized that you need root to read from debugfs anyway. Won't help us at the moment.

> So though the driver (thinkpad_acpi) loaded, it still doesn't seem to be meant
> for Yoga series.
Yes, looks like it. Still, I want to believe that either thinkpad_acpi will get Yoga support, or ideapad-laptop learns to send SW_TABLET_MODE. In the meantime we'll try the xinput events.

> About DEXP devices. They produce many tablets with keyboard, please take a look:
Thank you, but I get only 404 errors.

> Link to logs: https://yadi.sk/d/7d8AYqcL33QW4R
Couldn't download, do you have to be a member? You could just attach it here to the bug report. I don't think I need more information at the moment, though. Maybe later when I have more working code.

> Patches necessary for Dell Venue 11 Pro 7140 is here:
> https://bugzilla.kernel.org/show_bug.cgi?id=102281#c78
> https://bugzilla.kernel.org/show_bug.cgi?id=102281#c83
The second link indicates it will send SW_TABLET_MODE in the future. That's good news. I suspect if/when ideapad-laptop.c will get tablet mode detection it will go that route as well.

> By the way I find that disabling "auto-show" option is not working
Is that on GNOME Shell? The extension always enables auto-show on startup. The idea was to match the behavior of the built-in keyboard. This should probably be done only once on first start, though. Now that there is a gsettings schema for the extension I can just store a flag there. Yes, a bug report would be helpful.