Jump to content
Read the Funtoo Newsletter: Summer 2023 ×
  • 0

addwifi failure


llogg

Question

I've been using Linux for years but never a source-based distro.  Going through the installation guide when I got to the step of

# addwifi -S wpa -K 'wifipassword' mywifinetwork

I received an error message as follows:

Traceback (most recent call last):
File "/usr/sbin/addwifi", line 164, in <module>
main()
File "/usr/sbin/addwifi:, line 144 in main
check_call(['rfkill','unblock','wlan','wifi'])
File "/usr/lib64/python3.3/subprocess.py", line 542, in check_call
retcode = call(*popenargs, **kwargs)
File "/usr/lib64/python3.3/subprocess.py", line 523, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib64/python3.3/subprocess.py", line 819, in __init__
restore_signals start_new_session)
File "/usr/lib64/python3.3/subprocess.py", line 1448, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'rfkill'

Some googling and forum searches suggested that being in the chroot environment might preclude addwifi from working, however when I boot to the terminal (which goes without error) I get the same error.  I have also confirmed that dbus and the network manager service was running.  Any suggestions on how to further troubleshoot this?  Can't try it right now, because don't have my bootable USB to get into a chroot, but do I need to emerge rfkill?

 

My hardware is a Lenovo U310, Intel C210 series chipset, Core i5 CPU, Network controller is intel centrino wireless-n 2200.  Thanks in advance.

 

EDIT:

Found this.  Not sure what is meant by

 

enable the correct ACPI/WMI driver for your notebook first (CONFIG_HP_WMI?).

but that might be the solution as well.

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

Thanks for the suggestion.  I think the driver is installed and loaded but not sure.

# lsmod | grep wifi
iwlwifi    87837  1  iwldvm
cfg80211   412130  3  iwlwifi,mac80211,iwldvm

I did chroot from a live usb and emerge rfkill.  Now after rebooting and running the addwifi command I get a different error:

Error: Connection activation failed: Device not managed by NetworkManager or unavailable

rfkill list returned two entries, neither of which was soft or hard blocked.

Link to comment
Share on other sites

  • 0

Thanks for the suggestion.  I think the driver is installed and loaded but not sure.

# lsmod | grep wifi
iwlwifi    87837  1  iwldvm
cfg80211   412130  3  iwlwifi,mac80211,iwldvm
I did chroot from a live usb and emerge rfkill.  Now after rebooting and running the addwifi command I get a different error:

Error: Connection activation failed: Device not managed by NetworkManager or unavailable
rfkill list returned two entries, neither of which was soft or hard blocked.

 

If you are using a chroot, you don't need to configure the wifi network inside it, just copy your local /etc/resolv.conf to ${FUNTOO_CHROOT_DIR}/etc/resolv.conf, or if you know what that file is for  make sure you have some dns servers in there.

 

When in the chroot, just make sure you build your kernel modules needed for your card, if you build debian-sources kernel, you are more likely OK.

After you leave the chroot, and reboot, use only one network manager, wicd , NetworkManager, etc.., if you will use NetworkManager and you don't have a GUI you can use nmcli, I use it that way, a quick list of commands for managing wifi trough nmcli:

nmcli c s # connection status
nmcli d # list devices
nmcli d w l  # list wifi connections available (SSID,BSSID, etc)
nmcli d w c [SSID] password <password> # connect to a network password can be eg. WPA2 or WEP 
if you need more help after rebooting, save and paste here after a log of:

ifconfig -a
# or better
ip a # you will have to install iproute2 in the chroot for that
cat /proc/net/wireless
cat /proc/net/dev
emerge --info [network_manager_installed]
Link to comment
Share on other sites

  • 0

Thanks. If I wasn't clear I did try the add wifi command after rebooting, not in the chroot. I did build the debian-sources kernel. As far as I know I only have Network Manager in use. Will try nmcli commands and report back. Thanks for your help.

Link to comment
Share on other sites

  • 0
# nmcli d
DEVICE    TYPE             STATE
wlan0     802-11-wireless  unavailable
eth0      802-3-ethernet   unavailable

Will edit with output of other commands after chrooting from liveUSB to have network connection for copy paste.

 

EDIT TO ADD

That does not seem like it would be helpful after looking at the output it is the info from the liveUSB system that is not relevant.  Will have to type it out by hand.

#ifconfig -a
eth0     Link encap:Ethernet  HWaddr 04:7d:7b:e8:da:0d
         UP BROADCAST MULTICAST  MTU:1500  Metric:1
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0
         TX packets:0 errors:0 dropped:0 overruns:0 frame:0
         collisions:0 txqueuelen:1000
         RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo       Link encap:Local Loopback
         inet addr:127.0.0.1  Mask:255.0.0.0
         inet6 addr: ::1/128 Scope:Host
         UP LOOPBACK RUNNING MTU:65536 Metric:1
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0
         TX packets:0 errors:0 dropped:0 overruns:0 frame:0
         collisions:0 txqueuelen:1000
         RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0    Link encap:Ethernet  HWaddr 9c:4e:36:37:37:04
         UP BROADCAST MULTICAST  MTU:1500  Metric:1
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0
         TX packets:0 errors:0 dropped:0 overruns:0 frame:0
         collisions:0 txqueuelen:1000
         RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
# cat /proc/net/wireless

Interface| status | Quality          | Discarded packets          | Missed | WE
         |        | link level noise | nwid crypt frag retry misc | beacon | 22

#cat /proc/net/dev

Interface | Receive                                                 | Transmit
          | bytes packets errs drop fifo frame compressed multicast | bytes packets errs drop fifo colls carrier compressed
eth0:
lo:
wlan0:

There are 0s across the board for all three interfaces.

emerge --info net-misc/networkmanager

Returns too much info.  Will have to output it to a file somehow and pastebin it. EDIT: see attached file.  File did not attach.  Please see http://pastebin.com/hnpudReX for this info.  Thanks.

#ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2:  eth0: <NO_CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
     link/ether 04:7d:7b:e8:da:0d brd ff:ff:ff:ff:ff:ff
3:  wlan0: <NO_CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
     link/ether 9c:4e:36:37:37:04 brd ff:ff:ff:ff:ff:ff
Link to comment
Share on other sites

  • 0

...

emerge --info net-misc/networkmanager
Returns too much info.  Will have to output it to a file somehow and pastebin it. EDIT: see attached file.  File did not attach.  Please see http://pastebin.com/hnpudReX for this info.  Thanks.

 

I see at the bottom of that, the USE flags used for building, and there is '-wifi', wich means the NetworManager you compiled doesn't have wifi capabilities, since you seem to be new to portage, I'll explain you some stuff, but refer to 'man 5 portage' to learn more about portage's configuration files.

 

You can enable wireless for NetworkManager either adding 'wifi' to the USE variable in /etc/portage/make.conf,

...
USE="... wifi "
...

or for using wifi only for networkmanager, add this line in /etc/portage/package.use (You can create this file, if you don't have it yet):

net-misc/networkmanager wifi

After any of those, remerge networkmanager with 'emerge -av net-misc/networkmanager' , this will show you the USE flags portage will use to build, check wifi is used, and let it build again, this should fix your problem.

Also, what flavor did you use, when selecting a profile with 'eselect profile'? I think if you use a workstation or desktop flavor, wifi USE flag is enabled by default, but I'm not sure about this, I'll check later.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...