# nouveau fb console off screen (solved)

## TrueDFX

I'm using nouveau and setting a 1920x1080 resolution, both on the framebuffer and in X. X did not autodetect my monitor's capabilities and chose 1360x768, but adding a modeline in xorg.conf allows me to run it in 1920x1080. The modeline I'm using is something generated by http://www.arachnoid.com/modelines/ and looks like this:

```
Modeline    "1920x1080" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync
```

This is exactly right, or so close to exactly right that I don't see the difference. For the fb console, though, I'm booting with video=VGA-1:1920x1080@60, only to find that the first column is not visible, and some part of the top row is missing as well. Can I use a custom modeline for the fb console? fbset is supposed to be able to do it, but fbset doesn't work with KMS, and I haven't been able to find any other way. Any suggestions would be much appreciated.Last edited by TrueDFX on Wed May 05, 2010 11:32 am; edited 1 time in total

----------

## Gusar

Try this:

```
video=VGA-1:1920x1080M@60
```

Note the 'M' in there.

From kernel documentation: *Quote:*   

> Valid mode specifiers (mode_option argument):
> 
>     <xres>x<yres>[M][R][-<bpp>][@<refresh>][i][m]
> 
>     <name>[-<bpp>][@<refresh>]
> ...

 

----------

## TrueDFX

Thanks for the suggestion, but that didn't help. I get the same problem with that. I think that M only means that

```
$ /usr/sbin/parse-edid </sys/devices/pci0000\:00/0000\:00\:09.0/0000\:02\:00.0/drm/card0/card0-VGA-1/edid 

/usr/sbin/parse-edid: parse-edid version 2.0.0

/usr/sbin/parse-edid: EDID checksum passed.

        # EDID version 1 revision 3

Section "Monitor"

        # Block type: 2:0 3:fd

        Identifier "LCD:6613"

        VendorName "LCD"

        ModelName "LCD:6613"

        # Block type: 2:0 3:fd

        HorizSync 30-65

        VertRefresh 50-76

        # Max dot clock (video bandwidth) 110 MHz

        # DPMS capabilities: Active off:no  Suspend:no  Standby:no

        Mode    "1360x768"      # vfreq 60.015Hz, hfreq 47.712kHz

                DotClock        85.500000

                HTimings        1360 1424 1536 1792

                VTimings        768 771 777 795

                Flags   "+HSync" "+VSync"

        EndMode

        Mode    "1280x768"      # vfreq 59.870Hz, hfreq 47.776kHz

                DotClock        79.500000

                HTimings        1280 1344 1472 1664

                VTimings        768 771 778 798

                Flags   "-HSync" "+VSync"

        EndMode

        Mode    "1366x768"      # vfreq 59.990Hz, hfreq 48.472kHz

                DotClock        87.250000

                HTimings        1366 1430 1542 1800

                VTimings        768 772 781 808

                Flags   "-HSync" "+VSync"

        EndMode

        # Block type: 2:0 3:fd

EndSection
```

gets ignored, but 1920x1080 isn't in there anyway, otherwise I wouldn't have had to add it explicitly to the kernel command line and xorg.conf. [Edit] And just in case, m also results in the same behaviour, and with R and i I get no output at all.

----------

## TrueDFX

Well, I noticed the difference between the calculation done by the web page I used, and the calculation done by the kernel. The web page uses the GTF formula, the kernel forces the CVT formula for modes specified on the command line. And having found that, I tried and got correctly positioned screen output with

```
--- ./drivers/gpu/drm/drm_crtc_helper.c

+++ ./drivers/gpu/drm/drm_crtc_helper.c

@@ -327,11 +327,19 @@

        }

 

 create_mode:

+#if 0

        mode = drm_cvt_mode(connector->dev, cmdline_mode->xres,

                            cmdline_mode->yres,

                            cmdline_mode->refresh_specified ? cmdline_mode->refresh : 60,

                            cmdline_mode->rb, cmdline_mode->interlace,

                            cmdline_mode->margins);

+#else

+       mode = drm_gtf_mode(connector->dev, cmdline_mode->xres,

+                           cmdline_mode->yres,

+                           cmdline_mode->refresh_specified ? cmdline_mode->refresh : 60,

+                           cmdline_mode->interlace,

+                           cmdline_mode->margins);

+#endif

        drm_mode_set_crtcinfo(mode, CRTC_INTERLACE_HALVE_V);

        list_add(&mode->head, &connector->modes);

        return mode;
```

Now let's see if there's a way to get that already, without patching the kernel...

Update: it looks like there are plans, but not for the near future.. So, since I already have something that works, I will consider this solved.

----------

