Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Q: WiFi Works If Cold Boot, But Not Warm Boot
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
solamour
l33t
l33t


Joined: 21 Dec 2004
Posts: 623
Location: San Diego, CA

PostPosted: Tue Oct 28, 2014 6:16 am    Post subject: Q: WiFi Works If Cold Boot, But Not Warm Boot Reply with quote

After "emerge -vDu world", a bunch of (about 70+) packages got updated. And then WiFi stops working if I issue "reboot" command. Oddly enough, when I completely shut down the system and start, WiFi works fine. Here is what happens when it's not working.

Code:
 * Bringing up interface wlo1
 *   Starting wpa_supplicant on wlo1 ...Successfully initialized wpa_supplicant
Could not set interface wlo1 flags (UP): Input/output error
nl80211: Could not set interface 'wlo1' UP
wlo1: Failed to initialize driver interface

 *   start-stop-daemon: failed to start `/usr/sbin/wpa_supplicant'
 [ !! ]
 * ERROR: net.wlo1 failed to start

I'm not sure what it's complaining about and why it happens only during warm boot. I'd appreciate any suggestions.
__
sol
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2583

PostPosted: Tue Oct 28, 2014 10:31 am    Post subject: Reply with quote

Did you check
Quote:
$ ifconfig -a
if that interface wlo1 is there? Or did it get renamed?
Back to top
View user's profile Send private message
solamour
l33t
l33t


Joined: 21 Dec 2004
Posts: 623
Location: San Diego, CA

PostPosted: Tue Oct 28, 2014 4:49 pm    Post subject: Reply with quote

"wlo1" is there whether it's in the working state or not. The name doesn't get changed. Besides, I don't see why its name would ever get changed when I reboot the system but not when I start from the shutdown.
__
sol
Back to top
View user's profile Send private message
limn
l33t
l33t


Joined: 13 May 2005
Posts: 997

PostPosted: Tue Oct 28, 2014 8:06 pm    Post subject: Reply with quote

Was sysvinit on of the 70+ packages updated?
Does it make a difference if you use
Code:
shutdown -r now
instead of
Code:
reboot
?
Back to top
View user's profile Send private message
solamour
l33t
l33t


Joined: 21 Dec 2004
Posts: 623
Location: San Diego, CA

PostPosted: Wed Oct 29, 2014 8:37 am    Post subject: Reply with quote

sysvinit was updated from "sysvinit-2.88-r4" to "sysvinit-2.88-r7", but that was several months ago, so I don't think it was a part of 70+ packages. Also "shutdown -r now" gave me the same result: "Could not set interface wlo1 flags (UP): Input/output error".

If I do "ifconfig wlo1 up" when WiFi is not working, it says "SIOCSIFFLAGS: Input/output error". I wish it shows a little more clues. A complete shutdown always brings up WiFi, but I do need to reboot occasionally, so I'd like to solve the problem once and for all.
__
sol
Back to top
View user's profile Send private message
limn
l33t
l33t


Joined: 13 May 2005
Posts: 997

PostPosted: Wed Oct 29, 2014 2:49 pm    Post subject: Reply with quote

What happens if you take down wireless with the computer on and bring it back up?

Did the kernel change? Perhaps the driver changed.
If the driver is a module, what happens if you reboot, take down wireless, unload the module, reload it, and try to bring up wireless?
Back to top
View user's profile Send private message
solamour
l33t
l33t


Joined: 21 Dec 2004
Posts: 623
Location: San Diego, CA

PostPosted: Fri Oct 31, 2014 3:04 pm    Post subject: Reply with quote

When WiFi is working, I can do "/etc/init.d/net.wlo1 restart" with no problem. But once I reboot the system, the same command gives "SIOCSIFFLAGS: Input/output error".

I tried reloading all WiFi related modules (rt2800pci, rt2x00pci, rt2800mmio, rt2x00mmio, rt2800lib, rt2x00lib), but the result was same. Converting modules to built-in didn't solve the problem either.

The kernel did upgrade from 3.14.14 to 3.16.5, but using the old kernel was equally ineffective.

I noticed that the upgrade brought in "sys-kernel/linux-firmware-20140603", "net-wireless/wpa_supplicant-2.2-r1", and "sys-devel/gcc-4.8.3" (among various other things). Would reverting them to previous version be worth a try?
__
sol
Back to top
View user's profile Send private message
limn
l33t
l33t


Joined: 13 May 2005
Posts: 997

PostPosted: Fri Oct 31, 2014 4:52 pm    Post subject: Reply with quote

Does a diff of dmesg from the two types of boot provide any clues?

It is a low-level problem, probably not wpa_supplicant or gcc. Maybe the firmware.

You might also try re-seating the card.
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1360
Location: Montréal

PostPosted: Sat Nov 01, 2014 2:07 pm    Post subject: Reply with quote

Do you use an initramfs? Have you put the rt2800pci module and it's firmware (rt2860.bin) in the initramfs?

It is relevant to know how the wlo1 is start. Is it from a link you made from net.lo to net.wlo1 in /etc/init.d and add net.wlo1 to the default boot level? Or it is from dhcpcd and wpa_supplicant boot scripts? What is the contain of the file /etc/conf.d/net?

Did you check with the
Code:
rfkill list

command if the card is blocked after reboot?

If not blocked after reboot and it's not working, after unload and reload the rt2800pci and module dependencies, can you connect using wpa_supplicant and dhcpcd commands from the terminal?

What does return
Code:
ip link show


More info we have, more possibility of a solution is.
_________________
Paul
Back to top
View user's profile Send private message
solamour
l33t
l33t


Joined: 21 Dec 2004
Posts: 623
Location: San Diego, CA

PostPosted: Sun Nov 02, 2014 6:53 am    Post subject: Reply with quote

Logicien wrote:
Do you use an initramfs? Have you put the rt2800pci module and it's firmware (rt2860.bin) in the initramfs?

Yes, I do use initramfs, but the problem persists even if I don't. I was under the impression that genkernel takes care of putting all the files necessary, but if not, let me know how to make sure the module and the firmware files are included.

Logicien wrote:
It is relevant to know how the wlo1 is start. Is it from a link you made from net.lo to net.wlo1 in /etc/init.d and add net.wlo1 to the default boot level? Or it is from dhcpcd and wpa_supplicant boot scripts? What is the contain of the file /etc/conf.d/net?

I created a soft link from "net.lo" to "net.wlo1" and put "net.wlo1" in the default level.

Logicien wrote:
Did you check with the
Code:
rfkill list

command if the card is blocked after reboot?

That was the first thing I checked, and nothing seems to be blocked when WiFi is not working after reboot.
Code:
0: phy0: Wireless LAN
   Soft blocked: no
   Hard blocked: no


Logicien wrote:
If not blocked after reboot and it's not working, after unload and reload the rt2800pci and module dependencies, can you connect using wpa_supplicant and dhcpcd commands from the terminal?

This is what happens when I try to use wpa_supplicant after a reboot.

Code:
#wpa_passphrase "myssid" "..." > wpa.conf
#wpa_supplicant -iwlo1 -Dnl80211 -cwpa.conf

Successfully initialized wpa_supplicant
Could not set interface wlo1 flags (UP): Input/output error
nl80211: Could not set interface 'wlo1' UP
wlo1: Failed to initialize driver interface


Logicien wrote:
What does return
Code:
ip link show


This is what shows up when WiFi is NOT working.
Code:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: sit0: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT
    link/sit 0.0.0.0 brd 0.0.0.0
3: eno1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT qlen 1000
    link/ether a0:48:1c:0b:bf:d3 brd ff:ff:ff:ff:ff:ff
4: wlo1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000
    link/ether 70:18:8b:d8:ec:41 brd ff:ff:ff:ff:ff:ff

And when it's working, it shows this.
Code:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: sit0: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT
    link/sit 0.0.0.0 brd 0.0.0.0
3: eno1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT qlen 1000
    link/ether a0:48:1c:0b:bf:d3 brd ff:ff:ff:ff:ff:ff
4: wlo1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT qlen 1000
    link/ether 70:18:8b:d8:ec:41 brd ff:ff:ff:ff:ff:ff

Here is dmesg when it's working fine.
http://pastebin.com/Fx59MN7J
And when it's not.
http://pastebin.com/tkTYHzYS
Code:
[    8.004069] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt3290.bin'
[    8.005341] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.37
[    9.109874] ieee80211 phy0: rt2800_wait_wpdma_ready: Error - WPDMA TX/RX busy [0x00000068]
[   10.209963] ieee80211 phy0: rt2800_wait_wpdma_ready: Error - WPDMA TX/RX busy [0x00000068]
[   10.209982] ieee80211 phy0: rt2800pci_set_device_state: Error - Device failed to enter state 4 (-5)

Let me know if there is anything else I can provide.
__
sol
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1371

PostPosted: Sun Nov 02, 2014 11:15 am    Post subject: Reply with quote

there is a
rt2800-correct-bbp1_tx_power_ctrl-mask.patch
patch included in linux-3.16.7
_________________
fun2gen2
Back to top
View user's profile Send private message
solamour
l33t
l33t


Joined: 21 Dec 2004
Posts: 623
Location: San Diego, CA

PostPosted: Tue Nov 04, 2014 7:37 am    Post subject: Reply with quote

ulenrich wrote:
there is a
rt2800-correct-bbp1_tx_power_ctrl-mask.patch
patch included in linux-3.16.7

That patch is not included in 3.16.7, but even if I include it, it didn't make any difference.
__
sol
Back to top
View user's profile Send private message
RazielFMX
l33t
l33t


Joined: 23 Apr 2005
Posts: 835
Location: NY, USA

PostPosted: Tue Nov 04, 2014 3:04 pm    Post subject: Reply with quote

This one is interesting and I suspect something might be up with a build somewhere... It is easy enough to check:

Code:
revdep-rebuild -p


Why do I think this is possible?

In a cold boot scenario (e.g. the card is powered down on shutdown) the init scripts activate the card and get it up and running. On shutdown, something may fail but it does not matter since the card will lose power.

In a warm boot scenario (e.g. the card does not lose power) the init scripts fail as the card has some left over state caused by a failure of the tear down process during shutdown.

Caveats

This assumes the problem is related to broken links caused by your package upgrades and not something wrong elsewhere (such as kernel bug). I believe my statements about what is happening are correct, it is the cause I am unsure about.
_________________
I am not anti-systemd; I am pro-choice. If being the latter makes you feel that I am the former, then so be it.
Back to top
View user's profile Send private message
solamour
l33t
l33t


Joined: 21 Dec 2004
Posts: 623
Location: San Diego, CA

PostPosted: Sat Nov 08, 2014 9:47 pm    Post subject: Reply with quote

When I did "revdep-rebuild", the system rebuilt "x11-libs/pango" (and nothing else), but the problem persisted. I went ahead and did "emerge -v --emptytree world" just for the heck of it but the result was the same.

I'm just about to revert all the newly installed packages, go back to the state when it worked fine, and install packages one by one to narrow down the problem, but putting all the newly installed packages in "/etc/portage/package.mask" seems like a rather tedious process. It would be great if I can somehow magically uninstall all new packages at once.
__
sol
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1717

PostPosted: Sun Nov 09, 2014 10:24 am    Post subject: Reply with quote

You can.
emerge -avc <package name you explicitly ordered to be installed>
(and perhaps 'emerge -avc' afterwards)
Back to top
View user's profile Send private message
limn
l33t
l33t


Joined: 13 May 2005
Posts: 997

PostPosted: Thu Nov 13, 2014 6:24 pm    Post subject: Reply with quote

FWIW, these are the errors in your dmesg
Code:
>  ieee80211 phy0: rt2800_wait_wpdma_ready: Error - WPDMA TX/RX busy [0x00000068]
>  ieee80211 phy0: rt2800_wait_wpdma_ready: Error - WPDMA TX/RX busy [0x00000068]
>  ieee80211 phy0: rt2800pci_set_device_state: Error - Device failed to enter state 4 (-5)
Back to top
View user's profile Send private message
solamour
l33t
l33t


Joined: 21 Dec 2004
Posts: 623
Location: San Diego, CA

PostPosted: Thu Nov 13, 2014 9:12 pm    Post subject: Reply with quote

[This is a rather elementary question]
During the upgrade, "sys-kernel/linux-firmware" was updated from 20131230 to 20140603, but the old version is no longer available in portage, so I'm not able to downgrade. How do I emerge the old version?
__
sol
Back to top
View user's profile Send private message
saellaven
Guru
Guru


Joined: 23 Jul 2006
Posts: 493

PostPosted: Thu Nov 13, 2014 10:51 pm    Post subject: Reply with quote

solamour wrote:
[This is a rather elementary question]
During the upgrade, "sys-kernel/linux-firmware" was updated from 20131230 to 20140603, but the old version is no longer available in portage, so I'm not able to downgrade. How do I emerge the old version?
__
sol


can pick up the ebuild here, and install it in a local overlay, though you might have to hunt for the firmware file to go with it if it isn't still in your distfiles
Back to top
View user's profile Send private message
solamour
l33t
l33t


Joined: 21 Dec 2004
Posts: 623
Location: San Diego, CA

PostPosted: Thu Nov 20, 2014 1:22 am    Post subject: Reply with quote

So, I finally managed to create a local overlay and downgraded linux-firmware from 20141009 to 20131230, but it turned out that the firmware in question (/lib/firmware/rt3290.bin) wasn't changed between those two versions. Thus the problem persists.

I'm already out of options that I can think of, so if you have any suggestions at all, please share. Thank you.
__
sol
Back to top
View user's profile Send private message
solamour
l33t
l33t


Joined: 21 Dec 2004
Posts: 623
Location: San Diego, CA

PostPosted: Mon Nov 24, 2014 1:13 am    Post subject: Reply with quote

Just to make sure I didn't miss anything obvious, I backed up the whole thing, wiped out the hard disk, and installed Gentoo from scratch. The result was same; WiFi works during cold boot but not during warm boot. WiFi also works when the system wakes up from either suspend or hibernation. Unless I was in a complete delusion (which isn't entirely out of the question, but still), it was working without a problem until I did a world update.
__
sol
Back to top
View user's profile Send private message
NoUserName
n00b
n00b


Joined: 12 Sep 2014
Posts: 2
Location: Austin, TX

PostPosted: Sat Dec 06, 2014 7:05 pm    Post subject: Reply with quote

solamour wrote:
Just to make sure I didn't miss anything obvious, I backed up the whole thing, wiped out the hard disk, and installed Gentoo from scratch. The result was same; WiFi works during cold boot but not during warm boot. WiFi also works when the system wakes up from either suspend or hibernation. Unless I was in a complete delusion (which isn't entirely out of the question, but still), it was working without a problem until I did a world update.
__
sol


What was your solution to this? I'm experiencing the exact same thing now.
_________________
I'm switching from Windows to Linux... so explain it like I'm stupid.
Back to top
View user's profile Send private message
solamour
l33t
l33t


Joined: 21 Dec 2004
Posts: 623
Location: San Diego, CA

PostPosted: Sun Dec 07, 2014 8:22 am    Post subject: Reply with quote

NoUserName wrote:
What was your solution to this? I'm experiencing the exact same thing now.


Unfortunately, I still haven't figured it out yet. It's somewhat bearable, because 1) I don't reboot the system very often and 2) when I do need to reboot, I just shutdown completely and press the power button. It's definitely annoying, though.

As a next step, I'm planning to install a different distro (Ubuntu, perhaps) and see if doing so makes any difference. In the mean time, if you find any solution, please share. Thanks.
__
sol
Back to top
View user's profile Send private message
solamour
l33t
l33t


Joined: 21 Dec 2004
Posts: 623
Location: San Diego, CA

PostPosted: Sun Dec 14, 2014 6:21 am    Post subject: Reply with quote

So, I installed Ubuntu 14.04 (kernel 3.13.0-43) along with Gentoo (kernel 3.16.5), and here is the result.

1) Boot to Ubuntu -> Reboot -> Boot to Ubuntu: WiFi works.
2) Boot to Ubuntu -> Reboot -> Boot to Gentoo: WiFi works.
3) Boot to Gentoo -> Reboot -> Boot to Ubuntu: WiFi doesn't work.
4) Boot to Gentoo -> Reboot -> Boot to Gentoo: WiFi doesn't work.

Looks like if I boot to Gentoo and reboot, WiFi stops working regardless of what boots afterwards. Also, after 3), I get the same "SIOCSIFFLAGS: Input/output error" in Ubuntu.

Ubuntu "config-3.13.0-43-generic":
http://pastebin.com/tsjFANW0

Ubuntu "lsmod":
http://pastebin.com/5X5Z6Dvc

If it's possible at all, I'd like to stick with Gentoo (not that there is anything wrong with Ubuntu), so if you have any suggestions, please share.
__
sol
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1371

PostPosted: Sun Dec 14, 2014 4:22 pm    Post subject: Reply with quote

This is not .config related but a kernel bug.
Why dont you try a probably fixed source:
https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.16.7.tar.xz

And apply your new upstream maintainer patches:
http://kernel.ubuntu.com/stable/patch-3.16.7-ckt1.xz
http://kernel.ubuntu.com/stable/patch-3.16.7-ckt2.xz

Gentoo
Code:
*gentoo-sources-3.16.5 (09 Oct 2014)
219    
220    09 Oct 2014; Mike Pagano <mpagano@gentoo.org> +gentoo-sources-3.16.5.ebuild:

having a two month old kernel source as latest stable is insane. Gentoo just should never declare as stable a short-term kernel.org source,
MyHumbleOpinion

If your issue persists after patching the kernel sources please file a bug. It might be init,udev system related (I think very unlikely). In your case it is most probably not a .config issue. While Linux kernels having a little minor version are known to be error prone you got to go patching and your issue will solve like magic :)
_________________
fun2gen2
Back to top
View user's profile Send private message
solamour
l33t
l33t


Joined: 21 Dec 2004
Posts: 623
Location: San Diego, CA

PostPosted: Fri Dec 26, 2014 10:26 am    Post subject: Reply with quote

I finally got around installing kernel 3.16.7 along with a couple of suggested patches, but the problem persisted; I received the exactly same error message ("SIOCSIFFLAGS: Input/output error") when I reboot the system, but not when the system start from completely turned off state.

Inform me where/how to file the issue.
__
sol
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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