Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 392549 - sys-kernel/gentoo-sources x11-drivers/xf86-video-intel Sandbridge HD3000: X does not start if secondary monitor plugged in
Summary: sys-kernel/gentoo-sources x11-drivers/xf86-video-intel Sandbridge HD3000: X d...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL: http://git.kernel.org/?p=linux/kernel...
Whiteboard: 3.5, > 3.4.4-r1
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2011-11-30 04:04 UTC by Petric Frank
Modified: 2012-08-23 14:05 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
failed X startup log (Xorg.0.log,19.16 KB, text/plain)
2011-11-30 04:06 UTC, Petric Frank
Details
successful X startup log (Xorg.0.log,34.17 KB, text/plain)
2011-11-30 04:09 UTC, Petric Frank
Details
failed X startup log (now with opengl switched to xorg-x11) (Xorg.0.log,19.77 KB, text/plain)
2011-11-30 04:33 UTC, Petric Frank
Details
successful X startup log (now with opengl switched to xorg-x11) (Xorg.0.log,33.14 KB, text/plain)
2011-11-30 04:35 UTC, Petric Frank
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petric Frank 2011-11-30 04:04:22 UTC
If a second monitor is plugged in on VGA port when Notebook (Lenovo T520, HD3000) is switched on xorg does not start.

Error message in Xorg.0.log:
  Intel(0): Failed to set mode: Invalid argument

No other (EE) messages are shown there.

I tried the stable xf86-video-intel and the latest one. No difference.

The only way (workaround) how i get it running is to plug off the external monitor until the grub boot menu displays. Then it is working.

I don't know where the bug(s) are. Either BIOS, intel-kvm, xorg-driver or gentoo environment. So this but may have to forward somewhere else.


Reproducible: Always

Steps to Reproduce:
1.Notebook switched off
2.Connect external monitor
3.Power on the notebook
4.execute startx

Actual Results:  
xorg does not start. See attached Xorg.0.log


Expected Results:  
Start xort desktop

Output of "emerge --info":
------------------------------ cut ----------------------------------
Portage 2.1.10.11 (default/linux/amd64/10.0, gcc-4.5.3, glibc-2.12.2-r0, 3.0.6-gentoo x86_64)
=================================================================
System uname: Linux-3.0.6-gentoo-x86_64-Intel-R-_Core-TM-_i7-2720QM_CPU_@_2.20GHz-with-gentoo-2.0.3
Timestamp of tree: Tue, 29 Nov 2011 23:15:01 +0000
app-shells/bash:          4.1_p9
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.1.4-r3
dev-util/cmake:           2.8.4-r1
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.9.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.10.3, 1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r1
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.39 (virtual/os-headers)
sys-libs/glibc:           2.12.2
Repositories: gentoo x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://de-mirror.org/gentoo/ http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de en"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="X aac acl acpi alsa amd64 apache2 berkdb bluetooth bzip2 cdparamoia cdr cgi cli consolekit cracklib crypt css cups cxx dbus dga dhcpcd dri dv dvb dvd dvdr encode exif extras ffmpeg firefox foomaticdb fortran ftp gd gdbm gif gimp git gnutls gphoto2 gpm hddtemp iconv ieee1394 imagemagick java java6 javascript jbig jpeg kde kontact laptop libnotify lm-sensors lzo mad matroska melt mmx mng modules mp3 mp4 mpeg mplayer mudflap multilib mysql ncurses networkmanager nls nptl nptlonly ogg opengl openmp pam pcmcia pcre pdf pdo php png policykit postgres ppds pppd qt3support qt4 readline samba scanner sdl semantic-desktop session slp smp speex sql sqlite3 sse sse2 ssl startup-notification subversion svg sysfs syslog tcpd theora threads tiff truetype udev unicode usb v4l v4l2 vaapi vcd vorbis webkit wifi x264 xcomposite xine xml xorg xpm xulrunner xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DVB_CARDS="usb-wt220u" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" PHP_TARGETS="php5-3" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel nvidia xv" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
------------------------------ cut ----------------------------------
Comment 1 Petric Frank 2011-11-30 04:06:35 UTC
Created attachment 294267 [details]
failed X startup log

The xorg startup log from /var/log/Xorg.0.log when external monitor is plugged in at power on.
Comment 2 Petric Frank 2011-11-30 04:09:54 UTC
Created attachment 294269 [details]
successful X startup log

The xorg startup log from /var/log/Xorg.0.log when external monitor is plugged
in after grub boot menu is displayed.
Comment 3 Chí-Thanh Christopher Nguyễn gentoo-dev 2011-11-30 04:13:19 UTC
Not sure if that causes your problem. But it seems that you have the nvidia proprietary driver installed and selected in eselect opengl. This is almost certain to break things when using xf86-video-intel.

[    32.150] (II) Module glx: vendor="NVIDIA Corporation"
[    32.166] 	compiled for 4.0.2, module version = 1.0.0
[    32.166] 	Module class: X.Org Server Extension
[    32.166] (II) NVIDIA GLX Module  290.06  Mon Oct 31 08:44:11 PDT 2011
Comment 4 Petric Frank 2011-11-30 04:21:57 UTC
As you can see this message is displayed on both Xorg.0.log (failed/working).

It seems to not affect it.

But anyway i make tests with opengl switched to xorg-x11 and upload the logs again.
Comment 5 Petric Frank 2011-11-30 04:33:08 UTC
Created attachment 294271 [details]
failed X startup log (now with opengl switched to xorg-x11)
Comment 6 Petric Frank 2011-11-30 04:35:18 UTC
Created attachment 294273 [details]
successful X startup log (now with opengl switched to xorg-x11)
Comment 7 Petric Frank 2011-11-30 04:40:10 UTC
Some additional infos:
- Notebook is a Lenovo T520 with Nvidia optimus. But Nvidia part is disabled in BIOS
- Intel Onboard graphics is a HD3000
- Tests made with LID closed (in both cases - working/failed)
- If LID is open when switched on X starts always successfully
Comment 8 Chí-Thanh Christopher Nguyễn gentoo-dev 2011-11-30 11:27:33 UTC
What happens if you start with no xorg.conf at all?

You could try to upgrade your kernel to 3.1, and if it still happens this looks like a problem in the intel driver. Report a bug on https://bugs.freedesktop.org/ so the xf86-video-intel developers are aware of the issue, and add the URL to this bug.
Comment 9 Petric Frank 2011-11-30 16:22:52 UTC
Ok, i tested with the latest in portage available unstable kernel (gentoo-sources-3.1.4). No lock - the same as before.

For me it looks like a problem with the display selection by the BIOS.

If the BIOS detects that the lid is closed it automatically enables the external monitor (if conected). It looks like (my gues) that this already done switch-on of the external monitor is detected by the driver (my guess).

If this switch is done after BIOS handed off its tasks to the boot loader (due the lid was open) and the external monitor is enablesd by the linux kernel (?) everything went well.

Anyway, the KMS module has no problem with it independent whether the lid was closed or open when the notebook is powered on. In text mode (without starting X) the external monitor works well. Only if i try to execute 'startx' ...

I will follow your suggestion and issue a bug report at freedesktop.org. Lets see what hapepens.
Comment 10 Petric Frank 2011-12-01 07:58:57 UTC
Bug report issued at freedesktop.org:
  https://bugs.freedesktop.org/show_bug.cgi?id=43379
Comment 11 Petric Frank 2012-05-02 22:50:19 UTC
A solution seems to have been found (at least for me).

See my commemts in
  https://bugs.freedesktop.org/show_bug.cgi?id=43379

In short - apply patch as posted in
  http://lists.freedesktop.org/archives/intel-gfx/2012-March/015552.html
Comment 12 Mike Pagano gentoo-dev 2012-07-01 21:28:37 UTC
This is now in SVN and will be in the next release of gentoo-sources 3.4.X. (And also in 3.5 by default).
Comment 13 Mike Pagano gentoo-dev 2012-08-23 14:05:32 UTC
Released since gentoo-sources-3.4.5