You are not logged in.

#1 2008-09-03 01:41:55

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 858
Website

[SOLVED] Intel 5300 wifi on new Arch64 install

I just bought a new Sager NP9262 laptop (but not really... it's huge, heavy, and sports a quad-core Q9650 processor), and put 64-bit Arch on it.  I've managed to get everything set up on it except for the wireless chip, an intel 4965.  I've downloaded the correct firmware (iwlwifi-4965-ucode) and the kernel module exists, but there seems to be a more basic problem.  hwdetect --show-net doesn't list the card at all, and lspci -k gives a rather unhelpful line saying

Network controller: Intel Corporation Device 4235

and lists no kernel modules which could work with the device.  Ideas?

Last edited by tavianator (2008-09-06 18:22:37)

Offline

#2 2008-09-04 01:08:50

wizzard
Member
From: PA, US
Registered: 2006-10-17
Posts: 33

Re: [SOLVED] Intel 5300 wifi on new Arch64 install

maybe Sager modified the chip? I dono, but I have a 4965 on a 32-bit Arch setup, and lspci -k gives

03:00.0 Network controller: Intel Corporation PRO/Wireless 4965 AG or AGN Network Connection (rev 61)

which is quite different from what you see

Rob

Last edited by wizzard (2008-09-04 01:09:34)

Offline

#3 2008-09-04 03:20:11

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 858
Website

Re: [SOLVED] Intel 5300 wifi on new Arch64 install

According to Sager, the chip is not modified or installed funny.

I just tried it with a 64-bit ubuntu livecd I had, and got the same problem.  I'll attempt it with a 32-bit arch install cd tomorrow, once I burn one.  In the meantime, does anyone have iwl4965 working on 64-bit, and if so, could they post the relevant part of lspci -v?

Offline

#4 2008-09-04 16:39:40

jfreund
Member
Registered: 2008-09-04
Posts: 8
Website

Re: [SOLVED] Intel 5300 wifi on new Arch64 install

"Intel Corporation Device 4235" means this is an Intel WiFi 5300 (providing N standard). There is no driver in current stable Linux kernels yet, but there will be with 2.6.27. You can try to get it running with iwlwifi-5000-ucode-5.4.A.11.tar.gz firmware (get it at http://intellinuxwireless.org/?p=iwlwifi&n=Downloads) and Compat (download from http://www.linuxwireless.org/en/users/D … odownload).

Extract compat and edit config.mk. Insert CONFIG_IWL5000=y between CONFIG_IWL4965_HT=y and CONFIG_B43=m. Then build compat (make, make install) and then load the module (su && make unload && make load).

There have been reports that this works (but not for ArchLinux specifically), so just try - maybe you're lucky.

Offline

#5 2008-09-05 01:49:59

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 858
Website

Re: [SOLVED] Intel 5300 wifi on new Arch64 install

Okay, thanks.  I don't particularly care about stability, so I'll build a 2.6.27-rc5 in a bit, install the firmware, and report on how it works.

How did you find out what the device code 4235 meant?  I tried googling it, and didn't get anywhere helpful.

Offline

#6 2008-09-05 02:49:40

sud_crow
Member
From: Argentina
Registered: 2003-06-30
Posts: 546
Website

Re: [SOLVED] Intel 5300 wifi on new Arch64 install

tavianator wrote:

According to Sager, the chip is not modified or installed funny.

I just tried it with a 64-bit ubuntu livecd I had, and got the same problem.  I'll attempt it with a 32-bit arch install cd tomorrow, once I burn one.  In the meantime, does anyone have iwl4965 working on 64-bit, and if so, could they post the relevant part of lspci -v?

Although it seems you don't have one, just for the record, I do have an Intel 4965 AGN and I'm running Arch64 with no problems.
Ironically, the ISO at the time of my install had a kernel (2.6.23.x) that didn't support my Ethernet, so I was forced to use Wi-Fi all the time until kernel 2.6.24 made it to Core.

Regards!


Leonardo Andrés Gallego
www.archlinux-es.org || Comunidad Hispana de Arch Linux

Offline

#7 2008-09-05 14:30:40

jfreund
Member
Registered: 2008-09-04
Posts: 8
Website

Re: [SOLVED] Intel 5300 wifi on new Arch64 install

tavianator wrote:

How did you find out what the device code 4235 meant?  I tried googling it, and didn't get anywhere helpful.

I got the same device in my notebook, and since this is a dual installation Win/Linux I could cheat and ask Windows Device Manager instead (where I used the drivers from the accompanying CD) wink
However, I found out about most of the stuff I posted above in a discussion on a Ubuntu board - but since this has been in german language I actually thought providing the link would not be of such great use...

Offline

#8 2008-09-06 18:22:11

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 858
Website

Re: [SOLVED] Intel 5300 wifi on new Arch64 install

YEAH!!!!

I got it working with 2.6.27-rc5.  On first try, I got wierd errors in ifconfig, and scanning didn't work, and it wouldn't associate with any networks.  Then I recompiled the kernel with "Enable full debugging output in iwlagn driver" just to get more debugging output, and it worked!  I also did some other things between compiles too, though, so I'll have to test it a bit more thorougly before I report a bug in the kernel.

If anyone wants the PKGBUILDs I used for the kernel and the firmware, and the .config, I can post them.

Last edited by tavianator (2008-09-06 18:25:13)

Offline

#9 2008-09-07 02:47:24

Statix
Member
From: Hangzhou, China
Registered: 2008-02-16
Posts: 240

Re: [SOLVED] Intel 5300 wifi on new Arch64 install

tavianator wrote:

If anyone wants the PKGBUILDs I used for the kernel and the firmware, and the .config, I can post them.

That'd be great. Thanks in advance!


Madly in love with Arch64, Openbox, DotA, and of course... penguins!
Happy to help if you're not a Help Vampire. Use your wonderful resources like ArchWiki, Google, and our wonderful search page.

Offline

#10 2008-09-07 16:55:51

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 858
Website

Re: [SOLVED] Intel 5300 wifi on new Arch64 install

EDIT:  now uses 2.6.27-rc6, which I haven't tested.  For something I'm sure works on my laptop, set '_rc' to '-rc5' and '_git' to '-git9', and uncomment the various commented-out lines dealing with -git patches.

Okay.  First start with everything from /var/abs/core/kernel26 in a separate directory.  Then, replace PKGBUILD with this

PKGBUILD:

# $Id: PKGBUILD 10337 2008-08-26 21:10:56Z tpowa $
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
# Maintainer: Thomas Baechler <thomas@archlinux.org>
pkgname=kernel26
_basekernel=2.6.26
pkgver=2.6.27
pkgrel=1
_rc=-rc6
_git=
pkgdesc="The Linux Kernel and modules"
arch=(i686 x86_64)
license=('GPL2')
groups=('base')
url="http://www.kernel.org"
backup=(etc/mkinitcpio.d/${pkgname}.preset)
depends=('coreutils' 'module-init-tools' 'mkinitcpio>=0.5.18')
# pwc, ieee80211 and hostap-driver26 modules are included in kernel26 now
# nforce package support was abandoned by nvidia, kernel modules should cover everything now.
# kernel24 support is dropped since glibc24
replaces=('kernel24' 'kernel24-scsi' 'kernel26-scsi'
          'alsa-driver' 'ieee80211' 'hostap-driver26'
          'pwc' 'nforce' 'squashfs' 'unionfs' 'ivtv'
          'zd1211' 'kvm-modules' 'iwlwifi' 'rt2x00-cvs')
install=kernel26.install
source=(ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_basekernel.tar.bz2
        http://kernel.org/pub/linux/kernel/v2.6/testing/patch-$pkgver$_rc.bz2
#        http://kernel.org/pub/linux/kernel/v2.6/snapshots/patch-$pkgver$_rc$_git.bz2
        # the main kernel config files
        config config.x86_64
        # standard config files for mkinitcpio ramdisk
        kernel26.preset)
md5sums=('5169d01c405bc3f866c59338e217968c'
         'd3a173a00e15a6bf3c76068537a5c069'
         '4fd1071a8dc2ea993aed81d5920de18d'
         'd5ad1f296356d159a2616a49d98b3434'
         '25584700a0a679542929c4bed31433b6')

build() {
  KARCH=x86

  cd $startdir/src/linux-$_basekernel
  # Add rc patches
  patch -Np1 -i $startdir/src/patch-${pkgver}${_rc} || return 1
#  patch -Np1 -i $startdir/src/patch-${pkgver}${_rc}${_git} || return 1

  if [ "$CARCH" = "x86_64" ]; then
    cat ../config.x86_64 >./.config
  else
    cat ../config >./.config
  fi
  # build the full kernel version to use in pathnames
  . ./.config
  ### next line is only needed for rc kernels
  #_kernver="2.6.25${CONFIG_LOCALVERSION}"
  _kernver="${pkgver}${_rc}${_git}${CONFIG_LOCALVERSION}"
  # load configuration
  yes "" | make config
  # build!
  ####################
  # stop here
  # this is useful to configure the kernel
  #msg "Stopping build"
  #return 1
  ####################
  make bzImage modules || return 1
  mkdir -p $startdir/pkg/{lib/modules,boot}
  make INSTALL_MOD_PATH=$startdir/pkg modules_install || return 1
  cp System.map $startdir/pkg/boot/System.map26
  cp arch/$KARCH/boot/bzImage $startdir/pkg/boot/vmlinuz26
  install -D -m644 Makefile \
    $startdir/pkg/usr/src/linux-${_kernver}/Makefile
  install -D -m644 kernel/Makefile \
    $startdir/pkg/usr/src/linux-${_kernver}/kernel/Makefile
  install -D -m644 .config \
    $startdir/pkg/usr/src/linux-${_kernver}/.config
  mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/include

  for i in acpi asm-{generic,x86} config linux math-emu media net pcmcia scsi sound video; do
    cp -a include/$i $startdir/pkg/usr/src/linux-${_kernver}/include/
  done

  # copy files necessary for later builds, like nvidia and vmware
  cp Module.symvers $startdir/pkg/usr/src/linux-${_kernver}
  cp -a scripts $startdir/pkg/usr/src/linux-${_kernver}
  # fix permissions on scripts dir
  chmod og-w -R $startdir/pkg/usr/src/linux-${_kernver}/scripts
  #mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/.tmp_versions

  mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/arch/$KARCH/kernel

  cp arch/$KARCH/Makefile $startdir/pkg/usr/src/linux-${_kernver}/arch/$KARCH/
  if [ "$CARCH" = "i686" ]; then
    cp arch/$KARCH/Makefile_32.cpu $startdir/pkg/usr/src/linux-${_kernver}/arch/$KARCH/
  fi
  cp arch/$KARCH/kernel/asm-offsets.s $startdir/pkg/usr/src/linux-${_kernver}/arch/$KARCH/kernel/

  # add headers for lirc package
  mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/drivers/media/video
  cp drivers/media/video/*.h  $startdir/pkg/usr/src/linux-${_kernver}/drivers/media/video/
  for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 usbvideo zc0301; do
   mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/drivers/media/video/$i
   cp -a drivers/media/video/$i/*.h $startdir/pkg/usr/src/linux-${_kernver}/drivers/media/video/$i
  done
  # add dm headers
  mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/drivers/md
  cp drivers/md/*.h  $startdir/pkg/usr/src/linux-${_kernver}/drivers/md
  # add inotify.h
  mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/include/linux
  cp include/linux/inotify.h $startdir/pkg/usr/src/linux-${_kernver}/include/linux/
  # add CLUSTERIP file for iptables
  mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/net/ipv4/netfilter/
  # add wireless headers
  mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/net/mac80211/
  cp net/mac80211/*.h $startdir/pkg/usr/src/linux-${_kernver}/net/mac80211/
  # add dvb headers for external modules
  # in reference to:
  # http://bugs.archlinux.org/task/9912
  mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core
  cp drivers/media/dvb/dvb-core/*.h $startdir/pkg/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core/
  # add dvb headers for external modules
  # in reference to:
  # http://bugs.archlinux.org/task/11194
  mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/include/config/dvb/
  cp include/config/dvb/*.h $startdir/pkg/usr/src/linux-${_kernver}/include/config/dvb/
  # add xfs and shmem for aufs building
  mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/fs/xfs
  mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/mm
  cp fs/xfs/xfs_sb.h $startdir/pkg/usr/src/linux-${_kernver}/fs/xfs/xfs_sb.h
  # add vmlinux
  cp vmlinux $startdir/pkg/usr/src/linux-${_kernver}
  # copy in Kconfig files
  for i in `find . -name "Kconfig*"`; do 
    mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/`echo $i | sed 's|/Kconfig.*||'`
    cp $i $startdir/pkg/usr/src/linux-${_kernver}/$i
  done

  cd $startdir/pkg/usr/src/linux-${_kernver}/include && ln -s asm-$KARCH asm

  chown -R root.root $startdir/pkg/usr/src/linux-${_kernver}
  find $startdir/pkg/usr/src/linux-${_kernver} -type d -exec chmod 755 {} \;
  cd $startdir/pkg/lib/modules/${_kernver} && \
    (rm -f source build; ln -sf ../../../usr/src/linux-${_kernver} build)
  # install fallback mkinitcpio.conf file and preset file for kernel
  install -m644 -D $startdir/src/${pkgname}.preset $startdir/pkg/etc/mkinitcpio.d/${pkgname}.preset || return 1
  # set correct depmod command for install
  sed -i -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" $startdir/kernel26.install
  echo -e "# DO NOT EDIT THIS FILE\nALL_kver='${_kernver}'" > ${startdir}/pkg/etc/mkinitcpio.d/${pkgname}.kver
  # remove unneeded architectures
  rm -rf $startdir/pkg/usr/src/linux-${_kernver}/arch/{alpha,arm,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,mips,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,xtensa}
}

Then, edit the pkgbuild, and uncomment lines 62 and 63, right below "stop here / this is useful to configure the kernel."  Run makepkg, which will extract the sources, patch them, and stop.  Run:

$ cd src/linux-2.6.26
$ make menuconfig

Go to Device Drivers ---> Network Device Support ---> Wireless LAN, and scroll down to "Intel Wireless WiFi Next Gen AGN."  Press 'm' to include this feature as a module.  Enable any subfeatures you want, by pressing 'y,' but be sure to enable "Intel Wireless WiFi 5000AGN."  Also, enable "Enable full debugging output in iwlagn driver," which is above "Intel Wireless WiFi AGN."  Exit menuconfig.  Run

$ cd ../..
$ cp src/linux-2.6.26/.config config

or on Arch64, run

$ cd ../..
$ cp src/linux-2.6.26/.config config.x86_64

Comment out the lines you uncommented in the PKGBUILD, run

$ makepkg -g >> PKGBUILD
$ rm -rf src # otherwise, it tries to patch an already patched kernel

and finally, makepkg!

Also, install the firmware:
PKGBUILD:

# $Id: PKGBUILD 4447 2008-07-07 12:06:04Z thomas $
# Maintainer: Thomas Baechler <thomas@archlinux.org>

pkgname=iwlwifi-5000-ucode
pkgver=5.4.A.11
pkgrel=1
pkgdesc="Intel wireless firmware for IPW5000 (iwlwifi driver)"
arch=(i686 x86_64)
url="http://intellinuxwireless.org/?p=iwlwifi"
license=('custom')
depends=()
source=(http://intellinuxwireless.org/iwlwifi/downloads/$pkgname-$pkgver.tar.gz)
md5sums=('748860c5079dde1a1313e72511b9322a')

build() {
  cd $startdir/src/$pkgname-$pkgver
  # Install firmware (ABI version 2, for future versions of iwl4965)
  install -D -m 644 iwlwifi-5000-1.ucode $startdir/pkg/lib/firmware/iwlwifi-5000-1.ucode || return 1
  # Install license
  install -D -m 644 LICENSE.iwlwifi-5000-ucode $startdir/pkg/usr/share/licenses/$pkgname/LICENSE || return 1
}

Last edited by tavianator (2008-09-10 23:10:35)

Offline

#11 2008-09-09 02:46:47

BetterLeftUnsaid
Member
From: My Happy Place
Registered: 2007-11-04
Posts: 78

Re: [SOLVED] Intel 5300 wifi on new Arch64 install

Awesome, thanks tavianator ... it got my laptop's wireless working big_smile

Offline

#12 2008-09-10 07:47:27

Sushisource
Member
Registered: 2008-02-14
Posts: 8

Re: [SOLVED] Intel 5300 wifi on new Arch64 install

So, I got the new kernel working, but I can't get the wlan0 interface to scan anything properly. Any ideas?

Edit: Also totally strange: kismet will work if I tell it to use the iwl4965 drver. How odd is that?

Last edited by Sushisource (2008-09-10 08:02:31)

Offline

#13 2008-09-10 22:57:09

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 858
Website

Re: [SOLVED] Intel 5300 wifi on new Arch64 install

BetterLeftUnsaid:  you're welcome.

Sushisource:  I had that problem intermittently with rc5, and it seems fixed with git9.  I'm assuming it's still fixed with rc6, so I'll update the PKGBUILD in a minute.  Also, don't forget to install the firmware for the 5300 - I'll add that PKGBUILD to my post.
EDIT:  PKGBUILD updated.

Last edited by tavianator (2008-09-10 23:12:03)

Offline

#14 2008-09-11 07:07:25

Sushisource
Member
Registered: 2008-02-14
Posts: 8

Re: [SOLVED] Intel 5300 wifi on new Arch64 install

Hmm. That's strange. I used your new PKGBUILD and wifi-radar still can't scan anything.

Offline

#15 2008-09-12 01:14:55

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 858
Website

Re: [SOLVED] Intel 5300 wifi on new Arch64 install

Hmm... what's the output of "lspci | grep Network", "ifconfig wlan0 up", "iwconfig wlan0", and "iwlist wlan0 scan"?

Last edited by tavianator (2008-09-12 01:15:52)

Offline

Board footer

Powered by FluxBB