# [KMS] Weird boot problem (Solved).

## Eurt

Greetings.

Since I installed gentoo in my new laptop I'm having a weird boot issue (kernel modesetting related) I expected to solve within kernel upgrades.

I was in a mistake...

I'm using kernel 2.6.37.2 vanilla sources patched with fbcondecor patch (I thought this could fix my problem, but it did not).

I'm using intel HD graphics (i915 driver).

I've recorded a video so that you can watch my problem:

http://www.megavideo.com/?v=7Y19EIRG

It loads fine until kernel modesetting adjust resolution, then white lines appear flying on screen. The moment in which those lines go away is highly random. In several cases, they are there even when KDM has been launched...It looks really bad.

Here is my kernel config file:

http://pastebin.com/eStVTebc

dmesg output:

http://pastebin.com/VvNpKxhv

Do you know what's wrong with that?

Thanks.Last edited by Eurt on Wed Mar 16, 2011 5:28 pm; edited 1 time in total

----------

## DONAHUE

Perhaps record the windows parameters and then set them in grub.conf?

plagiarized example: *Quote:*   

> setting the screen resolution to 1280x1024, 24bps at 75Hz would be just:
> 
> video=1280x1024-24@75

 

http://en.gentoo-wiki.com/wiki/Kernel_Mode_Setting

----------

## Eurt

 *DONAHUE wrote:*   

> Perhaps record the windows parameters and then set them in grub.conf?
> 
> plagiarized example: *Quote:*   setting the screen resolution to 1280x1024, 24bps at 75Hz would be just:
> 
> video=1280x1024-24@75 
> ...

 

Same result, I've already read this guide   :Sad: .

It's strange, I think this issue is not resolution related as it solves itself after booting, then you can access to console normally.

----------

## idella4

Eurt,

is ksm a blessing or a curse?

Do you want it?  If so why?

Would you discard it?

Did you have a kernel that booted without fault before this?

From the info given, it appears you have a complete boot.  Does kde get reached or does it bomb out?

What about info from the xorg.0.log?

What makes this a ksm issue and not an xorg issue?

----------

## DONAHUE

What I see in your video is a CRT monitor that has lost vertical sync and is slow to resync. The idea behind setting the resolution was to avoid any stumbles that kms might make calculating the resolution. As the event occurs long before xorg is started, I don't see a xorg or kde involvement. I have a legacy tv that needs a slap (or several) on its lower right side to catch vertical sync, you are doing much better. If you are not using a CRT -- "Never mind"

----------

## Eurt

 *idella4 wrote:*   

> Eurt,
> 
> is ksm a blessing or a curse?

 

That's an easy one, a curse of course   :Sad: 

 *idella4 wrote:*   

> Do you want it?  If so why?

 

I do not want it, in fact I'm really happy without it on my main PC (nvidia card) but I need it enabled in my laptop as xf86-video-intel needs it.

 *idella4 wrote:*   

> Would you discard it?

 

Of course.

 *idella4 wrote:*   

> Did you have a kernel that booted without fault before this?

 

No   :Sad: 

 *idella4 wrote:*   

> From the info given, it appears you have a complete boot.  Does kde get reached or does it bomb out?

 

KDE gets reached, the problem is that sometimes (random), that weird problem occurs even when I'm on KDM and it's impossible to see anything on screen, then I have to wait a long time for "autofixing".

 *idella4 wrote:*   

> What about info from the xorg.0.log?

 

Several warnings at the end of the file I have no idea of what they want to say. Here is the full xorg log:

http://pastebin.com/bP1KGKsW

 *idella4 wrote:*   

> What makes this a ksm issue and not an xorg issue?

 

The problem goes away when I disable modesetting through grub.conf, adding i915.modeset=0 or nomodeset. The problem with this workaround is that kdm does not start, as xf86-video-intel needs kernel modesetting enabled.

Thanks everyone for replying.

----------

## Eurt

 *DONAHUE wrote:*   

> What I see in your video is a CRT monitor that has lost vertical sync and is slow to resync. The idea behind setting the resolution was to avoid any stumbles that kms might make calculating the resolution. As the event occurs long before xorg is started, I don't see a xorg or kde involvement. I have a legacy tv that needs a slap (or several) on its lower right side to catch vertical sync, you are doing much better. If you are not using a CRT -- "Never mind"

 

No CRT, that is my laptop screen, maybe you got confused due to the "high quality" of my camera   :Laughing:  .

----------

## Eurt

Opening and closing the laptop several times fix those lines.   :Crying or Very sad: 

----------

## WvR

I also have a laptop with Intel i915 (ThinkPad 201i). In my case, the external monitor, if connected, switches off every few seconds. This was solved by going to kernel 2.6.37. But even then, the modesetting on boot is incorrect if connected to an external monitor. It corrects itself when X is started.

- You can disable KMS but then indeed, you have no X at all

- You can try to downgrade to a pre-KMS xf86-video-intel driver

- Check your laptop boot menu, it may have settings for external displays on boot.

