Linux Ubuntu 14.04, Suspend/Resume, And new "In Kernel" LIRC
#1
I don't know if all the above is interrelated, but from past experience of older versions of Ubuntu suggests it should be. I have a new Zotac ZBox AQ01, and there is limited info, guides or threads to follow with this information.

After rebuilding the system again, I thought I was grasping the new "in kernel LIRC" configuration. The presumption being I should never need to install the standard LIRC program we all know and love again...

So I finally got the system to recognise the OK button on my Harmony 650 remote. It involved creating a new (copy of) file /lib/udev/rc_keymaps/rc6_mce into /etc and editing the 0f0422 to KEY_ENTER, then updating ir-keytable to use the new file as the correct config.

So onto the next problem. Suspend and Resume. It actually took a long time to find the original Power Saving > Shutdown function = Suspend option. In the settings menu, go into 1 of the top level settings menus, such as Appearance or System. Then scroll to 1 beyond the final item, and it will move to "Settings level | Standard". You can toggle this through to Expert to reveal the old setting.

I have tried a lot of stuff to get this going and am still stuck, so at people's mercy... Summary of what I have been trying, and do not think I have even successfully got a complete Suspend, let alone a Resume:
1. Editing the above rc_keymap file to use KEY_SLEEP instead of KEY_POWER
2. Editing the various XBMC input device files (or creating stripped out copies into .xbmc/userdata/keymaps/) using the function "Suspend", "XBMC.Suspend()". These files are /usr/share/xbmc/system/Lircmap.xml, /usr/share/xbmc/system/keymaps/keyboard.xml and /usr/share/xbmc/system/keymaps/remote.xml.
3. Editing udev rules to enable "wake on USB" for ALL devices i can find (lsusb, and 1 line per device found in this command goes into the new udev rule. i used the same syntax as is all over the net for vendor and product ID's to insert the correct wakeup enabled parameters).
4. My final resort has been to use the Official XBMC remote from an iOS device to force a Suspend action (as its the only way I can guarantee it executes properly). Then toggling the above udev devices one by one to see if 1 would work with the remote as expected.
None did. In fact, when 1 device is enabled, it auto-resumes 1 second after the suspend.
So I turned them all off. Still no resume from the remote. However, resuming from the keyboard works fine.

I still think it relates to the new "in kernel LIRC".

Can someone please explain? Provide instructions, a guide with the same hardware in, or help with troubleshooting? Even knowing the correct procedures for completing this type of action would be good!

Thanks in advance.
Reply
#2
If you hit 'S' then suspend, does it suspend ?
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#3
Thanks for the reply.

I have been able to move the issues along.

So pressing any of the appropriate keys works on the keyboard. I actually set all the files back to their defaults, then created a new file in .xbmc/userdata/keymaps/keyboard.xml with the following:

Code:
<keymap>
<global>
     <keyboard>
        <sleep>Shutdown</sleep>
        <pause>Pause</pause>
        <c>ContextMenu</c>
        <i>Info</i>
     </keyboard>
</global>
</keymap>

and edited the default /lib/udev/rc_keymaps/rc6_mce and loaded the ir-keytable with this config to repoint that button to the KEY_SLEEP function. And in XBMC set the Shutdown function to Suspend.

So the PC now suspends. And understanding a bit more about this new way of working I hope to restore the buttons to how I am used to them on the MCE-1039 model remote, though some buttons aren't even recognised in "ir-keytable -t".

However it does not resume...

I have the following USB devices:

Code:
sudo lsusb
[sudo] password for dan:
Bus 002 Device 003: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 8087:07dc Intel Corp.
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I have the following in the /etc/udev/rules.d/90-keyboardwake.rules:
Code:
cat /etc/udev/rules.d/90-keyboardwakeup.rules
#SUBSYSTEM=="usb", ATTRS{idVendor}=="1d6b", ATTRS{idProduct}=="0001" RUN+="/bin/sh -c 'echo enabled > /sys$env{DEVPATH}/../power/wakeup'"
#SUBSYSTEM=="usb", ATTRS{idVendor}=="1d6b", ATTRS{idProduct}=="0002" RUN+="/bin/sh -c 'echo enabled > /sys$env{DEVPATH}/../power/wakeup'"
#SUBSYSTEM=="usb", ATTRS{idVendor}=="1d6b", ATTRS{idProduct}=="0003" RUN+="/bin/sh -c 'echo enabled > /sys$env{DEVPATH}/../power/wakeup'"
SUBSYSTEM=="usb", ATTRS{idVendor}=="8087", ATTRS{idProduct}=="07dc" RUN+="/bin/sh -c 'echo enabled > /sys$env{DEVPATH}/../power/wakeup'"

I have been cycling through enabling a single device at a time, rebooting and testing. If I set it to the 2nd device, when I click to Suspend, the PC immediately resumes on its own. If I enable any of the other devices, nothing happens.

Is there something else I should be trying in Ubuntu 14.04 or for this specific hardware?
Reply

Logout Mark Read Team Forum Stats Members Help
Ubuntu 14.04, Suspend/Resume, And new "In Kernel" LIRC0