View | Details | Raw Unified | Return to bug 53292
Collapse All | Expand All

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

Return to bug 53292