• 1
  • 2(current)
  • 3
  • 4
  • 5
  • 14
No resume form standby with vista remote after 2.6.32-23 #37 Kernel version
#16
decaturguy Wrote:looks like mceusb driver will be included in kernel 2.6.36
[url=http://git.wilsonet.com/linux-2.6-ir-wip.git/?a=commit;[url="http://git.wilsonet.com/linux-2.6-ir-wip.git/?a=commit;h=c57325a5f7651b06ab908d1629fddf7dc70073c3]http://git.wilsonet.com/linux-2.6-ir-wip.git/?a=commit;h=c57325a5f7651b06ab908d1629fddf7dc70073c3[/url]
http://sourceforge.net/mailarchive/forum...viewday=11
Any good composer that wanna write to mceusb module writer about resume situation here is his email address jarod at wilsonet dot com

Thanks for the info, but the git commit you linked i think has nothing to do with mce usb or is it ?

The other important thing to note that the new linux kernel blocks the usb power i think for ANY type of remote controller which uses usb power to receive the wakeup signal. So it is not only related to mce usb.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#17
alanwww1 Wrote:Thanks for the info, but the git commit you linked i think has nothing to do with mce usb or is it ?

The other important thing to note that the new linux kernel blocks the usb power i think for ANY type of remote controller which uses usb power to receive the wakeup signal. So it is not only related to mce usb.

sorry wrong commit.
http://git.wilsonet.com/linux-2.6-ir-wip...53997654a3

I was hopping they should add some sort of option to the usb drivers to enable wake from suspend and give the devices more juice.
Reply
#18
decaturguy Wrote:sorry wrong commit.
http://git.wilsonet.com/linux-2.6-ir-wip...53997654a3

I was hopping they should add some sort of option to the usb drivers to enable wake from suspend and give the devices more juice.

Thanks for the link ! It is strange why the good old mce usb driver had to be rewritten... I mean it worked pretty well and stable. I am not sure that this driver can be compiled with earlier kernels, but worth a try.

The best would be really if the general USB power problem could be solved somehow while the device is in suspend. I think the best would be to check the problematic commit in terms of how it handles if the device gets power or not while in standby.

I already contacted the developer who made the problematic kernel commit if he could help us in this way.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#19
Hey guys !

Below is my emailing with Alan Stern, who commited the problematic kernel change. He introduced a patch for newer kernels already, but for older kernels (for eg. Lucid 2.6.32-23) the patch needs testing. Anyone has the possibility to check the patch ?

if it is working he will commit the patch to the stable versions. So here it is:

Quote:> Dear Alan !
>
> I read your name on a kernel commit
>
> commit 2b454d9a5f0507c1bc3f01c06a2e6c464d2a2641
> Author: Alan Stern <stern@ROWLAND.harvard.edu>
> Date: Fri Apr 30 12:09:23 2010 -0400
>
> USB: fix remote wakeup settings during system sleep

That is a back-port of commit 5f677f1d45b2bf08085bbba7394392dfa586fa8e,
which is included in 2.6.34 and 2.6.35-rc.

Quote:> After this commit users have serious problems waking up their machines with
> a remote receiver eg. mce remote.
> This is a big problem for all htpc users out there. Can you help us finding
> a workaround or a solution that lirc devices can wake the computer up ?

The problem is fixed in 2.6.35 by commit
48826626263d4a61d06fd8c5805da31f925aefa0n (USB: obey the sysfs
power/wakeup setting). However that commit applies to 2.6.35 and has
not yet been released in 2.6.34.2. Below is a back-ported version
which applies to 2.6.33.5, so it will probably work with 2.6.32.23 too.

If this fixes your problem, I can submit it for inclusion in the
earlier -stable kernels.

Alan Stern

Code:
Index: 2.6.33.5/drivers/usb/core/driver.c
===================================================================
--- 2.6.33.5.orig/drivers/usb/core/driver.c
+++ 2.6.33.5/drivers/usb/core/driver.c
@@ -1790,9 +1790,6 @@ int usb_external_resume_device(struct us

static void choose_wakeup(struct usb_device *udev, pm_message_t msg)
{
-       int                     w, i;
-       struct usb_interface    *intf;
-
       /* Remote wakeup is needed only when we actually go to sleep.
        * For things like FREEZE and QUIESCE, if the device is already
        * autosuspended then its current wakeup setting is okay.
@@ -1802,18 +1799,10 @@ static void choose_wakeup(struct usb_dev
               return;
       }

-       /* If remote wakeup is permitted, see whether any interface drivers
+       /* Allow remote wakeup if it is enabled, even if no interface drivers
        * actually want it.
        */
-       w = 0;
-       if (device_may_wakeup(&udev->dev) && udev->actconfig) {
-               for (i = 0; i < udev->actconfig->desc.bNumInterfaces; i++) {
-                       intf = udev->actconfig->interface[i];
-                       w |= intf->needs_remote_wakeup;
-               }
-       }
-
-       udev->do_remote_wakeup = w;
+       udev->do_remote_wakeup = device_may_wakeup(&udev->dev);
}

int usb_suspend(struct device *dev, pm_message_t msg)
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#20
Unfortunately I cant test the patch you supplied. It wont apply cleanly on 2.6.34.1 which I'm running and I do not like to go through the hassle of downgrading. I'm not that experienced in compiling kernels either.

Here is a guide on how to compile a kernel in ubuntu someone might find useful if they feel like trying the patch though.
https://help.ubuntu.com/community/Kernel/Compile
Reply
#21
alanwww1 Wrote:Below is my emailing with Alan Stern, who commited the problematic kernel change. He introduced a patch for newer kernels already, but for older kernels (for eg. Lucid 2.6.32-23) the patch needs testing.


I'm not sure I understand. Will upgrading to the newest kernel (using synaptic package manager in Ubuntu) solve this problem?
Reply
#22
rbrohman Wrote:I'm not sure I understand. Will upgrading to the newest kernel (using synaptic package manager in Ubuntu) solve this problem?

No ! The original patch is for kernels 2.6.34. Ubuntu Lucid is tracking the 2.6.32 series (older) kernels.The patch needs to be tested first, if it is working the developer will commit it to the older kernels (our Lucid kernel for example) than the Ubuntu developers will put it into one of the future kernel upgrades. So it won't be tomorrow i am afraid :-((

The first should be if someone could make a test with a patched kernel compile.

I don't have time for that now.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#23
I have tested with kernel 2.6.34.1 and it works Big Grin
I made a new patch that will apply on kernel 2.6.34.1
Code:
--- linux-2.6.34/drivers/usb/core/driver.c    2010-07-17 00:50:09.000000000 +0200
+++ linux-2.6.34/drivers/usb/core/driver.c.mce    2010-07-17 01:09:20.407000116 +0200
@@ -1266,9 +1266,7 @@

static void choose_wakeup(struct usb_device *udev, pm_message_t msg)
{
-    int            w, i;
-    struct usb_interface    *intf;
-
+    
    /* Remote wakeup is needed only when we actually go to sleep.
     * For things like FREEZE and QUIESCE, if the device is already
     * autosuspended then its current wakeup setting is okay.
@@ -1279,23 +1277,11 @@
        return;
    }

-    /* If remote wakeup is permitted, see whether any interface drivers
+    /* Allow remote wakeup if it is enabled, even if no interface drivers
     * actually want it.
     */
-    w = 0;
-    if (device_may_wakeup(&udev->dev) && udev->actconfig) {
-        for (i = 0; i < udev->actconfig->desc.bNumInterfaces; i++) {
-            intf = udev->actconfig->interface[i];
-            w |= intf->needs_remote_wakeup;
-        }
-    }
-
-    /* If the device is autosuspended with the wrong wakeup setting,
-     * autoresume now so the setting can be changed.
-     */
-    if (udev->state == USB_STATE_SUSPENDED && w != udev->do_remote_wakeup)
-        pm_runtime_resume(&udev->dev);
-    udev->do_remote_wakeup = w;
+    
+    udev->do_remote_wakeup = device_may_wakeup(&udev->dev);
}

/* The device lock is held by the PM core */
Reply
#24
decaturguy Wrote:I have tested with kernel 2.6.34.1 and it works Big Grin
I made a new patch that will apply on kernel 2.6.34.1

Thanks for testing. That's good news.

Now all we need is someone who can test it on Ubuntu 2.6.32-23 so that i could report success with both older kernels to the kernel developers.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#25
decaturguy Wrote:I have tested with kernel 2.6.34.1 and it works Big Grin
I made a new patch that will apply on kernel 2.6.34.1
Code:
--- linux-2.6.34/drivers/usb/core/driver.c    2010-07-17 00:50:09.000000000 +0200
+++ linux-2.6.34/drivers/usb/core/driver.c.mce    2010-07-17 01:09:20.407000116 +0200
@@ -1266,9 +1266,7 @@

static void choose_wakeup(struct usb_device *udev, pm_message_t msg)
{
-    int            w, i;
-    struct usb_interface    *intf;
-
+    
    /* Remote wakeup is needed only when we actually go to sleep.
     * For things like FREEZE and QUIESCE, if the device is already
     * autosuspended then its current wakeup setting is okay.
@@ -1279,23 +1277,11 @@
        return;
    }

-    /* If remote wakeup is permitted, see whether any interface drivers
+    /* Allow remote wakeup if it is enabled, even if no interface drivers
     * actually want it.
     */
-    w = 0;
-    if (device_may_wakeup(&udev->dev) && udev->actconfig) {
-        for (i = 0; i < udev->actconfig->desc.bNumInterfaces; i++) {
-            intf = udev->actconfig->interface[i];
-            w |= intf->needs_remote_wakeup;
-        }
-    }
-
-    /* If the device is autosuspended with the wrong wakeup setting,
-     * autoresume now so the setting can be changed.
-     */
-    if (udev->state == USB_STATE_SUSPENDED && w != udev->do_remote_wakeup)
-        pm_runtime_resume(&udev->dev);
-    udev->do_remote_wakeup = w;
+    
+    udev->do_remote_wakeup = device_may_wakeup(&udev->dev);
}

/* The device lock is held by the PM core */

I would love this patch but have no clue how to patch my kernel in arch. =(. Hope this gets put in rather quickly.
Reply
#26
Smile 
I have good news. Alan Stern the author of the patch has submitted it also for the 2.6.32 and 33 series kernels.

I think it is just a matter if time we will see it in a Ubuntu kernel upgrade.

http://marc.info/?l=linux-usb&m=127970476426245&w=2
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#27
That's great - thanks guys for getting this looked after.
Reply
#28
Good work alanwww1
Reply
#29
Darkjasper Wrote:I would love this patch but have no clue how to patch my kernel in arch. =(. Hope this gets put in rather quickly.

I built a custom kernel in Arch using this patch last night, it compiled and installed successfully but I didn't have time before work this morning to test the remote wake-up to see if it is indeed fixed. It was pretty simple to build my own kernel following the Arch Wiki here. Basically I updated abs so everything was updated. Copied the kernel26 folder out of abs and edited the PKGBUILD to include the patch posted above. I used the latest Arch Kernel 2.6.34.1.

If it tests out tonight I could make it available somewhere for download if you still need it. It's a 32 bit package, so you are on your own if you are running 64 bit. Also I can throw up the PKGBUILD I used if that would help.

UPDATE: Patch works great on the latest Arch Kernel. I can post up my compilation somewhere if there is interest from other Archers.

Kevin
Reply
#30
decaturguy Wrote:I have tested with kernel 2.6.34.1 and it works Big Grin
I made a new patch that will apply on kernel 2.6.34.1

vanilla kernel or ubuntu kernel?
Reply
  • 1
  • 2(current)
  • 3
  • 4
  • 5
  • 14

Logout Mark Read Team Forum Stats Members Help
No resume form standby with vista remote after 2.6.32-23 #37 Kernel version0