diff options
author | Antonino A. Daplas <adaplas@gmail.com> | 2006-06-26 03:27:07 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 12:58:33 -0400 |
commit | a4a73e1f0283850edc143d28502c1c517c6ab49c (patch) | |
tree | c3e767bf8a3a19d0823d770357c472f70dde324a /Documentation/fb | |
parent | 5428b04405af1bb441aa8aabd314e48b870bc58e (diff) |
[PATCH] Detaching fbcon: update documentation
Update Documentation/fb/fbcon.txt on the following:
1. sysfs attributes are now located in class/graphics/fbcon
2. instructions on how to attach, detach and/or unload fbcon
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'Documentation/fb')
-rw-r--r-- | Documentation/fb/fbcon.txt | 104 |
1 files changed, 100 insertions, 4 deletions
diff --git a/Documentation/fb/fbcon.txt b/Documentation/fb/fbcon.txt index 08dce0f631bf..f3a3be087707 100644 --- a/Documentation/fb/fbcon.txt +++ b/Documentation/fb/fbcon.txt | |||
@@ -135,10 +135,10 @@ C. Boot options | |||
135 | 135 | ||
136 | The angle can be changed anytime afterwards by 'echoing' the same | 136 | The angle can be changed anytime afterwards by 'echoing' the same |
137 | numbers to any one of the 2 attributes found in | 137 | numbers to any one of the 2 attributes found in |
138 | /sys/class/graphics/fb{x} | 138 | /sys/class/graphics/fbcon |
139 | 139 | ||
140 | con_rotate - rotate the display of the active console | 140 | rotate - rotate the display of the active console |
141 | con_rotate_all - rotate the display of all consoles | 141 | rotate_all - rotate the display of all consoles |
142 | 142 | ||
143 | Console rotation will only become available if Console Rotation | 143 | Console rotation will only become available if Console Rotation |
144 | Support is compiled in your kernel. | 144 | Support is compiled in your kernel. |
@@ -148,5 +148,101 @@ C. Boot options | |||
148 | Actually, the underlying fb driver is totally ignorant of console | 148 | Actually, the underlying fb driver is totally ignorant of console |
149 | rotation. | 149 | rotation. |
150 | 150 | ||
151 | --- | 151 | C. Attaching, Detaching and Unloading |
152 | |||
153 | It's possible to detach/attach the framebuffer console from the vt layer by | ||
154 | echoing anything to the following sysfs attributes found | ||
155 | /sys/class/graphics/fbcon. | ||
156 | |||
157 | attach - attach framebuffer console to vt layer | ||
158 | detach - detach framebuffer console to vt layer | ||
159 | |||
160 | If fbcon is detached from the vt layer, your boot console driver (which is | ||
161 | usually VGA text mode) will take over. A few drivers (rivafb and i810fb) will | ||
162 | restore VGA text mode for you. With the rest, before detaching fbcon, you | ||
163 | must take a few additional steps to make sure that your VGA text mode is | ||
164 | restored properly. The following is one of the several methods that you can do: | ||
165 | |||
166 | 1. Download or install vbetool. This utility is included with most | ||
167 | distributions nowadays, and is usually part of the suspend/resume tool. | ||
168 | |||
169 | 2. In your kernel configuration, ensure that CONFIG_FRAMEBUFFER_CONSOLE is set | ||
170 | to 'y' or 'm'. Enable one or more of your favorite framebuffer drivers. | ||
171 | |||
172 | 3. Boot into text mode and as root run: | ||
173 | |||
174 | vbetool vbestate save > <vga state file> | ||
175 | |||
176 | The above command saves the register contents of your graphics | ||
177 | hardware to <vga state file>. You need to do this step only once as | ||
178 | the state file can be reused. | ||
179 | |||
180 | 4. If fbcon is compiled as a module, load fbcon by doing: | ||
181 | |||
182 | modprobe fbcon | ||
183 | |||
184 | 5. Now to detach fbcon: | ||
185 | |||
186 | vbetool vbestate restore < <vga state file> && \ | ||
187 | echo 1 > /sys/class/graphics/fbcon/detach | ||
188 | |||
189 | 6. That's it, you're back to VGA mode. And if you compiled your drivers as | ||
190 | modules, you can unload them at will. So if you want to change your driver | ||
191 | from xxxfb to yyyfb, you can do this: | ||
192 | |||
193 | detach fbcon | ||
194 | rmmod xxxfb | ||
195 | modprobe yyyfb | ||
196 | |||
197 | Of course, con2fbmap can do the same thing but will not work if xxxfb | ||
198 | and yyyfb are not compatible (ie, cannot be loaded at the same time). | ||
199 | |||
200 | 7. To reattach fbcon: | ||
201 | |||
202 | echo 1 > /sys/class/graphics/fbcon/attach | ||
203 | |||
204 | 8. Once the framebuffer console is detached, and if it is compiled as a module, | ||
205 | the module can be unloaded with 'rmmod fbcon'. This feature is great for | ||
206 | developers. | ||
207 | |||
208 | Notes for vesafb users: | ||
209 | ======================= | ||
210 | |||
211 | Unfortunately, if your bootline includes a vga=xxx parameter that sets the | ||
212 | hardware in graphics mode, such as when loading vesafb, vgacon will not load. | ||
213 | Instead, vgacon will replace the default boot console with dummycon, and you | ||
214 | won't get any display after detaching fbcon. Your machine is still alive, so | ||
215 | you can reattach vesafb. However, to reattach vesafb, you need to do one of | ||
216 | the following: | ||
217 | |||
218 | Variation 1: | ||
219 | |||
220 | a. Before detaching fbcon, do | ||
221 | |||
222 | vbetool vbemode save > <vesa state file> # do once for each vesafb mode, | ||
223 | # the file can be reused | ||
224 | |||
225 | b. Detach fbcon as in step 5. | ||
226 | |||
227 | c. Attach fbcon | ||
228 | |||
229 | vbetool vbestate restore < <vesa state file> && \ | ||
230 | echo 1 > /sys/class/graphics/fbcon/attach | ||
231 | |||
232 | Variation 2: | ||
233 | |||
234 | a. Before detaching fbcon, do: | ||
235 | |||
236 | vbetool vbemode get | ||
237 | |||
238 | b. Take note of the mode number | ||
239 | |||
240 | b. Detach fbcon as in step 5. | ||
241 | |||
242 | c. Attach fbcon: | ||
243 | |||
244 | vbetool vbemode set <mode number> && \ | ||
245 | echo 1 > /sys/class/graphics/fbcon/attach | ||
246 | |||
247 | -- | ||
152 | Antonino Daplas <adaplas@pol.net> | 248 | Antonino Daplas <adaplas@pol.net> |