# [SOLVED] Has anyone got Wifi to work on Lenovo X1 Carbon?

## philip

HW is Intel Wireless 7260 

http://www.intel.com/content/www/us/en/wireless-products/dual-band-wireless-ac-7260-bluetooth.html

http://wireless.kernel.org/en/users/Drivers/iwlwifi

I run kernel 3.12.13-gentoo

dmesg gives 

[    8.073580] iwlwifi 0000:03:00.0: request for firmware file 'iwlwifi-7260-7.ucode' failed.

I use the latest firmware package from the gentoo tree:

sys-firmware/iwl7260-ucode

      Latest version available: 22.24.8.0

      Latest version installed: 22.24.8.0

      Size of files: 338 kB

      Homepage:      http://wireless.kernel.org/en/users/Drivers/iwlwifi

      Description:   Firmware for Intel (R) Dual Band Wireless-AC 7260

      License:       ipw3945

When i look into the directory where the firmware is installed I get

# ls /lib/firmware/

intel  iwlwifi-7260-8.ucode

The driver seems to look for iwlwifi-7260-7.ucode while the available firmware is iwlwifi-7260-8.ucode

Has anyone got a solution to this problem?

----------

## albright

can't really help but will report that my T440S with

intel 7260 works (Intel Corporation Wireless 7260 (rev 6b))

with .8 firmware

you can get .7 here:

http://wireless.kernel.org/en/users/Drivers/iwlwifi#Download

here's what they say on that page:

 *Quote:*   

> Intel® Wireless 7260    
> 
> 3.10+    iwlwifi-7260-ucode-22.1.7.0.tgz
> 
> 3.13+    iwlwifi-7260-ucode-22.24.8.0.tgz    
> ...

 

But I tried the .9 and it did not work even though I'm on 3.14 kernel

EDIT: out of curiousity I tried the .9 firmware with gentoo-sources-3.15.0-r1 and

it works fine for me on T440S

----------

## philip

Thanks albright,

I tried the 3.10+ iwlwifi-7260-ucode-22.1.7.0.tgz version and now my HW i detected!

# dmesg | grep iwlwifi

```
[    8.016007] iwlwifi 0000:03:00.0: loaded firmware version 22.1.7.0 op_mode 

iwlmvm

[    8.016024] iwlwifi 0000:03:00.0: Detected Intel(R) Dual Band Wireless AC 

7260, REV=0x144

[    8.016367] iwlwifi 0000:03:00.0: L1 Enabled; Disabling L0S

[    8.016881] iwlwifi 0000:03:00.0: L1 Enabled; Disabling L0S
```

A new interface has been created

# ifconfig -a 

```
wlp3s0: flags=4098<BROADCAST,MULTICAST>  mtu 1500

        ether 7c:7a:91:a3:2f:5a  txqueuelen 1000  (Ethernet)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 0  bytes 0 (0.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
```

But it is not recognized as a wireless interface.

( I have wpa_supplicant installed)

# iwconfig

```
enp0s25   no wireless extensions.

wlp3s0    no wireless extensions.

enp0s20u4  no wireless extensions.

lo        no wireless extensions.

sit0      no wireless extensions.
```

My configuration file of wpa_supplicant is configured as follows

# cat /etc/wpa_supplicant/wpa_supplicant.conf 

```
# The line below should not be changed. Otherwise wpa_supplicant will not work

ctrl_interface=/var/run/wpa_supplicant

# Allow users in the 'wheel' group tp control wpa_supplicant

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel

# Allow user-made changes to be saved (e.g. add networks)

# Ensure that only root can read the WPA configuration

ctrl_interface_group=0

#Let wpa_supplicant take care of scanning and AP selection

ap_scan=1

# A simple case: WPA-PSK, PSK, as an ASCII passphrase, allow all valid ciphers

network={

        ssid="simple"

        psk="very sectres passphrase"

        # The higher the priority the sooner we are matched

        priority=5

}
```

----------

## khayyam

 *philip wrote:*   

> 
> 
> ```
> # iwconfig
> 
> ...

 

philip ... wireless-tools (of which iwconfig is part) uses the now legacy WEXT (wireless extensions) and not NL80211/CFG80211/MAC80211 (netlink). If you want to use these tools you need to enable  CFG80211_WEXT (the WEXT compatibility layer) in the kernel.

You didn't mention what driver you're using for wpa_supplicant, you want '-Dnl80211', you can provide this either on the command line, or via /etc/conf.d/net, eg:

```
wpa_supplicant_wlp3s0="-Dnl80211 -qq"
```

Your wpa_supplicant.conf is defining ctrl_interface and its 'group' multiple times, you just need the following (dependent on what group you want to be able to have access, here 'wheel').

```
# Allow users in the 'wheel' group tp control wpa_supplicant

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel

#Let wpa_supplicant take care of scanning and AP selection

ap_scan=1

# A simple case: WPA-PSK, PSK, as an ASCII passphrase, allow all valid ciphers

network={

        ssid="simple"

        psk="very sectres passphrase"

        # The higher the priority the sooner we are matched

        priority=5

}
```

best ... khay

----------

## pa1983

I have the Intel 7260 AC in my router set up as an Access point. I used kernel 3.13.6 to start with now days I have 3.14.1 if i recall.

its much better to get the proper firmware from

http://wireless.kernel.org/en/users/Drivers/iwlwifi#Firmware

Then make sure the firmware match your kernel.

Gentoo package do not contain the latest firmwares (last  I checked) and iwlwifi-7260-7.ucode was causing my card to stop responding randomly for me at least, might be a bug with access point mode only.

Atm I am using iwlwifi-7260-8.ucode.

iwlwifi-7260-9.ucode is sad to be 3.14 compatible but its not at least not with earlier 3.14.X kernels. I spoke with the intel dev a month or so ago and he didnt know when the changes would merge in with 3.14.X but the 3.15 kernel do support iwlwifi-7260-9.ucode.

I suggest upgrading your kernel to 3.13.6 at least or preferably 3.14 and try iwlwifi-7260-8.ucode.

Other then that its more about configuring the card properly.

I run my card in AP mode so my settings migth not be that useful.

I have had no problems since I got my card set up properly so they do seem to work pretty well except that intel NEVER will support AC speeds in AP mode according to the intel Dev I spoke with that manages the driver and firmware.

----------

## philip

OK,

Now I have 

# grep CFG80211_WEXT .config

```
CONFIG_CFG80211_WEXT=y
```

# iwconfig

```
[wlp3s0    IEEE 802.11abgn  ESSID:off/any  

          Mode:Managed  Access Point: Not-Associated   Tx-Power=0 dBm

          Retry  long limit:7   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:off
```

if I do

#ifconfig iwl3s0 up

and 

# iwlist wlp3s0 scan

It seems like my laptop can communicate with the Access Point

```
wlp3s0    Scan completed :

          Cell 01 - Address: 74:D0:2B:D3:3E:28

                    Channel:6

                    Frequency:2.437 GHz (Channel 6)

                    Quality=36/70  Signal level=-74 dBm  

                    Encryption key:on

                    ESSID:"[i]my_AP_SSID[/i]"

                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s

                              24 Mb/s; 36 Mb/s; 54 Mb/s

                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s

                    Mode:Master

                    Extra:tsf=000002adcfae0bdb

                    Extra: Last beacon: 4ms ago

                    IE: Unknown: 00086E6F727368696C6C

                    IE: Unknown: 010882848B962430486C

                    IE: Unknown: 030106

                    IE: Unknown: 2A0100

                    IE: Unknown: 2F0100

                    IE: IEEE 802.11i/WPA2 Version 1

                        Group Cipher : CCMP

                        Pairwise Ciphers (1) : CCMP

                        Authentication Suites (1) : PSK

                    IE: Unknown: 32040C121860

                    IE: Unknown: 0B0501000B0000

                    IE: Unknown: 2D1ABD1917FFFFFF0000000000000000000000000000000000000000

                    IE: Unknown: 3D1606080400000000000000000000000000000000000000

                    IE: Unknown: 4A0E14000A002C01C800140005001900

                    IE: Unknown: 7F03010008

                    IE: Unknown: 

                    IE: Unknown: DD090010180201001C0000

                    IE: Unknown: DD180050F2020101840003A4000027A4000042435E0062322F00
```

My /etc/conf.d/net is now

# cat /etc/conf.d/net

```
# --- Wired ethernet ---

config_enp0s25="dhcp 192.168.1.250/24"

# config_eth0="dhcp" ?

# --- Wireless WiFi ---

#Prefer wpa_supplicant over wireless-tools

modules_wlp3s0="wpa_supplicant"

 

# It is important that we tell wpa_supplicant which driver we should 

# be using as it is not very good at guessing that

wpa_supplicant_wlp3s0="-Diwlwifi -iwlp3s0 -c /etc/wpa_supplicant/wpa_supplicant.conf"

config_wlp3s0="dhcp"
```

As you can see I am using the iwlwifi driver, which seems to be the right one according to pa1983

 # ls /lib/firmware/

```
intel  iwlwifi-7260-7.ucode
```

My wpa_supplicant.conf is now 

# cat /etc/wpa_supplicant/wpa_supplicant.conf 

```
# Allow users in the 'wheel' group tp control wpa_supplicant

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel

#Let wpa_supplicant take care of scanning and AP selection

ap_scan=1

# A simple case: WPA-PSK, PSK, as an ASCII passphrase, allow all valid ciphers

network={

        ssid="[i]my_AP_SSID[/i]"

        psk="[i]the PSK passphrase[/i]"

        # The higher the priority the sooner we are matched

        priority=5

}
```

However the line 

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel

seems to be wrong. There is no /var/run/wpa_supplicant

# ls /var/run/wpa_supplicant

ls: cannot access /var/run/wpa_supplicant: No such file or directory

Which is the right ctrl_interface=DIR=/?

It seems I can choose from:

```
# find / -name wpa_supplicant

/home/philip/.config/wpa_supplicant

/etc/init.d/wpa_supplicant

/etc/conf.d/wpa_supplicant

/etc/wpa_supplicant

/usr/portage/net-wireless/wpa_supplicant

/usr/sbin/wpa_supplicant
```

----------

## khayyam

 *philip wrote:*   

> 
> 
> ```
> wpa_supplicant_wlp3s0="-Diwlwifi -iwlp3s0 -c /etc/wpa_supplicant/wpa_supplicant.conf"
> ```
> ...

 

phil ... that is incorrect, the '-D<driver>' is '-Dnl80211'. Also, there is no need to pass '-iwlp3s0' or -'c /etc/wpa_supplicant/wpa_supplicant.conf' as these is passed by netifrc/openrc as a parameters/defaults.

Please can you correct the formating on the above ... it makes difficult to read (use codeblocks rather than lists as the lines don't seem to be wrapped with the latter).

best ... khay

----------

## philip

Thanks kayyam,

Now I tried the configuration of /etc/conf.d/net, like you suggest

# cat /etc/conf.d/net

```
# --- Wired ethernet ---

config_enp0s25="dhcp 192.168.1.250/24"

# config_eth0="dhcp" ?

# --- Wireless WiFi ---

#Prefer wpa_supplicant over wireless-tools

modules_wlp3s0="wpa_supplicant"

 

# It is important that we tell wpa_supplicant which driver we should 

# be using as it is not very good at guessing that

wpa_supplicant_wlp3s0="-Dnl80211"

config_wlp3s0="dhcp"
```

I have changed the wpa_supplicant.conf to handle a WPA2 encrypted connection 

# cat /etc/wpa_supplicant/wpa_supplicant.conf

```
# Allow users in the 'wheel' group tp control wpa_supplicant

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel

#Let wpa_supplicant take care of scanning and AP selection                                                  

#ap_scan=1

# Allow user-made changes to be saved (e.g. add network)

#update_config=1

# A simple case: WPA-PSK, PSK, as an ASCII passphrase, allow all valid ciphers

network={

        ssid="[i]my_AP_SSID[/i]"

        psk="[i]the_passphrase_of_the_AP[/i]"

        scan_ssid=1

        proto=WPA2

        key_mgmt=WPA-PSK

        group=CCMP TKIP

        pairwise_CCMP TKIP

        # The higher the priority the sooner we are matched

        priority=5

}
```

I still get

# iwconfig

```
enp0s25   no wireless extensions.

wlp3s0    IEEE 802.11abgn  ESSID:off/any  

          Mode:Managed  Access Point: Not-Associated   Tx-Power=0 dBm   

          Retry  long limit:7   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:off

          

enp0s20u4  no wireless extensions.

lo        no wireless extensions.

sit0      no wireless extensions.
```

In my previous setting I got my firmware driver from 

http://wireless.kernel.org/en/users/Drivers/iwlwifi

My HW is 

```
Intel® Wireless 7260 
```

where the firmware driver should be (since I am on kernel version 3.12.13)

```
iwlwifi-7260-ucode-22.1.7.0
```

I have placed it in /lib/firmware as intructed at the website

# ls /lib/firmware/

```
intel  iwlwifi-7260-7.ucode  iwlwifi-7260-8.ucode
```

Are you sure that nl80211 is the right driver and that it works with Intel® Wireless 7260 ?

Should I maybe configure in /etc/conf.d/net:

```
wpa_supplicant_wlp3s0="-Diwlwifi-7260-7.ucode"
```

?

----------

## philip

When I configure /etc/conf.d/net with

```
wpa_supplicant_wlp3s0="-Diwlwifi-7260-7.ucode"
```

this is what dmesg says:

# dmesg | grep iwlwifi

```
[    8.078906] iwlwifi 0000:03:00.0: loaded firmware version 22.1.7.0 op_mode iwlmvm

[    8.078924] iwlwifi 0000:03:00.0: Detected Intel(R) Dual Band Wireless AC 7260, REV=0x144

[    8.080027] iwlwifi 0000:03:00.0: L1 Enabled; Disabling L0S

[    8.080530] iwlwifi 0000:03:00.0: L1 Enabled; Disabling L0S

[   58.697897] iwlwifi 0000:03:00.0: L1 Enabled; Disabling L0S

[   58.698541] iwlwifi 0000:03:00.0: L1 Enabled; Disabling L0S
```

When I configure /etc/conf.d/net with

```
wpa_supplicant_wlp3s0="-Dnl80211"
```

dmesg says:

# dmesg | grep iwlwifi

```
[    8.019681] iwlwifi 0000:03:00.0: loaded firmware version 22.1.7.0 op_mode iwlmvm

[    8.019695] iwlwifi 0000:03:00.0: Detected Intel(R) Dual Band Wireless AC 7260, REV=0x144

[    8.020037] iwlwifi 0000:03:00.0: L1 Enabled; Disabling L0S

[    8.020437] iwlwifi 0000:03:00.0: L1 Enabled; Disabling L0S

[   54.316150] iwlwifi 0000:03:00.0: L1 Enabled; Disabling L0S

[   54.316642] iwlwifi 0000:03:00.0: L1 Enabled; Disabling L0S
```

and

# dmesg | grep 80211

```
[    8.231527] ieee80211 phy0: Selected rate control algorithm 'iwl-mvm-rs'
```

It seems like both  

```
wpa_supplicant_wlp3s0="-Diwlwifi-7260-7.ucode" 
```

 and 

```
wpa_supplicant_wlp3s0="-Dnl80211"
```

works.....

----------

## khayyam

 *philip wrote:*   

> 
> 
> ```
> config_enp0s25="dhcp 192.168.1.250/24"
> ```
> ...

 

phil ... you're welcome. That should be config_enp0s25="dhcp".

 *philip wrote:*   

> Are you sure that nl80211 is the right driver and that it works with Intel® Wireless 7260 ?
> 
> Should I maybe configure in /etc/conf.d/net:
> 
> ```
> ...

 

Yes, I'm absolutely certain that -Dnl80211 is the correct driver, this is the wpa_supplicant "driver", not the wireless driver (and certainly not the firmware).

As for the output above you're not associated with an AP, but the card is recongised and seems to be working. If you are unable to assocate with the AP ('wpa_cli staus' should show the state) then change the following and pastebin the wpa_supplicant.log

/etc/conf.d/net

```
wpa_supplicant_wlp2s0="-Dnl80211 -d -f /var/log/wpa_supplicant.log"
```

Again, this thread is very difficult for me to read, as the above formating means I have to scroll right then left to read whats written, can you please go back and edit your post(s) and correct the formating making sure that any text copy-pasted doesn't have extranious whitespace.

best ... khay

----------

## philip

Yes I think we can conclude that the card is recognized and works. The evidence, I believe is that a scan returns information about the AP:

# iwlist wlp3s0 scan

```
wlp3s0    Scan completed :

          Cell 01 - Address: 74:D0:2B:D3:3E:28

                    Channel:6

                    Frequency:2.437 GHz (Channel 6)

                    Quality=42/70  Signal level=-68 dBm  

                    Encryption key:on

                    ESSID:"my_APs_SSID"

                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s

                              24 Mb/s; 36 Mb/s; 54 Mb/s

                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s

                    Mode:Master

                    Extra:tsf=000002b003106080

                    Extra: Last beacon: 4ms ago

                    IE: Unknown: 00086E6F727368696C6C

                    IE: Unknown: 010882848B962430486C

                    IE: Unknown: 030106

                    IE: Unknown: 2A0100

                    IE: Unknown: 2F0100

                    IE: IEEE 802.11i/WPA2 Version 1

                        Group Cipher : CCMP

                        Pairwise Ciphers (1) : CCMP

                        Authentication Suites (1) : PSK

                    IE: Unknown: 32040C121860

                    IE: Unknown: 0B0501000A0000

                    IE: Unknown: 2D1ABD1917FFFFFF0000000000000000000000000000000000000000

                    IE: Unknown: 3D1606080400000000000000000000000000000000000000

                    IE: Unknown: 4A0E14000A002C01C800140005001900

                    IE: Unknown: 7F03010008
```

I have definitively put 

```
wpa_supplicant_wlp3s0="-Dnl80211"
```

in /etc/conf.d/net

which gives at system boot:

# dmesg | grep iwlwifi

```
[    7.990426] iwlwifi 0000:03:00.0: loaded firmware version 22.1.7.0 op_mode iwlmvm

[    7.990440] iwlwifi 0000:03:00.0: Detected Intel(R) Dual Band Wireless AC 7260, REV=0x144

[    7.991065] iwlwifi 0000:03:00.0: L1 Enabled; Disabling L0S

[    7.991562] iwlwifi 0000:03:00.0: L1 Enabled; Disabling L0S

[   54.827106] iwlwifi 0000:03:00.0: L1 Enabled; Disabling L0S

[   54.827597] iwlwifi 0000:03:00.0: L1 Enabled; Disabling L0S
```

So this works fine now I believe,

wpa_cli status gives:

# wpa_cli status

```
Failed to connect to non-global ctrl_ifname: (null)  error: No such file or directory
```

Maybe something is not right here?

(I will return soon with /var/log/wpa_supplicant.log)

(Btw: The configuration 

```
config_enp0s25="dhcp 192.168.1.250/24"
```

in /etc/conf.d/net is on purpose, where I have an alias address 192.168.1.250/24 on this interface for a project I am working on )

----------

## philip

For some reason the /var/log/wpa_supplicant.log file will not be created.

Steps I made:

1)

