Index: uspace/srv/console/console.c
===================================================================
--- uspace/srv/console/console.c	(revision f0c9aff01d81837d08318925aeba53a675fd1af9)
+++ uspace/srv/console/console.c	(revision 04de76596e4d05a3dc73b8214d009de852888337)
@@ -87,7 +87,4 @@
 						 * switching */
 
-static int kernel_pixmap = -1;	/**< Number of fb pixmap, where kernel
-				 * console is stored */
-
 
 /** Find unused virtual console.
@@ -188,112 +185,78 @@
 }
 
-/** Save current screen to pixmap, draw old pixmap
- *
- * @param oldpixmap Old pixmap
- * @return ID of pixmap of current screen
- */
-static int switch_screens(int oldpixmap)
-{
-	int newpmap;
-       
-	/* Save screen */
-	newpmap = async_req_0_0(fb_info.phone, FB_VP2PIXMAP);
-	if (newpmap < 0)
-		return -1;
-
-	if (oldpixmap != -1) {
-		/* Show old screen */
-		async_msg_2(fb_info.phone, FB_VP_DRAW_PIXMAP, 0, oldpixmap);
-		/* Drop old pixmap */
-		async_msg_1(fb_info.phone, FB_DROP_PIXMAP, oldpixmap);
-	}
-	
-	return newpmap;
-}
-
 /** Switch to new console */
 static void change_console(int newcons)
 {
 	connection_t *conn;
-	static int console_pixmap = -1;
 	int i, j, rc;
 	keyfield_t *field;
 	style_t *style;
-
+	
 	if (newcons == active_console)
 		return;
-
+	
 	if (newcons == KERNEL_CONSOLE) {
+		async_serialize_start();
+		curs_visibility(0);
+		gcons_in_kernel();
+		async_serialize_end();
+		
+		if (__SYSCALL0(SYS_DEBUG_ENABLE_CONSOLE))
+			active_console = KERNEL_CONSOLE;
+		else
+			newcons == active_console;
+	}
+	
+	if (newcons != KERNEL_CONSOLE) {
+		async_serialize_start();
+		
 		if (active_console == KERNEL_CONSOLE)
-			return;
-		active_console = KERNEL_CONSOLE;
+			gcons_redraw_console();
+		
+		active_console = newcons;
+		gcons_change_console(newcons);
+		conn = &connections[active_console];
+		
+		set_style(&conn->screenbuffer.style);
 		curs_visibility(0);
-
-		async_serialize_start();
-		if (kernel_pixmap == -1) { 
-			/* store/restore unsupported */
-			set_style_col(DEFAULT_FOREGROUND, DEFAULT_BACKGROUND);
+		if (interbuffer) {
+			for (i = 0; i < conn->screenbuffer.size_x; i++)
+				for (j = 0; j < conn->screenbuffer.size_y; j++) {
+					unsigned int size_x;
+					
+					size_x = conn->screenbuffer.size_x; 
+					interbuffer[i + j * size_x] =
+					    *get_field_at(&conn->screenbuffer, i, j);
+				}
+			/* This call can preempt, but we are already at the end */
+			rc = async_req_0_0(fb_info.phone, FB_DRAW_TEXT_DATA);		
+		}
+		
+		if ((!interbuffer) || (rc != 0)) {
+			set_style(&conn->screenbuffer.style);
 			clrscr();
-		} else {
-			gcons_in_kernel();
-			console_pixmap = switch_screens(kernel_pixmap);
-			kernel_pixmap = -1;
+			style = &conn->screenbuffer.style;
+			
+			for (j = 0; j < conn->screenbuffer.size_y; j++) 
+				for (i = 0; i < conn->screenbuffer.size_x; i++) {
+					field = get_field_at(&conn->screenbuffer, i, j);
+					if (!style_same(*style, field->style))
+						set_style(&field->style);
+					style = &field->style;
+					if ((field->character == ' ') &&
+					    (style_same(field->style,
+					    conn->screenbuffer.style)))
+						continue;
+					
+					prtchr(field->character, j, i);
+				}
 		}
+		
+		curs_goto(conn->screenbuffer.position_y,
+		    conn->screenbuffer.position_x);
+		curs_visibility(conn->screenbuffer.is_cursor_visible);
+		
 		async_serialize_end();
-
-		__SYSCALL0(SYS_DEBUG_ENABLE_CONSOLE);
-		return;
-	} 
-	
-	async_serialize_start();
-
-	if (console_pixmap != -1) {
-		kernel_pixmap = switch_screens(console_pixmap);
-		console_pixmap = -1;
-	}
-	active_console = newcons;
-	gcons_change_console(newcons);
-	conn = &connections[active_console];
-
-	set_style(&conn->screenbuffer.style);
-	curs_visibility(0);
-	if (interbuffer) {
-		for (i = 0; i < conn->screenbuffer.size_x; i++)
-			for (j = 0; j < conn->screenbuffer.size_y; j++) {
-				unsigned int size_x;
-
-				size_x = conn->screenbuffer.size_x; 
-				interbuffer[i + j * size_x] =
-				    *get_field_at(&conn->screenbuffer, i, j);
-			}
-		/* This call can preempt, but we are already at the end */
-		rc = async_req_0_0(fb_info.phone, FB_DRAW_TEXT_DATA);		
-	}
-	
-	if ((!interbuffer) || (rc != 0)) {
-		set_style(&conn->screenbuffer.style);
-		clrscr();
-		style = &conn->screenbuffer.style;
-
-		for (j = 0; j < conn->screenbuffer.size_y; j++) 
-			for (i = 0; i < conn->screenbuffer.size_x; i++) {
-				field = get_field_at(&conn->screenbuffer, i, j);
-				if (!style_same(*style, field->style))
-					set_style(&field->style);
-				style = &field->style;
-				if ((field->character == ' ') &&
-				    (style_same(field->style,
-				    conn->screenbuffer.style)))
-					continue;
-
-				prtchr(field->character, j, i);
-			}
-	}
-	
-	curs_goto(conn->screenbuffer.position_y,
-	    conn->screenbuffer.position_x);
-	curs_visibility(conn->screenbuffer.is_cursor_visible);
-
-	async_serialize_end();
+	}
 }
 
