Bug 716652

Summary: Configuration of wireless network interface during installation is OK, but network connection does not work
Product: [openSUSE] openSUSE 12.2 Reporter: Freek de Kruijf <freek>
Component: NetworkAssignee: Marius Tomaschewski <mt>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P3 - Medium CC: anixx, ManuelStol, mt, suse-beta
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: SUSE Other   
Whiteboard: maint:released:sle11-sp2:50983
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Ignore error if power saving is unsupported.
ifup-wireless: do not fail on unsupported power options

Description Freek de Kruijf 2011-09-08 12:54:32 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20100101 Firefox/6.0

During the installation of openSUSE 12.1 M5 on a laptop with a wireless interface one can configure the wireless interface. It is left in the default to use the Network Manager. On the screen with the configuration one gets the message that the interface has been set-up with DHCP without encryption. So clicking to configure the interface, one is able to configure it as WPA-PSK and enter the proper passphrase. However later the test of a network connection fails. After <Ctrl>+<Alt>+<F2> one can see the status of the network interfaces and only lo appears. There is no wlan0.
After finishing the installation one has to configure the network again using the networkmanager-applet. There is nothing available from the configuration during installation.

Reproducible: Always

Steps to Reproduce:
1.
2.
3.



Either do not offer the possibility to set-up the network and the offer to test the network connection or make it work with a wireless interface.
Comment 1 Freek de Kruijf 2011-09-09 13:43:51 UTC
One possible cause is bug#716013 if the firewall is activated.
Another possible cause is that the system is trying to set the wifi interface to power saving, which my interface is not supporting and results in an error message after which the interface is not set up any further. This was found by configuring the ifup traditional set up in which the parameter WIRELESS_POWER in /etc/sysconfig/network/ifcfg-wlan0 was set to "no", which caused the error. After setting this parameter to "none", the interface is working.
The interface shows itself as "AR5001 Wireless Network Adapter".
Comment 2 Manuel Stol 2011-09-25 11:13:14 UTC
If the wireless adapter or driver does not support power saving (anymore),
the '/etc/sysconfig/network/scripts/ifup-wireless' script returns an error.
Because the 'ifup-wireless' script returns an error,
the DHCP client is not started.


In '/etc/sysconfig/network/ifcfg.template' for 'WIRELESS_POWER' it says:
"
# Note, that this setting is not supported by all cards resp. drivers
# and shall be tested before the user decides to set it.
"
However, nowhere is this tested.
(Note that 'ifcfg.template' says '## Default: "none"', but the actual default is '""'.)


In '/usr/share/YaST2/modules/LanItems.ycp' the 'WIRELESS_POWER' is always set to either 'no' or 'yes'.  So when the 'Traditional Method with ifup' is used, YaST never sets 'WIRELESS_POWER' to ' "" ' nor ' "none" ' and 'iwconfig <iface> power ..' is always called.


Error message:
"
# ifup wlan0
    wlan0     device: Intel Corporation PRO/Wireless 4965 AG or AGN [Kedron] Network Connection (rev 61)
command 'iwconfig wlan0 power period 2' returned
 Error for wireless request "Set Power Management" (8B2C) :
    SET failed on device wlan0 ; Invalid argument.
    wlan0     warning: WPA configured, but is untested
    wlan0     warning: with this device
    wlan0     starting wpa_supplicant
"

Notes:
- The power saving in the driver for the Intel 4965 AGN has been disabled in the version in openSUSE 12.1 M5, but was enabled in openSUSE 11.4.


Workaround:
Set ' WIRELESS_POWER="" ' in '/etc/sysconfig/network/ifcfg-wlan0' and set this each time after you run 'YaST > Network Devices > Network Settings'.


Attached Solution:
If 'iwconfig <iface> power off' returns error 250, power saving is unsupported an the error is ignored.
The patch tests for the error 250.  And if iwconfig ever changes the error number for the 'unsupported operation' error, the ifup-wireless' script must be updated.
Comment 3 Manuel Stol 2011-09-25 11:16:54 UTC
Created attachment 452882 [details]
Ignore error if power saving is unsupported.
Comment 4 Marius Tomaschewski 2011-09-27 11:36:37 UTC
Thanks,

fixed in http://gitorious.org/opensuse/sysconfig/commit/9eb69f41 and
will be in the submit to factory.
Comment 5 Christian Boltz 2011-10-03 21:21:46 UTC
Marius, please don't forget to commit this to Factory - it broke wireless (which I need for internet access) on my system after updating from 11.4 to Factory (slightly newer than beta1) :-(

The good news is: I manually applied Manuel's patch - it works (with traditional network configuration).
Comment 6 Marius Tomaschewski 2011-10-05 08:48:02 UTC
Fixed and requested submit in https://build.opensuse.org/request/show/86630
Comment 7 Ilya Chernykh 2012-10-21 10:08:56 UTC
Why it is marked as "solved"? I have the same issue after upgrading to openSUSE 12.2
Comment 8 Ilya Chernykh 2012-10-21 10:10:31 UTC
It affects the most up-to-date openSUSE 12.2
Comment 9 Marius Tomaschewski 2012-10-25 12:07:30 UTC
Hmm... Have to take a closer look -- did the return code changed?
Comment 10 Ilya Chernykh 2012-10-25 12:39:04 UTC
Yes. After upgrade from 11.4 to 12.2 I got

