ariflirc Posted September 12, 2012 Report Share Posted September 12, 2012 These are instructions that worked for my ubuntu 12.04-based XBMC HTPC. None of the other howtos I could find actually worked for me. Recent ubuntus (e.g. 12.04 or later) use udev and automatically query the "wakeup" capability of USB devices, and allow setting the "wakeup" property of the device only if it supports it. The "stable" FLIRC firmware does not expose the "wakeup" capability to the kernel. Only later "fw_wakeup" betas do (starting in v2 I think). Anyhow - here is the procedure that did the trick for me - YMMV but at least this will give you some hopefully useful pointers :) For wake-up to work with newer ubuntu’s with udev, the “Wake Up Firmware v6” is required. This method works in recent ubuntus (e.g. 12.04 or later) Connect FLIRC to the HTPC - then do: ..... Bus 005 Device 003: ID 20a0:0001 Clay Logic Note: Bus 5, Device 2. Note also: Vendor ID: 20a0; Device ID: 0001 lsusb -t …. /: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=ohci_hcd/5p, 12M |__ Port 4: Dev 3, If 0, Class=HID, Driver=usbhid, 1.5M |__ Port 4: Dev 3, If 1, Class=vend., Driver=, 1.5M Note: Bus 05, Port 4 Now if flashed with a “recent wake up” firmware, FLIRC will advertise via USB that it can wake up the machine, and this can be verified by querying the “power” capabilities of “Bus 05, Port 4”: ls /sys/bus/usb/devices/5-4/power active_duration control runtime_enabled wakeup_active wakeup_max_time_ms async level runtime_status wakeup_active_count wakeup_total_time_ms autosuspend persist runtime_suspended_time wakeup_count autosuspend_delay_ms runtime_active_kids runtime_usage wakeup_hit_count connected_duration runtime_active_time wakeup wakeup_last_time_ms If “wakeup” shows up in the listing, all is good. With the original “non-wakeup” firmware, no wakeup capability was showing up. Note: the old (pre udev) way of activating wakeup (sh -c 'echo "USB4" > /proc/acpi/wakeup') no longer works in ubuntu 12.04+ Now we can manually test if wakeup works by doing (note the use of the "bus" and the "port" addresses): echo enabled > /sys/bus/usb/devices/5-4/power/wakeup Suspend / resume should now work. This could be added to rc.local - the problem with this approach is that if the FLIRC is moved to a different USB port, wakeup won’t work. The best approach is to create a new udev rule: cd /etc/udev/rules.d/ vi 90-flircwakeup.rules SUBSYSTEM=="usb", ATTRS{idVendor}=="20a0", ATTRS{idProduct}=="0001" RUN+="/bin/sh -c 'echo enabled > /sys$env{DEVPATH}/../power/wakeup'" This will allow wake for the FLIRC no matter where it is connected. Note that for wake up to work, the “wake up” key has to be recorded using the “flirc” utility. 1 Quote Link to comment Share on other sites More sharing options...
jmarcet Posted September 14, 2012 Report Share Posted September 14, 2012 Hi, One nice addition would be to be able to use the same button for other things besides waking up. Other than that it works perfect :) Quote Link to comment Share on other sites More sharing options...
hhbernd Posted January 24, 2013 Report Share Posted January 24, 2013 Hello, I dont understand the "How-to". I Try the whole day to get my ZBOX restarted from sleep. I have a YaVDR with Ubuntu 12.4. Is there a chance to explain step-by-step what I can do to get my Flirc awake my machine ? Thank you! Bernd Quote Link to comment Share on other sites More sharing options...
burke Posted January 25, 2013 Report Share Posted January 25, 2013 @ hhbernd, can you wake your box using usb keyboard? Quote Link to comment Share on other sites More sharing options...
burke Posted January 28, 2013 Report Share Posted January 28, 2013 @ ariflirc Thank you for your post - I almost started panicking when I switched from xbmcbuntu with older kernel to minimal 12.10. I had a bit different experience with my system which is based on Zotac H55 board. Using flirc on win7, openelec and xbmcbuntu I never had need to upgrade from v1 fw. When I switched to minimal 12.10 all of the sudden wake did not work. After finding your post I made new udev rule and it all seemed to work, but.. If I used any other fw accept v1 my flirc would wake system on any remote activity in living room and it would not be present in my system until I would plug it into diferent usb. It would be ok if i wake my system with "wake command" but that was impossible to achieve. If i used fw 1 with your udev rule i could wake system with any key on remote (like on other systems I used before) but flirc was again not present on my system after resume. Resolution was to use v1 fw, so my system would not wake on any remote activity and to make a resume script that will reset USB port with flirc after resume. sudo nano /etc/pm/sleep.d/20_flirc_resume case "${1}" in hibernate|suspend) # Switch USB buses off echo -n "0000:00:1d.7" | tee /sys/bus/pci/drivers/ehci_hcd/unbind ;; resume|thaw) # Switch USB buses on echo -n "0000:00:1d.7" | tee /sys/bus/pci/drivers/ehci_hcd/bind ;; esac Note: this is copy of my script it will need to be changed to work on different system. If anyone needs more info pls just ask :) Regards burke Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.