[SOLVED] SSH is slow as hell

Hi there,

I wasn’t home for about two weeks and powered my Raspi 2 with OSMC down. Today I started it again.

Everything seemed fine (OSMC running without any problems) until I sshed into my Raspi. I can login, but I cant do pretty anything. Whenever I try to type something, it takes for ever until the letters appear in putty (something like 1 letter per minute (!)). Often it is not even possible to ping the Pi from my PC (same network).
I managed once to start sudo apt-get update, but it took forever too. It seems like somethings wrong with the wifi adapter. I can download updates, but mostly with ~50 B/s (sometimes even switching to ~3000 PB/s). Sometimes it shows faster speed at around 100kB/s, but nothing happens, the ssh simply stops doing stuff (OSMC GUI still fully responding).

Anyone any ideas what might have happened while the Pi was powered off?

Ok, I just found out that the Pi is loosing the connection to the wifi network (and forgeting the login credentials).
So, the slow download and the strange ssh behaviour might be caused by that. I’m going to look into why the Pi is loosing the connection (wifi network hasnt changed).


After a few times restarting the Pi and re-entering the wifi credentials it seems to work now.

Make sure you have the latest updates installed (even if you have to temporarily connect via Ethernet to do so) as there were wireless driver updates recently.

Also what make and model is your wireless adaptor ? Most adaptors should work pretty well with the latest updates.

I really dont know what might have caused this.

I was able to download the newest updates, but had an error installing it. Again a bit later, the download rate dropped again towards 0. Its a LogiLink WL0084B adapter.

Because of the wifi issue (as I said, this came out of nowhere) and the error during updating, I simply reinstalled RC2 on the SD card. Currently I’m having a different adapter attached, which seems to work better so far (except that OSMC seems to forget the wifi credentials everytime it got disconnected).


“Forgetting” the wifi password is a known behaviour of the current release version of the OSMC settings addon. The password is not actually forgotten, however every time you try to manually connect a not-currently-connected network through the GUI (even if the password was previously saved) it will ask you for the password again.

However if you just leave it alone when the connection drops connman should automatically re-try the connection approx every 2 mins, using the saved password.

This always prompting for the password has already been fixed a while ago in the development version of OSMC settings, so should be fixed in the next release.

If your wireless connection is dropping, that’s another issue though, that may need troubleshooting.

1 Like

Nice to hear, that the password issue is already been fixed.

I agree on this. The problem is, the problem is not always there. At the moment I have no connection problems. The only problems at the moment are, that
a) the download rate is unusual slow (mostly around 100-150kbps, whereas it was usually around 600-800kpbs a while ago) and
b) I dont seem to be able to download stuff on my PC and my Pi simultaneously. Whenever I load something bigger on my PC (on Steam, doesnt matter if unlimited rate (around 500kbps) or limited (tried 64kbps) my Pi seems to completly lose the connection (only to the internet, the Pi says it is still connected to the router). Stopping the download on the PC and restarting the wifi adapter on my Pi seems to be the only helpful thing at the moment.

Currently I’m thinking, that this might also be caused by the router, but I currently dont have physical access to the router, so I can neither restart him nor politly talk to him. (But as interesting as it is, my PC has a normal and stable connection, and his wifi adapter is only 50cm - 1m away from the Pi).

The next time I see something which is clearly related to the Pi, I will to upload a log file.

How far away is the router and through what kind of walls ? 100-150kbps is ridiculously slow and almost certainly a wireless signal issue. Do you happen to know what chipset your wireless adaptors use ? The ‘dmesg’ command should show this.

As an example of what’s possible I can get 90Mbps (Mbps, not Kbps!) measured throughput with a TP-Link TL-WN823N from a downstairs router to an upstairs Pi 2, so less than 1Mbps is very very poor.

Assuming the range to the base station is not too great and the client adaptors are reasonable quality my first suspicion would be interference on the channel you’re using, but it sounds like you don’t have access to the router to try changing the wireless channel.

I couldnt find the chipset in the dmesg ouput, but according to lsusb I have a ‘Ralink Technology, Corp. RT5370 Wireless Adapter’.

Indeed, but as I said about 2 weeks ago I had much faster rates (up to 800kpbs) with the exact same setup. I’m sharing the internet connection with my neighboor (legally, I asked), so I dont have any administrative options to change the channel (currently channel 6) or other settings. But there are not many wifi networks around (the nearest would be on channel 4 and 11) and none of it is new (you can see it in the screenshot I’ve posted here)
This surprisingly change in download rate is making me think, that it might be related to the Pi and/or OSMC (as said before, my PC has no problems at all and the download rate didnt dropped).

800kbps is still really bad. So you’ve gone from really bad to really really bad. :wink:

Without knowing enough first hand details I would say that you simply have a weak wireless signal or there is a lot of interference on that channel - especially if you are getting poor results with two completely different adaptors.

If you don’t have any control over the router there may not be a lot of troubleshooting that can be done.

Well, depends on what youre used to :wink: At my parents home we had only 350kpbs for years - so I was pretty excited when I saw that I’m surfing with 800kpbs now :smiley:

Btw, I’ve switched wifi adapters again (I knew there’s a reason why I have alot of them…). Now the Pi is using an Realtek Semiconductor Corp. RTL8191SU 802.11n adapter with an external antenna, which seems to help a bit. I’m now having all green dots in the AP list and its loading with 250-400kbps.
And I found out, that when changing the position of the adapter/antenna even a few centimeters matter a lot (120kbps vs. 370kbps). So, maybe I’m busy trying to find a got location for the rest of the day :stuck_out_tongue:

But thanks so far for your help :wink:

It does sound like a signal issue. When the signal is poor (sounds like it is interference, not signal strength) then even small variations in the signal can cause quite big, seemingly random changes in performance.

One thing you could try if you have not already is buy something like a half metre USB extension lead to get the adaptor up away from the Pi - for example you could tape it to a window if the signal is coming from outdoors.

@sonstwas, not sure if already someone mentioned it. When you install wavemon (sudo apt-get install wavemon) you can monitor the connection very detailed

Afaik you’re the first mentioning it :wink:

The thing is, repositioning the Pi only for a few centimeters (less then 5cm) results in an immense raise/drop of rate, but only in minimal changes in link quality and signal strength as shown by wavemon.

Usually the link quality is around 45% and the signal strength is around -80dBm. Repositioning the Pi a few centimeters doesnt show any large changes in these two values, but can increase/decrease the download rate by the factor of ten.

-80dB is a very weak signal - you certainly won’t get good performance at that signal level. See the table on page 7 on the following document:


Assuming a single stream (single antenna) adaptor, which most small USB adaptors and 20Mhz channels (most AP’s don’t use 40Mhz channels on 2.4Ghz) are you’ll only be able to use MCS mode 1, which is a wireless rate of 6.5Mbps, in real world performance you would get well under 2Mbps from this in best case conditions.

To get maximum performance you really need a signal of -65dBm or better. (A larger negative number is a weaker signal so -65 is stronger than -80)

I know, probably caused by the street which seperates me from the router. But for my purposes the rate I get is good enough (preparing for the defensio of my master thesis, so anything which might make media consumption easy would be… yea, well, once you have it… :D).

By the way, I finally found the good spot again, where I have a download rate I can work with (around 700-900kbps).

So, everythings working again, I guess I have to finish my powerpoint presentation then :smiley:
Special thanks to you @DBMandrake for helping me :slight_smile: