RaLink RT2800 Suddenly Stopped Working

Hi All,

I’ve got a RaLink RT2800 80211n PCI wireless card installed on my desktop, and it has been functioning for the past year. A couple of days ago, I was able to connect to the internet with it. Without installing or changing anything, I turned the rig off, unplugged it, moved it (gingerly), then plugged it back in and turned it on. Now the card is no longer shown with cli wireless tools, I cannot connect with knetworkmanager either. The card does show under hwinfo, and with the yast gui I can see and edit the card, delete & re-add (under ifup global setting), but it still refuses to function. Hwinfo shows no kernel driver, which I find strange, so I cannot try to use modprobe. The card works with the windoze 7 dual-boot. I’ll pastebin some info below, please let me know if you need any other specific info.

The OS is Tumbleweed, x86_64, KDE. The card’s name should be “wlan0.” My thanks to HuHa and simon123 for their help in the irc channel yesterday. They tipped me off to a potential firmware problem, but I’m not sure what could have happened to the firmware.

SUSE Paste

(dmesg | grep firmware showed no results)

Thanks!

On 08/05/2011 12:16 PM, seanthor wrote:

Two questions: (1) Does the card show up in ‘/sbin/lspci -nn’? (2) What kernel
are you using as shown by ‘uname -r’?

One possible problem is that none of the openSUSE kernels have rt2800pci
configured as it clashes with rt2860sta; however, the latter one was deleted
from kernel 3.0.

yes, I believe it shows in sbin/lspci:

SUSE Paste

:~> uname -r
3.0.0-39-desktop

do you recommending configuring rt2800pci?

