# 'startx' freezes system (intel/i915 driver, Macbook Air 4,1)

## comuesli

Hi,

I'm trying to setup X11 on a Macbook Air 4,1 following http://www.gentoo.org/doc/en/xorg-config.xml and http://en.gentoo-wiki.com/wiki/Intel_GMA.

'startx' turns the screen black and freezes the system (ctrl-c does nothing, remote ssh session freezes, and the machine is no longer pingable). 

The system boots via BIOS emulation, not EFI. Here is some more info:

```

# uname -a

Linux gentoo-thought 2.6.39-gentoo-r3 #2 SMP Sat Aug 6 11:48:56 EST 2011 i686 Intel(R) Core(TM) i7-2677M CPU @ 1.80GHz GenuineIntel GNU/Linux

# lspci -k

[...]

00:02.0 VGA compatible controller: Intel Corporation Device 0116 (rev 09)

   Subsystem: Apple Computer Inc. Device 00ea

   Kernel driver in use: i915

[...]

# zcat /proc/config.gz | grep I915

CONFIG_DRM_I915=y

CONFIG_DRM_I915_KMS=y

# cat /etc/make.conf

[...]

USE="udev -acl -berkdb -crypt -cups -cxx -fortran -gdbm -gpm -ipv6 -nls -openmp -pppd -session -mudflap"

VIDEO_CARDS="fbdev vesa intel"

INPUT_DEVICES="evdev"

# cat /usr/share/X11/xorg.conf.d/40-monitor.conf

Section "Screen"

  Identifier "MyScreen0"

  DefaultDepth 24

  SubSection "Display"

    Depth 24

    Modes "1366x768"

  EndSubSection

EndSection

Section "Device"

  Identifier "blah"

  Driver "intel"

#  Driver "fbdev"

#  Driver "vesa"

EndSection

```

Any help would be much appreciated!Last edited by comuesli on Sat Aug 06, 2011 10:12 pm; edited 1 time in total

----------

## VoidMage

What's the full kernel command line ?

What about kernel framebuffer options ?

----------

## comuesli

The kernel command line is just "root=/dev/sda4". From /boot/grub/grub.conf:

```

title Gentoo Linux 2.6.39

root (hd0,3)

kernel /boot/kernel-2.6.39-gentoo-r3 root=/dev/sda4

# cat /etc/modprobe.d/modprobe.conf

options ath_pci rfkill=0

```

Among CONFIG_FB* the following are set:

```

CONFIG_FB=y

CONFIG_FB_CFB_FILLRECT=y

CONFIG_FB_CFB_COPYAREA=y

CONFIG_FB_CFB_IMAGEBLIT=y

```

'make menuconfig' dosen't let me turn off "CONFIG_FB". It says "selected by" DRM_KMS_HELPER [=y] && HAS_IOMEM [=y] && DRM [=y] || DRM_NOUVEAU [=n] && STAGING [=y] && !STAGING_EXCLUDE_BUILD [=n] && DRM [=y] && PCI [=y].

----------

## VoidMage

What about FRAMEBUFFER_CONSOLE ?

Though it might be just something Macbook specific.

----------

## comuesli

```

CONFIG_FRAMEBUFFER_CONSOLE=y

CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y

```

The rest is here: http://paste.pocoo.org/show/453850

----------

## g0del

I had a similar problem with disabling the framebuffer and also startx crashing my machine, to turn off the framebuffer DaggyStyle pointed me to Switch it off here (using make menuconfig )

```
Device Drivers --> Graphics Support --> Support for frame buffer devices 

```

----------

## comuesli

make menuconfig's help says that

FRAMEBUFFER_CONSOLE is selected by DRM_KMS_HELPER [=y] && HAS_IOMEM [=y] && DRM [=y] && !EXPERT [=n] || DRM_NOUVEAU [=n] && STAGING [=y] && !STAGING_EXCLUDE_BUILD [=n] && DRM [=y] && PCI [=y] && !EXPERT [=n]

and that

FRAMEBUFFER_CONSOLE is selected by

DRM_KMS_HELPER [=y] && HAS_IOMEM [=y] && DRM [=y] || DRM_NOUVEAU [=n] && STAGING [=y] && !STAGING_EXCLUDE_BUILD [=n] && DRM [=y] && PCI [=y]

Are you implying that DRM needs to be switched off, too? (I turned it on because the howto said so.)

EDIT I just tried that: switched off both DRM and FRAMEBUFFER_CONSOLE and uncommented the Driver "vesa" line in the X config. Result: X starts up -- however the resolution is 1024x768, despite the 1366x768 Modes setting. Needless to say that the fonts don't look great.

----------

## comuesli

This seems relevant: https://bugs.freedesktop.org/show_bug.cgi?id=39533

----------