re-merge wpa_supplicant with the use flag debug set

```
# USE="debug" emerge --ask wpa_supplicant
```

2)

Change in /etc/conf.d/net to this:

```
wpa_supplicant_wlp3s0="-Dnl80211 -d -f /var/log/wpa_supplicant.log"
```

3) reboot

No wpa_supplicant.log file :

```
# find / -name wpa_supplicant.log

phils_x1 philip #
```

or 

```
# ls /var/log/wpa_supplicant.log

ls: cannot access /var/log/wpa_supplicant.log: No such file or directory
```

Maybe wpa_supplicant does not start properly?

Also, should there not be a net.wlp3s0 entry in /etc/init.d/?

# ls -al /etc/init.d/ | grep net*

```
lrwxrwxrwx  1 root root     6 May  1 20:24 net.enp0s25 -> net.lo

-rwxr-xr-x  1 root root 17412 Apr 10 07:03 net.lo

-rwxr-xr-x  1 root root  1583 Apr 10 07:03 netmount

-rwxr-xr-x  1 root root   411 May 15 20:41 saned
```

----------

## khayyam

 *philip wrote:*   

> For some reason the /var/log/wpa_supplicant.log file will not be created.

 

phil ... yes, because the service isn't started (see bellow).

 *philip wrote:*   

> Also, should there not be a net.wlp3s0 entry in /etc/init.d/?

 

Yes, in fact, you are supposed to create this symlink ...

```
# ln -s /etc/init.d/net.lo /etc/init.d/net.wlp3s0

# /etc/init.d/net.wlp2s0 start
```

best ... khay

----------

## philip

If I do 

```
ln -s /etc/init.d/net.lo /etc/init.d/net.wlp3s0
```

will I get a conflict with net.enp0s25 which also has a symbolic link to net.lo?

# ls -al /etc/init.d/ | grep net*

```
lrwxrwxrwx  1 root root     6 May  1 20:24 net.enp0s25 -> net.lo

-rwxr-xr-x  1 root root 17412 Apr 10 07:03 net.lo
```

----------

## toralf

 *philip wrote:*   

> If I do 
> 
> ```
> ln -s /etc/init.d/net.lo /etc/init.d/net.wlp3s0
> ```
> ...

 No, and try this :

```
man ln
```

----------

## philip

I have got it working !

Starting the service and adding it to the default runlevel was the last piece of the puzzle.

# rc-status

```
Runlevel: default

 dbus                                                                                          [  started  ]

 syslog-ng                                                                                     [  started  ]

 net.enp0s25                                                                                   [  started  ]

 net.wlp3s0                                                                                    [  started  ]
```

