# uvesafb: v86d segfault after kernel update

## z0ny

Hey there, I am having troubles with uvesafb/v86d after updating my kernel (vanilla-sources) from 2.6.28 to 2.6.32.6. While everything is working fine on 2.6.28, v86d always crashes with a segfault a few times when the console resolution gets changed (and once again later when the console font gets set). The result is a black screen for about 15 seconds, afterwards the computer boots just normal (except for the short console font blackout).

Kernel video parameter:

```
video=uvesafb:ywrap,1024x768-32@60
```

dmesg output:

```
...

uvesafb: Intel Corporation, Intel(r)915GM/910ML/915MS Graphics Controller, Hardware Version 0.0, OEM: Intel(r)915GM/910ML/915MS Graphics Chip Accelerated VGA BIOS, VBE v3.0

uvesafb: VBIOS/hardware supports DDC2 transfers

uvesafb: monitor limits: vf = 60 Hz, hf = 64 kHz, clk = 108 MHz

uvesafb: scrolling: redraw

v86d[431]: segfault at c6a6a ip 000070ce sp 00000fc4 error 7 in v86d[9000+1000]

uvesafb: mode switch failed (eax=0x4f02, err=1). Trying again with default timings.

v86d[437]: segfault at c6a6a ip 000070ce sp 00000fc4 error 7 in v86d[9000+1000]

uvesafb: mode switch failed (eax=0x4f02, err=1). Trying again with default timings.

v86d[440]: segfault at c6a6a ip 000070ce sp 00000fc4 error 7 in v86d[9000+1000]

uvesafb: mode switch failed (eax=0x4f02, err=1). Trying again with default timings.

Console: switching to colour frame buffer device 128x48

v86d[443]: segfault at c6a6a ip 000070ce sp 00000fc4 error 7 in v86d[9000+1000]

uvesafb: mode switch failed (eax=0x4f02, err=1). Trying again with default timings.

uvesafb: framebuffer at 0xc0000000, mapped to 0xf8880000, using 7872k, total 7872k

fb0: VESA VGA frame buffer device

...

v86d[446]: segfault at c6a6a ip 000070ce sp 00000fc4 error 7 in v86d[9000+1000]

uvesafb: mode switch failed (eax=0x4f02, err=1). Trying again with default timings.

...
```

Things I have already tried:

- Re-emerge v86d and klibc.

- Re-emerge v86d with x86emu enabled (was disabled before).

- Re-emerge v86d with disabled optimization (-O0).

- Rebuild the kernel.

I am using GCC 4.1.2 on an older 32-bit laptop by the way. Any ideas?

Thanks.

----------

## mikegpitt

I ran into this problem several months ago, and was able to work around it.  The thing that really threw me off is that when I recompiled v86d I would still get the segfault until I recompiled the kernel.

This is what I would recommend:

1) USE="x86emu" emerge v86d

2) emerge klibc (probably won't matter)

3) Clean, recompile, and install your kernel

I started a thread about it here, but it got abandoned, since I wasn't able to get the proper debug output:

https://bugs.gentoo.org/show_bug.cgi?id=281334

Maybe you can add your debug output at this point to re-open the issue...

----------

## z0ny

Thanks for your reply. Seems like the black screen is gone now but the display looks pretty ugly now though, no matter whether the uvesafb kernel parameter is present or not. The resolution changes with the parameter but the image is always stretched in width. Todays kernel version 2.6.32.7 shows the same symptoms. The only working version is still 2.6.28...  :Confused: 

----------

## mikegpitt

 *z0ny wrote:*   

> Thanks for your reply. Seems like the black screen is gone now but the display looks pretty ugly now though, no matter whether the uvesafb kernel parameter is present or not. The resolution changes with the parameter but the image is always stretched in width. Todays kernel version 2.6.32.7 shows the same symptoms. The only working version is still 2.6.28... 

 Are you still getting the segfaults when the display looks distorted?  Does the distortion happen without a splash image, but when still using uvesafb?

----------

## z0ny

 *Quote:*   

> Are you still getting the segfaults when the display looks distorted?

 

No, v86d doesn't segfault anymore.

 *Quote:*   

> Does the distortion happen without a splash image, but when still using uvesafb?

 

I am not using a splash image.

----------

## mikegpitt

I'm running out of ideas...  maybe your parameters are off.  This is what I use on my laptop:

```
video=uvesafb:1024x768-32,mtrr:3,ywrap
```

Does `dmesg | grep uvesa` or `dmesg | grep fb` give you anything?

----------

## z0ny

Sure:

```
# dmesg|grep uvesa

uvesafb: Intel Corporation, Intel(r)915GM/910ML/915MS Graphics Controller, Hardware Version 0.0, OEM: Intel(r)915GM/910ML/915MS Graphics Chip Accelerated VGA BIOS, VBE v3.0

uvesafb: VBIOS/hardware supports DDC2 transfers

uvesafb: monitor limits: vf = 60 Hz, hf = 64 kHz, clk = 108 MHz

uvesafb: scrolling: redraw

uvesafb: framebuffer at 0xc0000000, mapped to 0xf8880000, using 7872k, total 7872k

# dmesg|grep fb

uvesafb: Intel Corporation, Intel(r)915GM/910ML/915MS Graphics Controller, Hardware Version 0.0, OEM: Intel(r)915GM/910ML/915MS Graphics Chip Accelerated VGA BIOS, VBE v3.0

uvesafb: VBIOS/hardware supports DDC2 transfers

uvesafb: monitor limits: vf = 60 Hz, hf = 64 kHz, clk = 108 MHz

uvesafb: scrolling: redraw

uvesafb: framebuffer at 0xc0000000, mapped to 0xf8880000, using 7872k, total 7872k

fb0: VESA VGA frame buffer device
```

The image is stretched in width even when using your kernel parameters.

----------

