Wake up from suspend with apple ir remote broken in 8.2.0

  • After upgrading from 8.0.2 to 8.2.0 my Macmini is no longer waking up from suspend using the apple ir remote.

    It only wakes up when I press the poweron button on the device itself but not with the remote.

    Any suggestions?

    Thanks, Jeroen.

  • Could you please post the following info from your working (8.0.2) and non-working (8.2.0) installations?

    Code
    journalctl -a | paste
    dmesg | paste
    lsmod | paste

    so long,

    Hias

  • For the non-working 8.2.0 installation it is:

    Code
    Macmini:/sys/bus/usb/devices # journalctl -a | paste
    http://sprunge.us/NZFX
    Macmini:/sys/bus/usb/devices # dmesg | paste
    http://sprunge.us/JciJ
    Macmini:/sys/bus/usb/devices # lsmod | paste
    http://sprunge.us/DEhD

    For the working 8.0.2 intallation I first have to revert my system upgrade and I will need some more time for that.

  • For the working 8.0.2 intallation it is:

    Code
    LibreELEC (official) Version: 8.0.2
    Macmini:~ # journalctl -a | paste
    http://sprunge.us/fEGL
    Macmini:~ # dmesg | paste
    http://sprunge.us/cYiX
    Macmini:~ # lsmod | paste
    http://sprunge.us/GijW

    I see there is a difference, but I have no understanding of what this is. So hope you can help me Hias.

    Thanks.

  • One difference is that we enable the apple-ir driver in 8.2.0 - this could be what's causing the issue, although I have no idea why wakeup worked before.

    Could you test if wakeup works after running the following command on 8.2.0:

    Code
    DEVPATH="/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.8/2-1.8.2/2-1.8.2:1.0/0003:05AC:8242.0001/input/input4" /usr/lib/udev/wakeup_enable

    so long,

    Hias

  • Hi Hias,

    I executed the command you requested, and then tested the wakeup again.

    However it still did not work to wakeup.

    Jeroen

    Code
    LibreELEC (official): 8.2.0 (Generic.x86_64)
    Macmini:~ # DEVPATH="/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.8/2-1.8.2/2-1.8.2:1.0/0003:05AC:8242.0001/input/input4" /usr/lib/udev/wakeup_enable
    Macmini:~ #
  • The previous versions contained no driver for the apple remote at all :)

    We added the apple-ir driver because we got reports that atvclient no longer worked without it. Also using lirc with the macmini / usbhid driver seems to require it.

    Unfortunately none of us LibreELEC developers have such hardware to test.

    BTW: are you using atvclient? If yes, uninstall it, then reboot, then ssh in, run the command from above and test again if wakeup works.

    IIRC atvclient unbinds the USB device so the command I posted could silently fail. Without atvclient probably only ENTER and volume up / down will be working, but that should be enough to test this. Better connect a USB keyboard during tests though.

    If that works, install atvclient, check if the remote works normally, and then check if suspend / remote wakeup works. Don't reboot in between, otherwise the wakeup settings from manually running wakeup_enable might be lost.

    so long,

    Hias

  • Code
    Macmini:~ # ps -ef | grep atvclient
      364 root       0:00 /usr/sbin/atvclient -m

    Yes I am running atvclient (it comes automatically with the installation).

    How can I manually uninstall / install it as you request me to do?

    What are the commands I have to enter?

    Thanks.

    Jeroen

  • Sorry, had forgotten that atvclient is built into the image, thought it was an addon.

    To disable it run the following command, then reboot.

    Code
    systemctl mask atvclient.service

    To enable it again run this:

    Code
    systemctl unmask atvclient.service

    Then, to start it without rebooting this should work:

    Code
    systemctl start atvclient.service

    so long,

    Hias

  • Hi Hias,

    I did all the instructions you said, but unfortunately without any success :(

    As far as I know atvclient is the only way to get the apple ir remote working properly and it works already for ages. There was a small code change earlier this year to support Krypton, but before that atvclinet code was not touched for a very long time.

    Is it an option to disable / remove the newly added apple ir driver, since it is not required by atvclient?

    I am happy to test.

    Jeroen.

  • According to this post atvclient didn't work at all until we enabled the appleir driver atvclient working but kodi does nothing

    I 've just kicked off a build without that driver and can upload it tomorrow but I suspect wake-from-suspend will still not work and atvclient won't work either.

    BTW: just noticed that you wrote that wakeup didn't work with 8.0 either and you manually had to add something to autostart: Apple IR Remote (atvclient) not working in v7.90.010 ALPHA

    8.2 uses a newer kernel (4.11 instead of 4.9 in 8.0) so probably some other change(s) might be needed...

    so long,

    Hias

  • Hi Hias,

    Thanks for preparing the build. I will test it on Saturday because I am away from home the whole week.

    I have added below lines to my autostart.sh in order for the USB devices/Bus to enable the wakeup.

    The atvclient itself has always worked for me (in LE 8 it needed latest version with krypton patches though).

    My autostart.sh

    Code
    echo enabled > /sys/bus/usb/devices/2-1.8.2/power/wakeup
    echo 1 > /sys/power/pm_async

    Jeroen.

  • Hi Jeroen,

    interesting that atvclient always worked for you - I'll probably need have a closer look into the differences between your setup and the one where atvclient failed.

    Here's a build without the apple-ir driver: LibreELEC-Generic.x86_64-8.2-devel-20171030102100-r26198-g0239080387.tar

    It would also be great if you could run the following commands on 8.0.2, 8.2.0, 8.2.0 with atvclient disabled, and the build above and post the output - this should hopefully give some hints if other wakeup related settings have changed:

    Code
    cat /proc/acpi/wakeup
    find /sys/devices -name wakeup | xargs grep .

    so long,

    Hias

  • Hi Hias,

    I tested the new buid and it works geat. Resume / wakep works as before again !!!

    Below is the output from the commands that you requested me.

    I am using LE and therefore OE for a long time now on Macmini (and prior ATV1) and the atvclient always worked perfectly, and for many other users.

    So I wonder what the plan is now?

    Greetings,

    Jeroen

  • Thanks a lot for the feedback!

    Wakeup states look identical for 8.2.0 and my test build, no idea why wakeup doesn't work with 8.2.0.

    I'm inclined to disable the kernel appleir driver again in official builds, but I'll wait a bit for feedback from the other thread (atvclient not working).

    so long,

    Hias

  • Ok Hias, thanks for your help.

    Please let me know when this is fixed in the official build, so I can upgrade to an official build again.

    Or If you want me to do another test....

    Jeroen.