Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

scp failing over wifi, how to update the firmware?

Need help with peripherals or devices?
Post Reply
Message
Author
ramislebob
Posts: 37
Joined: 2007-05-27 20:43
Has thanked: 1 time

scp failing over wifi, how to update the firmware?

#1 Post by ramislebob »

Hi,
I've an issue on my work laptop at home with the wifi all my scp loose the connection after few seconds.
I'm getting randomly the following after having being able to upload or download between 50MB and 250MB

Code: Select all

packet_write_wait: Connection to 192.168.1.254 port 22: Broken pipe
lost connection
Same thing if I resume the transfer using rsync via ssh. It is suddenly loosing the connection and I've to relaunch it manually. pretty boring!
I've no issue with an ssh connection. It is never failing. only scp.
I've tried from another laptop which is quite old and using wifi at a low speed (< 3MB) and there is no issue. (between my work laptop and this other old laptop or between the old laptop and my home server) This issue is only with my work laptop and my home server that is connected on the box by ethernet and thus can support an 100MB bandwidth.

So I'm thinking the issue may come from the firmware of my laptop wifi controler.
Here is the detail:

Code: Select all

# lspci -nn | grep -i w
21:02:00.0 Network controller [0280]: Intel Corporation Device [8086:24fd] (rev 78)
I'm running a debian stable (SMP Debian 4.9.110-3+deb9u6 (2018-10-08) x86_64 GNU/Linux)

It seems that I can only load the firmware iwlwifi-8265-22.ucode

Code: Select all

# dmesg | egrep -i 'dmi:|firmware'
[    0.000000] DMI: Dell Inc. Precision 3520/0G0G6Y, BIOS 1.9.3 03/08/2018
[    0.052617] Spectre V2 : Enabling Restricted Speculation for firmware calls
[    0.242574] ACPI: [Firmware Bug]: BIOS _OSI(Linux) query ignored
[    8.881459] iwlwifi 0000:02:00.0: firmware: failed to load iwlwifi-8265-26.ucode (-2)
[    8.881549] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-8265-26.ucode failed with error -2
[    8.881565] iwlwifi 0000:02:00.0: firmware: failed to load iwlwifi-8265-25.ucode (-2)
[    8.881688] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-8265-25.ucode failed with error -2
[    8.881704] iwlwifi 0000:02:00.0: firmware: failed to load iwlwifi-8265-24.ucode (-2)
[    8.881793] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-8265-24.ucode failed with error -2
[    8.881803] iwlwifi 0000:02:00.0: firmware: failed to load iwlwifi-8265-23.ucode (-2)
[    8.881898] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-8265-23.ucode failed with error -2
[    8.889196] Bluetooth: hci0: Firmware revision 0.1 build 82 week 37 2016
[    8.893722] iwlwifi 0000:02:00.0: firmware: direct-loading firmware iwlwifi-8265-22.ucode
[    8.894302] iwlwifi 0000:02:00.0: loaded firmware version 22.391740.0 op_mode iwlmvm
[    8.975115] i915 0000:00:02.0: firmware: direct-loading firmware i915/kbl_dmc_ver1_01.bin
[    8.999572] [drm] GuC firmware load skipped
I've checked online, there is the 36 available but my kernel doesn't support it.
I don't find the information on which kernel I should build in order to be able to use this firmware.
Which would be the procedure. I suppose it is available in testing but this is my work laptop and I'd prefer to stay in stable.
What are the options?
Thanks in advance for the help,
Cheers

PS: I can't find only the iwlwifi-8265-26.ucode, I suppose it wasn't stable... and anyway I guess it would be best to use the latest version available. I've read some people tried to fool the kernel by renaming the latest version in iwlwifi-8265-26.ucode bu this wouldn't work. I didn't try it so... could I?

PS2: I didn't try yet to do such scp on another network. The issue could be my internet box in the middle but as there are newest version of the firmware, I'm thinking it could be the problem. What do you think?

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: scp failing over wifi, how to update the firmware?

#2 Post by Head_on_a_Stick »

deadbang

ramislebob
Posts: 37
Joined: 2007-05-27 20:43
Has thanked: 1 time

Re: scp failing over wifi, how to update the firmware?

#3 Post by ramislebob »

Thanks for the suggestion, I've just tried to set the power_off on my wifi device

Code: Select all

