You are not logged in.

#1 2013-02-07 09:12:09

Joe S
Member
Registered: 2013-01-18
Posts: 4

[SOLVED] Suspend Resume WLAN USB Realtek r8712u Linux 3.7.5-1

After suspend to ram any r8712u wireless usb device won't wake up, killing the wireless network.

The solution I found was to stop the network and unload the module before going into suspend. The following systemd service file does the trick:

/etc/systemd/system/root-suspend.service

[Unit]
Description=Local system suspend actions
Before=sleep.target

[Service]
Type=oneshot
ExecStart=/usr/bin/systemctl stop network ; /usr/bin/rmmod r8712u

[Install]
WantedBy=sleep.target

To load the module and start the network:

/etc/systemd/system/root-resume.service

 
[Unit]
Description=Local system resume actions
After=suspend.target                                                            
                                                                                
[Service]                                                                       
Type=oneshot
ExecStart=/sbin/modprobe r8712u ; /usr/bin/systemctl start network

[Install]
WantedBy=suspend.target

After enabling

systemctl enable root-resume root-suspend

and starting the unit files

systemctl start root-resume root-suspend

the wireless network works after suspend to ram.

Offline

#2 2013-02-08 17:24:36

Mihael
Member
From: Croatia
Registered: 2013-02-08
Posts: 4

Re: [SOLVED] Suspend Resume WLAN USB Realtek r8712u Linux 3.7.5-1

I was facing exact same problem with my Airlive WN-370USB witch uses r8712u driver and my solution is almost same as yours except I didn't stop the network. Is there any particular reason for doing this? And after resume it takes about a minute to connect.
The only thing different I had to do because of Airlive card is UDEV rule.
in /etc/udev/rules.d/10-local.rules

ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="1b75", ATTRS{idProduct}=="8171", RUN+="/bin/wlan"

VID and PID are specific to my adapter, if anyone faces same problems, lsusb will get you VID and PID.
For quick solution to get wireless working when installing. This works on all linux systems that I tried.

modprobe r8712u
echo VID PID > /sys/bus/usb/drivers/r8712u/new_id

Hope this will help someone.

Last edited by Mihael (2013-02-15 11:01:08)

Offline

#3 2017-03-22 04:25:19

penguintx
Member
Registered: 2017-03-22
Posts: 1

Re: [SOLVED] Suspend Resume WLAN USB Realtek r8712u Linux 3.7.5-1

JoeS  Thanks.  Very helpful.

Offline

#4 2017-03-22 10:19:24

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 6,891
Website

Re: [SOLVED] Suspend Resume WLAN USB Realtek r8712u Linux 3.7.5-1

Please don't necrobump,especially if you have nothing to add.

https://wiki.archlinux.org/index.php/Co … bumping.22
https://wiki.archlinux.org/index.php/Co … mpty_posts

Closing.


Sakura:-
Mobo: ASUS P8Z77-V PRO // Processor: Intel Core i7-3770K 3.4GHz // GFX: nVidia GeForce GTX 970 Ti // RAM: 32GB (4x 8GB) Corsair DDR3 (@ 2133MHz) // Storage: 1x 3TB Seagate SATAII 5x 1TB Samsung SATAII, 2x 120GB Corsair SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB