aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/fb
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/fb')
-rw-r--r--Documentation/fb/fbcon.txt69
1 files changed, 59 insertions, 10 deletions
diff --git a/Documentation/fb/fbcon.txt b/Documentation/fb/fbcon.txt
index b91aea57a98e..f373df12ed4c 100644
--- a/Documentation/fb/fbcon.txt
+++ b/Documentation/fb/fbcon.txt
@@ -180,10 +180,13 @@ fbcon.
180So, how do we unbind fbcon from the console? Part of the answer is in 180So, how do we unbind fbcon from the console? Part of the answer is in
181Documentation/console/console.txt. To summarize: 181Documentation/console/console.txt. To summarize:
182 182
183Echo the ID number of the 'frame buffer driver' to: 183Echo a value to the bind file that represents the framebuffer console
184driver. So assuming vtcon1 represents fbcon, then:
184 185
185sys/class/tty/console/bind - attach framebuffer console to console layer 186echo 1 > sys/class/vtconsole/vtcon1/bind - attach framebuffer console to
186sys/class/tty/console/unbind - detach framebuffer console from console layer 187 console layer
188echo 0 > sys/class/vtconsole/vtcon1/bind - detach framebuffer console from
189 console layer
187 190
188If fbcon is detached from the console layer, your boot console driver (which is 191If fbcon is detached from the console layer, your boot console driver (which is
189usually VGA text mode) will take over. A few drivers (rivafb and i810fb) will 192usually VGA text mode) will take over. A few drivers (rivafb and i810fb) will
@@ -211,19 +214,15 @@ restored properly. The following is one of the several methods that you can do:
211 214
2125. Now to detach fbcon: 2155. Now to detach fbcon:
213 216
214 'cat /sys/class/tty/console/backend' and take note of the ID
215
216The above is probably needed only once. Then:
217
218 vbetool vbestate restore < <vga state file> && \ 217 vbetool vbestate restore < <vga state file> && \
219 echo <ID> > /sys/class/tty/console/unbind 218 echo 0 > /sys/class/vtconsole/vtcon1/bind
220 219
2216. That's it, you're back to VGA mode. And if you compiled fbcon as a module, 2206. That's it, you're back to VGA mode. And if you compiled fbcon as a module,
222 you can unload it by 'rmmod fbcon' 221 you can unload it by 'rmmod fbcon'
223 222
2247. To reattach fbcon: 2237. To reattach fbcon:
225 224
226 echo <ID> > /sys/class/tty/console/bind 225 echo 1 > /sys/class/vtconsole/vtcon1/bind
227 226
2288. Once fbcon is unbound, all drivers registered to the system will also 2278. Once fbcon is unbound, all drivers registered to the system will also
229become unbound. This means that fbcon and individual framebuffer drivers 228become unbound. This means that fbcon and individual framebuffer drivers
@@ -254,6 +253,8 @@ Variation 1:
254 c. Attach fbcon 253 c. Attach fbcon
255 254
256 vbetool vbestate restore < <vesa state file> && \ 255 vbetool vbestate restore < <vesa state file> && \
256 echo 1 > /sys/class/vtconsole/vtcon1/bind
257
257Variation 2: 258Variation 2:
258 259
259 a. Before detaching fbcon, do: 260 a. Before detaching fbcon, do:
@@ -269,7 +270,55 @@ Variation 2:
269 c. Attach fbcon: 270 c. Attach fbcon:
270 271
271 vbetool vbemode set <mode number> && \ 272 vbetool vbemode set <mode number> && \
272 echo <ID> > /sys/class/tty/console/bind 273 echo 1 > /sys/class/vtconsole/vtcon1/bind
274
275Samples:
276========
277
278Here are 2 sample bash scripts that you can use to bind or unbind the
279framebuffer console driver if you are in an X86 box:
280
281---------------------------------------------------------------------------
282#!/bin/bash
283# Unbind fbcon
284
285# Change this to where your actual vgastate file is located
286# Or Use VGASTATE=$1 to indicate the state file at runtime
287VGASTATE=/tmp/vgastate
288
289# path to vbetool
290VBETOOL=/usr/local/bin
291
292
293for (( i = 0; i < 16; i++))
294do
295 if test -x /sys/class/vtconsole/vtcon$i; then
296 if [ `cat /sys/class/vtconsole/vtcon$i/name | grep -c "frame buffer"` \
297 = 1 ]; then
298 if test -x $VBETOOL/vbetool; then
299 echo Unbinding vtcon$i
300 $VBETOOL/vbetool vbestate restore < $VGASTATE
301 echo 0 > /sys/class/vtconsole/vtcon$i/bind
302 fi
303 fi
304 fi
305done
306
307---------------------------------------------------------------------------
308#!/bin/bash
309# Bind fbcon
310
311for (( i = 0; i < 16; i++))
312do
313 if test -x /sys/class/vtconsole/vtcon$i; then
314 if [ `cat /sys/class/vtconsole/vtcon$i/name | grep -c "frame buffer"` \
315 = 1 ]; then
316 echo Unbinding vtcon$i
317 echo 1 > /sys/class/vtconsole/vtcon$i/bind
318 fi
319 fi
320done
321---------------------------------------------------------------------------
273 322
274-- 323--
275Antonino Daplas <adaplas@pol.net> 324Antonino Daplas <adaplas@pol.net>