Fedora 18: Difference between revisions

From JoeHacker
Line 16: Line 16:
My wireless driver didn't suspend correctly and it acted bad when the system was resumed. I found the best solution for me was to have systemd unload the wireless module during suspend and reload during resume.
My wireless driver didn't suspend correctly and it acted bad when the system was resumed. I found the best solution for me was to have systemd unload the wireless module during suspend and reload during resume.


  cd /etc/systemd/system
Find out what wireless driver you have, in my example it is going to be iwl4965
  #ethtool -i wlan0 | grep driver
  driver: iwl4965
 
#cd /etc/systemd/system


Create the following files:
Create the following files:
 
wifi-sleep.service
pre-sleep.service
  [Unit]
  [Unit]
  Description=Prepare System Sleep
  Description=deactivate / activate wireless modules
Before=sleep.target
StopWhenUnneeded=yes
   
   
  [Service]
  [Service]
  Type=oneshot
  Type=oneshot
  ExecStart=/usr/sbin/modprobe -r iwl4965  
RemainAfterExit=yes
  ExecStart=/usr/sbin/modprobe -r iwl4965
ExecStop=/usr/sbin/modprobe iwl4965
   
   
  [Install]
  [Install]
Line 32: Line 39:




post-sleep.service
You then need to enable the new scripts
[Unit]
systemctl enable wifi-sleep.service
Description=Finish System Sleep
After=suspend.target
[Service]
Type=oneshot
ExecStart=/usr/sbin/modprobe iwl4965
[Install]
WantedBy=suspend.target


You then need to enable the new scripts
To disable the service
systemctl enable pre-sleep.service
  systemctl disable wifi-sleep.service
  systemctl enable post-sleep.service

Revision as of 23:38, 18 February 2013

Getting VMWare 9 to compile in fc18

After upgrading to Fedora 18, VMWare 9.0.1, you get and error that "Kernel headers for version 3.7.2-201.fc18.x86_64 were not found". VMWare will not compile because it cannot find the correct version.h file. Simple fix is to create a symlink and vmware will compile the needed modules.

First make sure that the compiler and header packages are installed.

sudo yum install gcc kernel-devel kernel-headers

The following command will create the link.

sudo ln -s /usr/src/kernels/$(uname -r)/include/generated/uapi/linux/version.h /usr/src/kernels/$(uname -r)/include/linux/version.h

Now just start vmware and the modules will compile and install.

Issues with Wireless driver during suspend / resume

My wireless driver didn't suspend correctly and it acted bad when the system was resumed. I found the best solution for me was to have systemd unload the wireless module during suspend and reload during resume.

Find out what wireless driver you have, in my example it is going to be iwl4965

#ethtool -i wlan0 | grep driver
  driver: iwl4965
#cd /etc/systemd/system

Create the following files: wifi-sleep.service

[Unit]
Description=deactivate / activate wireless modules
Before=sleep.target
StopWhenUnneeded=yes

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/modprobe -r iwl4965
ExecStop=/usr/sbin/modprobe iwl4965

[Install]
WantedBy=sleep.target


You then need to enable the new scripts

systemctl enable wifi-sleep.service

To disable the service

systemctl disable wifi-sleep.service