Page 1 of 1

MediaTek Wifi Driver Issue (Solved in 5.7)

Posted: Wed Mar 13, 2024 4:18 pm
by hnw

Hi all. First time poster and first time Puppy Linux user.

Puppy has been a distro that I have crossed paths with for years but never installed. So finally, I decided to give it a go, since EasyOS seems really interesting in premise. I did the not recommended thing and installed it on one of my PCs. It is an old machine and Puppy being as light as it is, made for a pretty good match in my use case, given the hardware.

I have a few questions but I will focus on just one here, the other question is Re: Freezing Containers. Which I will probably make another post, later.
But I digress, I have an ASUS micro wifi adapter and I am having issues getting it to install. Specifically, I am getting an error while trying to make the driver.

For reference, I am using this driver:
https://github.com/cilynx/rtl88x2bu

I know it works on the harware because on it, I dual-boot it with Q4OS and I am able to compile and install the driver with 0 issues, however, Q4 is Debian based and a pretty straightforward/run of the mill distro. Unfortunately, albeit using the machine right now, I am on Q4, so I cannot exactly quote the error in detail, I apologize for that, so I will have to update this question a bit later once I run the cable back into the PC.

I am getting a "[modules] Error 2," and I guess that right now, I am just asking if anyone is/was having the same issue with a mediatek driver and I wanted to get the ball rolling on this. I did a quick search and I saw someone mention an adjacent issue with another mediatek driver on a puppy distro but the issues seem pretty different in how to go around fixing them. On the github above there are related issues but not the exact one.

Likely I am missing a dependency but I am not really sure, yet. Especially since EasyOS is so different than most other distros.
Otherwise, really liking it so far, when connected via cable. It really makes this old PC fly.

I will update the error here.

Thanks to anyone who is able to shed some light on this. Cheers.


Update: To give more info, below is the error I get while running make. I do not understand the error.

/bin/sh: line 1: cc: command not found
(standard_in) 1: syntax error
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.15.148/build M=/mnt/sda8/easyos/files/documents/Wifi Adapter Stuff/Cilynx Driver/rtl88x2bu-5.6.1.6_35492.20191025_COEX20180928-6a6a modules
make[1]: *** /lib/modules/5.15.148/build: No such file or directory. Stop.
make: *** [Makefile:2284: modules] Error 2

I do have a /lib/modules/5.15.148/ folder.
When I run make install. I get the following:

/bin/sh: line 1: cc: command not found
(standard_in) 1: syntax error
install -p -m 644 88x2bu.ko /lib/modules/5.15.148/kernel/drivers/net/wireless/
install: cannot stat '88x2bu.ko': No such file or directory
make: *** [Makefile:2290: install] Error 1


Just as reference, when I copy the files from Q4OS, and run make install just to see the output, I get a slightly different error.

/bin/sh: line 1: cc: command not found
(standard_in) 1: syntax error
install -p -m 644 88x2bu.ko /lib/modules/5.15.148/kernel/drivers/net/wireless/
/sbin/depmod -a 5.15.148

I am still looking into it.


Re: MediaTek Wifi Driver Issue

Posted: Thu Mar 14, 2024 8:40 am
by Caramel

Waiting for a response from a more experienced forum, I suggest you to copy the module compiled for Q4OS to EasyOS. With luck, it could be works.

Apparently according to the github page, this module is cfg80211.ko. In Q4OS. It is probably located somewhere in a subdirectory of the /lib/modules directory.
Copy the module to /usr/lib/modules/"lastest kernel"/kernel ( lastest kernel is 5.15.148 in the case EasyOS 5.7). Reboot and test.


Re: MediaTek Wifi Driver Issue

Posted: Thu Mar 14, 2024 12:35 pm
by rockedge

@hnw I want to say :welcome: to the forum!

one of the EasyOS people will jump in here at some point and get this thing solved!

To clarify...it is the MediaTek driver that is not compiling successfully in your installation of EasyOS?


Re: MediaTek Wifi Driver Issue

