LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-15-2018, 07:21 PM   #1
deretsigernu
Member
 
Registered: May 2007
Distribution: Slackware 14.2/-current
Posts: 185

Rep: Reputation: 13
Realtek 8821ce wireless driver install fail


I'm trying to set up dual boot with Windows 10 and Slackware 14.2 (more problems later). I'm in kernel 4.4.14-smp. The machine is a new Asus Vivobook X54OU. It uses a Realtek 8821ce wireless chip, which apparently isn't part of Slackware's install. I read that I can download some help here:
https://github.com/endlessm/linux/tr...less/rtl8821ce

I download the zip and transfer it to the laptop (it doesn't have ethernet) and changed the Makefile to refer to the correct directory. When I
Code:
make
I get the following output:
Quote:
make ARCH=i386 CROSS_COMPILE= -C /lib/modules/4.4.14-smp/build M=/tmp/StoreNGo/rtl8821ce modules
make[1]: Entering directory '/usr/src/linux-4.4.14'
CC [M] /tmp/StoreNGo/rtl8821ce/core/rtw_code.o
In file included from /tmp/StoreNGo/rtl8821ce/include/drv_types.h:32:0,
from /tmp/StoreNGo/rtl8821ce/core/rtw_cmd.c:22:
/tmp/StoreNGo/rtl8821ce/include/osdep_serice.h:47:33 fatal error: linux/sched/signal.h: No such file or directory
compilation terminated.
scripts/Makefile.build:258: recipe for target '/tmp/StoreNGo/rtl8821ce/core/rtw_cmd.o' failed
make[2] *** [/tmp/StoreNGo/rtl8821ce/core/rtw_cmd.o] Error 1
Makefile:1385: recipe for target '_module_/tmp/StoreNGo/rtl8821ce' failed
make[1] *** [_module_/tmp/StoreNGo/rtl8821ce] Error 2
make[1] Leaving directory '/usr/src/linux-4.4.14'
Makefile:1902: recipe for target 'modules' failed
make: *** [modules] Error 2
Code:
lspci
Quote:
02:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device c821
I don't understand the error messages. How do I get the driver installed and working?
 
Old 09-15-2018, 07:40 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,337
Blog Entries: 28

Rep: Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144
It looks to me as if this is the first error.

Quote:
/tmp/StoreNGo/rtl8821ce/include/osdep_serice.h:47:33 fatal error: linux/sched/signal.h: No such file or directory
compilation terminated.
You're missing a dependency called linux/sched/signal.h. The following errors may be the result of the first error.

There's a RealTek driver at Slackbuilds, but I'm not sure its for your chipset: https://slackbuilds.org/repository/1...search=realtek
 
Old 09-15-2018, 08:20 PM   #3
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,634

Rep: Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929
@deretsigernu
You'll need to patch:
https://github.com/endlessm/linux/bl...sdep_service.h
Change:
Code:
#ifdef PLATFORM_LINUX
	#include <linux/sched/signal.h>
	#include <osdep_service_linux.h>
#endif
to
Code:
#ifdef PLATFORM_LINUX
	#include <linux/signal.h>
	#include <osdep_service_linux.h>
#endif
signal.h has been moved from its actual (older kernel) place in:
/usr/src/linux-4.4.14/include/linux/
to:
/usr/src/linux-NEWER-KERNELS/include/linux/sched/

Reference:
https://github.com/torvalds/linux/tr...de/linux/sched
https://stackoverflow.com/questions/...older-is-empty
 
1 members found this post helpful.
Old 09-16-2018, 10:37 AM   #4
deretsigernu
Member
 
Registered: May 2007
Distribution: Slackware 14.2/-current
Posts: 185

Original Poster
Rep: Reputation: 13
I've never patched a kernel before and I'm confused. Does patching mean that I have to find a newer version of 4.4.x, like 4.4.156 or that I'm supposed to look for 4.x, where x is a later version?
 
Old 09-16-2018, 12:01 PM   #5
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,634

Rep: Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929
You don't need to patch the kernel, only one file (hopefully) from the driver you downloaded. This driver was recently modified to match the modifications that were made for some file locations in newer kernels, past 4.4.153.
You said:
Quote:
I download the zip and transfer it to the laptop (it doesn't have ethernet) and changed the Makefile to refer to the correct directory.
After you extract the zip file, look for the file:
/rtl8821ce/include/osdep_service.h
and modify it according to my previous post and run make after that.
 
2 members found this post helpful.
Old 09-16-2018, 04:34 PM   #6
deretsigernu
Member
 
Registered: May 2007
Distribution: Slackware 14.2/-current
Posts: 185

Original Poster
Rep: Reputation: 13
Re: Realtek 8821ce wireless driver install fail

abga,

Thank you for explaining. I made that change and used "make" again. That led to a new group of messages:

Quote:
make ARCH=i386 CROSS_COMPILE= -C /lib/modules/4.4.14-smp/build M=/tmp/StoreNGo/rtl8821ce modules
make[1]: Entering directory '/usr/src/linux-4.4.14'
CC [M] /tmp/StoreNGo/rtl8821ce/core/rtw_code.o
In file included from /tmp/StoreNGo/rtl8821ce/include/include/osdep_service.h:48:0,
from /tmp/StoreNGo/rtl8821ce/include/include/drv_types.h:32,
from /tmp/StoreNGo/rtl8821ce/core/rtw_cmd.c:22:
/tmp/StoreNGo/rtl8821ce/include/osdep_service_linux.h: In function '_init_timer':
/tmp/StoreNGo/rtl8821ce/include/osdep_service_linux.h:294:2: error: implicit declaration of function 'timer_setup' [-Werror=implicit-function-declaration]
timer_setup(ptimer, pfunc, 0);
^
cc1: some warnings being treated as errors
scripts/Makefile.build:258: recipe for target '/tmp/StoreNGo/rtl8821ce/core/rtw_cmd.o' failed
make[2] *** [/tmp/StoreNGo/rtl8821ce/core/rtw_cmd.o] Error 1
Makefile:1385: recipe for target '_module_/tmp/StoreNGo/rtl8821ce' failed
make[1] *** [_module_/tmp/StoreNGo/rtl8821ce] Error 2
make[1] Leaving directory '/usr/src/linux-4.4.14'
Makefile:1902: recipe for target 'modules' failed
make: *** [modules] Error 2
I opened up the ~osdep_service.h, ~drv_types.h, and ~osdep_service_linux.h files. I don't understand what the respective lines in those files mean. They seems to refer to the file before. It looks to me like the current error has to do with a timer that was called, but I don't understand the purpose of the timer or what is wrong with it.
 
Old 09-16-2018, 05:15 PM   #7
jostber
Member
 
Registered: Jul 2001
Location: Skien, Norway
Distribution: Slackware Current 64-bit
Posts: 543

Rep: Reputation: 178Reputation: 178
You might need to install kernel 4.15:

https://unix.stackexchange.com/quest...inux-mint-18-2
 
Old 09-17-2018, 08:09 AM   #8
deretsigernu
Member
 
Registered: May 2007
Distribution: Slackware 14.2/-current
Posts: 185

Original Poster
Rep: Reputation: 13
Thank you, jostber. I looked on kernel.org and there is no 4.15. There is 4.14.x, then 4.17.x. I wonder how the writer in the link you point to had a 4.15 to reference.

Last edited by deretsigernu; 09-17-2018 at 08:09 AM. Reason: fix version
 
Old 09-17-2018, 09:34 AM   #9
jostber
Member
 
Registered: Jul 2001
Location: Skien, Norway
Distribution: Slackware Current 64-bit
Posts: 543

Rep: Reputation: 178Reputation: 178
Kernel 4.15 was released this January so you should use v. 4.18.8 as the most recent stable one now.

https://www.linuxquestions.org/quest...ml#post5903631

You have different kernels for Slackware from 4.15 to 4.18 here:

https://dusk.idlemoor.tk/

Last edited by jostber; 09-17-2018 at 09:35 AM.
 
Old 09-17-2018, 04:49 PM   #10
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,634

Rep: Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929
Quote:
Originally Posted by deretsigernu View Post
abga,

Thank you for explaining. I made that change and used "make" again. That led to a new group of messages:
...
cc1: some warnings being treated as errors
...

I opened up the ~osdep_service.h, ~drv_types.h, and ~osdep_service_linux.h files. I don't understand what the respective lines in those files mean. They seems to refer to the file before. It looks to me like the current error has to do with a timer that was called, but I don't understand the purpose of the timer or what is wrong with it.
Sorry for the late reply, pretty busy these days.

You can try editing the Makefile:
https://github.com/endlessm/linux/bl...821ce/Makefile
and remove:
Code:
#EXTRA_CFLAGS += -Werror
and give it another try with make. Well, run "make clean" before starting another "make".

Or, as suggested by some other users, try a newer kernel that already contains the required 8821ce driver (haven't checked if it's already included or in which version it was introduced). You might want to try a community compiled kernel - ask for guidance in this thread:
https://www.linuxquestions.org/quest...se-4175597503/
 
Old 09-18-2018, 07:49 PM   #11
deretsigernu
Member
 
Registered: May 2007
Distribution: Slackware 14.2/-current
Posts: 185

Original Poster
Rep: Reputation: 13
Hi. I got the newest kernel and tried again. Here is the history reprinted
Code:
cd /tmp
tar -xvf linux-4.18.8.tar.xz 
rm linux
mv linux-4.18.8 /usr/src
cd /usr/src/linux-4.18.8/
cd ..
ls
ln -s linux-4.18.8 linux
zcat /proc/config.gz > /usr/src/linux/.config
cd /usr/src/linux
ls
make oldconfig
make xconfig
make clean
make all
And this is the result:

Quote:
bash-4.3# make all
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/bin2c
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf --silentoldconfig Kconfig
#
# configuration written to .config
#
HOSTCC arch/x86/tools/relocs_32.o
HOSTCC arch/x86/tools/relocs_64.o
HOSTCC arch/x86/tools/relocs_common.o
HOSTLD arch/x86/tools/relocs
CHK include/config/kernel.release
Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR: -fstack-protector not supported by compiler
Makefile:1114: recipe for target 'prepare-compiler-check' failed
make: *** [prepare-compiler-check] Error 1
I went to the Makefile to see if I could edit out the
Code:
#EXTRA_CFLAGS += -Werror
but couldn't find the line:

Code:
less Makefile | grep Werror
returns nothing.

and


Code:
less Makefile | grep "#EXTRA_CFLAGS += -Werror"
Quote:
-Werror-implicit-function-declaration \
KBUILD_CFLAGS += $(call cc-option,-Werror=implicit-int)
KBUILD_CFLAGS += $(call cc-option,-Werror=strict-prototypes)
KBUILD_CFLAGS += $(call cc-option,-Werror=date-time)
KBUILD_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types)
KBUILD_CFLAGS += $(call cc-option,-Werror=designated-init)
which isn't helpful from my inexperienced perspective.
 
Old 09-18-2018, 10:07 PM   #12
jostber
Member
 
Registered: Jul 2001
Location: Skien, Norway
Distribution: Slackware Current 64-bit
Posts: 543

Rep: Reputation: 178Reputation: 178
In addition to the new kernel you must also install the driver, ref. to this article:

https://nova.moe/solve-realtek-rtl88...ver-on-fedora/

Check the endlessm repo.
 
Old 09-18-2018, 10:46 PM   #13
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,634

Rep: Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929
@deretsigernu

In post #10 I advised you to remove the line "#EXTRA_CFLAGS += -Werror" from /rtl8821ce/Makefile and start the driver compilation again. Removing that line from the makefile will instruct the compiler to not treat warnings as errors, which was the cause of your build failure reported in post #6:
Code:
cc1: some warnings being treated as errors
I also said that I don't know (didn't check) if the 8821ce driver is already available in the newer kernels. If it's not and if this driver is your only issue, then you can stick with the kernel Slackware is providing (4.4.14) and adapt the driver as suggested in post #3 & #5

