Jetson TX1 wake by Power key

Don’t forget that drivers related to power management can generate events within the kernel even if not exposed to a device special file…this may be what the primary display is detecting through Xorg or the driver. Simply mirroring events as a human interface device to a device special file which listens to those same kernel events would allow that code to remain unchanged while offering end users the ability to customize without special efforts. The power button would be usable after that as a common keyboard or mouse button.

I don’t know how the primary display actually uses power events for waking, but one mechanism which might be related to this is D-Bus. This is the sort of thing D-Bus was designed for, and either directly or indirectly, I suspect at least part of waking up or sleeping gets sent this way. See:
[url]https://en.wikipedia.org/wiki/D-Bus[/url]

There are tools to monitor D-Bus traffic. I haven’t checked on Ubuntu, but Fedora (and probably Ubuntu) has “dbus-monitor”. It might be a place to start.

Thank you

Hello, Alex:
By default, 3 keys (GPIO) are defined in DTS (tegra210-jetson-cv-keys-p2597-2180-a00.dtsi). They are vol-up/vol-down/power.

You can test that in console:
export DISPLAY=:0
xinput list

� Virtual core pointer id=2 [master pointer (3)]
� ��↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
� ��↳ HID 04d9:0499 id=8 [slave pointer (2)]
� ��↳ Microsoft Comfort Curve Keyboard 2000 id=10 [slave pointer (2)]
� Virtual core keyboard id=3 [master keyboard (2)]
��↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
��↳ gpio-keys id=6 [slave keyboard (3)]
��↳ tegra-snd-t210ref-mobile-rt565x Headphone Jack id=7 [slave keyboard (3)]
��↳ Microsoft Comfort Curve Keyboard 2000 id=9 [slave keyboard (3)]

xinput test 6
key press 122
key release 122
key press 123
key release 123
key press 124
key release 124

Again, I tried in my platform with LCD. And power-key can light-up LCD after screen turn-off.

br
ChenJian

Hi ChenJian,

Thank you for the info. It must be useful.

I remember you said that in your particular condition it works in right way.
Unfortunately this knowledge does not help me at at all, because:

  • I have no chance to guess your particular environment, it is not specified;
  • in my particular condition system works different. :)

Thank you and best regards,
Alex

Hello, Alex:
You are right.
I test your case in my platform with exactly R24.2 SDK and it works well. But you have different platform. So most jobs may be on your own.

br
ChenJian

Hi ChenJian,

Just for clarification.
I’ve tried with exactly R24.2 SDK and Jetson TX1 Developer Kit.
It works properly until I connect my LCD.

I think, power button handling must not depend on LCD hardware, but in fact it does.

Best regards,
Alex