Posted: Thu Mar 14, 2024 8:16 pm
by hnw
rockedge wrote: Thu Mar 14, 2024 12:35 pm

@hnw I want to say :welcome: to the forum!

one of the EasyOS people will jump in here at some point and get this thing solved!

To clarify...it is the MediaTek driver that is not compiling successfully in your installation of EasyOS?

Thank you, Rockedge. Happy to be experimenting with EasyOS. The issue is fairly minor in the larger scheme so I can wait for a bit.
It is somewhat a different distro from what I am used to, so I would not be surprised if the fix was, you know, Easy.

Just to be verbose: I download the driver from git. First run Make then I would install it.
On the Debian side, after compiling, I would run sudo modprobe cfg8021 followed by insmod 88x2bu.ko and call it a day.

On the EasyOS side, I do not even get past running make. The build just fails.
I updated my original post with errors in question, for everyone's convenience.


Re: MediaTek Wifi Driver Issue

Posted: Thu Mar 14, 2024 8:54 pm
by Keef

Have you downloaded the devx.sfs? This has the bulk of the tools/programs needed for compilation. It is also better to install it in the 'Main' filesystem, rather than in a separate container, as you have to make sure you have your source files in the right place, else they won't be found.

EDIT
I made the directory 'build' in /lib/modules/5.15.148
Copied the contents of the module source into it.
Ran make, and off it goes. It is taking a while and not finished yet, but at least it is compiling.

I wasn't able to complete this - it slowed to a crawl then eventually seized up, so had to hit the power button.


Re: MediaTek Wifi Driver Issue

Posted: Fri Mar 15, 2024 3:09 pm
by hnw
Keef wrote: Thu Mar 14, 2024 8:54 pm

Have you downloaded the devx.sfs? This has the bulk of the tools/programs needed for compilation. It is also better to install it in the 'Main' filesystem, rather than in a separate container, as you have to make sure you have your source files in the right place, else they won't be found.

EDIT
I made the directory 'build' in /lib/modules/5.15.148
Copied the contents of the module source into it.
Ran make, and off it goes. It is taking a while and not finished yet, but at least it is compiling.

I wasn't able to complete this - it slowed to a crawl then eventually seized up, so had to hit the power button.

No, I had not. I had perused PKGet and had installed both Git and Make from there, thought that was enough. I too had created the 'build' folder, and well, had begun getting a different error, which seemed at least a bit more like progress. It would read it and then complain with:

make[1]: Entering directory '/usr/lib/modules/5.15.148/build'
make[1]: *** No rule to make target 'Adapter'. Stop.
make[1]: Leaving directory '/usr/lib/modules/5.15.148/build'
make: *** [Makefile:2391: modules] Error 2

Which sort of makes sense if the folder is empty, I guess. By the way, I had dumped source in the 'build' folder and ran make from there as you had suggested, before installing the SFS's and albeit it seemed like it was compiling, I noticed ongoing errors while it ran, it was not writing changes. It was not really compiling it. Had to kill it as it ran for a while, which froze the PC. Did you manage to build it successfully in the end?

Anyway, looking around the forums, Barry suggested to someone back in 2020 to install both devx.sfs and kernel.sfs and run both from Main in order to run Make. Was not aware that was needed, so I did as you both suggested. Checked they ran at startup, no issues with that but I rather not just experiment by dumping source driver back into 'build' and hope for the best. Reverting did undo some of the JWM setup.

What is the actual procedure to compile with EasyOS? It should not really matter where the driver is downloaded at, if at least the Linux Header is up to date and you run make from that XYZ location. That reminds me, I had also installed the Linux 5.15.148 headers from PPM, so the fact that is not working is odd. Clearly, I am missing something but it is somewhat unique to EasyOS.

I did try to run make as I had tried in the very beginning but with both SFS's installed and got the exact same errors as back then.

So, what you are saying that with both SFS's installed that if I try again, by putting the source from github into the 'build' folder that it will run properly? Since nothing seems really different. I will look at the MAKEFILE and see if something is amiss later today or if I need to change something, as I should not have to put anything into 'build' for it to work. But I am at a bit of a loss since it works on the other OS without having to change anything. Thanks for your help though, it is appreciated.

Lastly, I am not sure if I am supposed to get this, but just as a sanity check, when I type which gcc on terminal, I get:

/bin/gcc

Is that what I am supposed to get in EasyOS? Read somewhere else in the forum that I would get a version number.


Re: MediaTek Wifi Driver Issue

Posted: Fri Mar 15, 2024 3:34 pm
by hnw
Caramel wrote: Thu Mar 14, 2024 8:40 am

Waiting for a response from a more experienced forum, I suggest you to copy the module compiled for Q4OS to EasyOS. With luck, it could be works.

Apparently according to the github page, this module is cfg80211.ko. In Q4OS. It is probably located somewhere in a subdirectory of the /lib/modules directory.
Copy the module to /usr/lib/modules/"lastest kernel"/kernel ( lastest kernel is 5.15.148 in the case EasyOS 5.7). Reboot and test.

Hi, Caramel, thank you for the suggestion. Tried looking at the Q4OS partition and simply could not find it from within EasyOS, there are just too many folders within 2 kernels there and the Find option is quirking out. I am currently troubleshooting a couple of things and would have to wait until I dual-boot into Q4 for a more in-depth search.

Plus, I think both OS's are built with different kernels, so the compiled Module on Q4, as far as I am aware is unlikely to just work via copy/paste into EasyOS, but please, correct me if I am wrong if you know better. I had already tried merely copying the already compiled source after applying make, not the module, from within Q4 and it failed just as a fresh download from Git had. Suggesting that the issue is with EasyOS.


Re: MediaTek Wifi Driver Issue

Posted: Fri Mar 15, 2024 5:49 pm
by Caramel
hnw wrote: Fri Mar 15, 2024 3:34 pm

Tried looking at the Q4OS partition and simply could not find it from within EasyOS, there are just too many folders within 2 kernels there and the Find option is quirking out. I am currently troubleshooting a couple of things and would have to wait until I dual-boot into Q4 for a more in-depth search.

Plus, I think both OS's are built with different kernels, so the compiled Module on Q4, as far as I am aware is unlikely to just work via copy/paste into EasyOS, but please, correct me if I am wrong if you know better. I had already tried merely copying the already compiled source after applying make, not the module, from within Q4 and it failed just as a fresh download from Git had. Suggesting that the issue is with EasyOS.

