# Working KMS on VGA-1 but not on LVDS-1

## Kanseki

I know that there are a lot of problems regarding kms, but i hope i have a much simplier problem that could be solved.

On Kubuntu i had sometimes the problem that i get a black screen after switching between vga and lvds on my laptop, i thought it could be a problem with autodetecting the resolution of the laptop screen. Also i noticed that after i login with kdm into kde the scren gets smaller on top and bottom. Probably it changes from 1366x768 to 1360x768.

Now after i installed Gentoo and tried to boot it without nomodeset the kernel changes the resolution and the screen keeps black, but when i connect my monitor via vga everything is working perfectly and i can even see the colored tux in the terminal.

My Laptop resolution is 1366x768 and i think kms can't set a fitting resolution probably tries to force the 1920x1080 resolution of my monitor even if vga is not connected.

I tried on grub:

video=VGA-1:d

video=LVDS-1:1366x768

video=LVDS-1:1360x768

video=1360x768

video=1360x768 video=VGA-1:d

Maybe someone can help me.

ps. sorry about my bad english it is not my motherlanguage

----------

## MotivatedTea

I had some trouble getting KMS working with both internal and external displays, too. For me, this works:

```
video=LCD1=1024x768@60,CRT1=1024x768@60
```

KMS on my laptop doesn't seem to work properly unless I set both devices to the same resolution and refresh rate. 1024x768 is the native resolution of my laptop. (Fortunately my external monitor is also an LCD, and 60Hz is its native refresh rate too. Also, this only affects the console. You can configure X-windows to use different resolutions for both.)

The big trick is figuring out what the correct names are for your internal and external displays. Currently, on my laptop, they are "LCD1" and "CRT1", but I remember that they were different before a kernel upgrade about a year ago. To find out, run "dmesg" and look for messages that start with "[drm]", like this:

```
[    0.323162] [drm] Panel Size 1024x768

[    0.323637] [drm] Radeon Display Connectors

[    0.323803] [drm] Connector 0:

[    0.323966] [drm]   VGA

[    0.324130] [drm]   DDC: 0x60 0x60 0x60 0x60 0x60 0x60 0x60 0x60

[    0.324298] [drm]   Encoders:

[    0.324461] [drm]     CRT1: INTERNAL_DAC1

[    0.324626] [drm] Connector 1:

[    0.324789] [drm]   DVI-D

[    0.324951] [drm]   HPD1

[    0.325114] [drm]   DDC: 0x64 0x64 0x64 0x64 0x64 0x64 0x64 0x64

[    0.325282] [drm]   Encoders:

[    0.325444] [drm]     DFP1: INTERNAL_TMDS1

[    0.325609] [drm] Connector 2:

[    0.325771] [drm]   LVDS

[    0.325935] [drm]   DDC: 0x6c 0x6c 0x6c 0x6c 0x6c 0x6c 0x6c 0x6c

[    0.326104] [drm]   Encoders:

[    0.326267] [drm]     LCD1: INTERNAL_LVDS

[    0.326431] [drm] Connector 3:

[    0.326593] [drm]   S-video

[    0.326780] [drm]   Encoders:

[    0.326943] [drm]     TV1: INTERNAL_DAC2

```

The correct names to use seem to be what is listed under "Encoders" for each device. (Note: previously, using the names under each "Connector" line worked, for example "VGA" and "LVDS", and those names seem to match the names that X-windows gives to my devices, but those names stopped working for KMS for me after some previous kernel version.) So my laptop theoretically has "CRT1", "DFP1", "LCD1", and "TV1". ("TV1" is probably ny s-video out, but I haven't tried it. "DFP1" doesn't actually seem to exist on this laptop. Probably it's an optional feature of the chipset that the manufacturer chose not to use.)

----------

