OESF Portables Forum

Everything Else => Zaurus Distro Support and Discussion => Distros, Development, and Model Specific Forums => Archived Forums => Angstrom & OpenZaurus => Topic started by: dansawyer on January 01, 2005, 01:23:17 am

Title: Usb Recover Accross Suspend Resume ??
Post by: dansawyer on January 01, 2005, 01:23:17 am
All,

usb suspend resume appears to be hanging up - again. The only way to re-ling accross the usb is after a re-boot. It comes up well.

I tried the sa1100 scripts that used to work for 3.5.1 but  to  no avail. Is there a fix or patch for this??

thanks,
Dan
Title: Usb Recover Accross Suspend Resume ??
Post by: grog on January 01, 2005, 01:45:31 pm
mmm, actually I was just trying to figure this our myself. So that's two!
Title: Usb Recover Accross Suspend Resume ??
Post by: dansawyer on January 01, 2005, 06:09:11 pm
Umm. Well the origenal post was a failior of the 'host' machine to restore usb after a suspend resume cycle. This was new; frequently it is the Z that will not pick up the usb interface. I will experiment and post. That said, is there anyway to 'test' the usb? When it is dead it is dead on both sides.

Dan
Title: Usb Recover Accross Suspend Resume ??
Post by: grog on January 02, 2005, 11:56:46 am
Just to qualify my own problem, my winxp pc comes up with the error 'USB device not recognized' when I plug my Z (back) in until I reboot the *Z* (not the pc), then it works fine until the next time I unplug then replug the Z back in. HTH
Title: Usb Recover Accross Suspend Resume ??
Post by: lardman on January 02, 2005, 05:28:05 pm
As a temporary work-around...

If you rmmod then insmod the usb/net_fd related modules it should fix it.

I was told on IRC that you should be able to modprobe usbd-control (not sure about the name, but something like that, and just the one module), rather than having to remove/add each module by hand.


Si
Title: Usb Recover Accross Suspend Resume ??
Post by: Hrw on January 03, 2005, 01:04:09 pm
modprobe usbdmonitor?
Title: Usb Recover Accross Suspend Resume ??
Post by: lardman on January 03, 2005, 01:09:43 pm
That sounds like the one :-), I've not tried it (yet) mind you as I can just run my start_net.sh script.

Si
Title: Usb Recover Accross Suspend Resume ??
Post by: Pyrates on January 03, 2005, 03:19:31 pm
Hey lardman, would you mind providing that start_net.sh script?

Cheers
Philipp
Title: Usb Recover Accross Suspend Resume ??
Post by: lardman on January 03, 2005, 05:53:13 pm
Note the differences depending on your processor type (SA or PXA):

https://www.oesf.org/forums/inde...rt_net\.sh (https://www.oesf.org/forums/index.php?showtopic=1485&hl=start_net\.sh)

Modified to just reload the net module, rather than looking at the storage stuff.

For SA:

#!/bin/sh
/sbin/rmmod sa1100_bi
/sbin/rmmod net_fd
/sbin/rmmod usbdcore
/sbin/insmod /lib/modules/2.4.18-rmk7-pxa3-embedix/kernel/drivers/usb/device/usbdcore.o
/sbin/insmod /lib/modules/2.4.18-rmk7-pxa3-embedix/kernel/drivers/usb/device/net_fd/net_fd.o
/sbin/insmod /lib/modules/2.4.18-rmk7-pxa3-embedix/kernel/drivers/usb/device/bi/sa1100_bi.o

or for PXA:

#!/bin/sh
/sbin/rmmod pxa_bi
/sbin/rmmod net_fd
/sbin/rmmod usbdcore
/sbin/insmod /lib/modules/2.4.18-rmk7-pxa3-embedix/kernel/drivers/usb/device/usbdcore.o
/sbin/insmod /lib/modules/2.4.18-rmk7-pxa3-embedix/kernel/drivers/usb/device/net_fd/net_fd.o
/sbin/insmod /lib/modules/2.4.18-rmk7-pxa3-embedix/kernel/drivers/usb/device/bi/pxa_bi.o


Si
Title: Usb Recover Accross Suspend Resume ??
Post by: Pyrates on January 03, 2005, 06:08:48 pm
Ahh, so it does just what you mentioned above. Thanks

Cheers
Philipp
Title: Usb Recover Accross Suspend Resume ??
Post by: grog on January 03, 2005, 08:34:01 pm
Thanks lardman. Works for me too!!
Title: Usb Recover Accross Suspend Resume ??
Post by: CoreDump on January 04, 2005, 12:06:47 pm
Did anyone here try to add this script to the APM resume scripts?
If so, did it work as expected?
Title: Usb Recover Accross Suspend Resume ??
Post by: Hrw on January 04, 2005, 12:17:56 pm
I 'love' you guys... those hacks around... but does ANY of you tried to modprobe usbdmonitor and try how does it work with STANDARD OpenZaurus 3.5.x hotplug?

When noone confirm does it work (it works for me) I won't set this as default as usbdmonitor is nasty thing sometimes.
Title: Usb Recover Accross Suspend Resume ??
Post by: CoreDump on January 04, 2005, 12:56:18 pm
Quote
I 'love' you guys... those hacks around... but does ANY of you tried to modprobe usbdmonitor and try how does it work with STANDARD OpenZaurus 3.5.x hotplug?

When noone confirm does it work (it works for me) I won't set this as default as usbdmonitor is nasty thing sometimes.
I tried usbmonitor w/ OZ 3.5.1 (IIRC) at one time.
Didn't help w/ the borked USB resume on my Collie.
Will try again tonight.
Title: Usb Recover Accross Suspend Resume ??
Post by: grog on January 04, 2005, 01:29:45 pm
Quote
I 'love' you guys... those hacks around... but does ANY of you tried to modprobe usbdmonitor and try how does it work with STANDARD OpenZaurus 3.5.x hotplug?

When noone confirm does it work (it works for me) I won't set this as default as usbdmonitor is nasty thing sometimes.
ok, then what exactly is the command I need to do? I tried
Code: [Select]
# /sbin/modprobe /lib/modules/2.4.18-rmk7-pxa3-embedix/kernel/drivers/usb/device/usbdmonitor.oand all I get is an error that it cannot find the module.
Title: Usb Recover Accross Suspend Resume ??
Post by: lardman on January 04, 2005, 03:44:28 pm
Quote
I 'love' you guys... those hacks around... but does ANY of you tried to modprobe usbdmonitor and try how does it work with STANDARD OpenZaurus 3.5.x hotplug?

When noone confirm does it work (it works for me) I won't set this as default as usbdmonitor is nasty thing sometimes.

No it doesn't work (on my C750). It doesn't fail, but just seems to do nothing, and Windows still doesn't recogniase my Z until I run start_net.sh.


Si
Title: Usb Recover Accross Suspend Resume ??
Post by: Pyrates on January 04, 2005, 04:21:26 pm
Grog, your command is wrong. Try "modprobe usbdmonitor" or replace "modprobe" by "insmod" in the command you tried...

Cheers
Philipp
Title: Usb Recover Accross Suspend Resume ??
Post by: lardman on January 04, 2005, 04:28:35 pm
I did a straight 'modprobe usbdmonitor' and it didn't work.

