# vesafb not enabling ypan or ywrap

## WingGnDm

I am running the 2.6.15 gentoo source kernel on an athlon64 sytem with a geforce 6800.  The problem is that vesafb will not enable ypan or ywrap even when passing is the correct options.  I have video=vesafb:ywrap,mtrr:3 vga=0x31b

I have tried it with ypan also and many different modes including 640x480-16.  It stays at redraw and report that the mode is not vga compatible with at 640x480-16.  Does anyone else also have this problem or a way to enable ywrap?

----------

## coco-loco

You could try something like

```
video=vesafb:ywrap,mttr,1280x1024-16@60
```

this works fine for me.

----------

## marschw

I'm having the same problem, and I'm also using the amd64 profile (the system itself is EM64T).  I'm trying to get it to use a PCI-Express ATI X600 for VESA, although the motherboard has built-in graphics, which I'm not using.  Here's the output of dmesg |grep -i vesa:

```
[    0.000000] Kernel command line: root=/dev/sda7 vga=0x31B video=vesafb:mtrr,ywrap

[   24.210177] vesafb: framebuffer at 0xe0000000, mapped to 0xffffc20010100000, using 7680k, total 16384k

[   24.210183] vesafb: mode is 1280x1024x24, linelength=3840, pages=3

[   24.210186] vesafb: scrolling: redraw

[   24.210190] vesafb: Truecolor: size=0:8:8:8, shift=0:16:8:0

[   24.210195] vesafb: Mode is not VGA compatible
```

I've tried permutations of the kernel command line, but at this point I'm tired of rebooting.  My uname is as follows:

```
Linux myhostname 2.6.15-ck3-r1 #5 SMP PREEMPT Thu Feb 23 15:19:43 PST 2006 x86_64 Intel(R) Pentium(R) 4 CPU 3.00GHz GenuineIntel GNU/Linux
```

Also, IIRC, passing the resolution in the form 1280x1024-16@60 is for VESAFB-TNG, which doesn't support amd64 yet.

 -=Marcus

----------

## allank63

For me vesafb on amd64 also only redraws and does not support ywrap/ypan. The issue is in drivers/video/vesafb.c . On amd64 the variable screen_info.vesapm_seg is set to 0, which effectively disables the protected mode interface required for ywrap/ypan and pmipal. There is obviously a reason for this as this is a specific #ifndef __i386__, but I don't know enough about amd64 to know why. Also vesafb-tng is a x86 only framebuffer so that is not an option.

From reading the code I think that video=vesafb:mtrr:4 (write-through) should work, assuming you enabled MTRR. And that should improve performance.

The only workaround to the ypan/ywrap issue would be a hardware specific driver with acceleration that might offer better performance.

----------

## niskel

I am on amd64 and I can't get ywrap working either. Is it only available on vesa-tng? Scrolling in the console is terribly terribly slow for me. I remember scrolling on the amd64 LiveCD was very fast, nothing near as slow as what I have. Has anyone on amd64 been able to get ywrap working? I always only get the following in my dmesg:

```
vesafb: framebuffer at 0xe0000000, mapped to 0xffffc20000080000, using 6144k, total 131072k

vesafb: mode is 1024x768x32, linelength=4096, pages=1

vesafb: scrolling: redraw

vesafb: Truecolor: size=8:8:8:8, shift=24:16:8:0

Console: switching to colour frame buffer device 128x48

fb0: VESA VGA frame buffer device
```

specifically of note is the

```
vesafb: scrolling: redraw
```

My grub entry is:

```
title=Gentoo Linux

  root (hd0,0)

  kernel /kernel root=/dev/sda3 panic=5 video=vesafb:ywrap,mtrr:3 vga=0x318
```

----------

## allank63

niskel - On AMD64 with vesafb, ywrap and pmipal are deliberately disabled in the code, and vesa-tng is not compatible with AMD64.

I noticed that you selected vga=0x318, which is 1024x768 24-bit (16 million) colors. Since I only wanted text on my console, 8-bit (256 colors) are fine and should increase scrolling speed (less data to copy/mode), so I used vga=0x305. Also I used write-through, which is mttr:4, on the assumption that would also be faster, but I did not test that. So my kernel options are listed below, and scrolling speed is great (much faster than I can read):

```

kernel /boot/2.6.15-gentoo-r7 ro root=/dev/sda3 vga=0x305 video=vesafb:ywrap,pmipal,mtrr:4 

```

Note I specified ywrap and pmipal even though they are currently disabled since I hope they might be enabled in a future release!

----------

## niskel

I may decide to go to 8-bit color but haven't yet because up until recently I had a bootsplash theme (useless but looks cool) so I wanted to have the color depth available. I also occasionally used the framebuffer links browser. Also, yes, scrolling is faster than I can read but if I am running a command with a lot of output (emerge), the command will run slower because it takes longer to draw the text to the screen. I suppose this is more of a situation of wanting to have my cake and eat it too.

----------

