Comment 82 for bug 1408963

Gabor Simon (gsimon75) wrote :

Thanks for the kernel bugzilla link, Dik, its power-save saving suspicion seems valid, at least now I had a full day of uptime without this wifi failure.

So, for anyone else who also wants to give it a try:

1. If you are using NetworkManager, then check '/etc/NetworkManager/conf.d/default-wifi-powersave-on.conf', and try setting 'wifi.powersave = 0'

2. If you aren't using NetworkManager, then you may add an udev rule for turning it off:
Add this to '/etc/udev/rules.d/90-iwl3945-quirk.rules':
# disable power saving, as per https://bugzilla.kernel.org/show_bug.cgi?id=93041
ACTION=="add", SUBSYSTEM=="net", ENV{DEVTYPE}=="wlan", ENV{ID_NET_DRIVER}=="iwl3945", RUN+="/sbin/iw dev %E{INTERFACE} set power_save off"

NOTE: the '90-...' is important, as it must be evaluated after '80-drivers.rules' (I think).

3. You may set it manually via 'iw dev <iface> set power_save off', but it will last only
until something overrides it, or until reboot.

I collected some dmesg stack traces, this was the most relevant one (the rest came from generic ieee80211 code).

[ 7729.780167] ------------[ cut here ]------------
[ 7729.780189] WARNING: CPU: 1 PID: 4563 at /build/linux-CQR1pk/linux-4.10.0/drivers/net/wireless/intel/iwlegacy/common.c:3178 il_enqueue_hcmd+0x35c/0x3d0 [iwlegacy]
[ 7729.780191] Modules linked in: uas usb_storage ccm pcmcia coretemp kvm_intel kvm input_leds joydev arc4 irqbypass iwl3945 iwlegacy serio_raw mac80211 yenta_socket snd_hda_codec_conexant snd_hda_codec_generic pcmcia_rsrc lpc_ich pcmcia_core snd_hda_intel cfg80211 snd_hda_codec snd_hda_core snd_hwdep snd_pcm snd_timer snd soundcore shpchp toshiba_acpi sparse_keymap industrialio wmi mac_hid parport_pc ppdev lp parport ip_tables x_tables autofs4 raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear hid_generic i915 8139too usbhid i2c_algo_bit psmouse drm_kms_helper syscopyarea 8139cp sysfillrect sysimgblt pata_acpi fb_sys_fops mii drm hid fjes video
[ 7729.780260] CPU: 1 PID: 4563 Comm: kworker/u4:1 Tainted: G W 4.10.0-19-generic #21-Ubuntu
[ 7729.780261] Hardware name: TOSHIBA SATELLITE L100/SATELLITE L100, BIOS V3.00 12/25/2008
[ 7729.780307] Workqueue: phy0 ieee80211_scan_work [mac80211]
[ 7729.780309] Call Trace:
[ 7729.780318] dump_stack+0x58/0x73
[ 7729.780321] __warn+0xea/0x110
[ 7729.780330] ? il_enqueue_hcmd+0x35c/0x3d0 [iwlegacy]
[ 7729.780332] warn_slowpath_null+0x2a/0x30
[ 7729.780340] il_enqueue_hcmd+0x35c/0x3d0 [iwlegacy]
[ 7729.780344] ? default_send_IPI_single+0x2c/0x30
[ 7729.780347] ? native_smp_send_reschedule+0x1f/0x40
[ 7729.780354] il_send_cmd_sync+0x40/0x340 [iwlegacy]
[ 7729.780360] il3945_request_scan+0x3e6/0x5a0 [iwl3945]
[ 7729.780368] il_mac_hw_scan+0x108/0x180 [iwlegacy]
[ 7729.780400] __ieee80211_start_scan+0x22d/0x6a0 [mac80211]
[ 7729.780433] ieee80211_scan_work+0x3db/0x4b0 [mac80211]
[ 7729.780437] process_one_work+0x1b8/0x420
[ 7729.780440] worker_thread+0x37/0x4c0
[ 7729.780442] ? process_one_work+0x420/0x420
[ 7729.780445] kthread+0xd5/0x100
[ 7729.780447] ? process_one_work+0x420/0x420
[ 7729.780449] ? kthread_create_on_node+0x30/0x30
[ 7729.780453] ret_from_fork+0x21/0x2c
[ 7729.780456] ---[ end trace 2fddf3f499f47c42 ]---