Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[ThinkPad X201i] Realtek wireless not detected by udev (?)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
WvR
Apprentice
Apprentice


Joined: 03 Mar 2011
Posts: 200
Location: Tsuruga, Japan

PostPosted: Thu Mar 03, 2011 1:29 pm    Post subject: [ThinkPad X201i] Realtek wireless not detected by udev (?) Reply with quote

I have a ThinkPad X201i laptop. I am in the process of installing Gentoo. I use a minimal installation. This is the fourth or fifth computer on which I am installing gentoo in a period of about 5 years. At this time, I am confused with the wireless card on my new laptop. This is listed:

Code:

rine50 ~@ # lspci
02:00.0 Network Controller: Realtek Semiconductor Co., Ltd. RTL8191SevB Wireless LAN controller (rev 10)


I have emerged:

Code:

net-wireless/rtl8192se
net-wireless/rtl8192se-firmware


I have also compiled the "Staging drivers" into my kernel (just the RTL8192SE one). So far, so good (I think). When I start my laptop this is what I get:

Code:

rine50~ # lspci -k
02:00.0 Network Controller: Realtek Semiconductor Co., Ltd. RTL8191SevB Wireless LAN controller (rev 10)
Kernel driver in use: rtl819xSE
kernel modules: r8192se_pci


BUT... the wireless card is __not__ set up by udev. Just the wired connection net.eth0 is created. If I make a link to net.wlan0, i.e.

Code:

rine50 ~ # ln -s /etc/init.d/net.lo /etc/init.d/net.wlan0


then do

Code:

rine50 ~ # /etc/init.d/net.wlan0 start


there is message from wpa_supplicant that the card is starting, the wireless light comes on, there is a warning of "operation not permitted", but the wireless connection works (!) and is correctly reported in wpa_gui(!). I am amazed & confused :)

In /etc/udev/rules.d/70-persistent-net.rules I have:

Code:

#PCI device 0x10ec:0x8172 (rtl819xSE)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="88:9f:fa:fa:0f:92", ATTR{dev_id}=="0x0", ATTR{type}==1, KERNEL=="wlan*", NAME="wlan0"


Can anybody help me so that the wireless card is picked up by udev? Of course, I could maintain a manual symlink but on all my other computers udev seems to work fine with wireless interfaces. All tips & tricks are welcome!
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6639
Location: The soundosphere

PostPosted: Thu Mar 03, 2011 2:45 pm    Post subject: Reply with quote

Can you please post the output of lspci -n? Also post a link to your kernel config (you have to upload it somewhere and link to it, because it will not fit in a code tag here).
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
WvR
Apprentice
Apprentice


Joined: 03 Mar 2011
Posts: 200
Location: Tsuruga, Japan

PostPosted: Sat Mar 05, 2011 4:46 am    Post subject: Reply with quote

Code:
rine50 ~ # lspci -n
00:00.0 0600: 8086:0044 (rev 02)
00:02.0 0300: 8086:0046 (rev 02)
00:16.0 0780: 8086:3b64 (rev 06)
00:19.0 0200: 8086:10ea (rev 06)
00:1a.0 0c03: 8086:3b3c (rev 06)
00:1b.0 0403: 8086:3b56 (rev 06)
00:1c.0 0604: 8086:3b42 (rev 06)
00:1c.3 0604: 8086:3b48 (rev 06)
00:1c.4 0604: 8086:3b4a (rev 06)
00:1d.0 0c03: 8086:3b34 (rev 06)
00:1e.0 0604: 8086:2448 (rev a6)
00:1f.0 0601: 8086:3b07 (rev 06)
00:1f.2 0106: 8086:3b2f (rev 06)
00:1f.3 0c05: 8086:3b30 (rev 06)
00:1f.6 1180: 8086:3b32 (rev 06)
02:00.0 0280: 10ec:8172 (rev 10)
ff:00.0 0600: 8086:2c62 (rev 02)
ff:00.1 0600: 8086:2d01 (rev 02)
ff:02.0 0600: 8086:2d10 (rev 02)
ff:02.1 0600: 8086:2d11 (rev 02)
ff:02.2 0600: 8086:2d12 (rev 02)
ff:02.3 0600: 8086:2d13 (rev 02)


What parts of the kernel config are of interest? It is probably easier to only post the relevant parts. Like I said, if I make a manual link in /etc/init.d then I can start the wireless card and it seems to work well. I am writing this posting using my wireless card to connect to my (home) internet.
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6639
Location: The soundosphere

PostPosted: Sat Mar 05, 2011 3:55 pm    Post subject: Reply with quote

You may have already solved it as well as you're going to. I assume now that you've made the link, you don't have to create it on every boot. You shouldn't - /etc/init.d is not one of those dirs that get wiped clean on boot.

If, on the other hand, you have to make this link on every boot, something is indeed amiss.
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
WvR
Apprentice
Apprentice


Joined: 03 Mar 2011
Posts: 200
Location: Tsuruga, Japan

PostPosted: Sun Mar 06, 2011 4:54 am    Post subject: Reply with quote

Indeed if I make a link "by hand" it remains between boots. But I think this is a bit of an amateur solution. I just don't understand why udev does not "see" the wireless card, even though all the settings are correct (at least, I think so). So yes, I can keep the manual link. The wireless card is then enabled on boot. But I want to have udev take care of these things, as it is supposed to.

Is there any chance this has anything to do with the infamous "RF kill switch" on ThinkPads? I will investigate....
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Sun Mar 06, 2011 5:11 am    Post subject: Reply with quote

WvR wrote:
So yes, I can keep the manual link. The wireless card is then enabled on boot. But I want to have udev take care of these things, as it is supposed to.


are we still talking about the link pointing /etc/init.d/net.wlan0 -> /etc/init.d/net.lo ?

because udev doesn't, nor is it supposed to, take care of that.

When you feel like doing a reboot next, delete the net.wlan0 symlink, boot up, and

Code:

cat /proc/net/wireless


is wlan0 there? if so, everything is working as expected. Creating the symlink in /etc/init.d is not for udev - it is for the human to make

http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?full=1#book_part1_chap8

net.eth0 is something that is included with gentoo by default. But as the handbook says:

Quote:

If you have several network interfaces, you need to create the appropriate net.eth1, net.eth2 etc. initscripts for those. You can use ln to do this:

_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
WvR
Apprentice
Apprentice


Joined: 03 Mar 2011
Posts: 200
Location: Tsuruga, Japan

PostPosted: Sun Mar 06, 2011 11:20 am    Post subject: Reply with quote

OK, I see. I will maintain the link in /etc/init.d and I have added the wireless card to the default runlevel:

Code:
rc-update add net.wlan0 default battery


(I have a battery runlevel as specified in the ACPI/Power HOWTO). The card seems to work, but there are two strange things. First:

Code:
rine50 ~ # /etc/init.d/net.wlan0 start
 * Starting wlan0
 *   Starting wpa_supplicant on wlan0 ...
ioctl[SIOCSIWAP]: Operation not permitted                                 [ ok ]
 *   Starting wpa_cli on wlan0 ...                                        [ ok ]
 *     Backgrounding ...


It is the "Operation not permitted" which I find strange. I read somewhere that it might have something to do with the rf kill switch but I emerged and ran "rfkill" and nothing showed up. Second, the [SIOCSIWAP] is not often reported on the forums here so I don't know where to look for help.

The card seems to work, but for reasons I don't yet know, it seems to "panic" after a while. I can try to restart it, but it will not connect to any wireless AP. The only solution is to reboot the computer. I will bump this thread as soon as I know more about this, there must be some error log somewhere.
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Sun Mar 06, 2011 11:36 am    Post subject: Reply with quote

no idea RE: the operation not permitted piece of this
googling around for "SIOCSIWAP: Operation not permitted" I find a handful of people who are in the same situation as you - everything works, similar card from same vendor, but that error gets thrown up. Some of them seem to suggest altering wpa_supplicant.conf settings may do the trick; I haven't found anything concrete. Maybe you need to change from wext to nl80211 as the driver? Maybe you need to emerge net-wireless/iw ? Don't know, to be honest.

We can at least get an idea of what the card was trying to do when it received that error:

http://tomoyo.sourceforge.jp/cgi-bin/lxr/source/include/linux/wireless.h#L263

(very handy list, by the way, for deciphering all of those cryptic 'SIOCxxxxxxx' type errors)

Code:

262 /* Access Point manipulation */
263 #define SIOCSIWAP       0x8B14          /* set access point MAC addresses */
264 #define SIOCGIWAP       0x8B15          /* get access point MAC addresses */
265 #define SIOCGIWAPLIST   0x8B17          /* Deprecated in favor of scanning */
266 #define SIOCSIWSCAN     0x8B18          /* trigger scanning (list cells) */
267 #define SIOCGIWSCAN     0x8B19          /* get scanning results */


No idea. Maybe something in your configuration is telling your card to behave like it's a Wireless AP itself, and since the card doesn't support it you get 'operation not permitted'?
Don't know, probably reading that wrong. However I will say, instead of rebooting, if you built the driver as a module

-shut down the wireless interface
-rmmod r8192se_pci
-wait a few seconds
-modprobe -v r8192se_pci
-restart network script

if that doesnt work, rmmod r8192se_pci, then rmmod the whole cfg80211/mac80211 stack
wait a few seconds, modprobe r8192se_pci

it's a crude hack, but it's better than rebooting. Wireless is just a pain in the ass like that, I've had to do the same thing as far as rmmod'ing the driver before i can reconnect :) Not always, not with every wifi card, but it does seem to unfortunately be fairly common.
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
WvR
Apprentice
Apprentice


Joined: 03 Mar 2011
Posts: 200
Location: Tsuruga, Japan

PostPosted: Mon Mar 07, 2011 4:00 am    Post subject: Reply with quote

Indeed I had also found a few references to the "operation not permitted" message. Furthermore, the fact that the wireless sometimes "panics" also shows up in other places. Apparently, it is a driver problem. Realtek releases new drivers every once in a while. According to www.thinkwiki.org the driver should move from "staging" to "supported" in kernel 2.6.39 and until that time, one may encounter problems.

If the card panics, it is possible to try and correct this as follows:

- compile driver as module
- when card panics:
Code:
rmmod r8192se_pci
modprobe r8192se_pci
/etc/init.d/net.wlan0 restart


For the time being I will just wait and see how everything works out.
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Mon Mar 07, 2011 4:18 am    Post subject: Reply with quote

WvR wrote:
IRealtek releases new drivers every once in a while. According to www.thinkwiki.org the driver should move from "staging" to "supported" in kernel 2.6.39 and until that time, one may encounter problems.


in that case, what i might say is keep abreast of changes to that driver's code, just in the kernel's bug tracker and whatnot, and as soon as it hits what looks like a quasi-stable state, it should be available within compat-wireless (you'd need to add the 'pentoo' overlay, as there isn't currently an ebuild for it in portage)
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum