# \[PATCH\] pm3fb: switching between X and fb fix

- List: linux-fbdev
- 1 message, 1 author
- Page: https://ratatoskr.run/linux-fbdev/2007/05/13457296/t

## \[PATCH\] pm3fb: switching between X and fb fix

- From: Krzysztof Helt \<hidden\>
- Date: 2007-05-27 17:23:39 
- Message: https://ratatoskr.run/linux-fbdev/2007/05/13457296.md

```text
From: Krzysztof Helt <redacted>

This patch correctly restores console state after switching from X.
Otherwise, screen is always off after switching from X.

Signed-off-by: Krzysztof Helt <redacted>

---

--- linux-2.6.21.old/drivers/video/pm3fb.c	2007-05-28 14:42:00.431762000 +0200
+++ linux-2.6.21/drivers/video/pm3fb.c	2007-05-28 19:19:46.001429935 +0200
@@ -498,7 +498,7 @@ static int pm3fb_set_par(struct fb_info 	else
		par->video |= PM3VideoControl_LINE_DOUBLE_OFF;

-	if (info->var.activate == FB_ACTIVATE_NOW)
+	if ((info->var.activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW)
		par->video |= PM3VideoControl_ENABLE;
	else {
		par->video |= PM3VideoControl_DISABLE;
```
