rt2x00.serialmonkey.com

Support forum for the rt2x00 project
It is currently Fri May 24, 2013 5:35 am

All times are UTC


Forum rules


Important: Read Project restructuring announcement regarding the pending removal of the legacy drivers from this project.



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 16 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Sat Aug 09, 2008 8:03 pm 
Offline

Joined: Fri Jul 04, 2008 4:34 pm
Posts: 12
Vern,
I've been following this thread to see if I can get my hibernate problem solved. Basically I have the same problem as described here. If I unload my rt2570 driver manually, I can hibernate, otherwise hibernate would fail. I downloaded the latest daily cvs tarball and it seemed that it had all your updates, but still my hibernate fails.

I am using Ubuntu Hardy with 2.6.24-19-generic. I'd appreciate your help.

Thanks,
Amir


Top
 Profile  
 
PostPosted: Sat Aug 09, 2008 8:55 pm 
Offline
User avatar

Joined: Sat Jan 14, 2006 6:29 pm
Posts: 897
Location: Carlsbad, California
Please follow the steps described in "Read Me Before Posting"

Thanks,

_________________
Yr Hmbl Obt Svt & c
Bryan - In favor of Big Oil. Big fan of General Grievous.


Top
 Profile  
 
PostPosted: Sat Aug 09, 2008 11:24 pm 
Offline

Joined: Fri Jul 04, 2008 4:34 pm
Posts: 12
Vern,
I read the "README BEFORE POSTING":
* I tried goolge, ubuntuforums and this forum. I don't think my question is already answered. :?:

* Basically, if i do "rmmod rt2570" before hibernate, hibernate successfully finishes. With the rt2570 module being active, I can not hibernate. I just get a blank screen. :shock:

* I recompiled the latest cvs hourly tarball with debug flag set and attached all the need log files. The attached tar ball includes a copy of the /var/log/debug, var/log/syslog and /var/log/kern.log files right after system startup.

* The output of modinfo is is attached.(info.tar.gz)

* My card is Zonet ZEW2500P. Here is the output of lsusb:
Bus 001 Device 002: ID 148f:2570 Ralink Technology, Corp. 802.11g WiFi

* I am using 2.6.24-19-generic.

I did not really understand what you meant by saying "read the README". Don't be mad if I missed your point :mrgreen:


Attachments:
info.tar.gz [628 Bytes]
Downloaded 66 times
debug.tar.gz [1.09 MiB]
Downloaded 70 times
Top
 Profile  
 
PostPosted: Sun Aug 10, 2008 3:52 pm 
Offline
User avatar

Joined: Sat Jan 14, 2006 6:29 pm
Posts: 897
Location: Carlsbad, California
Hi hormati,

Took a look at your logs. Some questions:

What driver is using the interface "wlan0"? The messages don't correspond to any the rt2570 issues. Need to make sure you don't have two drivers trying to run the same device.

Looks like the rt2570 module is being unloaded before suspend.

Quote:
With the rt2570 module being active, I can not hibernate. I just get a blank screen.
Sounds like what's supposed to happen to me. What happens if you then press, say, CTL-ALT-F1?

Thanks,

_________________
Yr Hmbl Obt Svt & c
Bryan - In favor of Big Oil. Big fan of General Grievous.


Top
 Profile  
 
PostPosted: Sun Aug 10, 2008 4:18 pm 
Offline

Joined: Fri Jul 04, 2008 4:34 pm
Posts: 12
Vern,
Thanks a lot for your reply. Here is my ifconfig output:
eth0 Link encap:Ethernet HWaddr 00:1d:7d:9c:81:1e
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:219 Base address:0xc000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2633 errors:0 dropped:0 overruns:0 frame:0
TX packets:2633 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:134061 (130.9 KB) TX bytes:134061 (130.9 KB)

rausb0 Link encap:Ethernet HWaddr 00:06:f4:0e:70:e9
inet addr:192.168.1.111 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:33459 errors:0 dropped:0 overruns:0 frame:0
TX packets:27382 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:67495433 (64.3 MB) TX bytes:4399476 (4.1 MB)

As you can see i do not have a wlan0 interface at all. So I don't know exactly what you mean by "What driver is using the interface wlan0". After hiberante freezes, if I press ctrl-alt-delete I go to a terminal which is asking me to login, but my keyboard is locked up.

To make sure that rt2570 is my probelm, I added a script to /etc/pm/sleep.d which rmmods the driver before hibernate and insmods on resume. After copying the script in that directory, my hibernate works. So, it seems that the rt2570 is causing the problem.

What do you exactly mean by "The messages don't correspond to any the rt2570 issues"? I am pretty sure I am using the latest version of rt2570 driver from the cvs and compiled it with -debug. I run the test again and give you the logs again if that helps.

Thanks a lot,


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 11, 2008 12:23 pm 
Offline

Joined: Sun Jun 03, 2007 4:00 pm
Posts: 195
Location: France
Hi hormati,
wlan* is the normal name for a wireless interface. You can have wlan0, wlan1, etc.
In your case, the wireless interface uses the old naming scheme rausb*. and your interface is named rausb0.

(The naming change has been done for rt73 legacy driver and I thought the change was done for rt2570 legacy driver as well.)

The interesting thing is that according your debug file NetworkManager uses an interface named wlan0.
That is the reason Vern asked "What driver is using the interface wlan0 ?".
I think Vern was thinking something like. "It looks like a configuration problem, but I should ask hormati if it's not another interface to be sure."

In fact, NetworkManager deals only with interfaces that are handled by wpa_supplicant. If you use legacy drivers, you surely use iwconfig/iwpriv instead. In this case, it should even not be started nor wpa_supplicant.


Top
 Profile  
 
PostPosted: Mon Aug 11, 2008 1:33 pm 
Offline

Joined: Fri Jul 04, 2008 4:34 pm
Posts: 12
In fact this was strange for me as well. Because before upgrading to Hardy, my wireless interface name was wlan0 using rt2570 driver. After upgrading to Hardy, I downloaded the latest version and I was expecting to see wlan0 again, but saw rausb0!

For installing the driver, I just downloaded the latest tarball and did a "make" and "make install". In fact I think during "make install", a file named "ralink"(or something like that) was created in /etc/modprobe.d. This files contains "alias rausb0 rt2570" which is I guess the reason I am seeing rausb0 and not wlan0.

Okay, now I am really confused. I'll try to remove the module and get a fresh copy from CVS and install again and see if that help. Do you guys think I am doing something awfully wrong?

Thanks a lot for helping me,


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 11, 2008 3:11 pm 
Offline

Joined: Sun Jun 03, 2007 4:00 pm
Posts: 195
Location: France
Are you really sure that new rt2x00 drivers are not loaded ?
What tells the output of lsmod|grep rt ?
If you see that another driver is loaded, then try to blacklist it.
You should have a look in /etc/modprobe.conf too. Maybe you have another line relative to wlan0 there.
hormati wrote:
In fact I think during "make install", a file named "ralink"(or something like that) was created in /etc/modprobe.d. This files contains "alias rausb0 rt2570" which is I guess the reason I am seeing rausb0 and not wlan0.
Indeed this can be the reason.
Maybe, could you try to change this line to "alias wlan0 rt2570" and see what happen after reboot.
Don't forget to change other occurrence of rausb0 to wlan0 in other files.


Top
 Profile  
 
PostPosted: Mon Aug 11, 2008 3:48 pm 
Offline
User avatar

Joined: Sat Jan 14, 2006 6:29 pm
Posts: 897
Location: Carlsbad, California
Hi hormati,

Looks like Starcrasher is pretty well sorting things out.
Quote:
I did not really understand what you meant by saying "read the README".
Under the rt2570 directory there's a file named "README". Under the Module subdirectory, there're a pair of files named "TESTING" and "iwpriv_usage.txt" that also have useful information.

Your logs show no indication that the driver's suspend/resume functions are being called. What I use on my system is:
Code:
echo test > /sys/power/disk
echo standby > /sys/power/state
or
Code:
echo platform > /sys/power/disk
echo disk > /sys/power/state
depending on whether I suspend or hibernate. Somewhere in the proceedings, your system needs to be doing likewise.

Thanks,

_________________
Yr Hmbl Obt Svt & c
Bryan - In favor of Big Oil. Big fan of General Grievous.


Top
 Profile  
 
PostPosted: Fri Aug 15, 2008 12:55 am 
Offline

Joined: Fri Jul 04, 2008 4:34 pm
Posts: 12
Hey guys,
sorry it took long to get back to you. Couple of points:
* I don't know why you are saying that the interface name should be wlan0 instead of rausb0. I checked the make file, and it sets the interface name to rausb0. From what I see in the makefile, it seems that the only distribution that gets wlan0 is fedora.

* I am 100% sure that I am using the right rt2570 driver because I already blacklisted all other related drivers. If I do "lsmod | grep rt" the only result will be rt2570.

* For hibernate, I use pm-hibernate script that comes with the pmutils package.

* Indeed you are right, the drivers hibernate and resume functions are not called. I don't see any of the related messages in my logs. This is really weird.

* I downloaded the latest daily tarball(August 14th version), and performed all the steps again and attached the logs. I am not sure if they are useful or not, because as I said there was no trace of the hibernate/resume functions in the log files.

I don't know what else to do exactly at this point.
Amir


Attachments:
modinfo.tar.gz [634 Bytes]
Downloaded 73 times
logs.tar.gz [1.01 MiB]
Downloaded 64 times
Top
 Profile  
 
PostPosted: Fri Aug 15, 2008 3:40 pm 
Offline
User avatar

Joined: Sat Jan 14, 2006 6:29 pm
Posts: 897
Location: Carlsbad, California
Hi hormati,

Does it end up poking the two files I referred you to?

Thanks,

_________________
Yr Hmbl Obt Svt & c
Bryan - In favor of Big Oil. Big fan of General Grievous.


Top
 Profile  
 
PostPosted: Sat Aug 16, 2008 8:00 am 
Offline

Joined: Fri Jul 04, 2008 4:34 pm
Posts: 12
So I tried to understand what pm-hibernate is doing. In fact pm-hibernate is calling the do_hibernate function in /usr/lib/pm-utils/functions. Here is the code for do_hibernate:

HIBERNATE_METHOD=""
S2DISK_BIN=/usr/sbin/s2disk
S2DISK_CONF=/etc/uswsusp.conf
do_hibernate()

{
if [ -z "$HIBERNATE_METHOD" ]; then
if [ -x $S2DISK_BIN -a -c /dev/snapshot ]; then
HIBERNATE_METHOD="userspace"
else
HIBERNATE_METHOD="kernel"
fi
fi
case $HIBERNATE_METHOD in
userspace)
$S2DISK_BIN -f $S2DISK_CONF
;;
kernel)
echo -n "platform" > /sys/power/disk
echo -n "disk" > /sys/power/state
;;
esac
}

Basically is checks for existence of /usr/sbin/s2disk and /dev/snapshot. If /usr/sbin/s2disk is not there, it pokes the files you referred to. I do not have /usr/sbin/s2disk, so it should be using the "kernel" option and do what you expected. To be 100% sure, I verified this by putting print statements in the case statement. It is using the $HIBERNATE_METHOD == kernel case.

I attached the script so you can take a look at it[in case you don't have the same script on your machine]
Thanks
Amir


Attachments:
pm-functions.tar.gz [2.42 KiB]
Downloaded 69 times
Top
 Profile  
 
PostPosted: Sat Aug 16, 2008 3:56 pm 
Offline

Joined: Fri Jul 04, 2008 4:34 pm
Posts: 12
Another piece of info that might help. I looked into /var/log/pm-suspend.log(attached). It indicates that unloading rt2570 has been unsuccessful. Basically, the hibernate script(pm-hiberante that i attached before) calls another script(/usr/lib/pm-utils/sleep.d/50modules) that tries to rmmod all the network modules, and it seems that rt2570 can not be unloaded because it is still being used by the device. The 50modules script is part of pm-utils and gets called right before hibernate.

Thanks


Attachments:
50modules.tar.gz [532 Bytes]
Downloaded 60 times
pm-suspend.log.tar.gz [395 Bytes]
Downloaded 77 times
Top
 Profile  
 
PostPosted: Mon Aug 18, 2008 1:13 am 
Offline
User avatar

Joined: Sat Jan 14, 2006 6:29 pm
Posts: 897
Location: Carlsbad, California
Hi hormati,

If you wish to unload the module, you first have to close the interface it's handling; e.g. "ifconfig rausb0 down".

If you wish to verify the driver's suspend/resume operation, you can (as root) manualy from a console session poke one or the other pair of files I referred to earlier, in the order I referred to them.

Thanks,

_________________
Yr Hmbl Obt Svt & c
Bryan - In favor of Big Oil. Big fan of General Grievous.


Top
 Profile  
 
PostPosted: Mon Aug 18, 2008 2:37 am 
Offline

Joined: Fri Jul 04, 2008 4:34 pm
Posts: 12
I know that the interface has to be closed before unloading, but I thought pm-util already does that. Are you saying that pm-utils does not do that and I need to that manually?

Amir


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group