Si
Title: Usb Recover Accross Suspend Resume ??
Post by: grog on January 04, 2005, 09:33:46 pm
Ok, I tried a straight 'modprobe usbdmonitor' (after fixing my PATH so that I could, it seems the default /etc/profile isn't set up correctly), and no error messages, no connection, no nothin'. Then I run the start_net.sh script and voila! Connected I am.
Title: Usb Recover Accross Suspend Resume ??
Post by: grog on January 04, 2005, 09:45:18 pm
Question - is there any way I can add an icon to run the start_net.sh script (or any script for that matter), and if so, how? thks
Title: Usb Recover Accross Suspend Resume ??
Post by: lardman on January 05, 2005, 07:04:13 am
Yes, just create a .desktop file and change the binary it points to to one in /opt/QtPalmtop/bin (either move start_net.sh there, or create a symlink there).

Si
Title: Usb Recover Accross Suspend Resume ??
Post by: grog on January 05, 2005, 07:38:25 am
Quote
is there any way I can add an icon to run the start_net.sh script (or any script for that matter), and if so, how?
Quote
Yes, just create a .desktop file and change the binary it points to to one in /opt/QtPalmtop/bin (either move start_net.sh there, or create a symlink there).
Ok, I found the .desktop files, and they seem to be placed in an apps dir, but there's serveral apps dirs:

/home/QtPalmtop/apps
/home/opt/QtPalmtop/apps
/home/opt/QtPalmtop/share/apps
/root/.kde/share/apps
/root/kdepim/apps

Which is the 'correct' one to place my new files into? I'm guessing the /home/opt/QtPalmtop/apps, 'cause that seems to have all of my 'active' icons in it.


Looking at these files, some are pretty simple, like like the one for nethack:

root@poodle:/home/opt/QtPalmtop/apps/Games# cat nethack.desktop
[Desktop Entry]
Comment = Classic Dungeon Adventure Game
Exec = nethack
Icon = NetHack
Name = NetHack
Type = Games
CanFastload = 0

So the default bin path is /opt/QtPalmtop/bin as you mentioned, but where does it pull it's iocns from? There's no 'icon*' dir that I can see.

thanks for your help.
Title: Usb Recover Accross Suspend Resume ??
Post by: samac on January 05, 2005, 09:09:27 am
Quote
Yes, just create a .desktop file and change the binary it points to to one in /opt/QtPalmtop/bin (either move start_net.sh there, or create a symlink there).

Thanks for the script and the description how to get the desktop icon. All is now working great.

Quote
So the default bin path is /opt/QtPalmtop/bin as you mentioned, but where does it pull it's iocns from? There's no 'icon*' dir that I can see.

I used tab manager to edit the desktop entry, it has a pulldown menu of icons, and I chose the one from embedded-konqueror.

Samac
Title: Usb Recover Accross Suspend Resume ??
Post by: x86Daddy on January 05, 2005, 04:03:55 pm
Quote
So the default bin path is /opt/QtPalmtop/bin as you mentioned, but where does it pull it's iocns from? There's no 'icon*' dir that I can see.

thanks for your help.
/opt/QtPalmtop/pics

... is where icons are stored.

/opt/QtPalmtop/apps

.... has subdirectories for the different tabs and their .desktop files.

Hope that helps.
Title: Usb Recover Accross Suspend Resume ??
Post by: grog on January 05, 2005, 10:26:51 pm
Thanks for the help re: setting up .desktop files. Works like a charm. But just one more question (of course). I added a new tab called Utilities, but it has a question mark for it's icon (the default I presume). How do I specify an icon for a tab? thks
Title: Usb Recover Accross Suspend Resume ??
Post by: x86Daddy on January 07, 2005, 02:57:26 pm
In the apps subdirectories for each tab, there is a ".directory" file (hidden due to the leading dot)  Copy one of the others and edit it (it's text) to point at the icon of your choosing.
Title: Usb Recover Accross Suspend Resume ??
Post by: grog on January 07, 2005, 07:56:31 pm
Quote
In the apps subdirectories for each tab, there is a ".directory" file (hidden due to the leading dot)  Copy one of the others and edit it (it's text) to point at the icon of your choosing.
oooh, cool. Now why didn't I think of looking for dot files? Thanks
Title: Usb Recover Accross Suspend Resume ??
Post by: YoG on December 12, 2005, 03:25:37 pm
Hi...

I have the same problem (usb connection works fine... until Z suspended).

tried "modprob usbdmonitor":
"module usbdmonitor not found
failed to load module usbdmonitor"

so i tried lardman's start_net.sh script:
all the rmmod commands resulted with
"pxa_bi: No such file or directory" etc.

I dont have the path "/lib/modules/2.4.18-rmk7-pxa3-embedix/kernel/drivers/usb/device/" but i found the modules under "/home/root/modules/2.4.18-rmk7-pxa3-embdix/kernel/drivers/usb/device/"

did ismod with the same result:
"...No such file or directory".

I'm running kernel 2.6.11-3.5.3... maybe that has to do with it?

any suggestions?

Edit: BTW, I also tried it with the sa1100_bi with the same results

YoG.
Title: Usb Recover Accross Suspend Resume ??
Post by: Hrw on December 13, 2005, 02:42:06 am
man... with 2.6 kernel on Zaurus all you need is loading "g_ether" module once - then you will have usb networking without reloading any modules. No more crap sharp 'drivers'.
Title: Usb Recover Accross Suspend Resume ??
Post by: lardman on December 13, 2005, 05:25:43 am
First of all, I fully agree with hrw, upgrade to one of the 2.6.x kernel images we have on oz.org.

Secondly:

Quote
I dont have the path "/lib/modules/2.4.18-rmk7-pxa3-embedix/kernel/drivers/usb/device/" but i found the modules under "/home/root/modules/2.4.18-rmk7-pxa3-embdix/kernel/drivers/usb/device/"

Why?

There's no reason I can think of for these modules to be here, unless you installed them  somewhere other than /

Even then, the pxa_bi module should still be installed to /

Are you definitely running an OpenZaurus image?


Si
Title: Usb Recover Accross Suspend Resume ??
Post by: YoG on December 13, 2005, 01:21:48 pm
lardman:
Quote
First of all, I fully agree with hrw, upgrade to one of the 2.6.x kernel images we have on oz.org.

if you'll read my post you'll see that:
Quote
I'm running kernel 2.6.11-3.5.3...

I've purchased the Z with some costumized version of OZ, I then reflashed the Z following the howto on openzaurus.org, using the following images:

zImage-c7x0-20050411221036.bin
opie-image-c7x0-20050411221036.rootfs.img

any chances that there are leftovers from the previous installation?

Hrw:
Quote
man... with 2.6 kernel on Zaurus all you need is loading "g_ether" module once - then you will have usb networking without reloading any modules. No more crap sharp 'drivers'.

I searched for "g_ether" on my Z, i found a directory with a bunch of files but being a newbie I didn't recognize any of them as a module (shouldn't they be something like blabla.ko?).
So my question remains, how do I restart the module responsible for the usb networking?

I have found out that if I suspend the Z before disconnecting the cable everything works fine... so I guess that's exactly what I'll do.

Thanx guys, you are doing great job.

YoG.
Title: Usb Recover Accross Suspend Resume ??
Post by: lardman on December 14, 2005, 06:46:22 am
Quote
if you'll read my post you'll see that: <snip>

My apologies.

Quote
I searched for "g_ether" on my Z, i found a directory with a bunch of files but being a newbie I didn't recognize any of them as a module (shouldn't they be something like blabla.ko?).

Yes, there should be a g_ether.ko somewhere under /lib/modules

Quote
So my question remains, how do I restart the module responsible for the usb networking?

Try:

"rmmod g_ether; modprobe g_ether"


Si
Title: Usb Recover Accross Suspend Resume ??
Post by: YoG on December 15, 2005, 04:38:10 am
Hi,

I tried "find / | grep g_ether.ko" - I get no results,

when I try "find / | grep g_ether" I get:
Quote
/sys/module/g_ether
/sys/module/g_ether/parameters
/sys/module/g_ether/parameters/idVendor
/sys/module/g_ether/parameters/idProduct
/sys/module/g_ether/parameters/iProduct
/sys/module/g_ether/parameters/dev_addr
/sys/module/g_ether/parameters/host_addr

trying "rmmod g_ether"
Quote
rmmod: g_ether: No such file or directory

trying "modprobe g_ether"
Quote
modprobe: module g_ether not found.
modprobe: failed to load module g_ether

but, since the usb-network works after reboot, I guess that that module exists somewhere under some name...

BTW, any better way finding files on linux than doing "find / | grep"?

Thanx, YoG.
Title: Usb Recover Accross Suspend Resume ??
Post by: lardman on December 15, 2005, 07:06:38 am
Quote
/sys/module/g_ether

This means the module is loaded; it may be compiled into the kernel.

I'm a bit hazy about how to manipulate it (reset it, etc.) if it's compiled in though. Any one else have any suggestions?


Si