To sum up, focus only on the driver (the zip file you downloaded) and follow my hints from post #3,#5(clarification) and #10

Last edited by abga; 09-18-2018 at 10:48 PM. Reason: too many # :)
 
Old 09-22-2018, 08:46 PM   #14
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,634

Rep: Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929Reputation: 929
@deretsigernu

I respect your ambition (and potential learning experience) in compiling your own kernel, but I don't really understand why you started a new thread related to the actual driver issue and for a newer kernel didn't follow what I suggested in post #10 about the community provided ones.
https://www.linuxquestions.org/quest...el-4175638931/

Back to your driver issue, have you tried what I advised you in my latest post? Is that endlessm rtl8821ce driver still failing to build under 4.4.14?

I remember helping a fellow Slacker with the BT part of the rtl8821ce driver recently and the working driver was not from endlessm but the official one from Realtek, found on an Ubuntu bug-track list.
I searched again and found the actual WiFi driver:
https://bugs.launchpad.net/ubuntu/+s...m/+bug/1740231
File: rtl8821CE_WiFi_linux_v5.2.5.1_26055.20180108_COEX20170310-1212.tar.gz

I just built it under Slackware 14.2 - kernel 4.4.157 and it looks OK, at least by simulating its use, since I don't own a rtl8821ce adapter.
Extracted the tarball, ran make & make install:
Code:
root@XXX:/kit/lq/rtl8821CE_WiFi_linux_v5.2.5.1_26055.20180108_COEX20170310-1212# make -j 4 V=1
....
ld -r -m elf_x86_64  -z max-page-size=0x200000 -T ./scripts/module-common.lds --build-id  -o /kit/lq/rtl8821CE_WiFi_linux_v5.2.5.1_26055.20180108_COEX20170310-1212/8821ce.ko /kit/lq/rtl8821CE_WiFi_linux_v5.2.5.1_26055.20180108_COEX20170310-1212/8821ce.o /kit/lq/rtl8821CE_WiFi_linux_v5.2.5.1_26055.20180108_COEX20170310-1212/8821ce.mod.o
make[1]: Leaving directory '/usr/src/linux-4.4.157'

root@XXX:/kit/lq/rtl8821CE_WiFi_linux_v5.2.5.1_26055.20180108_COEX20170310-1212# make install
install -p -m 644 8821ce.ko  /lib/modules/4.4.157/kernel/drivers/net/wireless/
/sbin/depmod -a 4.4.157

root@XXX:/kit/lq/rtl8821CE_WiFi_linux_v5.2.5.1_26055.20180108_COEX20170310-1212# modinfo 8821ce
filename:       /lib/modules/4.4.157/kernel/drivers/net/wireless/8821ce.ko
version:        v5.2.5_1.26055.20180108
author:         Realtek Semiconductor Corp.
description:    Realtek Wireless Lan Driver
license:        GPL
srcversion:     71C3F440FD119729D6C49E2
alias:          pci:v000010ECd0000C82Bsv*sd*bc*sc*i*
alias:          pci:v000010ECd0000C82Asv*sd*bc*sc*i*
alias:          pci:v000010ECd0000C821sv*sd*bc*sc*i*
depends:        cfg80211
retpoline:      Y
vermagic:       4.4.157 SMP mod_unload 
...

root@XXX:/kit/lq/rtl8821CE_WiFi_linux_v5.2.5.1_26055.20180108_COEX20170310-1212# modprobe 8821ce
-- kernel loading the driver:
[  618.181822] 8821ce: loading out-of-tree module taints kernel.
[  618.189330] RTW: module init start
[  618.189333] RTW: rtl8821ce v5.2.5_1.26055.20180108
[  618.189337] RTW: rtl8821ce BT-Coex version = COEX20170310-1212
[  618.189379] RTW: module init ret=0
[  618.276625] cfg80211: World regulatory domain updated:
[  618.276630] cfg80211:  DFS Master region: unset
[  618.276632] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
...
P.S.
8821ce BT thread:
https://www.linuxquestions.org/quest...lp-4175628305/