iw dev wlp2s0 set power_save off
The first scp upload went to 600MB but then the rsync were failing as usual.. I tried another scp from scratch and it failed again at 260MB.
The speed is 14.0MB/s.
I've tried to limit it to 5MB (as I've no issue with my old laptop) doing scp -l 5000 but then the connection get stalled once and then the speed is under 600k which is quite too slow... and then few sec later I'm getting again disconnected.. :'(
I've also tried to not accept wifi n on my box but I get the same issue (and the same speed: over 10MB/s)

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: scp failing over wifi, how to update the firmware?

#4 Post by stevepusser »

Your 8265 device was released in mid 2016, just before the 4.9 kernel, so maybe the driver has been improved in later versions.

There's a project that will allow you to update your wireless drivers for a given kernel. I know it used to work well, but the instructions and releases haven't been updated for some time, though current snapshots are still available. You'll have to set up your system to build drivers (modules)(install module-assistant and run m-a prepare) and read the instructions carefully if you just want to upgrade Intel drivers instead of the whole shebang, which can take a while on slow machines.

https://backports.wiki.kernel.org/index.php/Main_Page
https://backports.wiki.kernel.org/index ... /packaging

If they are a disaster, the original drivers are preserved, and you can go back to them by running "make uninstall" as sysadmin.

You'll also need the newer firmware-iwlwifi from stretch-backports.

The other way to get a newer driver and firmware is now to install a newer kernel and firmware package from stretch-backports. You keep the first kernel as a backup boot option. Firmware packages are backwards-compatible, so you don't need to downgrade that if you go back to the original kernel.

Anyway, the missing firmware warnings are benign and can be ignored, the driver is just going down a list of acceptable firmware until it finds one that you have. The missing ones were never released by Intel.
MX Linux packager and developer

ramislebob
Posts: 37
Joined: 2007-05-27 20:43
Has thanked: 1 time

Re: scp failing over wifi, how to update the firmware?

#5 Post by ramislebob »

stevepusser wrote:Your 8265 device was released in mid 2016, just before the 4.9 kernel, so maybe the driver has been improved in later versions.

There's a project that will allow you to update your wireless drivers for a given kernel. I know it used to work well, but the instructions and releases haven't been updated for some time, though current snapshots are still available. You'll have to set up your system to build drivers (modules)(install module-assistant and run m-a prepare) and read the instructions carefully if you just want to upgrade Intel drivers instead of the whole shebang, which can take a while on slow machines.

https://backports.wiki.kernel.org/index.php/Main_Page
https://backports.wiki.kernel.org/index ... /packaging

If they are a disaster, the original drivers are preserved, and you can go back to them by running "make uninstall" as sysadmin.

You'll also need the newer firmware-iwlwifi from stretch-backports.

The other way to get a newer driver and firmware is now to install a newer kernel and firmware package from stretch-backports. You keep the first kernel as a backup boot option. Firmware packages are backwards-compatible, so you don't need to downgrade that if you go back to the original kernel.

Anyway, the missing firmware warnings are benign and can be ignored, the driver is just going down a list of acceptable firmware until it finds one that you have. The missing ones were never released by Intel.
Hi,
thanks for your answer. Could you please detail a bit more or give some links that would explain a bit more both methods.
I would be happy to install a more recent kernel. Is the process simple now or do I've to build it myself? (I remembered having done that but it was like 10 years ago...) How can I be sure that the kernel will support the latest version of the firmware-iwlwifi?

I did try before my post to download firmware-iwlwifi package from the testing repo and install it via dpkg but of course it didn't work. (it did unpack iwlwifi-8265-36.ucode in /lib/firmware but it isn't used....)

Otherwise how could I build only the driver myself? just launching module-assistant?

ramislebob
Posts: 37
Joined: 2007-05-27 20:43
Has thanked: 1 time

Re: scp failing over wifi, how to update the firmware?

#6 Post by ramislebob »

Here is a temporary solution for the scp issue: a bash function that loop until the transfer is finished... (But I'm still interested in trying updating my driver and avoid this)

Code: Select all

function upload()
{
	file=$1
	dest=$2

	rsync --partial --progress --rsh=ssh $file $dest/$file
	res=$?
	while [ $res -ne 0 ]; do
		rsync --partial --progress --rsh=ssh $file $dest/$file
		res=$?

		# 130: Error on SIGINT
		if [ $res -eq 130 ]; then
			break
		fi
	done
}

ramislebob
Posts: 37
Joined: 2007-05-27 20:43
Has thanked: 1 time

Re: scp failing over wifi, how to update the firmware?

#7 Post by ramislebob »

Little update: I've installed the latest kernel from backport (4.18.0-0.bpo.1-amd64) and now iwlwifi is loading the latest firmware (iwlwifi-8265-36.ucode)
I still have the same issue: my scp uploads are unstable...
Maybe the issue comes from my box that drops packets when we're uploading from the LAN over wifi... bit strange cause I don't have the issue with another laptop...
I'll give it a try on another LAN to check if it is my laptop (and thus I guess the firmware of the wifi) or not

Post Reply