Project

General

Profile

Bug #2261

[C201] ThinkPenguin N150 USB WiFi not working

Time4Tea - 4 months ago - . Updated 3 months ago.

Status:
in progress
Priority:
bug
Assignee:
% Done:

0%


Description

I purchased a Wireless N USB adapter from ThinkPenguin (https://www.thinkpenguin.com/gnu-linux/penguin-wireless-n-usb-adapter-gnu-linux-tpe-n150usb) for use with an Asus Chromebook C201 running Parabola. However, it appears to be unstable. When I connect to a network, everything works ok for a couple of minutes, but then the whole system freezes (i.e. nothing responds to mouse clicks). However, when I unplug the USB adapter, the system unfreezes and works fine again.

Another user mentioned on this issue page [[https://labs.parabola.nu/issues/1965]] that they experienced similar issues with a TP-Link TL-722N. That also seems to be based on Atheros, although I don't know if it is exactly the same chipset.

There is some suggestion that the problem may be alleviated by using a USB hub, although I haven't tried that personally.

I also tried the same USB device in ALARM (on the same machine) and experienced the same problem. In Parabola, I tried kernel version 4.20.11 and in ALARM, 4.20.6.

History

#1

Updated by bill-auger 4 months ago

  • Assignee set to Megver83
  • Subject changed from USB wifi not working with Asus Chromebook C201 to think-penguin N150 USB wifi not working with Asus Chromebook C201
#2

Updated by CBotulinum 4 months ago

I'm the user that tried the TL-722N, I'll try it all again with the latest kernel today, I'll report later.

#3

Updated by bill-auger 4 months ago

  • Subject changed from think-penguin N150 USB wifi not working with Asus Chromebook C201 to [linux-libre-chromebook]: think-penguin N150 USB wifi not working with Asus Chromebook C201
#4

Updated by Megver83 4 months ago

  • Subject changed from [linux-libre-chromebook]: think-penguin N150 USB wifi not working with Asus Chromebook C201 to [C201] ThinkPenguin N150 USB WiFi not working

Time4Tea wrote:

I also tried the same USB device in ALARM (on the same machine) and experienced the same problem. In Parabola, I tried kernel version 4.20.11 and in ALARM, 4.20.6.

If you tried the non-free vanilla linux kernel, then it means that it is a problem from upstream. That is, Torvals kernel (not linux-libre, not Parabola's kernel). Hopefully a patch could be done (or could be a config needed which is needed, or a config that should be disabled).

Now, I have a theory. Did you installed Parabola/ALARM before Libreboot? I don't discard that there could be an issue related to it (a bug in Libreboot maybe?)

#5

Updated by Time4Tea 4 months ago

Megver83 I have to confess that I haven't installed Libreboot on it yet. It's on my to-do, just haven't gotten to it.

#6

Updated by Time4Tea 4 months ago

Also, there has been some discussion about this issue on the development mailing list, which I will copy here in case anyone isn't reading those:

There was some suggestion that the issue might be because the Chromebook USB port isn't providing enough power for the Atheros dongle. So, I bought a $10 USB tester to try to verify if that is the case. This is what I said in my e-mail:


Hey, so I received that USB tester in the mail today. Got some
interesting results:

First, I tried the older Ralink wifi dongle (the one that works). When
connected, it seems to operate at around 110-120mA. Very rarely it went
up to around 160. So, that is quite a bit lower than the 450mA max
power that was reported by 'lsusb'.

I then unplugged that and plugged in my phone charger. That was able to
draw around 500mA (which is the spec for a USB 2.0 port).

I then tried the ThinkPenguin Atheros dongle. It was at about 70mA when
connected, but experienced the same freezing issue as when plugged
directly in to the Chromebook port. I tried it in my desktop and it
works fine on that, both direct and going through the USB tester. No
sign of the freezing issue. On the desktop, I think the max current I
saw was around 90mA.

So, clearly the issue is not a power limitation, as the Chromebook port
can deliver the full 500mA. My best guess is that it is some sort of
compatibilty bug between the dongle and the particular USB hub that the
Chromebook uses.


(the Ralink dongle is an older wifi dongle that I have from years ago, which only works with a firmware blob. It seems to work fine with the Chromebook, despite drawing more current)

#7

Updated by Megver83 4 months ago

Maybe you could try a non-Arch-based distro (Debian maybe?) to see if it works. Or ar least to confirm if it's a hardware or software issue

#8

Updated by Time4Tea 4 months ago

Ok, I will try to do that (when I can find some time). However, all the distros use the same kernel (Torvalds), so I expect it would be the same.

As I mentioned above, the Atheros dongle works on my desktop, which is currently running Trisquel (although I think an older kernel version).

#9

Updated by Time4Tea 4 months ago

Megver83 I agree with you that the problem seems to be from upstream with the kernel. I found this page for the ath9k-htc firmware:

https://github.com/qca/open-ath9k-htc-firmware/wiki/usb-related-issues#start-of-content

it seems they are aware of stability issues with 'some specific USB controllers'; however, I don't know if anyone is actively working on a fix. I will try to contact them.

#10

Updated by Time4Tea 4 months ago

There appears to be an open issue for this on the github page for the ath9k-htc-firmware:

https://github.com/qca/open-ath9k-htc-firmware/issues/124

It seems there may be a patch that can resolve the issue. I will try their solution and see if it helps.

#11

Updated by Megver83 4 months ago

ok, so i'm 90% sure that it is a kernel issue (couldn't be a firmware issue since firmware is about compatibility, not stability/reliability with the whole OS).

Time4Tea wrote:

There appears to be an open issue for this on the github page for the ath9k-htc-firmware:

https://github.com/qca/open-ath9k-htc-firmware/issues/124

It seems there may be a patch that can resolve the issue. I will try their solution and see if it helps.

Looks promising. Please let me know if it works with linux-libre 5.0

#12

Updated by Time4Tea 3 months ago

I have tried the patch, but it didn't seem to work for me. Unfortunately, it seems to actually make things worse: after applying the patch and re-compiling the ath9k modules, inserting the USB dongle causes the whole system to freeze, and it doesn't unfreeze after removing the dongle. (Although, it is possible that I did something wrong with applying the patch or compiling the modules)

I think I will have to wait for a more robust solution.

Interestingly, there is page here from the guy that runs PrawnOS that describes how the internal webcam can be switched for the USB dongle:

https://github.com/SolidHal/AsusC201-usb-wifi-from-webcam

This is apparently possible, because the webcam is also on USB and does not go through the 'dwc2 bridge', which is apparently what is causing the compatibility issue. Although it requires opening the case and soldering. Has the additional benefits that it frees up the USB port and it is also possible to utilize the wifi antenna that is built in around the screen.

I would like to try it, but I don't think I'll be able to find the time myself any time soon.

#13

Updated by libreantho 3 months ago

I've installed parabola after installing libreboot and I can confirm that I have the same issue.

#14

Updated by Time4Tea 3 months ago

Following some discussion with SolidHal on the Github issue page (linked above), I downgraded my kernel from 5.0.6 to 4.20.0 and, even without the patch, the Atheros dongle seems to work much better. It still seems to freeze the system if it is plugged in when I boot up, or if I close the lid and then re-open. However, after unplugging/re-plugging, the system frees up and the dongle seems quite stable after that.

This is probably good enough for me, for the time being. It seems that some changes in the more recent kernels may have reduced the stability of the Atheros dongles.

#15

Updated by Time4Tea 3 months ago

Actually no, it's not as stable as I thought at first. It seems I can get ~20-30 minutes of continuous connectivity before it freezes (which is still better than with the 5.0.6 kernel, which freezes within about 10 seconds every time).

I tried the patch again with the 4.20.0 kernel, but it still didn't seem to work. Again, it just causes my system to unrecoverably lock up after trying to connect. Perhaps I am doing something wrong with my module build process? I am following the instructions on this Arch page:

https://wiki.archlinux.org/index.php/Compile_kernel_module

The only real difference is that I don't have the Module.symvers file for the Parabola kernel. However, I have built other modules without it, and those seemed to work ok.

#16

Updated by Megver83 3 months ago

Time4Tea wrote:
(...)

I tried the patch again with the 4.20.0 kernel, but it still didn't seem to work. Again, it just causes my system to unrecoverably lock up after trying to connect. Perhaps I am doing something wrong with my module build process? I am following the instructions on this Arch page:

https://wiki.archlinux.org/index.php/Compile_kernel_module

The only real difference is that I don't have the Module.symvers file for the Parabola kernel. However, I have built other modules without it, and those seemed to work ok.

If you read carefully...

Build environment

Firstly you will need to install build dependencies such as compiler(base-devel) and linux-headers.

$ pkgfile -l linux-libre-headers | grep symvers
libre/linux-libre-headers       /usr/lib/modules/5.0.6-gnu-1/build/Module.symvers

The headers packages are for that. For building modules for specific kernels. Don't feel bad anyways, but now you know

#17

Updated by Time4Tea 3 months ago

Megver83 Ok, yes that makes sense. Silly me. I will try it again with the symbol files.

I had built the elan_i2c touchpad module before without them, which seemed to work ok. But, perhaps I got lucky with that one.

#18

Updated by Time4Tea 3 months ago

Update: I recompiled the patched ath9k modules with the Module.symvers file and the ThinkPenguin dongle now seems to be working very well with the 5.0.6 kernel. I've been using it since yesterday and it's been much more stable - I don't think I've had to unplug/replug even once. It seems like a decent solution.

#19

Updated by Megver83 3 months ago

Time4Tea wrote:

Update: I recompiled the patched ath9k modules with the Module.symvers file and the ThinkPenguin dongle now seems to be working very well with the 5.0.6 kernel. I've been using it since yesterday and it's been much more stable - I don't think I've had to unplug/replug even once. It seems like a decent solution.

ok, where's the patch?

#20

Updated by Megver83 3 months ago

  • Status changed from unconfirmed to in progress

Also available in: Atom PDF