Last edited by abga; 09-22-2018 at 09:36 PM. Reason: P.S. + format
 
1 members found this post helpful.
Old 09-23-2018, 07:05 PM   #15
deretsigernu
Member
 
Registered: May 2007
Distribution: Slackware 14.2/-current
Posts: 185

Original Poster
Rep: Reputation: 13
abga,

I appreciate your patience and help so far. I deleted the line in the Realtek Makefile that referred to the "#EXTRA_CFLAGS += -Werror". I also made the edit you suggested for the line in /rtl8821ce/include/osdep_service.h that said to change "linux/sched/signal.h" to "linux/signal.h". Then I used "make clean" and then "make". I'm doing this inside the /tmp directory where the file was extracted as root. When I use "make", I get the following:
Quote:
make ARCH=i386 CROSS_COMPILE= -C /lib/modules/4.4.14-smp/build M=/tmp/StoreNGo/rtl8821ce modules
make[1]: Entering directory '/usr/src/linux-4.4.14'
CC [M] /tmp/StoreNGo/rtl8821ce/core/rtw_cmd.o
In file included from /tmp/StoreNGo/rtl8821ce/include/osdep_service.h:48:0,
from /tmp/StoreNGo/rtl8821ce/include/drv_types.h:32,
from /tmp/StoreNGo/rtl8821ce/core/rtw_cmd.c:22,/tmp/StoreNGo/rtl882/tmp/StoreNGo/rtl8821ce1ce
/tmp/StoreNGo/rtl8821ce/include/osdep_service_linux.h: In function '_init_time':
/tmp/StoreNGo/rtl8821ce/include/osdep_service_linux.h:294:2 error: implicit declaration of function 'timer_setup' [-Werror=implicit-function=declaration]
timer_setup(ptimer, pfunc, 0);
^
cc1: some warnings being treated as errors
scripts/Makefile.build:258 recipe for target '/tmp/StoreNGo/rtl8821ce/core/trw_cmd.o' failed
(with a few more lines)
Because I was still getting errors around making this driver, I started looking at other options for dealing with the error/'stackprotector' flag and they seemed to indicate that I need a different kernel, thus my attempts at trying to build, or otherwise set up, a new kernel. From what I can tell, the newer kernels do not have support for Realtek 8821ce. I say this because when I went through the config process in the newer kernel (can't remember which one I tried now) before the actual make (which never succeeded for me) there was never any config question about 8821ce. So, I'm hoping if I can build/get a new kernel in place, I can try installing the driver there and have some success.

Once again, I appreciate your patience. I see that you have referred to an actual Realtek driver (which I tried to find at one point, but something didn't go right before I got all of this rolling) and will see if that works for me. I will post about that later.
 
  


Reply

Tags
wirelessnetworking



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Getting Realtek 8188EU Wireless Adapters to work in Linux (and possibly other wireless Realtek chipsets!) LXer Syndicated Linux News 0 02-04-2017 10:06 PM
How to install Realtek 8187SE wireless card driver in Open SUSE 11 amunzaa Linux - Newbie 3 06-17-2015 05:28 PM
Help getting a working Realtek wireless driver. ssenuta Linux - Hardware 5 02-04-2013 12:47 AM
Make Error (wireless realtek driver) rc nai Slackware 5 05-29-2011 08:40 PM
Need driver for Realtek Wireless Nic Dr_Zin Linux - Hardware 3 02-04-2008 11:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration