# Linux tty consoles shifted 10 pixels left

## fulldaykg

I've read several posts of people that seem to have the same issue, but most of them aren't solved and they don't seem to have the exact problem I have...

I have an nVidia FX 5900 Ultra (AGP) video card and a SONY 19 inch flat panel TFT monitor. My kernel is built with the following relevant settings:

```
Device Drivers --->

    Graphics Support --->

        <*>  VESA VGA Graphics Support

        ...

        (1280x1024@60) VESA default mode
```

which seems to work just fine (it does put my display in 1280x1024 resolution) except that once the kernel starts to use the framebuffer, my display seems to be shifted about 10 pixels to the left, cutting of about two characters, and adding that 10 pixel blank space to the right side of the screen. Normally this wouldn't bother me, I'd just use the monitors auto correct feature to fix it (and that does work) HOWEVER this 10 pixel shift ONLY occurs on the consoles, once kdm kicks in, it's back to normal; so if I did the auto correct on the console, now in KDE my monitor is shifted 10 pixels to the right and I have to do the auto correct again to fix it!

I know that it's messed up in console mode because when I use Windows (dual boot), it does exactly what kdm does: ie. if I boot linux and do the auto correct to fix the display for my console mode, then I reboot and go to Windows, the display is off 10 pixels to the right, and I have to auto correct again. ALSO this problem only happens in 1280x1024 mode. I tested my display in 1024x768@60 and I didn't have this problem.

I tried the 

```
fbset -move right -shift 10
```

 but that didn't do anything at all. Has anyone had this same problem, and does anyone know of a fix, or even just a place where this issue is officially documented?

----------

## unclecharlie

fulldaykg,

I had the same problem when I first set up the nVidia drivers on my laptop but I don't completely remember the fix... (I was experimenting trying to find the best setup. So I was fiddling with a lot of options. If I remember correctly the problem occured with vesafb more so than vesafb-tng)

I do have a few questions-

1. Are you using vesafb or vesafb-tng? (You should be using vesafb-tng.)

2. Are you using the framebuffer driver or the nVidia driver for X?

3. What are your mode settings for 1280x1024 in /etc/fb.modes?

4. What are your grub.conf video settings?

Charlie

----------

## chunderbunny

IIRC this is actually a bug in the xorg "nv" driver which shifts the picture 10 pixel to the right...

It's fixed if you switch to the binary Nvidia driver though.

----------

## fulldaykg

Thanks for the quick responses guys,

Charlie, to answer your questions...

1. I am using vesafb-tng.

2. I'm not sure exactly what you mean by this question, but I have emerged nvidia-kernel and am using that for X.

3. I do not have an /etc/fb.modes file. Will look into that after I send this response.

4. I don't have any grub.conf video-specific settings. The resolution is built into the kernel with the setting I posted originally. I have tried other settings from grub, but I usually get an error telling me that my setting is unrecognized and I have to choose from a selection that sucks. So I haven't tried it in a while.

chunderbunny,

I didn't know it was possible to use the binary nVidia driver (I assume you mean emerging nvidia-kernel) for the console. I though that only took effect when you started a GUI. How would I go about specifying the binary nvidia module for the console? I've already got it in my xorg.conf and that works wonderfully for xdm/kdm/KDE.

----------

## unclecharlie

fulldaykg,

o.k. 

1. You're on vesafb-tng, good.

2. You are using the nVidia driver for X. (You could have been using the framebuffer driver. which is not accelerated. This is relevant to your fix...) BTW what version of the nVidia driver are you using?

3. /etc/fb.modes is the file fbset looks for to set framebuffer modes. It is not installed with fbset. However Several example files ARE installed under /usr/share/doc/fbset-<version>/*. I've had good luck using the ATI one for most video cards. Do-

```

# cd /usr/share/doc/fbset*

# cp fb.modes.ATI.gz /root

# cd /root

# gunzip fb.modes.ATI.gz

# cp fb.modes.ATI /etc/fb.modes

```

This should allow you to use the fbset command to change framebuffer resolution/refresh rate. 

4. my grub.conf loaded* the desired resolution via the kernel line using-

```

kernel vmlinuz-2.6.15-r1 root=/dev/hda3 video=vesafb:mtrr:4,ywrap,1280x1024-16@75,vtotal=32

```

Note- Don't do video=vesafb-tng:mtrr... This is incorrect.

hope this helps,

Charlie

* I say loaded above because I sold the laptop with the nVidia card yesterday. So from here on out, any help I can give you is from memory, which is spotty at best. Sorry  :Embarassed: 

----------

## fulldaykg

Thanks charlie, I will start messing around with the fb.modes file as soon as I get home. I am out of town for the weekend though, so it'll be a few days before I respond.

I am using the latest nvidia driver (had to unmask it to get it because the latest "gentoo-apporved" one was crapping out my system) I think your solution is gonna help out a lot, because I was trying to use fbset, and nothing ever happened; so maybe my problem was that I didn't have the fb.modes file. We'll see Sunday night. I'll post back ten (LATE Sunday night).

----------

## fulldaykg

Thanks Charlie, I copied the fb.modes file and I can now use the "video" flag in grub. However, it did not fix my problem, and I still can't use 

```
 fbset -move right -step 10
```

 I have no clue what the problem is. If you have any other suggestions , I'd love to hear them, but I guess I'm just stuck with 1024x768 for now. Bummer    :Confused: 

----------

## red-wolf76

Hey,

I have this problem also. It occurs only in 1280x1024@60 and also only if both fbconsole and X are on the same resolution. It works fine when I use a different resolution for vesafb in the console.

I'm using vesafb (vesa-tng isn't available under mm-sources  :Twisted Evil:  ) and the .8756 Nvidia binary drivers. Kernel sources are 2.6.17-rc1-mm2 #4 PREEMPT on an i686 AMD Athlon(tm) XP 3000+.

Here's the relevant portion of my /boot/grub/grub.conf:

```
title Gentoo Linux 2.6.17-rc1-mm2

        root (hd0,0)

        kernel /kernel-2.6.17-rc1-mm2 root=/dev/hda3 video=vesafb:ywrap,pmipal,mtrr,vga=795

```

If I use vga=791, which equals 1024x768-16M, the problem doesn't occur.

Isn't there a possibility to shift the position of the Nvidia-output by using their config tool under X?

----------

