1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
|
<?xml version="1.0" encoding="ISO8859-1" standalone="no"?>
<!DOCTYPE article PUBLIC "-//FreeBSD//DTD DocBook XML V4.2-Based Extension//EN"
"../../../share/sgml/freebsd42.dtd" [
<!ENTITY % entities PUBLIC "-//FreeBSD//ENTITIES DocBook FreeBSD Entity Set//EN" "../../share/sgml/entities.ent">
%entities;
]>
<article lang='en'>
<articleinfo>
<title>FreeBSD on Laptops</title>
<abstract>
<para>FreeBSD works fine on most laptops, with a few caveats.
Some issues specific to running FreeBSD on laptops, relating
to different hardware requirements from desktops, are
discussed below.</para>
</abstract>
<legalnotice id="trademarks" role="trademarks">
&tm-attrib.freebsd;
&tm-attrib.linux;
&tm-attrib.microsoft;
&tm-attrib.general;
</legalnotice>
<pubdate>$FreeBSD$</pubdate>
<releaseinfo>$FreeBSD$</releaseinfo>
</articleinfo>
<para>FreeBSD is often thought of as a server operating system, but
it works just fine on the desktop, and if you want to use it on
your laptop you can enjoy all the usual benefits: systematic
layout, easy administration and upgrading, the ports/packages
system for adding software, and so on. (Its other benefits,
such as stability, network performance, and performance under
a heavy load, may not be obvious on a laptop, of course.)
However, installing it on laptops often involves problems which
are not encountered on desktop machines and are not commonly
discussed (laptops, even more than desktops, are fine-tuned for
µsoft.windows;). This article aims to discuss some of these
issues. Several people have also documented their experiences
with &os; on specific laptop models on webpages which are not
part of the &os; documentation. You might very well find some
information if you type the name of your laptop model and the
word <quote>&os;</quote> into a search engine of your
choice. Additionally there is a &os;-specific online database
which aims to give information on hardware issues with laptops,
<ulink url="http://laptop.bsdgroup.de/freebsd/">The &os;
Laptop Compatibility List</ulink>.</para>
<para>If you want to communicate with other &os; laptop users,
check out the &a.mobile.name; list. You can also get additional
information about using Laptops on &os; at
<ulink url="http://tuxmobil.org/mobile_bsd.html"></ulink>.</para>
<sect1 id="xorg">
<title>&xorg;</title>
<para>Recent versions of <application>&xorg;</application> work with most display adapters
available on laptops these days. Acceleration may not be
supported, but a generic SVGA configuration should work.</para>
<para>Check your laptop documentation for which card you have,
and check in the <application>&xorg;</application> documentation
to see whether it is specifically supported. If it is not, use
a generic device (do not go for a name which just looks
similar). You can try your luck
with the command <userinput>Xorg -configure</userinput>
which auto-detects a lot of configurations.</para>
<para>The problem often is configuring the monitor. Common
resources for <application>&xorg;</application> focus on CRT monitors; getting a
suitable modeline for an LCD display may be tricky. You may
be lucky and not need to specify a modeline, or just need to
specify suitable <literal>HorizSync</literal> and <literal>VertRefresh</literal> ranges. If that
does not work, the best option is to check web resources
devoted to configuring X on laptops (these are often
Linux oriented sites but it does not matter because both systems
use <application>&xorg;</application>) and copy a modeline posted by someone for similar
hardware.</para>
<para>Most laptops come with two buttons on their pointing
devices, which is rather problematic in X (since the middle
button is commonly used to paste text); you can map a
simultaneous left-right click in your X configuration to
a middle button click with the line</para>
<programlisting>
Option "Emulate3Buttons"
</programlisting>
<para>in the <filename>xorg.conf</filename> file in the <literal>InputDevice</literal>
section.</para>
</sect1>
<sect1 id="modems">
<title>Modems</title>
<para>
Laptops usually come with internal (on-board) modems.
Unfortunately, this almost always means they are
<quote>winmodems</quote> whose
functionality is implemented in software, for which only &windows;
drivers are normally available (though a few drivers are beginning
to show up for other operating systems; for example, if your modem has a Lucent LT chipset it might be supported by the <filename role="package">comms/ltmdm</filename> port). If that is the case, you
need to buy an external modem: the most compact option is
probably a PC Card (PCMCIA) modem, discussed below, but
serial or USB modems may be cheaper. Generally, regular
modems (non-winmodems) should work fine.
</para>
</sect1>
<sect1 id="pcmcia">
<title>PCMCIA (PC Card) devices</title>
<para> Most laptops come with PCMCIA (also called PC Card)
slots; these are supported fine under FreeBSD. Look through
your boot-up messages (using &man.dmesg.8;) and see whether these were
detected correctly (they should appear as
<devicename>pccard0</devicename>,
<devicename>pccard1</devicename> etc on devices like
<devicename>pcic0</devicename>).</para>
<para>&os; 4.X supports 16-bit PCMCIA cards, and
&os; 5.X supports both 16-bit and
32-bit (<quote>CardBus</quote>) cards. A database of supported
cards is in the file <filename>/etc/defaults/pccard.conf</filename>.
Look through it, and preferably buy cards listed there. Cards not
listed may also work as <quote>generic</quote> devices: in
particular most modems (16-bit) should work fine, provided they
are not winmodems (these do exist even as PC Cards, so watch out).
If your card is recognised as a generic modem, note that the
default <filename>pccard.conf</filename> file specifies a delay time of 10 seconds
(to avoid freezes on certain modems); this may well be
over-cautious for your modem, so you may want to play with it,
reducing it or removing it totally.</para>
<para>Some parts of <filename>pccard.conf</filename> may need
editing. Check the irq line, and be sure to remove any number
already being used: in particular, if you have an on board sound
card, remove irq 5 (otherwise you may experience hangs when you
insert a card). Check also the available memory slots; if your
card is not being detected, try changing it to one of the other
allowed values (listed in the manual page &man.pccardc.8;).
</para>
<para>If it is not running already, start the &man.pccardd.8; daemon.
(To enable it at boot time, add
<programlisting>pccard_enable="YES"</programlisting> to
<filename>/etc/rc.conf</filename>.) Now your cards should be
detected when you insert and remove them, and you should get
log messages about new devices being enabled.</para>
<para>There have been major changes to the pccard code
(including ISA routing of interrupts, for machines where
&os; is not able to use the PCI BIOS) before the &os; 4.4
release. If you have problems, try upgrading your system.</para>
</sect1>
<sect1 id="power-management">
<title>Power management</title>
<para>Unfortunately, this is not very reliably supported under
FreeBSD. If you are lucky, some functions may work reliably;
or they may not work at all.</para>
<para>To make things a little more complex, there are two existing
standards for power management: APM and ACPI, the latter
superseding the former and including more features, but also
introducing more problems.</para>
<para>Some laptops support both APM and ACPI (to a certain
degree), others just support one of them, so chances are that
you have to experiment with both of them to have reliable power
management on your laptop.</para>
<note>
<para>You cannot have APM and ACPI enabled at the same time,
even if your laptop has support for both of them.</para>
</note>
<sect2>
<title>APM</title>
<para>The APM (Advanced Power Management) BIOS provides support
for various power management features like standby, suspend,
hibernation, CPU clock slow down etc. and is available
under &os; 4.X and &os; 5.X.</para>
<para>To enable APM support, you can compile a kernel with power
management support (<literal>device apm0</literal> on
&os; 4.X and <literal>device apm</literal> on
&os; 5.X). A kernel module for APM is available under
&os; 5.X, to simply load the APM kernel module at boot
add the line <literal>apm_load="YES"</literal> to
<filename>/boot/loader.conf</filename>.</para>
<para>On &os; 5.X, you also have to set
<literal>hint.apm.0.disabled="0"</literal> in
<filename>/boot/device.hints</filename>.</para>
<para>You can start APM at boot time by having
<literal>apm_enable="YES"</literal> in
<filename>/etc/rc.conf</filename>. You may also want start
the &man.apmd.8; daemon by adding
<literal>apmd_enable="YES"</literal> to
<filename>/etc/rc.conf</filename>, which takes care of
various APM events that are posted to the BIOS, so you can
have your laptop suspend/resume by pressing some function
key on the keyboard or by closing/opening the lid.</para>
<para>The APM commands are listed in the &man.apm.8; manual page.
For instance, <command>apm -b</command> gives you battery
status (or 255 if not supported), <command>apm -Z</command>
puts the laptop on standby, <command>apm -z</command> (or
<command>zzz</command>) suspends it. To shutdown and power
off the machine, use <command>shutdown -p</command>. Again,
some or all of these functions may not work very well or at
all.</para>
<para>You may find that laptop suspension/standby works in
console mode but not under X (that is, the screen does not
come on again); if you are running &os; 5.X, one solution
for this might be to put <literal>options
SC_NO_SUSPEND_VTYSWITCH</literal>
in your kernel configuration file and recompile your kernel.
Another workaround is to switch to a virtual console (using
<keycombo
action="simul"><keycap>Ctrl</keycap><keycap>Alt</keycap><keycap>F1</keycap></keycombo>
or another function key) and then execute &man.apm.8;.
You can automate this with &man.vidcontrol.1;, if you are
running &man.apmd.8;. Simply edit
<filename>/etc/apmd.conf</filename> and change it to
this:</para>
<programlisting>apm_event SUSPENDREQ {
exec "vidcontrol -s 1 < /dev/console";
exec "/etc/rc.suspend";
}
apm_event USERSUSPENDREQ {
exec "vidcontrol -s 1 < /dev/console";
exec "sync && sync && sync";
exec "sleep 1";
exec "apm -z";
}
apm_event NORMRESUME, STANDBYRESUME {
exec "/etc/rc.resume";
exec "vidcontrol -s 9 < /dev/console";
}</programlisting>
</sect2>
<sect2>
<title>ACPI</title>
<para>ACPI (Advanced Configuration and Power Management
Interface) provides not only power management but also
platform hardware discovery (superseding PnP and PCI BIOS).
ACPI is only available under &os; 5.X and is enabled by
default, so you do not have to do anything special to get it
running. You can control ACPI behaviour with
&man.acpiconf.8;.</para>
<para>Unfortunately, vendors often ship their laptops with
broken ACPI implementations, thus having ACPI enabled
sometimes causes more problems than being useful, up to the
point that you cannot even boot &os; on some machines with
ACPI enabled.</para>
<para>If ACPI is causing problems, you might check if your
laptop vendor has released a new BIOS version that fixes some
bugs. Since the &os; ACPI implementation is still very
evolving code, you might also want to upgrade your system;
chances are that your problems are fixed.</para>
<para>If you want to disable ACPI simply add
<literal>hint.acpi.0.disabled="1"</literal> to
<filename>/boot/device.hints</filename>. You can disable
ACPI temporarily at the boot loader prompt by issuing
<literal>unset acpi_load</literal> if you are having problems
booting an ACPI enabled machine. &os; 5.1-RELEASE and
later come with a boot-time menu that controls how &os; is
booted. One of the proposed options is to turn off ACPI. So
to disable ACPI just select <guimenuitem>2. Boot &os; with ACPI
disabled</guimenuitem> in the menu.</para>
</sect2>
<sect2>
<title>Display Power Management</title>
<para>The X window system (<application>&xorg;</application>) also includes display power
management (look at the &man.xset.1; manual page, and search for
<quote>dpms</quote> there). You may want to investigate this. However, this,
too, works inconsistently on laptops: it
often turns off the display but does not turn off the
backlight.</para>
</sect2>
</sect1>
</article>
|