Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: Wifi USB dongle requires removal and reconnection after the PC is suspended

  1. #1
    Join Date
    Jul 2008
    Location
    Pretoria, South Africa
    Beans
    124
    Distro
    Ubuntu 9.10 Karmic Koala

    Question Wifi USB dongle requires removal and reconnection after the PC is suspended

    I am using an Intel based desktop to connect to my local Wifi network.

    I use the "Suspend" feature quite a lot when I am not using my PC for any significant length of time. However, after typing in my password when bringing it out of "suspension", it will not reconnect to the network automatically or manually.

    I have to unplug and re-plug the USB wifi dongle. It then connects automatically.

    I am using a Canyon 802.11 g model with the ubuntu provided drivers.

    I am glad that it is just a USB dongle or else I would need to get into the guts to fiddle with the PCI card
    Last edited by glubbdrubb; May 11th, 2009 at 06:37 PM. Reason: typo

  2. #2
    Join Date
    Aug 2006
    Beans
    841

    Re: Wifi USB dongle requires removal and reconnection after the PC is suspended

    im not quite sure what does ubuntu uses to suspend, so this might not apply but its worth trying.

    first, identify your wireless kernel module (google a bit, use lsusb, etc)

    once you have identified the module, create a file called 12modules under /etc/pm/sleep.d and paste this text inside:
    Code:
    #!/bin/bash
    
    	case "$1" in
    		hibernate|suspend)
                            rmmod <your module> #insert your module's name
    			;;
    		thaw|resume)
    			modprobe <your module> #insert your module's name
    			sleep 1
    			;;
    		*)
    			;;
    	esac
    modify it to include your wireless module.

    then you have to make it executable for it to work

    i had to do something like this in order to be able to suspend since the config line in pm-suspend used to ignore modules does not work for me.

    what this script does, is remove the included modules before suspend, and inserts them later. during resume. hope it helps.


    if this does not help, simply delete the file created.

  3. #3
    Join Date
    Jul 2008
    Location
    Pretoria, South Africa
    Beans
    124
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Wifi USB dongle requires removal and reconnection after the PC is suspended

    Well... it did not work but I suspect I did not do it correctly.
    I am battling to figure out what the kernel mode is called. I used lsusb and lsmod but did not find it or recognize it. So I tried to disable the usb kernel module, and that did not correct the problem either.

    Any thoughts?

    Should I file a bug perhaps? These are the sorts of things that will keep the Masses away from linux in general. They may be relatively easy to fix but until Ubuntu works perfectly "out of the box", we wont be reaching 5% for a while.

    </rant>
    Last edited by glubbdrubb; May 11th, 2009 at 06:36 PM. Reason: typo

  4. #4
    Join Date
    Feb 2009
    Location
    Hull, England
    Beans
    Hidden!
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: Wifi USB dongle requires removal and reconnection after the PC is suspended

    ive just solved the exact same problem after weeks.
    If you could post what wireless card you are using or what the driver is I might be able to help.

  5. #5
    Join Date
    Jul 2008
    Location
    Pretoria, South Africa
    Beans
    124
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Wifi USB dongle requires removal and reconnection after the PC is suspended

    It is a Ralink USB Wireless Adapter. How would I figure out what drivers it uses? I seem to remember that when I installed it, it work almost immediately (I think). I am using the "Restricted Drivers" that Ubuntu installed when I plugged in my nVidia card. I think it just downloaded more drivers for the wfi dongle.
    Last edited by glubbdrubb; May 11th, 2009 at 07:08 PM. Reason: typos

  6. #6
    Join Date
    Feb 2009
    Location
    Hull, England
    Beans
    Hidden!
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: Wifi USB dongle requires removal and reconnection after the PC is suspended

    Go into a terminal, Type lsmod and paste the output here.
    Or give the exact model and number of your wireless adaptor.

  7. #7
    Join Date
    Jul 2008
    Location
    Pretoria, South Africa
    Beans
    124
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Wifi USB dongle requires removal and reconnection after the PC is suspended

    Here you go:

    Module Size Used by
    isofs 40228 0
    udf 88484 0
    aes_i586 15744 2
    aes_generic 35880 1 aes_i586
    binfmt_misc 16904 1
    rfcomm 44560 0
    bridge 56980 0
    stp 10628 1 bridge
    bnep 20480 2
    sco 18308 2
    l2cap 30464 6 rfcomm,bnep
    bluetooth 61924 6 rfcomm,bnep,sco,l2cap
    vboxnetflt 92296 0
    vboxdrv 119080 1 vboxnetflt
    ipv6 263972 18
    ppdev 15748 0
    af_packet 25728 4
    acpi_cpufreq 15500 0
    cpufreq_conservative 14600 0
    cpufreq_stats 13188 0
    cpufreq_ondemand 14988 4
    cpufreq_powersave 9856 0
    cpufreq_userspace 11396 0
    freq_table 12672 3 acpi_cpufreq,cpufreq_stats,cpufreq_ondemand
    sbs 19464 0
    container 11520 0
    pci_slot 12680 0
    video 25232 0
    output 11008 1 video
    sbshc 13440 1 sbs
    wmi 14504 0
    battery 18436 0
    iptable_filter 10752 0
    ip_tables 19600 1 iptable_filter
    x_tables 22916 1 ip_tables
    ac 12292 0
    sbp2 29324 0
    parport_pc 39332 0
    lp 17156 0
    parport 42604 3 ppdev,parport_pc,lp
    arc4 9984 2
    ecb 10880 2
    crypto_blkcipher 25476 1 ecb
    snd_hda_intel 384176 7
    snd_pcm_oss 46848 0
    snd_mixer_oss 22784 1 snd_pcm_oss
    rt73usb 30464 0
    crc_itu_t 10112 2 udf,rt73usb
    snd_pcm 83204 3 snd_hda_intel,snd_pcm_oss
    snd_seq_dummy 10884 0
    snd_seq_oss 38528 0
    snd_seq_midi 14336 0
    rt2500usb 27904 0
    rt2x00usb 18816 2 rt73usb,rt2500usb
    rt2x00lib 36224 3 rt73usb,rt2500usb,rt2x00usb
    rfkill 17176 1 rt2x00lib
    snd_rawmidi 29824 1 snd_seq_midi
    led_class 12164 1 rt2x00lib
    snd_seq_midi_event 15232 2 snd_seq_oss,snd_seq_midi
    mac80211 216820 2 rt2x00usb,rt2x00lib
    snd_seq 57776 6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_mid i_event
    snd_timer 29960 2 snd_pcm,snd_seq
    snd_seq_device 15116 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi ,snd_seq
    cfg80211 32392 2 rt2x00lib,mac80211
    nvidia 7082420 44
    snd 63268 22 snd_hda_intel,snd_pcm_oss,snd_mixer_oss,snd_pcm,sn d_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_de vice
    i2c_core 31892 1 nvidia
    intel_agp 33724 0
    soundcore 15328 1 snd
    serio_raw 13444 0
    snd_page_alloc 16136 2 snd_hda_intel,snd_pcm
    evdev 17696 6
    iTCO_wdt 18596 0
    psmouse 45200 0
    pcspkr 10624 0
    shpchp 38036 0
    iTCO_vendor_support 11652 1 iTCO_wdt
    pci_hotplug 34976 1 shpchp
    button 14224 0
    agpgart 42184 2 nvidia,intel_agp
    ext3 133256 2
    jbd 55828 1 ext3
    mbcache 16004 1 ext3
    sr_mod 22212 0
    cdrom 43168 1 sr_mod
    sd_mod 42392 6
    crc_t10dif 9984 1 sd_mod
    sg 39732 0
    pata_acpi 12160 0
    ata_generic 12932 0
    usbhid 35840 0
    hid 50560 1 usbhid
    pata_jmicron 11136 0
    ata_piix 24708 4
    ohci1394 37936 0
    libata 178208 4 pata_acpi,ata_generic,pata_jmicron,ata_piix
    iee


    Edit: sorry it did not come out nicely..

  8. #8
    Join Date
    Feb 2009
    Location
    Hull, England
    Beans
    Hidden!
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: Wifi USB dongle requires removal and reconnection after the PC is suspended

    OK looks like were in business, its the same driver as mine. rt73usb.
    Open a terminal type "sudo gedit" followed by your password.
    An unsaved document comes up.
    Paste in this line- SUSPEND_MODULES=rt73usb
    Click "file" at the top. "save as", then "file system" on the left.
    Then in the main box double click "etc", "pm" and "config.d".
    In the name at the top call it "madwifi" and finally click save.
    That should be it.
    Suspend and resume and see what happens.
    Let me know if there is a problem.

  9. #9
    Join Date
    Jul 2008
    Location
    Pretoria, South Africa
    Beans
    124
    Distro
    Ubuntu 9.10 Karmic Koala

    Thumbs down Re: Wifi USB dongle requires removal and reconnection after the PC is suspended

    IT WORKED!

    Thanks for the help. That is now my second last annoyance fixed.

    I am quite surprised that the networking modules aren't suspended when you put the PC into suspension anyway.

    I am surprised that the monitor switches off with out my intervention.

    I guess it must be a driver issue..

  10. #10
    Join Date
    Feb 2009
    Location
    Hull, England
    Beans
    Hidden!
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: Wifi USB dongle requires removal and reconnection after the PC is suspended

    Glad it worked.
    Hoped my post was clear enough.
    Ive been wrestling with this for weeks, and I know many others are having the same problem.
    Workarounds are so simple, when they work!!

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

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