@@ -498,5 +461,4 @@
 	
 	/* Connect to framebuffer driver */
-	
 	fb_info.phone = ipc_connect_me_to(PHONE_NS, SERVICE_VIDEO, 0, 0);
 	while (fb_info.phone < 0) {
@@ -505,13 +467,8 @@
 	}
 	
-	/* Save old kernel screen */
-	kernel_pixmap = switch_screens(-1);
-
 	/* Initialize gcons */
 	gcons_init(fb_info.phone);
 	/* Synchronize, the gcons can have something in queue */
 	async_req_0_0(fb_info.phone, FB_FLUSH);
-	/* Enable double buffering */
-	async_msg_2(fb_info.phone, FB_VIEWPORT_DB, (sysarg_t) -1, 1);
 	
 	async_req_0_2(fb_info.phone, FB_GET_CSIZE, &fb_info.rows,
Index: uspace/srv/console/gcons.c
===================================================================
--- uspace/srv/console/gcons.c	(revision f0c9aff01d81837d08318925aeba53a675fd1af9)
+++ uspace/srv/console/gcons.c	(revision 04de76596e4d05a3dc73b8214d009de852888337)
@@ -82,5 +82,5 @@
 static void vp_switch(int vp)
 {
-	async_msg_1(fbphone,FB_VIEWPORT_SWITCH, vp);
+	async_msg_1(fbphone, FB_VIEWPORT_SWITCH, vp);
 }
 
@@ -106,5 +106,5 @@
 static void tran_putch(char c, int row, int col)
 {
-	async_msg_3(fbphone, FB_TRANS_PUTCHAR, c, row, col);
+	async_msg_3(fbphone, FB_PUTCHAR, c, row, col);
 }
 
@@ -190,8 +190,8 @@
 	else
 		console_state[consnum] = CONS_DISCONNECTED;
-
+	
 	if (active_console == KERNEL_CONSOLE)
 		return;
-
+	
 	redraw_state(consnum);
 	vp_switch(console_vp);
@@ -218,14 +218,8 @@
 void gcons_in_kernel(void)
 {
-	if (console_state[active_console] == CONS_DISCONNECTED_SEL)
-		console_state[active_console] = CONS_DISCONNECTED;
-	else
-		console_state[active_console] = CONS_IDLE;
-	redraw_state(active_console);
-
 	if (animation != -1)
 		async_msg_1(fbphone, FB_ANIM_STOP, animation);
-
-	active_console = KERNEL_CONSOLE; /* Set to kernel console */
+	
+	active_console = KERNEL_CONSOLE;
 	vp_switch(0);
 }
@@ -343,9 +337,10 @@
 extern char _binary_nameic_ppm_start[0];
 extern int _binary_nameic_ppm_size;
-/** Redraws console graphics  */
-static void gcons_redraw_console(void)
+
+/** Redraws console graphics */
+void gcons_redraw_console(void)
 {
 	int i;
-
+	
 	if (!use_gcons)
 		return;
@@ -358,5 +353,5 @@
 	draw_pixmap(_binary_nameic_ppm_start,
 	    (size_t) &_binary_nameic_ppm_size, 5, 17);
-
+	
 	for (i = 0; i < CONSOLE_COUNT; i++)
 		redraw_state(i);
@@ -460,14 +455,14 @@
 	int i;
 	int status_start = STATUS_START;
-
+	
 	fbphone = phone;
-
+	
 	rc = async_req_0_2(phone, FB_GET_RESOLUTION, &xres, &yres);
 	if (rc)
 		return;
 	
-	if (xres < 800 || yres < 600)
-		return;
-
+	if ((xres < 800) || (yres < 600))
+		return;
+	
 	/* create console viewport */
 	/* Align width & height to character size */
@@ -507,5 +502,5 @@
 	
 	make_anim();
-
+	
 	use_gcons = 1;
 	console_state[0] = CONS_DISCONNECTED_SEL;
@@ -513,6 +508,5 @@
 	gcons_redraw_console();
 }
- 
+
 /** @}
  */
-
Index: uspace/srv/console/gcons.h
===================================================================
--- uspace/srv/console/gcons.h	(revision f0c9aff01d81837d08318925aeba53a675fd1af9)
+++ uspace/srv/console/gcons.h	(revision 04de76596e4d05a3dc73b8214d009de852888337)
@@ -37,4 +37,5 @@
 
 void gcons_init(int phone);
+void gcons_redraw_console(void);
 void gcons_change_console(int consnum);
 void gcons_notify_char(int consnum);
Index: uspace/srv/console/screenbuffer.h
===================================================================
--- uspace/srv/console/screenbuffer.h	(revision f0c9aff01d81837d08318925aeba53a675fd1af9)
+++ uspace/srv/console/screenbuffer.h	(revision 04de76596e4d05a3dc73b8214d009de852888337)
@@ -36,4 +36,5 @@
 #define __SCREENBUFFER_H__
 
+#include <stdint.h>
 
 #define DEFAULT_FOREGROUND 0x0	/**< default console foreground color */
@@ -41,6 +42,6 @@
 
 typedef struct {
-	unsigned int bg_color;		/**< background color */
-	unsigned int fg_color;		/**< foreground color */
+	uint32_t bg_color;      /**< background color */
+	uint32_t fg_color;      /**< foreground color */
 } style_t;
 
