FedoraForum.org - Fedora Support Forums and Community
Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    Join Date
    Sep 2006
    Location
    UK, Bucks.
    Posts
    354
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    More NetworkManager and Madwifi Help Fedora 9, Thinkpad T41p

    Hello,

    I followed the steps in this guide to install Madwifi on my Thinkpad T41p which uses an Atheros chipset.

    A restart later and entering in my network's configuration to NetworkManager's connections and it automatically connects fine. My netowork uses WPA2 (AES). My network also uses manual assigning of IP addresses rather than DHCP.

    All works fine on startup, and eth0 will come back up after a suspend or hibernate.

    However when resuming, NetworkManager then tries to automatically connect to my wireless network and repeatedly asks me for my password, which I keep entering correctly, then after some time it will make wlan0 'inactive' again.

    I've been reading a lot about 'ifconfig' and 'iwconfig' in relation to wireless, but whenever I type those exact things in to the gnome-terminal, I just get an error message saying it doesn't exist. (Edit: I realise these must be '/sbin/ifconfig' now)

    Any ideas? From what I can make out from the logs after the resume, it's trying to use TKIP instead of AES which is why it keeps asking for my password and rejecting it, before timing out and making wlan0 inactive. Logs are below. If there are any other outputs I can give you to diagnose the problem, please just ask.

    At startup:
    Code:
    [root@Jon-Laptop Jon]# tail /var/log/messages
    Jun 24 03:26:40 Jon-Laptop NetworkManager: <info>  Activation (wlan0) Stage 4 of 5 (IP Configure Get) complete.
    Jun 24 03:26:40 Jon-Laptop NetworkManager: <info>  Activation (wlan0) Stage 5 of 5 (IP Configure Commit) started...
    Jun 24 03:26:40 Jon-Laptop avahi-daemon[2233]: Joining mDNS multicast group on interface wlan0.IPv4 with address 192.168.1.100.
    Jun 24 03:26:40 Jon-Laptop avahi-daemon[2233]: New relevant interface wlan0.IPv4 for mDNS.
    Jun 24 03:26:40 Jon-Laptop avahi-daemon[2233]: Registering new address record for 192.168.1.100 on wlan0.IPv4.
    Jun 24 03:26:41 Jon-Laptop NetworkManager: <info>  (wlan0): device state change: 7 -> 8
    Jun 24 03:26:41 Jon-Laptop NetworkManager: <info>  Policy set (wlan0) as default device for routing and DNS.
    Jun 24 03:26:41 Jon-Laptop NetworkManager: <info>  Activation (wlan0) successful, device activated.
    Jun 24 03:26:41 Jon-Laptop NetworkManager: <info>  Activation (wlan0) Stage 5 of 5 (IP Configure Commit) complete.
    Jun 24 03:27:33 Jon-Laptop console-kit-daemon[1943]: WARNING: Couldn't read /proc/2678/environ: Error reading file '/proc/2678/environ': No such process
    [root@Jon-Laptop Jon]#
    After resume:
    Code:
    [root@Jon-Laptop Jon]# tail /var/log/messages
    Jun 24 03:05:59 Jon-Laptop NetworkManager: <info>  Config: added 'group' value 'WEP40 WEP104 TKIP CCMP'
    Jun 24 03:05:59 Jon-Laptop NetworkManager: <info>  Activation (wlan0) Stage 2 of 5 (Device Configure) complete.
    Jun 24 03:05:59 Jon-Laptop NetworkManager: <info>  Config: set interface ap_scan to 1
    Jun 24 03:05:59 Jon-Laptop NetworkManager: <info>  (wlan0): supplicant connection state change: 2 -> 0
    Jun 24 03:05:59 Jon-Laptop NetworkManager: <info>  (wlan0): supplicant connection state change: 0 -> 2
    Jun 24 03:06:24 Jon-Laptop NetworkManager: <info>  Activation (wlan0/wireless): association took too long.
    Jun 24 03:06:24 Jon-Laptop NetworkManager: <info>  (wlan0): device state change: 5 -> 6
    Jun 24 03:06:24 Jon-Laptop NetworkManager: <info>  Activation (wlan0/wireless): asking for new secrets
    Jun 24 03:06:24 Jon-Laptop NetworkManager: <info>  (wlan0): supplicant connection state change: 2 -> 0
    Jun 24 03:06:39 Jon-Laptop NetworkManager: <info>  wlan0: link timed out.
    [root@Jon-Laptop Jon]#
    As a supplementary question does anyone know the difference between akmod and kmod? There were two types of packages for madwifi in the repositories.

    Thank-you very much in advance.
    Last edited by Dead1nside; 24th June 2008 at 03:40 AM.

  2. #2
    Join Date
    Jul 2005
    Location
    Melbourne, Australia
    Age
    46
    Posts
    762
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    for what its worth I got identical issue with T41 atheros chipset.
    Works fine normally w/ networkmanager but it never works after suspend, keeps asking for password.

    I've got it fixed via creating a file called suspend_modules in /etc/pm/config.d.
    In that file there is one line
    SUSPEND_MODULES="ath5k".


    FYR the reason your iwconfig etc. commands don't work is because networkmanager overrides them. You have to disable networkmanager service and enable the normal network service. I'm going to see if I can manually restore the wireless after a suspend, then go from there

    note if you are using the ath_pci module instead, change the line above appropriately. I tested this also to see if that driver was better - but it wasn't, I have to confirm the password again after suspend?!?!? but it actually takes the password.

    out of the box I believe ath5k is what yum will install for you.
    Last edited by wintermute000; 28th June 2008 at 07:22 AM. Reason: FIXED the issue
    the phases of 'nix troubleshooting

    For :eek:
    :confused: | google > :D
    Next

  3. #3
    Join Date
    Sep 2006
    Location
    UK, Bucks.
    Posts
    354
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    johannlo it's great to see that someone else is having a similar problem, not alone and all of that.

    Is the ath5k driver stable, I have heard of it before but my understanding was that it's at an early stage.

    I'm sorry I don't understand your piece about ath_pci, I see this device in 'system-config-network' but it's labelled as ethernet and configured. NetworkManager reports when right-clicking and selecting connection information says that it's using wlan0.

    Does your fix use the madwifi driver until a suspend/resume occurs and then switches? What network encryption do you use, sometimes these earlier drivers have trouble with more secure things such as WPA2-PSK.

    Thanks very much for your information.
    Thinkpad T400 - Smolt Profile || Thinkpad T61 - Smolt Profile || Thinkpad T41p - Smolt Profile.

  4. #4
    Join Date
    Jul 2005
    Location
    Melbourne, Australia
    Age
    46
    Posts
    762
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well even if you're not sure, just try what I suggested and see what happens.

    You can see what driver you are using via "modprobe -l | grep ath". For me there is an entry called ath5k. You should find similar.

    I've read that ath5k is not stable too, but it seems to work for me, I haven't tried to dump gigabytes of traffic or anything but didn't notice any issues browsing + streaming MP3s stored on another computer on my network.

    I DID notice that gnome vfs seems to break, I mounted a windows share via gnome's GUI then tried to build a library in amarok pointing to that share. It got 10% through and broke (this is ~60 gigs of music). I unmounted, created a manual mount point and manually mounted the share via command line. Then it worked flawlessly.

    I mentioned ath_pci because there are a lot of posts on the internet about similar issues where people recommend switching to the ath_pci driver instead by manually blacklisting the ath5k module in your modules blacklist, so you might have tried this already. I know I did.

    All my fix does is make suspend unload the module before suspend, and reload it afterwards. Its identical to doing below manually after unsuspend
    modprobe -r ath5k
    modprobe ath5k

    I am using WPA-PSK with a Cisco access point and with the above fix it just works (tm). Really happy with the stability and featureset of F9 on this T41. Even desktop effects work. Take that vista
    Last edited by wintermute000; 28th June 2008 at 02:09 PM. Reason: Mentioned Gnome CIFS/SMB mount seems unstable
    the phases of 'nix troubleshooting

    For :eek:
    :confused: | google > :D
    Next

  5. #5
    scottro's Avatar
    scottro is offline Retired Community Manager -- Banned from Texas by popular demand.
    Join Date
    Sep 2007
    Location
    NYC
    Posts
    8,120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As for the command not found aspect see
    http://home.nyc.rr.com/computertaijutsu/rhpath.html

  6. #6
    Join Date
    Jul 2005
    Location
    Melbourne, Australia
    Age
    46
    Posts
    762
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah I REALLY hate how you don't have /bin and /sbin in the default path. THe first thing I do in any fedora setup is to stick them into the path.

    Maybe its to protect normal users from breaking things but if someone is game enough to poke around the command line then they're going to want to RUN things. Besides most 'dangerous' commands require root privileges anyway
    the phases of 'nix troubleshooting

    For :eek:
    :confused: | google > :D
    Next

  7. #7
    Join Date
    Sep 2006
    Location
    UK, Bucks.
    Posts
    354
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is the output of the modprobe command you gave me. So does that mean I am indeed running ath5k?
    Code:
    [Jon@Jon-Laptop ~]$ su -c '/sbin/modprobe -l | grep ath'
    Password: 
    /lib/modules/2.6.25.6-55.fc9.i686/kernel/drivers/net/wireless/ath5k/ath5k.ko
    /lib/modules/2.6.25.6-55.fc9.i686/kernel/drivers/md/multipath.ko
    /lib/modules/2.6.25.6-55.fc9.i686/kernel/drivers/md/dm-multipath.ko
    /lib/modules/2.6.25.6-55.fc9.i686/extra/madwifi/ath_hal.ko
    /lib/modules/2.6.25.6-55.fc9.i686/extra/madwifi/ath_rate_sample.ko
    /lib/modules/2.6.25.6-55.fc9.i686/extra/madwifi/ath_pci.ko
    /lib/modules/2.6.25.6-55.fc9.i686/extra/madwifi/ath_rate_minstrel.ko
    /lib/modules/2.6.25.6-55.fc9.i686/extra/madwifi/ath_rate_onoe.ko
    /lib/modules/2.6.25.6-55.fc9.i686/extra/madwifi/ath_rate_amrr.ko
    When I make the file in /etc/pm/config.d that you told me to, selinux troubleshooter comes up and gives me this output:

    Code:
    Summary:
    
    SELinux is preventing the pm-suspend from using potentially mislabeled files
    (/etc/pm/config.d/suspend_modules).
    
    Detailed Description:
    
    SELinux has denied pm-suspend access to potentially mislabeled file(s)
    (/etc/pm/config.d/suspend_modules). This means that SELinux will not allow
    pm-suspend to use these files. It is common for users to edit files in their
    home directory or tmp directories and then move (mv) them to system directories.
    The problem is that the files end up with the wrong file context which confined
    applications are not allowed to access.
    
    Allowing Access:
    
    If you want pm-suspend to access this files, you need to relabel them using
    restorecon -v '/etc/pm/config.d/suspend_modules'. You might want to relabel the
    entire directory using restorecon -R -v '/etc/pm/config.d'.
    
    Additional Information:
    
    Source Context                system_u:system_r:hald_t:s0
    Target Context                unconfined_u:object_r:user_home_t:s0
    Target Objects                /etc/pm/config.d/suspend_modules [ file ]
    Source                        pm-powersave
    Source Path                   /bin/bash
    Port                          <Unknown>
    Host                          Jon-Laptop
    Source RPM Packages           bash-3.2-22.fc9
    Target RPM Packages           
    Policy RPM                    selinux-policy-3.3.1-69.fc9
    Selinux Enabled               True
    Policy Type                   targeted
    MLS Enabled                   True
    Enforcing Mode                Enforcing
    Plugin Name                   home_tmp_bad_labels
    Host Name                     Jon-Laptop
    Platform                      Linux Jon-Laptop 2.6.25.6-55.fc9.i686 #1 SMP Tue
                                  Jun 10 16:27:49 EDT 2008 i686 i686
    Alert Count                   2
    First Seen                    Sat 28 Jun 2008 11:26:28 BST
    Last Seen                     Sat 28 Jun 2008 11:27:17 BST
    Local ID                      c0603fb5-76a0-43aa-8888-f28fdeff3ef9
    Line Numbers                  
    
    Raw Audit Messages            
    
    host=Jon-Laptop type=AVC msg=audit(1214648837.542:37): avc:  denied  { getattr } for  pid=4025 comm="pm-suspend" path="/etc/pm/config.d/suspend_modules" dev=dm-0 ino=228876 scontext=system_u:system_r:hald_t:s0 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file
    
    host=Jon-Laptop type=SYSCALL msg=audit(1214648837.542:37): arch=40000003 syscall=195 success=no exit=-13 a0=89a2b98 a1=bf870080 a2=275ff4 a3=89a2b98 items=0 ppid=4022 pid=4025 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="pm-suspend" exe="/bin/bash" subj=system_u:system_r:hald_t:s0 key=(null)
    You don't happen to know how to make a rule for this do you? I'd like to keep selinux on but I have absolutely no experience with it.

    Thank you very much.
    Thinkpad T400 - Smolt Profile || Thinkpad T61 - Smolt Profile || Thinkpad T41p - Smolt Profile.

  8. #8
    Join Date
    Jul 2005
    Location
    Melbourne, Australia
    Age
    46
    Posts
    762
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    a.) you are running ath5k
    b.) sorry no knowledge with selinux. I turn it off General consensus is that its nice, but overkill for normal user, unless you're the paranoid type. I've hated selinux ever since my first weekend with linux was spent trying to get samba to work, and selinux broke it back in FC4 out of the box. As a linux newbie following general linux instructions (none of which mentioned selinux in fedora) you can imagine how confusing it was until I stumbled across this fact, upon which I promptly turned it off.

    Having said that, you can always test the fix first via after a suspend

    service NetworkManager stop
    service wpa_supplicant stop
    modprobe -r ath5k
    modprobe ath5k
    service NetworkManager start

    If above works the fix will work
    the phases of 'nix troubleshooting

    For :eek:
    :confused: | google > :D
    Next

  9. #9
    Join Date
    Sep 2006
    Location
    UK, Bucks.
    Posts
    354
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well I must give you a very big thank-you. I'll try out the steps you just said and if it works then I'm a step away from getting suspend to properly work - thank you.

    Fedora 9 really does work well on the T41p. Desktop effects works out of the box but I get some graphical artefacts upon resuming from a suspend if I have it turned on. NetworkManager with madwifi finally works (bar our troubles documented here), selinux doesn't get in the way all the time and when it does it provides useful feedback. Can't wait for Fedora 10!

    Thanks again, I'll report back when I try it out.
    Thinkpad T400 - Smolt Profile || Thinkpad T61 - Smolt Profile || Thinkpad T41p - Smolt Profile.

  10. #10
    Join Date
    Sep 2006
    Location
    UK, Bucks.
    Posts
    354
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    johannlo another big thank-you.

    I made the file titled 'suspend_modules' in '/etc/pm/config.d' containing

    Code:
    SUSPEND_MODULES='ath_pci'
    As you can see I replaced ath5k with my driver ath_pci. The madwifi drivers create ath_pci as the driver and wlan0 as the interface. So I don't think I am using ath5k.

    I had to set selinux into 'permissive' mode, instead of switching it off like you do, to get around the error message which I pasted in full in a previous post in the thread.

    It works! I'm trying to narrow down what the difference was, whether it was the /etc/pm/config.d file or whether it was putting my passphrase into hex instead.

    I am yet to try this fix on my home wireless which kept asking for my passphrase. I'm on another network, a WEP 128-bit one and I entered the key with hex instead of ascii and the combination of it all seems to have solved it.

    I'd just like to know where you found out to put the /etc/pm/config.d file there? Is that a well understood piece of information?

    Thanks again. If we can get this to work out the box in Fedora 10, I think we'd be doing everyone, including ourselves, a favour.
    I've updated my bug: https://bugzilla.redhat.com/process_bug.cgi
    Thinkpad T400 - Smolt Profile || Thinkpad T61 - Smolt Profile || Thinkpad T41p - Smolt Profile.

  11. #11
    Join Date
    Jul 2005
    Location
    Melbourne, Australia
    Age
    46
    Posts
    762
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Glad to hear it helped. I know it took me a few hours to google it up and test. Sorry don't remember where I read it, but it was on a linux forum somewhere (maybe even this one) via a google hunt.

    I am using ath5k, I manually blacklisted ath_pci because my chipset didn't even activate the wireless upon unsuspend but with ath5k its fine.

    Now to work out how to automount my shares upon unsuspend, on a laptop you really want specific shares tied to specific connections (as you may unsuspend somewhere else) is it really that hard? LOL
    the phases of 'nix troubleshooting

    For :eek:
    :confused: | google > :D
    Next

  12. #12
    Join Date
    Oct 2006
    Location
    Lincoln, NE
    Age
    68
    Posts
    414
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by johannlo
    ... FYR the reason your iwconfig etc. commands don't work is because networkmanager overrides them. You have to disable networkmanager service and enable the normal network service. I'm going to see if I can manually restore the wireless after a suspend, then go from there. ...
    May be something else causing problems with the iwconfig command. Mine works with NM enabled.
    lost in hypertime...

    Registered Linux User #329061

  13. #13
    Join Date
    Jul 2005
    Location
    Melbourne, Australia
    Age
    46
    Posts
    762
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    iwconfig is fine as a print.
    But if you use e.g. ifconfig to set the IP manually it fails epic.
    Ditto with setting your parameters in your ifup scripts manually (the old school red hat way)
    At least that was F8 behaviour, haven't tested in F9
    the phases of 'nix troubleshooting

    For :eek:
    :confused: | google > :D
    Next

  14. #14
    Join Date
    Oct 2006
    Location
    Lincoln, NE
    Age
    68
    Posts
    414
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by johannlo
    iwconfig is fine as a print.
    But if you use e.g. ifconfig to set the IP manually it fails epic.
    Ditto with setting your parameters in your ifup scripts manually (the old school red hat way)
    At least that was F8 behaviour, haven't tested in F9
    Oh, I see. That makes sense. I'll try it in F9 just to satisfy my own curiosity.
    lost in hypertime...

    Registered Linux User #329061

  15. #15
    munchy Guest
    Hi,
    I've been reading this thread to help get my MacBook wireless resuming after suspend on Fedora 9. It uses the Atheros AR5418 chipset, running on a recent Madwifi svn driver.

    I tried creating the 'suspend_modules' file with 'ath_pci' in it but this didn't work, and adding 'ath5k' wouldn't let me suspend at all. I ended up using this script from the openSUSE wiki...
    http://en.opensuse.org/Atheros_madwi...nt_and_madwifi
    and placing it in the '/etc/pm/sleep.d' folder.

    This seemed to do the trick, however I'm now left with the same problem as Dead1nside, where I've had to set SELinux to permissive mode. These are the alerts I get from SELinux each time after unsuspend...

    SELinux is preventing ip (ifconfig_t) "read" to pipe (hald_t).
    SELinux is preventing arping (netutils_t) "read" to pipe (hald_t).
    SELinux is preventing ip (ifconfig_t) "write" to /var/log/pm-suspend.log (hald_log_t).

    I'd like to set SELinux back to enforce mode, so does anyone know how I would create local policy modules for SELinux? I see there's an option in SELinux Administration to create a new policy but I'm a bit lost how to use it.

Page 1 of 2 12 LastLast

Similar Threads

  1. [Fedora 8rc3] madwifi networkmanager wpa_supplicant problems
    By moosetooth in forum Servers & Networking
    Replies: 3
    Last Post: 15th November 2007, 09:13 PM
  2. FC5 installation failure on ThinkPad T41p
    By kimsg in forum EOL (End Of Life) Versions
    Replies: 4
    Last Post: 20th September 2006, 10:11 PM
  3. GRUB and W2K/XP on IBM T41p Thinkpad
    By Hose in forum Hardware
    Replies: 4
    Last Post: 24th August 2004, 12:55 AM
  4. Replies: 0
    Last Post: 15th July 2004, 02:21 AM
  5. Installation on ThinkPad T41P?
    By AussieGuy in forum Hardware
    Replies: 1
    Last Post: 26th March 2004, 10:54 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •