# Suspend on FreeBSD 7 on IBM T43



## jgg (Jun 13, 2009)

Hi,

This is my first time using BSD, so if I'm missing something obvious: apologies.

I installed FreeBSD 7 on an IBM ThinkPad T43 yesterday. While mostly everything is going smoothly, I'm still having a lot of trouble getting a few things to work. One issue in particular is that of the suspend/resume feature. I followed the guide here:

http://www.thinkwiki.org/wiki/Installing_FreeBSD_7_on_a_ThinkPad_T43#Known_Issues

and it acknowledges that there is an issue with suspending that I'm experiencing. I can put the computer in suspend mode and resume it once, but after that I have to reboot the computer to use the feature again. 

I tried performing a work-around by disabling APIC in my device.hints file. This allows me to suspend the computer more than once, but it takes approx. 2-3 minutes before it stops complaining of my Ethernet device "PHY read time out (phy 1, reg #, val 0xffffffff)", along with telling me various USB devices that "interrupt while not operating ignored" before it suspends.

I have no idea where to go from here.


----------



## jgg (Jun 16, 2009)

*Update*

UPDATE:

I found that while running X11, with APIC disabled, it will actually go into suspend and resume perfectly! But there's one problem: I loose the ability to use any mouse at all upon resume. This happens when running under X and the command line.

So, I tried restarting HAL...no luck. I also put


```
hint.psm.0.flags="0x2000"
```

in my /boot/device.hints, but this doesn't help either. No matter what, I lose my mouse support until I restart.


----------



## ibb27 (Jun 21, 2009)

If you are using Xorg 7.4, you can use old behavior (with moused in rc.conf) and turn off HAL. Just insert line:
Option "AutoAddDevices" "false"
in ServerLayout section in your xorg.conf.
I hope that helps


----------



## socillion (Aug 11, 2009)

I'm not sure if you're gonna read this, but I feel it would be a good idea to answer this for other T43 FreeBSD users who stumble across this through Google. I also have a T43 and recently installed FreeBSD. I also found ACPI suspend/resume to be one of the tough spots, and only today appear to have gotten it working in all situations. OP: if you have more questions about getting everything working, just ask... I think I have everything running except for the fingerprint scanner .


1. I'm using a 14" T43 with the PRO/Wireless 2200BG. This may not work for other hardware.
2. Edit /boot/loader.conf
Despite other recommendations, I found that disabling APIC was not necessary.
In addition to loading all the drivers like if_iwi and snd_ich, these lines are needed:

```
acpi_load="YES"
acpi_ibm_load="YES"
hint.psm.0.flags="0x3000" #So mouse works on resume
hw.acpi.reset_video=1 #Bad Stuff happens to the screen buffer without this
```
Try without any other ACPI-related lines in /boot/loader.conf and /boot/device.hints - if you attempted configuring ACPI earlier, remove what you added to be safe.
3. Edit /etc/rc.resume and /etc/rc.suspend
Find the "logger -t $subsystem ..." line in each of the file.
The below lines must be added before this 'logger -t' line.
In rc.suspend, add

```
/etc/rc.d/netif stop
```

In rc.resume, add

```
/etc/rc.d/netif start
#IF you want the network to start when resuming.
```


http://lists.freebsd.org/pipermail/freebsd-current/2009-May/006436.html has some good tips for reducing power consumption.

Attached is the xorg.conf that I use - had to rename it to upload.
-socillion


----------



## socillion (Aug 11, 2009)

Actually, 

```
hint.apic.0.disabled=1
```
is necessary in /boot/device.hints or /boot/loader.conf IF you're controlling the CPU speed with powerd etc. Everything works with C1/C2, but C3 fails with APIC (not ACPI) enabled.

Also, I think


> hint.psm.0.flags="0x2000"


should be 

```
hint.psm.0.flags="0x3000"
```

-socillion
sry for double post, but I couldn't see any way to edit my previous post.


----------