and 

# ping www.google.com

```
PING www.google.com (173.194.32.16) 56(84) bytes of data.

64 bytes from arn06s01-in-f16.1e100.net (173.194.32.16): icmp_seq=1 ttl=54 time=8.85 ms

64 bytes from arn06s01-in-f16.1e100.net (173.194.32.16): icmp_seq=2 ttl=54 time=8.96 ms

^C

--- www.google.com ping statistics ---

2 packets transmitted, 2 received, 0% packet loss, time 1001ms

rtt min/avg/max/mdev = 8.850/8.907/8.964/0.057 ms
```

Thank you all for excellent help![/code]

----------

## khayyam

 *philip wrote:*   

> Thank you all for excellent help!

 

philip ... you're welcome. You should now edit the first post and add [SOLVED] to the subject line.

Something I noticed in the above, you are starting both net.wlp2s0 and net.enp0s25 ... unless these are on seperate subnets (unlikely) then there isn't really a reason to have both started. You might want to have net.enp0s25 managed by sys-apps/ifplugd (which will bring the interface up/down when a cable is detected). There are various methods of handling switching between wired and wireless networks, and examples of how to use ifplugd, or netplug, to manage the switch. You can search the wiki and the forum for examples.

best ... khay

----------

## philip

Yes khayyam, I need to have net.enp0s25 managed by sys-apps/ifplugd. This will be the next challange to configure.

Thanks!

----------

## khayyam

 *philip wrote:*   

> Yes khayyam, I need to have net.enp0s25 managed by sys-apps/ifplugd. This will be the next challange to configure.

 

phil ... it shouldn't be much of a challenge, in fact its quite easy ... probably best for another thread though.

best ... khay

----------