On 08/05/2011 02:26 PM, seanthor wrote:
>
> yes, I believe it shows in sbin/lspci:
>
> ‘SUSE Paste’ (http://paste.opensuse.org/9463978)

Yes, it is there.

> :~> uname -r
> 3.0.0-39-desktop
>
>
> do you recommending configuring rt2800pci?

Yes. I would download the 3.0.1 kernel source from kernel.org and save it in
your home directory. Then do the following:


tar jxvf <downloaded file name>
cd <source directory>
zcat /proc/config.gz > ,config
At this point, edit .config and change the line that says "#CONFIG_RT2800PCI is
not configured" to "CONFIG_RT2800PCI=m". Be sure the # is gone.
make -jX              (X is one larger than the number of CPUs)
sudo make modules_install install

Once the above steps are complete, the GRUB menu will show a new boot item. Once
you boot it, driver rt2800pci will load. You need to install the firmware as well.

Ok I just want to clarify a couple points before I make the changes:

By downloading the entire kernel source, isn’t that manually replacing the existing kernel? Is there a reason to use kernel.org instead of from an opensuse release?

How do I know what firmware to install? Shouldn’t it already be installed, or will the new kernel give me a suggestion for new firmware?

In that case, Should I use the link under “device firmware” at <http://linuxwireless.org/en/users/Drivers/rt2800pci#device_firmware> and install at the same time as the kernel?

Sorry if these are n00b questions, but I just want to make sure I understand your directions (for example, I’m not 100% sure if a core i7 counts as 1 cpu).

On 08/05/2011 07:46 PM, seanthor wrote:
>
> Ok I just want to clarify a couple points before I make the changes:
>
> By downloading the entire kernel source, isn’t that manually replacing
> the existing kernel? Is there a reason to use kernel.org instead of from
> an opensuse release?

If you use the openSUSE kernel sources, they are installed in /usr/src, which is
the wrong place, and they are owned by root. Unless you (1) recopy them, which
leads to 2 copies and a lot of disk space, or (2) change the owner, then you
must build the kernel as root, which is STRONGLY discouraged. I didn’t feel like
relating all the steps needed to fix the issues. Use the one from kernel.org.

> How do I know what firmware to install? Shouldn’t it already be
> installed, or will the new kernel give me a suggestion for new firmware?

If you install the kernel-firmware package, you will get what you need.

> In that case, Should I use the link under “device firmware” at
> <http://linuxwireless.org/en/users/Drivers/rt2800pci#device_firmware>
> and install at the same time as the kernel?

Answered above. Using zypper or YaST is a lot easier.

> Sorry if these are n00b questions, but I just want to make sure I
> understand your directions (for example, I’m not 100% sure if a core i7
> counts as 1 cpu).

A core i7 chip has 2, 4, or 6 cores (CPUs) depending on the model. If you get
that number wrong, the build just takes longer. The output of ‘cat
/proc/interrupts’ will tell you how many CPUs there are.

Thanks for taking the time to work with me, I really appreciate the chance to learn a little more. :slight_smile:

I followed your instructions up to make -jX, at which point I got this error:

:~> zcat /proc/config.gz > ,config

:~> ls
bin      ,config~  Documents  hs_err_pid9648.log  linux-3.0.1.tar.bz2  Pictures  public_html  Videos
,config  Desktop   Downloads  linux-3.0.1         Music                Public    Templates

:~> make -j9
make: *** No targets specified and no makefile found.  Stop.

I got the stable 3.0.1.tar.bz2 from kernel.org, placed it directly in my /home/, then followed the steps above (except I wasn’t sure what you meant by “cd <source directory>”, since the shell has been pointed /home the whole time).

Any ideas where I went astray?

On 08/05/2011 11:46 PM, seanthor wrote:
>
> Thanks for taking the time to work with me, I really appreciate the
> chance to learn a little more. :slight_smile:
>
> I followed your instructions up to make -jX, at which point I got this
> error:
>
>
> Code:
> --------------------
> :~> zcat /proc/config.gz> ,config
>
> :~> ls
> bin ,config~ Documents hs_err_pid9648.log linux-3.0.1.tar.bz2 Pictures public_html Videos
> ,config Desktop Downloads linux-3.0.1 Music Public Templates
>
> :~> make -j9
> make: *** No targets specified and no makefile found. Stop.
>
> --------------------
>
>
> I got the stable 3.0.1.tar.bz2 from kernel.org, placed it directly in
> my /home/, then followed the steps above (except I wasn’t sure what you
> meant by “cd<source directory>”, since the shell has been pointed /home
> the whole time).
>
> Any ideas where I went astray?

Change directory to the one with the kernel sources. ‘cd linux-3.0.1’ Before you
do that, move .config to that directory as well. ‘mv .config linux-3.0.1/.’

I am surprised. In your first post you said, you have not changed anything. But with kernel 3.0 your card should have never worked! The module rt2860sta has been deleted and the module rt2800pci is not (yet) configured. That means, there can never have been a working wireless PCI card based on rt2800 with kernel 3.0.
In any case, since you have a running kernel and the source of this kernel is available, it should not be necessary to recompile everything. It should be sufficient to just compile and install the rt2x00 modules:
make SUBDIRS=drivers/net/wireless/rt2x00 modules (if I remember correctly)

lwfinger: OK, I’m still trying to get through your suggestion, but I’m now getting another error:

:~/linux-3.0.1> make -j9
make: gcc: Command not found
  HOSTCC  scripts/basic/fixdep
/bin/sh: gcc: command not found
make[2]: *** [scripts/basic/fixdep] Error 127
make[1]: *** [scripts_basic] Error 2
make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'.  Stop.

:~/linux-3.0.1> ls
arch     COPYING  Documentation  fs       ipc      kernel       Makefile  README          scripts   tools
block    CREDITS  drivers        include  Kbuild   lib          mm        REPORTING-BUGS  security  usr
,config  crypto   firmware       init     Kconfig  MAINTAINERS  net       samples         sound     virt

frank_from_ch: I’m not sure how I did it, but I know the PCI card worked. I was able to shutdown/ restart the pc and connect to the internet for a few days before it stopped working following the last set of updates being installed. And as the PCI wireless has been my only option for internet, I know it could NOT have been falling back to an ethernet line.

On 08/06/2011 11:16 AM, seanthor wrote:
>
> lwfinger: OK, I’m still trying to get through your suggestion, but I’m
> now getting another error:
>
> Code:
> --------------------
> :~/linux-3.0.1> make -j9
> make: gcc: Command not found
> HOSTCC scripts/basic/fixdep
> /bin/sh: gcc: command not found
> make[2]: *** [scripts/basic/fixdep] Error 127
> make[1]: *** [scripts_basic] Error 2
> make: *** No rule to make target include/config/auto.conf', needed by include/config/kernel.release’. Stop.

I guess I assumed that you knew that the compiler needed to be installed. I
think there is a package with everything, but I cannot find it today. We will do
it by pieces.

sudo zypper install gcc

O.k., so you installed some updates. I guess that there was a kernel update from 2.6.whatever to 3.0. That certainly explains why it worked before.
Your error messages looks like gcc is not installed. You will need that, it’s the compiler. Recompiling stuff is in principle easy, one only needs a huge bunch of packages to make it work :wink:

OK so finally the PCI card is working! I just followed lwfinger’s suggestion, then set up the card with yast, then used the wireless sticky to check the Access Point and internet connection.

Thank you both very much for your knowledge and effort, I think this thread may now be marked “solved.” But just one last question: now that I just complied a new kernel in /home, do I need to be extra mindful of “zypper dup,” or can I delete this file once zypper updates the kernel to a newer version?

On 08/06/2011 05:26 PM, seanthor wrote:
>
> OK so finally the PCI card is working! I just followed lwfinger’s
> suggestion, then set up the card with yast, then used the wireless
> sticky to check the Access Point and internet connection.
>
> Thank you both very much for your knowledge and effort, I think this
> thread may now be marked “solved.” But just one last question: now that
> I just complied a new kernel in /home, do I need to be extra mindful of
> “zypper dup,” or can I delete this file once zypper updates the kernel
> to a newer version?

Until the standard 3.0 kernel from openSUSE has the driver configured, you will
need to keep using your home built one. I have requested the configuration
change, but I have no idea how long until the request is honored and the change
propagates through the system.

Seanthor, I only asked some questions. It was lwfinger who has helped you :wink: It’s good that it works now for you.