In Q4OS the modules are probably in /usr/lib/modules/"number of the last kernel"/kernel/drivers/net/wireless. (it's the location for such modules in MX Linux).

There is effectively a risk the modules do not work in EasyOS specially if the numbers of the kernels are too different (in EasyOS 5.7 the kernel is 5.15.148 (the command "uname -a" gives this number)

To test you have to copy the modules (a difficulty is to know which one) in /usr/lib/modules/"number of the kernel of EasyOS"/kernel/drivers/net/wireless
(The modules could be in a subdirectory of the directory wireless in Q4OS)

To compile in Easy, you need to install devx.sfs with SFSGet

Edit : I will try the compilation with the indications given above by @Keef
Edit 2 : not work


Re: MediaTek Wifi Driver Issue

Posted: Fri Mar 15, 2024 6:56 pm
by hnw
Caramel wrote: Fri Mar 15, 2024 5:49 pm

In Q4OS the modules are probably in /usr/lib/modules/"number of the last kernel"/kernel/drivers/net/wireless. (it's the location for such modules in MX Linux).

There is effectively a risk the modules do not work in EasyOS specially if the numbers of the kernels are too different (in EasyOS 5.7 the kernel is 5.15.148 (the command "uname -a" gives this number)

To test you have to copy the modules (a difficulty is to know which one) in /usr/lib/modules/"number of the kernel of EasyOS"/kernel/drivers/net/wireless
(The modules could be in a subdirectory of the directory wireless in Q4OS)

To compile in Easy, you need to install devx.sfs with SFSGet

Edit : I will try the compilation with the indications given above by @Keef
Edit 2 : not work

Hi. The issue was just finding the exact file as to parse the right folder. I am on Q4OS now and found it easily. Now, the question is whether it will work. Currently, I can't be switching back and forth since I have to do a bit of other stuff.

Needless to say, I got the folder in question and will be placing it in EasyOS a bit later since Easy's folders are encrypted. Main concern is the Q4OS distro is somewhat old, since I left it on a version that ran rather well, so you are right that it might not work.

I had tried to build before from source on EasyOS after reading Reef's suggestions and I too could not get it work. Even with Kernel and Devx installed. I am at a loss there, at least for now.

I guess, worse case scenario, if I cannot get it to work then I will have to switch to Anti-X eventually. Which would be too bad but the reality is that I have to run a cable to this machine for it to have internet when on Easy that is supposed to go into another PC. LOL.

Will report back either way.


Re: MediaTek Wifi Driver Issue

Posted: Fri Mar 15, 2024 9:28 pm
by Keef

I had to abandon the compile on EasyOS as it froze. As you noted, there was no output files to be found anywhere while the compile was running, but no error messages either. For comparison I tried it in the same way on Fatdog. Again, 'make' worked without any producing errors. Ran quicker, but eventually began to stutter then froze the laptop. No signs of anything being built while it was running either. Does exactly the same whether the kernel headers are loaded or not (this is with a newer kernel 6.1.46).


Re: MediaTek Wifi Driver Issue

Posted: Sat Mar 16, 2024 7:55 am
by BarryK

@hnw
You seem to have figured out that the devx and the kernel source sfs's need to be loaded.
This is the same as all puppies.

In EasyOS, you click on the "pkg" icon on the desktop then choose "SFSget" then download the two sfs's.
...install both of them to the main filesystem, not in a container.

As Easy does not support sfs load-on-the-fly, as some other pups do, you have to reboot.

There is a webpage that explains basics of compiling in EasyOS:

https://easyos.org/dev/coding-for-easyos.html


Re: MediaTek Wifi Driver Issue

Posted: Sat Mar 16, 2024 10:07 am
by Caramel

There are other github pages for rll88x2bu (EDIT: English correction)

https://github.com/ivanovborislav/rtl88x2bu
https://github.com/kurahaupo/linux-rtl88x2bu
https://github.com/RinCat/RTL88x2BU-Linux-Driver
https://github.com/morrownr/88x2bu-20210702 (the most active)
https://github.com/farribeiro/rtl88x2bu

They all provided source for dkms install (but different readme). The compilation when dkms is not installed (as in EasyOS Kirkstone) seems complicated. (EDIT : BAD ASSUMPTION, dkms is not the problem)

I have started to try to compile (with the easy kernel 5.15.148) in MX Linux (where dkms is installed). So far I haven't had any results.


Re: MediaTek Wifi Driver Issue

Posted: Sat Mar 16, 2024 2:50 pm
by BologneChe

Re: MediaTek Wifi Driver Issue

Posted: Sat Mar 16, 2024 4:06 pm
by Caramel
Caramel wrote: Sat Mar 16, 2024 10:07 am

I have started to try to compile (with the easy kernel 5.15.148) in MX Linux (where dkms is installed). So far I haven't had any results.

Still problems to "install" the Easy Kernel in MX Linux

The dkms compilation for MX Linux kernels has worked.

These are modules (same name for both 88x2bu.ko) for the older and the newer kernels (of MX Linux) (There is little difference between numbers)

For kernel 6.1.0-10-amd64
https://www.swisstransfer.com/d/740a948 ... 0153cd2ceb
For kernel 6.1.0-18-amd64
https://www.swisstransfer.com/d/ecc95be ... 1ef3d768e0

@hnw, choose one of these 2 modules. Copy it to /usr/lib/modules/5.15.148/kernel/drivers/net /wireless in EasyOS 5.7
Reboot and test. If it do not work, verify if the module was loaded (type lsmod | grep 88x2bu in terminal (if no result to this command, the module is not loaded) or use EasyBootManager)
If the module was not loaded, open Easy Boot Manager (Files Menu or bootmanager in terminal) (or command insmod in terminal) to add 88x2bu at boot. (EDIT: Correction)

If it yet not works, the module is ineffective, you can delete it.


Re: MediaTek Wifi Driver Issue

Posted: Sat Mar 16, 2024 6:45 pm
by hnw
Keef wrote: Fri Mar 15, 2024 9:28 pm

I had to abandon the compile on EasyOS as it froze. As you noted, there was no output files to be found anywhere while the compile was running, but no error messages either. For comparison I tried it in the same way on Fatdog. Again, 'make' worked without any producing errors. Ran quicker, but eventually began to stutter then froze the laptop. No signs of anything being built while it was running either. Does exactly the same whether the kernel headers are loaded or not (this is with a newer kernel 6.1.46).

I see. So, more or less the same as me. Yeah, it seems to be an issue with EasyOS. The funny thing, when I lsusb the hardware is found:

Bus 001 Device 004: ID 0b05:184c ASUSTek Computer, Inc. 802.11ac NIC

The issue is that there is no way to start it nor so far a way to actually put make the drive. Someone suggested that I simply copy the already compiled drivers from the Q4OS install. Which I did, rebooted, twice now to be sure, and albeit I perceive the Modules line take a bit longer while loading the first time, there is no way to actually 'turn on' the adapter.

When I inxi -Nni I get this result.

Network: Card-1: Broadcom and subsidiaries NetXtreme BCM5754 Gigabit Ethernet PCI Express
driver: tg3
IF: eth0 state: down mac: 00:1e:4f:ef:b8:c4
Card-2: ASUSTek 802.11ac NIC
IF: null-if-id state: N/A mac: N/A
WAN IP: None Detected! IF: eth0 ip-v4: N/A


Re: MediaTek Wifi Driver Issue

Posted: Sat Mar 16, 2024 7:20 pm
by hnw

@BarryK

Hi Barry, nice to make your e-acquaintance. I really like your EasyOS project.

Yes, I did all of that already. Installed both SFS's. Both on main. Ran, seemingly with no issues. Updated headers as well. Driver will still not compile via "make."

I looked at the link you provided, thank you. I am not going to claim that I am doing the thing correctly, however, I tried following the instructions and I get the below error during STEP 4 of the 'make' script and albeit it seems it continues onto STEP 5, I am sure that it is not populated correctly as to run anything. Albeit I am not sure of how to interact with the end result in a way that I can provide more insight. This is however no too different than the usual errors I got while doing the regular 'make' procedure before I posted in the forum and after I installed the SFSs.

install -p -m 644 88x2bu.ko /lib/modules/5.15.148/kernel/drivers/net/wireless/
install: cannot stat '88x2bu.ko': No such file or directory
make: *** [Makefile:2400: install] Error 1

Worth noting that while attempting the importing of the drivers from the Q4OS install into EasyOS as @Cinnamon had suggested as a possible solution that there is, in fact, a 88x2bu.ko in that folder while the error above suggests otherwise. Not that I think that the script is actively looking for it. It is just amusing.

Even with both SFS's installed, 'make' does not compile the driver. Which I have now downloaded multiple version from multiple different github projects.
Also worth noting, as I noted above this post that if I do a 'lsusb,' the system does find the Wifi adapter. It just can't see it otherwise in order to interact with it.

A ifconfig wlan0 up will read:

ifconfig: SIOCGIFFLAGS: No such device


Re: MediaTek Wifi Driver Issue

Posted: Sat Mar 16, 2024 8:08 pm
by hnw
Caramel wrote: Sat Mar 16, 2024 10:07 am

There another github pages for rll88x2bu...

They all provided source for dkms install (but different readme). The compilation when dkms is not installed (as in EasyOS Kirkstone) seems complicated.

I have started to try to compile (with the easy kernel 5.15.148) in MX Linux (where dkms is installed). So far I haven't had any results.

Thank you for the links. I had tried with multiple versions of the driver before posting, since while doing research it seemed that perhaps different results could be achieved depending on driver source/build. I tried specifically from:

https://github.com/RinCat/RTL88x2BU-Linux-Driver
https://github.com/morrownr/88x2bu-20210702 (the most active)

On top of the one I linked in OP, which is the one that I use on Q4OS. So that makes for 5-6 drivers from 3 different projects. The only difference being that the MakeFile error number is different on each, yet all glitching out with an Error 2, while giving an Error 1 if a try a 'make install' on some.

The main difference I have noticed is that in a one, if I did a 'make install.' I would not get an error, per se, I would get the following:

install -p -m 644 88x2bu.ko /lib/modules/5.15.148/kernel/drivers/net/wireless/
/sbin/depmod -a 5.15.148

Then it would hang and go back to the prompt.
It seems the convergence issue is EasyOS. I am not sure on how to proceed here though. When you said that you were not getting any results with dkms, would you mind giving more details? Were you getting any errors?

Cheers.


Re: MediaTek Wifi Driver Issue

Posted: Sun Mar 17, 2024 7:48 am
by Caramel

The following may be stupid :

When trying to integrate the sources of the kernel 5.15.148 in MX Linux to compile there, i realized that the sources are not available in easy.sfs nor in the devx.sfs.

The sources are available on ibiblio.org:
https://distro.ibiblio.org/easyos/sourc ... -20240203/
There is a help page bk-readme.htm that explains how to compil the kernel.
I think it is necessary to execute the first script (1kernel.sh) to install the sources. I still need to think and test


Re: MediaTek Wifi Driver Issue

Posted: Tue Mar 19, 2024 7:18 am
by Caramel
Caramel wrote: Sun Mar 17, 2024 7:48 am

The following may be stupid :

When trying to integrate the sources of the kernel 5.15.148 in MX Linux to compile there, i realized that the sources are not available in easy.sfs nor in the devx.sfs.

The sources are available on ibiblio.org:
https://distro.ibiblio.org/easyos/sourc ... -20240203/
There is a help page bk-readme.htm that explains how to compil the kernel.
I think it is necessary to execute the first script (1kernel.sh) to install the sources. I still need to think and test

I launched 1kernel.sh. After the patching of the sources, the compil started. It was very long. I interrupted the script before the installation of the new compiled kernel by Ctrl+C (There is a pause with prompt before the installation)
Now I have a very huge directory (/usr/src/linux-56.15.148) (2GB) with complete source. (At least I'm sure nothing is missing!)

I created a symlink (named build) to the sources in /lib/modules

ln -s /usr/src/linux-5.15.148 /usr/lib/modules/5.15.148/build

The compilation worked, this is the file 88xbu.ko to place in /lib/modules/5.15.148/kernel/drivers/net/wireless/ and test
https://www.swisstransfer.com/d/58667ff ... fea9970e4c

EDIT
v5.13.1 (https:github.com/morrownr/88x2bu-20210702)
https://www.swisstransfer.com/d/987e478 ... eac02cd68f

EDIT FOR NOOBS LIKE ME :
To be able to use the module, execute depmod.


Re: MediaTek Wifi Driver Issue

Posted: Thu Apr 11, 2024 6:33 pm
by hnw

The compilation worked, this is the file 88xbu.ko to place in /lib/modules/5.15.148/kernel/drivers/net/wireless/ and test
https://www.swisstransfer.com/d/58667ff ... fea9970e4c

EDIT
v5.13.1 (https:github.com/morrownr/88x2bu-20210702)
https://www.swisstransfer.com/d/987e478 ... eac02cd68f

EDIT FOR NOOBS LIKE ME :
To be able to use the module, execute depmod.

Hi @Caramel. Apologies for the long delay in response. Life got in the way along the planning of an out of town trip for the recent eclipse. Which I just got back yesterday.

I tried the 5.13.1 build, checked around a few things on Terminal, and everything seemed fine. Rebooted and it just worked. It is working perfectly. I appreciate the amount of time you clearly spent helping me. I am so glad that I get to keep EasyOS. Since I really like it and it would have been a shame if I could not make the Wifi work on it. Thank you very much.

Cheers!