command 'iwconfig wlan0 power period 2' returned
 Error for wireless request "Set Power Management" (8B2C) :
    SET failed on device wlan0 ; Invalid argument.

By turning off the power management on WLAN0 via Yast as described above I got rid of the error. I had to connect Internet via cable to learn the solution though.
Comment 11 Ilya Chernykh 2012-10-25 15:30:54 UTC
linux:~ # ip link set up wlan0
linux:~ # iwconfig wlan0 power period 2 ; echo "power period 2: $?"
Error for wireless request "Set Power Management" (8B2C) :
    SET failed on device wlan0 ; Invalid argument.
power period 2: 250
linux:~ # iwconfig wlan0 power off ; echo "power off: $?"
power off: 0
Comment 12 Marius Tomaschewski 2012-10-25 16:33:11 UTC
Created attachment 510912 [details]
ifup-wireless: do not fail on unsupported power options

I'd say, this patch should fix it. I've applied it at:

http://download.opensuse.org/repositories/home:/mtomaschewski:/branches:/openSUSE:/12.2:/Update/standard/x86_64/

please wait a bit until it rebuilds (> sysconfig-0.76.4-1.3.1).
Comment 13 Marius Tomaschewski 2012-10-25 16:34:49 UTC
Does it work for you now?
Comment 14 Freek de Kruijf 2012-10-25 22:37:12 UTC
This is typically a problem during installation from DVD or CD, so further testing only makes sense for 12.3. The problem does not exist after installation, because after installation I use NetworkManager. You generated something for 12.2, which makes no sense to me. I can do a test on my laptop with generating oS 12.3 some Milestone in which this change is present. So please give me a warning when this change is available in a 12.3 Milestone, I assume it is not available in M0. Will it be in M1?
Comment 15 Ilya Chernykh 2012-10-28 08:51:53 UTC
Which package from the repository should I test?
Comment 16 Marius Tomaschewski 2012-10-29 07:52:32 UTC
(In reply to comment #15)
This one, please:

http://download.opensuse.org/repositories/home:/mtomaschewski:/branches:/openSUSE:/12.2:/Update/standard/x86_64/sysconfig-0.76.4-1.4.1.x86_64.rpm

(submitted as rq 139466) or the most recent sysconfig-0.76.6 from factory.

(In reply to comment #14)
> This is typically a problem during installation from DVD or CD

Well, it may cause a problem while installation too, but it is not limited
to the installation flow. It can be tested in a normal system using:

/sbin/ifup wlan0 ; echo "return code: $?"

or incl. collecting some trace output:

{ bash -x /sbin/ifup wlan0 ; echo "return code: $?"; } &>/tmp/ifup.wlan0.out

Note, that an error message like:
  Error for wireless request "Set Power Management" (8B2C) :
      SET failed on device wlan0 ; Invalid argument.
from ifup-wireless will still occur -- but the error code will be not
forwarded to ifup any more.

Please reopen / let me know when it still causes problem. Thanks!
Comment 17 Marius Tomaschewski 2012-10-29 07:57:35 UTC
BTW: When you have some problems, uninstall "samba-client" package and retry.
The samba-client installs some if-up.d hooks which sometimes triggers a systemd
deadlock / blocks ifup and finally causes "rcnetwork" timeouts (see bnc#780644).
Comment 18 Bernhard Wiedemann 2012-11-14 13:41:18 UTC
This is an autogenerated message for OBS integration:
This bug (716652) was mentioned in
https://build.opensuse.org/request/show/141173
Comment 19 Bernhard Wiedemann 2012-11-23 10:00:07 UTC
This is an autogenerated message for OBS integration:
This bug (716652) was mentioned in
https://build.opensuse.org/request/show/142549 Maintenance /
Comment 20 Bernhard Wiedemann 2012-11-23 11:00:09 UTC
This is an autogenerated message for OBS integration:
This bug (716652) was mentioned in
https://build.opensuse.org/request/show/142552 Maintenance /
Comment 21 Swamp Workflow Management 2012-12-04 13:10:14 UTC
openSUSE-RU-2012:1602-1: An update that has four recommended fixes can now be installed.

Category: recommended (low)
Bug References: 716652,780644,784952,785240
CVE References: 
Sources used:
openSUSE 12.2 (src):    sysconfig-0.76.4-1.4.1
Comment 22 Bernhard Wiedemann 2012-12-06 19:00:08 UTC
This is an autogenerated message for OBS integration:
This bug (716652) was mentioned in
https://build.opensuse.org/request/show/144440 Maintenance /
Comment 23 Swamp Workflow Management 2012-12-17 12:08:43 UTC
openSUSE-RU-2012:1651-1: An update that has 5 recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 716652,775281,780644,784952,785240
CVE References: 
Sources used:
openSUSE 12.1 (src):    sysconfig-0.75.4-2.16.1
Comment 24 Swamp Workflow Management 2013-02-05 20:21:50 UTC
Update released for: sysconfig, sysconfig-debuginfo, sysconfig-debugsource
Products:
SLE-DEBUGINFO 11-SP2 (i386, ia64, ppc64, s390x, x86_64)
SLE-DESKTOP 11-SP2 (i386, x86_64)
SLE-SERVER 11-SP2 (i386, ia64, ppc64, s390x, x86_64)
SLES4VMWARE 11-SP2 (i386, x86_64)