- Stupid solution: hit Fn-F7 (or other relevant key-combination) when the grub screen comes up. In my case, it sometimes helps.

----------

## Eurt

Fixed in kernel 2.6.38

----------

## WvR

Strangely enough, kernel 2.6.38 completely screws up my external display: all I get is a red / black flashing screen, maybe 20 times per second  :Sad:  I will use 2.6.37 for the time being and watch the forums to see if anybody else has the same problems and maybe a solution.

----------

## anton_kg

 *WvR wrote:*   

> Strangely enough, kernel 2.6.38 completely screws up my external display: all I get is a red / black flashing screen, maybe 20 times per second  I will use 2.6.37 for the time being and watch the forums to see if anybody else has the same problems and maybe a solution.

 

I confirm the same problem here. Please let me know if you filed bug report somewhere.

----------

## DONAHUE

```
Strangely enough, kernel 2.6.38 completely screws up my external display: all I get is a red / black flashing screen, maybe 20 times per second  I will use 2.6.37 for the time being and watch the forums to see if anybody else has the same problems and maybe a solution.
```

have you rerun 

```
emerge xorg-server $(qlist -IC x11-drivers)
```

on the 2.6.38 kernel?

```
eselect opengl list
```

----------

## anton_kg

Donahue,

I just did rerun it. The problem is still there. 

The bug does not appear immediately. A computer boots up normally and xdm starts xorg (both screens runs in lower laptop mode).

An external monitor becomes flickering red after a login (I use gnome) then a gnome display manager (?) switches monitors to the previous state which is:

laptop off, external monitor on

```
eselect opengl list

Available OpenGL implementations:

  [1]   xorg-x11 *

```

```
eselect mesa list

i915 (Intel 915, 945)

  [1]   classic *

  [2]   gallium

i965 (Intel 965, G/Q3x, G/Q4x)

  [1]   classic *

  [2]   gallium

r300 (Radeon R300-R500)

r600 (Radeon R600-R700, Evergreen, Northern Islands)

sw (Software renderer)

  [1]   classic

```

 *Quote:*   

> 00:02.0 VGA compatible controller: Intel Corporation Arrandale Integrated Graphics Controller (rev 02)

 

my info: up-to-date x86 gentoo

Any ideas?

----------

## DONAHUE

If gnome is messing up; perhaps: Gnome --> System --> Preferences --> Monitors will do some good?

I have no knowledge or experience with dual monitor, just suffer a compulsion to remind folks with X problems to reup X drivers ...

----------

## anton_kg

 *DONAHUE wrote:*   

> If gnome is messing up; perhaps: Gnome --> System --> Preferences --> Monitors will do some good?

  I'm sure gnome just run a high level tool like xrandr or an API directly so the problem is not here.

It was working fine with kernels up to <2.6.38. It really looks like a kernel regression.

----------

## DONAHUE

ok. good luck.

----------

## asturm

 *WvR wrote:*   

> But even then, the modesetting on boot is incorrect if connected to an external monitor. It corrects itself when X is started.

 

That has been a regression for me since 2.6.33 and I just recently solved it by finding a patch (works with 2.6.38 ). EDIT: WOOHOO, will be included in 2.6.39!  :Very Happy: 

I've never seen the 'red / black flashing screen' issue so far, having the external display connected via Displayport (thanks to Ultrabase). Are you connecting via D-SUB/analogue?

Also, how up to date is the Intel graphics userspace portion of your setup? It should always be on par with the kernel.

EDIT: Also, there's 2.6.38.1 out including i915 fixes.

----------

## WvR

@genstorm: I use an UltraBase but I connect with the old-style connector, because the thing is connected with several other PCs to one screen (Lenovo ThinkVision). I will simply keep an eye open and retry every once in a while. I am too busy now to spend much time on these issues. The combination of UltraBase, multi-port PC connector and ThinkVision screen works very well with kernel 2.6.37. And yes, it is ironic: kernel 2.6.36 does not properly support the external display, 2.6.37 does, and 2.6.38 does not.

----------

## WvR

 *anton_kg wrote:*   

> The bug does not appear immediately. A computer boots up normally and xdm starts xorg (both screens runs in lower laptop mode).
> 
> An external monitor becomes flickering red after a login (I use gnome) then a gnome display manager (?) switches monitors to the previous state which is:
> 
> laptop off, external monitor on
> ...

 

I retried with kernel-2.6.38-r2. Same result here: booting is OK, although the wrong size is chosen for the external display. Then GDM starts in the same way as usual, it displays a 1280x1024 image on 1680x1050 so it looks a bit weird. I enter my name and passwd and the external display starts flickering black and red. I open my laptop and hit Fn-F7; I can cycle through the screen but the external display never is quite right. If I open Gnome Display Properties, I can get the external monitor to work fine, but after a restart the red-black screen is back. So I am giving up for the time being.

----------

## anton_kg

 *WvR wrote:*   

>  So I am giving up for the time being.

 

Never give up  :Wink:  I've submitted a bug report:

https://bugzilla.kernel.org/show_bug.cgi?id=32762

----------

