Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 463838 - =sys-kernel/gentoo-sources-3.8.4 (i915) without virtual ttys (tty1-tty12) on hybrid graphics system
Summary: =sys-kernel/gentoo-sources-3.8.4 (i915) without virtual ttys (tty1-tty12) on ...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL: https://bugzilla.kernel.org/show_bug....
Whiteboard: watch-linux-bugzilla
Keywords: UPSTREAM
Depends on:
Blocks:
 
Reported: 2013-03-30 11:13 UTC by Mark Dominik Bürkle
Modified: 2013-08-06 22:02 UTC (History)
1 user (show)

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


Attachments
kernel .config for gentoo-sources-3.8.4 (config-3.8.4-gentoo,99.27 KB, text/plain)
2013-03-30 11:13 UTC, Mark Dominik Bürkle
Details
intel_reg_dumper 3.8.5-gentoo from within running X session (rgd-20130402-210931-3.8.5-gentoo_within-X-session,14.56 KB, text/plain)
2013-04-02 20:03 UTC, Mark Dominik Bürkle
Details
kernel .config for vanilla-3.4.38 (config-3.4.38,94.56 KB, text/plain)
2013-04-02 20:39 UTC, Mark Dominik Bürkle
Details
kernel .config for 3.2.1 (config-3.2.1,90.77 KB, text/plain)
2013-04-02 20:45 UTC, Mark Dominik Bürkle
Details
kernel .config for 3.6.11-r1 (config-3.6.11-gentoo-r1,99.51 KB, text/plain)
2013-04-04 13:26 UTC, Mark Dominik Bürkle
Details
intel_reg_dumper 3.6.11-r1-gentoo (rgd-20130404-151256-3.6.11-gentoo-r1,14.56 KB, text/plain)
2013-04-04 13:29 UTC, Mark Dominik Bürkle
Details
intel_reg_dumper vanilla-3.2.42 (rgd-20130404-162508-3.2.42,14.56 KB, text/plain)
2013-04-04 14:30 UTC, Mark Dominik Bürkle
Details
kernel .config for vanilla-3.2.42 (config-3.2.42,94.38 KB, text/plain)
2013-04-04 14:31 UTC, Mark Dominik Bürkle
Details
intel_reg_dumper vanilla-3.0.71 (rgd-20130404-173317-3.0.71,14.56 KB, text/plain)
2013-04-04 15:35 UTC, Mark Dominik Bürkle
Details
kernel .config for vanilla-3.0.71 (config-3.0.71,89.24 KB, text/plain)
2013-04-04 15:36 UTC, Mark Dominik Bürkle
Details
kernel .config for vanilla-2.6.32.60 (config-2.6.32.60,74.05 KB, text/plain)
2013-04-04 16:53 UTC, Mark Dominik Bürkle
Details
intel_reg_dumper vanilla-2.6.32.60 (rgd-20130404-184659-2.6.32.60,14.60 KB, text/plain)
2013-04-04 16:54 UTC, Mark Dominik Bürkle
Details
intel_reg_dumper vanilla-3.0.0 (rgd-20130404-192623-3.0.0,14.56 KB, text/plain)
2013-04-04 17:28 UTC, Mark Dominik Bürkle
Details
kernel .config for vanilla-3.0.0 (config-3.0.0,89.28 KB, text/plain)
2013-04-04 17:29 UTC, Mark Dominik Bürkle
Details
intel_reg_dumper vanilla-2.6.34.14; i915 not loaded (rgd-20130405-165913-2.6.34.14,14.60 KB, text/plain)
2013-04-05 16:48 UTC, Mark Dominik Bürkle
Details
kernel .config for vanilla-2.6.34.14 (config-2.6.34.14,79.24 KB, text/plain)
2013-04-05 16:49 UTC, Mark Dominik Bürkle
Details
intel_reg_dumper vanilla-3.8.2 (rgd-20130405-230448-3.8.2,14.56 KB, text/plain)
2013-04-05 21:06 UTC, Mark Dominik Bürkle
Details
kernel .config for vanilla-3.8.2 (config-3.8.2,99.24 KB, text/plain)
2013-04-05 21:07 UTC, Mark Dominik Bürkle
Details
dmesg WITHOUT drm.debug=6, after third reboot with working consoles (dmesg.20130409172429,111.00 KB, text/plain)
2013-04-09 15:35 UTC, Mark Dominik Bürkle
Details
intel_reg_dumper 3.8.5-gentoo from within running X session, from third reboot with working consoles (rgd-20130409-172838-3.8.5-gentoo,14.56 KB, text/plain)
2013-04-09 15:38 UTC, Mark Dominik Bürkle
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Dominik Bürkle 2013-03-30 11:13:12 UTC
For a long time now, I'm missing the virtual consoles.
They are there and working (typing a login and a command blindly leads to the expected activity, e.g. "find / -xdev" and the HD led is blinking) but they are not displayed at all.

The console is displayed when booting until "udev is processing events", which I *suspect* to be the time when the i915 kernel module is being auto-loaded.
In addition to "hiding" the console, the backlight is being turned off at that time, too, which can be circumvented by pressing fn+brightnessUp...

This will come in very unhandy should I need to do a manual filesystem check sometime...

Any help anybody?

Reproducible: Always

Steps to Reproduce:
1. have a "hybrid graphics" laptop, here: HP "Pavilion g6 1222sg"
2. boot Gentoo Linux with gentoo-sources-3.8.4
3. watch the console disappear after "processing udev events" message
Actual Results:  
console is hidden (black screen)

Expected Results:  
console should be shown

IIRC the console has been shown (ctrl-alt-f1 to -f12) when running kernel-3.8.2 (whose sources I don't have any more, so I can't run it with ati-drivers-3.13_beta2 and xf86-video-intel-2.20.13)...

lapmdb-hpl ~ #>> emerge --info
Portage 2.1.11.55 (default/linux/amd64/13.0, gcc-4.6.3, glibc-2.15-r3, 3.8.4-gentoo x86_64)
=================================================================
System uname: Linux-3.8.4-gentoo-x86_64-Intel-R-_Core-TM-_i5-2430M_CPU_@_2.40GHz-with-gentoo-2.1
KiB Mem:     6053988 total,   2361628 free
KiB Swap:   10485756 total,  10485588 free
Timestamp of tree: Sun, 24 Mar 2013 17:15:01 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.3-r3, 3.2.3-r2
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo seden local
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=core2 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/seden /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 avx berkdb bluetooth branding bzip2 cdda cddb cdinstall cdparanoia cdr cgi cli cracklib crypt css cxx dbus dedicated dga dri dvd dvdr fam fastcgi ffmpeg firefox flac fortran gdbm gif glut gnome gnutls gpm gsm gstreamer gtk gzip hddtemp iconv idn ipv6 java java6 javascript jpeg jpeg2k kerberos lame lash ldap lm_sensors mad matroska mbox mikmod mime mmap mms mmx mng mod modules mp3 mp4 mpeg mplayer mudflap multilib musepack ncurses nls nptl nsplugin ogg openal openexr opengl openmp pam pcre pdf perl php png posix quicktime raw rdesktop readline recode samba sasl savedconfig sdl session sharedmem simplexml smp sound sse sse2 ssl subversion svg symlink syslog sysvipc tcl tcmalloc tcpd theora tiff tokenizer udev unicode usb vcd videos vim-syntax vnc vorbis wavpack wifi wmf x264 xcb xcomposite xml xosd xsl xulrunner xv xvid zlib" ABI_X86="64" 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="authn_core authz_core socache_shmcb unixd 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" APACHE2_MPMS="prefork" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" 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" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de en fr" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2 pypy1_9 jython2_5" QEMU_SOFTMMU_TARGETS="arm" QEMU_USER_TARGETS="arm armeb" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="intel fglrx" 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, USE_PYTHON
Comment 1 Mark Dominik Bürkle 2013-03-30 11:13:38 UTC
Created attachment 343742 [details]
kernel .config for gentoo-sources-3.8.4
Comment 2 Andreas Sturmlechner gentoo-dev 2013-03-30 11:24:32 UTC
Maybe similar issue here: https://bugs.freedesktop.org/show_bug.cgi?id=58876

Is this happening since 3.8? I have that problem on a specific setup with a DP-DVI dongle, and only get a working fbcon about 1/4 of startups. Due to weather, date or whatever, it sometimes works for several reboots with the same kernel image that ultimately fails to bring up fbcon on the next day. I haven't figured out the root cause yet.
Comment 3 Mark Dominik Bürkle 2013-03-30 16:13:49 UTC
(In reply to comment #2)
> Maybe similar issue here: https://bugs.freedesktop.org/show_bug.cgi?id=58876

Thanks, I will have a look at it...
Doesn't look so similar to me: I have my display directly attached (LVDS?).

> Is this happening since 3.8?

No, this was even before 3.7 (I think, but I'm not sure),
at least it's not working with gentoo-sources-3.7.6 and -3.7.10.
It's working with 3.2.1 in an old Debian installation and 
it /was/ working with kernel 3.8.2, IIRC, 
but not with 3.8.1.
I don't know about 3.8.3 and about the vanilla kernels, didn't work with vanilla-sources-3.8.4 IIRC.

Will try gentoo-sources-3.8.5 next... yeah it's in portage...
Comment 4 Mark Dominik Bürkle 2013-03-30 17:37:42 UTC
gentoo-sources-3.8.5 is not showing any ttys either.

Running gentoo-sources-3.8.5, xf86-video-intel-2.20.13, ati-drivers-13.3_beta2.
Comment 5 Andreas Sturmlechner gentoo-dev 2013-03-30 17:44:32 UTC
Well I didn't expect it to fix *that* issue, but you might report on your other bug 463836 ? ;)
Comment 6 Andreas Sturmlechner gentoo-dev 2013-03-30 17:57:20 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Maybe similar issue here: https://bugs.freedesktop.org/show_bug.cgi?id=58876
> 
> Thanks, I will have a look at it...
> Doesn't look so similar to me: I have my display directly attached (LVDS?).

Well, who knows? Due to the randomness of the bug on my system, it was impossible so far to bisect it thoroughly. And it is possible that the bug existed well before 3.8, and only got exposed to my setup by some change in 3.8. Maybe you could provide the same output that I was asked for in the bug?
Comment 7 Mark Dominik Bürkle 2013-03-31 09:28:21 UTC
(In reply to comment #6)
> > > Maybe similar issue here: https://bugs.freedesktop.org/show_bug.cgi?id=58876
> Maybe you could provide the same output that I was asked for in the bug?

I'll have a hard time doing a bisect from 3.2.1 to 3.8.1 or 3.8.5 - don't know if I will find that amount of time to do so.
I'll start with vanilla kernel 3.4.38...
Comment 8 Andreas Sturmlechner gentoo-dev 2013-03-31 10:23:43 UTC
Sorry, I realise my words have been a bit ambigious. ;)

At first, `emerge intel-gpu-tools` and run `intel_reg_dumper`.
Secondly, crank up your kernel log buffer size (18 should suffice) and boot with drm.debug=6 kernel param so that the earliest output of dmesg can be examined.

Should you decide to do a bisect, it would make sense to narrow it further down to last working / first non-working kernel version and not begin with 3.2 and 3.8.

Actually, is it the same when you disable your AMD graphics?
Comment 9 Mark Dominik Bürkle 2013-04-02 20:03:48 UTC
Created attachment 344110 [details]
intel_reg_dumper 3.8.5-gentoo from within running X session
Comment 10 Mark Dominik Bürkle 2013-04-02 20:36:13 UTC
kernel 3.4.38 refuses to run:
Uncompressing, Parsing ELF, done.
Booting => no more output.
kernel cmdline: root=/dev/sda8 vga=0x0f04
Tried with vga=normal, no change.
Comment 11 Mark Dominik Bürkle 2013-04-02 20:39:54 UTC
Created attachment 344114 [details]
kernel .config for vanilla-3.4.38

tried with CONFIG_USB_PRINTER=m as well, as I've got a "new" usb printer attached, too...
Comment 12 Mark Dominik Bürkle 2013-04-02 20:45:38 UTC
Created attachment 344116 [details]
kernel .config for 3.2.1

built within and used with a debian 6.0.4 system.

ttys are fully functional.
Comment 13 Mark Dominik Bürkle 2013-04-04 13:26:23 UTC
Created attachment 344372 [details]
kernel .config for 3.6.11-r1

ttys are hidden (black screen)
Comment 14 Mark Dominik Bürkle 2013-04-04 13:29:10 UTC
Created attachment 344374 [details]
intel_reg_dumper 3.6.11-r1-gentoo
Comment 15 Mark Dominik Bürkle 2013-04-04 14:30:31 UTC
Created attachment 344384 [details]
intel_reg_dumper vanilla-3.2.42
Comment 16 Mark Dominik Bürkle 2013-04-04 14:31:18 UTC
Created attachment 344386 [details]
kernel .config for vanilla-3.2.42
Comment 17 Mark Dominik Bürkle 2013-04-04 14:44:08 UTC
I had /etc/modprobe.d/test.conf with contents

options video use_bios_initial_backlight
#=false
#parm:           brightness_switch_enabled:bool
options i915 invert_brightness=0
#Invert backlight brightness (-1 force normal, 0 machine defaults, 1 force inversion)"

which (invert_brightness) was unknown to the vanilla-3.2.42 i915 module, so I had a working console (tty1) until I commented that out and started xdm (which autoloads the i915 module).

Background light turned off, console black screen again.

Does anyone know a way of running ati-drivers without i915 module?
Comment 18 Mark Dominik Bürkle 2013-04-04 15:35:17 UTC
Created attachment 344400 [details]
intel_reg_dumper vanilla-3.0.71
Comment 19 Mark Dominik Bürkle 2013-04-04 15:36:24 UTC
Created attachment 344402 [details]
kernel .config for vanilla-3.0.71
Comment 20 Mark Dominik Bürkle 2013-04-04 15:38:09 UTC
Comment on attachment 344116 [details]
kernel .config for 3.2.1

This kernel is configured to run without i915 module. :-(
Comment 21 Mark Dominik Bürkle 2013-04-04 16:53:41 UTC
Created attachment 344412 [details]
kernel .config for vanilla-2.6.32.60
Comment 22 Mark Dominik Bürkle 2013-04-04 16:54:43 UTC
Created attachment 344414 [details]
intel_reg_dumper vanilla-2.6.32.60
Comment 23 Mark Dominik Bürkle 2013-04-04 16:57:44 UTC
in summary:

console visible    kernel version                   comments
    no             current (gentoo-sources-3.8.5)   i915 module is hiding the console
    no             gentoo-sources-3.6.11-r1         like 3.8.5
    no             vanilla 3.2.42                   like 3.8.5
    no             vanilla 3.0.71                   like 3.8.5
    yes            vanilla 3.2.1                    compiled without i915 module
    yes            vanilla 2.6.32.60                X not running (ati-drivers/fglrx)

will try 3.0 next...
Comment 24 Mark Dominik Bürkle 2013-04-04 17:28:59 UTC
Created attachment 344418 [details]
intel_reg_dumper vanilla-3.0.0
Comment 25 Mark Dominik Bürkle 2013-04-04 17:29:47 UTC
Created attachment 344420 [details]
kernel .config for vanilla-3.0.0
Comment 26 Mark Dominik Bürkle 2013-04-04 17:31:30 UTC
no ttys with 3.0.0
Comment 27 Mark Dominik Bürkle 2013-04-05 16:48:57 UTC
Created attachment 344524 [details]
intel_reg_dumper vanilla-2.6.34.14; i915 not loaded

i915 refuses to load (no device) because "*ERROR* drm/i915 can't work without intel_agp module" which was first compiled-in, then has been loaded as a module, still no success in loading i915 module. So ttys are seen...
Comment 28 Mark Dominik Bürkle 2013-04-05 16:49:55 UTC
Created attachment 344526 [details]
kernel .config for vanilla-2.6.34.14
Comment 29 Mark Dominik Bürkle 2013-04-05 16:57:27 UTC
vanilla kernel sources 2.6.34 (built from 2.6.34.14 and reverse applying patchset .14; patching was done successfully without errors and warnings) cannot be compiled:

lapmdb-hpl linux-2.6.34 #>> make bzImage modules
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  VDSO    arch/x86/vdso/vdso.so.dbg
gcc: error: elf_x86_64: No such file or directory
make[2]: *** [arch/x86/vdso/vdso.so.dbg] Error 1
make[1]: *** [arch/x86/vdso] Error 2
make: *** [arch/x86] Error 2
lapmdb-hpl linux-2.6.34 #>> 

any hints on this, anybody?
TIA.
Comment 30 Mark Dominik Bürkle 2013-04-05 18:31:53 UTC
will give vanilla-3.8.2 a try -- IIRC it did have consoles while running X...
Comment 31 Mark Dominik Bürkle 2013-04-05 21:06:22 UTC
Created attachment 344558 [details]
intel_reg_dumper vanilla-3.8.2

no consoles with vanilla-3.8.2 either :-(
Comment 32 Mark Dominik Bürkle 2013-04-05 21:07:12 UTC
Created attachment 344560 [details]
kernel .config for vanilla-3.8.2
Comment 33 Mark Dominik Bürkle 2013-04-06 17:49:01 UTC
Tried to run without KMS on i915 module.

Consoles were visible but X refused to start, intel_drv.so requires KMS in i915.

Upon un- and loading i915 module with parameter modeset=0 or =-1, consoles continued to be visible, but X refused to start.

Upon un- and loading i915 module with parameter modeset=1, console turned black (backlight off) and nothing is visible (even after using brightnessUp key), like I'm already used to.

Upon unloading i915 (first stopping X/xdm, then unloading), consoles continued t
o be invisible. brightnessUp/Down did not react any more.
Upon loading i915 with modeset=1, brightnessUp/Down worked again and X was restartable.
Comment 34 Mark Dominik Bürkle 2013-04-08 23:52:38 UTC
(In reply to comment #8)
> ...
> Secondly, crank up your kernel log buffer size (18 should suffice) and boot
> with drm.debug=6 kernel param ... dmesg...
> 
> Should you decide to do a bisect, it would make sense to narrow it further
> down to last working / first non-working kernel version and not begin with
> 3.2 and 3.8.
> 
> Actually, is it the same when you disable your AMD graphics?

a) my log buffer size is set at "17", at least in gentoo-sources-3.8.5:
CONFIG_LOG_BUF_SHIFT=17
 but I will set it to 18 and reboot with drm.debug=6.

b) there is no kernel version that is working as to my wishes, so no bisect... :-(

c) I can not disable my AMD graphics. The only thing I can do is to use 
 aticonfig --px-igpu
to switch the fglrx X-driver to use the intel gpu - or whatever this does... will give it a try, too.
Comment 35 Mark Dominik Bürkle 2013-04-09 15:30:25 UTC
Just to keep a record of what's been done:

changed CONFIG_LOG_BUF_SHIFT=18, aticonfig --px-igpu, cmdline += drm.debug=6, rebooted
  consoles were displayed until X started, and at reboot, were visible again after X session was finished. Didn't try ctrl-alt-f1 or other.
  dmesg lost after reboot (stored in /tmp/, ups).

changed aticonfig --px-dgpu, rebooted
  consoles visible

changed cmdline -= drm.debug=6
  consoles visible, ctrl-alt-f1 and similar work.
  dmesg follows, intel_reg_dumper follows.
Comment 36 Mark Dominik Bürkle 2013-04-09 15:35:24 UTC
Created attachment 344996 [details]
dmesg WITHOUT drm.debug=6, after third reboot with working consoles
Comment 37 Mark Dominik Bürkle 2013-04-09 15:38:18 UTC
Created attachment 344998 [details]
intel_reg_dumper 3.8.5-gentoo from within running X session, from third reboot with working consoles
Comment 38 Mark Dominik Bürkle 2013-05-06 20:42:37 UTC
---------------------------------------------------------
the kernel cmdline "drm.debug=6" seems to fix this issue.
(run once with kernel 3.8.5)
---------------------------------------------------------

Will try some of the older kernels before doing the next "emerge -avuND @world" and will re-open this bug if I find any black consoles.

List of kernels to be tested:
2.6.32.60
2.6.34.14
3.0.0
3.0.71
3.2.42
3.4.38
3.6.11-gentoo-r1
3.7.10-gentoo
3.8.2
Comment 39 Mark Dominik Bürkle 2013-05-07 14:13:51 UTC
Uhm well, it's not fixed as I thought:

2.6.32.60            ok, but no X11 b/c loaded i915 is not found by atiddxInit
2.6.34.14            i915 Module refuses to initialize, intel_agp (which is loaded) is required...
3.0.0                Black Screen
3.0.71               BS
3.2.42               BS
3.4.38               (OK) (have to check this again)
3.6.11-gentoo-r1     BS
3.7.10-gentoo        BS
3.8.2                BS
3.8.5                OK with X11 -- but only when Module is compiled without "KMS by default on" and
                                    /etc/modprobe.d/test.conf: options i915 modeset=1
3.8.6                same as 3.8.5
Comment 40 Mark Dominik Bürkle 2013-05-08 14:44:58 UTC
mdb@lapmdb-hpl ~ $>> grep I915 /boot/config-*
/boot/config-2.6.32.60:CONFIG_DRM_I915=m
/boot/config-2.6.32.60:CONFIG_DRM_I915_KMS=y
/boot/config-2.6.34.14:CONFIG_DRM_I915=m
/boot/config-2.6.34.14:CONFIG_DRM_I915_KMS=y
/boot/config-2.6.34.14.old:CONFIG_DRM_I915=m
/boot/config-2.6.34.14.old:CONFIG_DRM_I915_KMS=y
/boot/config-3.0.0:CONFIG_DRM_I915=m
/boot/config-3.0.0:CONFIG_DRM_I915_KMS=y
/boot/config-3.0.71:CONFIG_DRM_I915=m
/boot/config-3.0.71:CONFIG_DRM_I915_KMS=y
/boot/config-3.2.42:CONFIG_DRM_I915=m
/boot/config-3.2.42:CONFIG_DRM_I915_KMS=y
/boot/config-3.4.38:CONFIG_DRM_I915=m
/boot/config-3.4.38:CONFIG_DRM_I915_KMS=y
/boot/config-3.4.38.old:CONFIG_DRM_I915=m
/boot/config-3.4.38.old:CONFIG_DRM_I915_KMS=y
/boot/config-3.6.11-gentoo-r1:CONFIG_DRM_I915=m
/boot/config-3.6.11-gentoo-r1:CONFIG_DRM_I915_KMS=y
/boot/config-3.7.10-gentoo:CONFIG_DRM_I915=m
/boot/config-3.7.10-gentoo:CONFIG_DRM_I915_KMS=y
/boot/config-3.7.3-gentoo:CONFIG_DRM_I915=m
/boot/config-3.7.3-gentoo:CONFIG_DRM_I915_KMS=y
/boot/config-3.7.6-gentoo:CONFIG_DRM_I915=m
/boot/config-3.7.6-gentoo:CONFIG_DRM_I915_KMS=y
/boot/config-3.8.1-gentoo:CONFIG_DRM_I915=m
/boot/config-3.8.1-gentoo:CONFIG_DRM_I915_KMS=y
/boot/config-3.8.1-gentoo.old:CONFIG_DRM_I915=m
/boot/config-3.8.1-gentoo.old:CONFIG_DRM_I915_KMS=y
/boot/config-3.8.2:CONFIG_DRM_I915=m
/boot/config-3.8.2:CONFIG_DRM_I915_KMS=y
/boot/config-3.8.2-gentoo:CONFIG_DRM_I915=m
/boot/config-3.8.2-gentoo:CONFIG_DRM_I915_KMS=y
/boot/config-3.8.2.old:CONFIG_DRM_I915=m
/boot/config-3.8.2.old:CONFIG_DRM_I915_KMS=y
/boot/config-3.8.4-gentoo:CONFIG_DRM_I915=m
/boot/config-3.8.4-gentoo:CONFIG_DRM_I915_KMS=y
/boot/config-3.8.5-gentoo:CONFIG_DRM_I915=m
/boot/config-3.8.5-gentoo:# CONFIG_DRM_I915_KMS is not set
/boot/config-3.8.5-gentoo.old:CONFIG_DRM_I915=m
/boot/config-3.8.5-gentoo.old:# CONFIG_DRM_I915_KMS is not set
/boot/config-3.8.6-gentoo:CONFIG_DRM_I915=m
/boot/config-3.8.6-gentoo:# CONFIG_DRM_I915_KMS is not set
/boot/config-3.8.6-gentoo.old:CONFIG_DRM_I915=m
/boot/config-3.8.6-gentoo.old:CONFIG_DRM_I915_KMS=y
mdb@lapmdb-hpl ~ $>> 

Please note: kernels 3.8.5 and 3.8.6 are compiled with "DRM_I915_KMS not set", therefore they are running with module option "modeset=1".

I'm too lazy to run all those old kernels with a new compilation (I cleaned up /usr/src/ just about one month ago), I'm more interested in future kernels, so coming up next will be a "emerge -avuND @world" with a newer kernel and ati-drivers... after the advertising break... ;-)
Comment 41 Mark Dominik Bürkle 2013-05-08 15:08:49 UTC
Booted twice with 
 - a 3.8.6-gentoo-kernel with DRM_I915_KMS=y
 - a 3.8.6-gentoo-kernel with DRM_I915_KMS not set
First was with black screens (X11 started ok), second was with tty1-tty12 OK.
The only difference for intel_reg_dumper is the RC6_RESIDENCY_TIME:

lapmdb-hpl ~ #>> diff -3u /root/rgd-20130508-16*
--- /root/rgd-20130508-164947-3.8.6-gentoo	2013-05-08 16:49:47.310008588 +0200
+++ /root/rgd-20130508-165414-3.8.6-gentoo	2013-05-08 16:54:14.846665742 +0200
@@ -1,4 +1,4 @@
-Script started on Wed May  8 16:49:47 2013
+Script started on Wed May  8 16:54:14 2013
                     PGETBL_CTL: 0x00000000
                GEN6_INSTDONE_1: 0xfffffffe
                GEN6_INSTDONE_2: 0xffffffff
@@ -200,7 +200,7 @@
              PCH_PP_OFF_DELAYS: 0x01f407d0
                 PCH_PP_DIVISOR: 0x00186905
                       PORT_DBG: 0x00000000 (HW DRRS off)
-            RC6_RESIDENCY_TIME: 0x09ebb182
+            RC6_RESIDENCY_TIME: 0x056581f7
            RC6p_RESIDENCY_TIME: 0x00000000
           RC6pp_RESIDENCY_TIME: 0x00000000
                GEN6_RP_CONTROL: 0x00000d91 (enabled)
@@ -225,4 +225,4 @@
                     GEN6_PMIMR: 0x00000000
                 GEN6_PMINTRMSK: 0x00000000
 
-Script done on Wed May  8 16:49:47 2013
+Script done on Wed May  8 16:54:14 2013
lapmdb-hpl ~ #>> cat /root/rgd
script -a "${0}-$( date +%Y%m%d-%H%M%S )-$( uname -r )" -c intel_reg_dumper
lapmdb-hpl ~ #>> last -3 reboot
reboot   system boot  3.8.6-gentoo     Wed May  8 16:52 - 17:03  (00:11)    
reboot   system boot  3.8.6-gentoo     Wed May  8 16:46 - 16:52  (00:05)    
reboot   system boot  3.8.6-gentoo     Mon May  6 23:50 - 16:45 (1+16:55)   

wtmp begins Thu May  2 18:13:12 2013
lapmdb-hpl ~ #>> # v=$(make kernelversion); make -j4 bzImage modules && rm /lib/modules/"${v:-gibtsnet}/kernel" -rf && make modules_install install
lapmdb-hpl ~ #>> 

(The last one is the cmdline to call the kernel's Makefile rules: it's cleaned up before the modules are installed.)

Any hints, any questions anybody?
Comment 42 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-05-11 22:52:21 UTC
Does this till occur on 3.8.13 and 3.9.2?

Other than that, nice analysis although it feels hard to draw a conclusion from; may need more sophisticated debugging techniques I'm unaware of. You may even opt to contact the Intel developers that do the Intel modules in the Linux kernel to look into this issue.
Comment 43 Mark Dominik Bürkle 2013-05-13 06:18:24 UTC
(In reply to comment #42)
> Does this till occur on 3.8.13 and 3.9.2?

Thanks for the feedback.

On 3.8.13-gentoo this is still the same,

I will try 3.9.0-gentoo and 3.9.2-gentoo this afternoon, most likely.
Comment 44 Mark Dominik Bürkle 2013-05-13 21:06:40 UTC
On 3.9.0-gentoo and 3.9.2-gentoo this is still the same:

 - i915 Module without KMS and /etc/modprobe.d/test.conf: options i915 modeset=1

   => tty1-12 are usable as usual

 - i915 Module with KMS (and test.conf as above)

   => tty1-12 are NOT usable

I will seek for ways of reporting this "upstream" next week.
Comment 45 Mark Dominik Bürkle 2013-05-13 21:11:33 UTC
(In reply to comment #44)

In "without KMS" I meant to write "without KMS on by default", to be more precise:

lapmdb-hpl ~ #>> grep I915 /boot/config-3.9.2-gentoo*
/boot/config-3.9.2-gentoo:CONFIG_DRM_I915=m
/boot/config-3.9.2-gentoo:# CONFIG_DRM_I915_KMS is not set
/boot/config-3.9.2-gentoo.old:CONFIG_DRM_I915=m
/boot/config-3.9.2-gentoo.old:CONFIG_DRM_I915_KMS=y
lapmdb-hpl ~ #>> 

Its getting late...
Comment 46 Andreas Sturmlechner gentoo-dev 2013-06-09 12:07:15 UTC
I was going to try (In reply to DominikBuerkle from comment #41)
> Booted twice with 
>  - a 3.8.6-gentoo-kernel with DRM_I915_KMS=y
>  - a 3.8.6-gentoo-kernel with DRM_I915_KMS not set
> First was with black screens (X11 started ok), second was with tty1-tty12 OK.
> The only difference for intel_reg_dumper is the RC6_RESIDENCY_TIME:

I was going to try that out as well on my system, but then forgot out of lack of time... anyway, I just had a few 3.10_rc5 test boots, all with successful fbcon upbringing, so I'm cautiously optimistic *knocks wood*. You might want to give that a try as well?
Comment 47 Andreas Sturmlechner gentoo-dev 2013-06-09 19:48:28 UTC
Well, forget it, my evil system was just again giving me false hopes.
Comment 48 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-07-19 10:21:51 UTC
Hmm, could you expand what you mean by "hybrid graphics"? Two cards?

In particular, we resolved another bug lately that had a blank screen related to hybrid graphics; but first thing I note here in your case, you don't have "# CONFIG_VGA_SWITCHEROO is not set" enabled, maybe that is a requirement to get things to work so I would advise trying to enable it. Also, you might be able to use that to turn on the right output (search the internet for instruction on how to use vga_switcheroo).

The temporary fix for that issue was to remove the two lines mentioned in

https://bugs.gentoo.org/show_bug.cgi?id=458746#c31

in the file "/usr/src/linux/drivers/gpu/drm/i915/i915_drv.c".
Comment 49 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-07-19 10:22:55 UTC
I forgot to note, those two lines are for 3.10 kernels; if you use an older kernel I would like to advise you to upgrade, that way you can also check if the problem has been fixed already...
Comment 50 Mark Dominik Bürkle 2013-07-25 14:45:40 UTC
Problem persists with 3.10.2-gentoo.

In addition to that, 3.10.0-gentoo and 3.10.2-gentoo do not resume after suspend-to-ram, they hang when resuming.
Comment 51 Mark Dominik Bürkle 2013-07-28 20:20:41 UTC
(In reply to Tom Wijsman (TomWij) from comment #48)
> Hmm, could you expand what you mean by "hybrid graphics"? Two cards?

Hi Tom,

I have a core i5-2430M CPU (which has integrated graphics) and a discrete graphics chip on the mainboard (with separate 1024 MB of graphics RAM).

I experimented with vga_switcheroo before I started using fglrx / ati-drivers, from those experiments I learned that I have a MUXless system that's permanently using the CPUs graphics system. :-(

However, using the discrete GPU (HD 6470M, just been renamed to HD 7470M) is making OpenGL games possible (usable).

Kind regards,
mdb

mdb@lapmdb-hpl ~ $>> lspci -nn| grep VGA
00:02.0 VGA compatible controller [0300]: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0116] (rev 09)
01:00.0 VGA compatible controller [0300]: Advanced Micro Devices [AMD] nee ATI Seymour [Radeon HD 6400M/7400M Series] [1002:6760]
mdb@lapmdb-hpl ~ $>> 

> ...
> The temporary fix for that issue was to remove the two lines mentioned in
> 
> https://bugs.gentoo.org/show_bug.cgi?id=458746#c31
> 
> in the file "/usr/src/linux/drivers/gpu/drm/i915/i915_drv.c".

Didn't try that yet, but I'm now reporting upstream.
Comment 52 Mark Dominik Bürkle 2013-07-28 20:46:51 UTC
reported upstream as https://bugzilla.kernel.org/show_bug.cgi?id=60643
Comment 53 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-08-06 17:28:28 UTC
(In reply to DominikBuerkle from comment #51)
> Didn't try that yet, but I'm now reporting upstream.

Please try that fix when you have the time; if it is the same bug, you have it fixed as well as avoid a duplicate upstream bug.
Comment 54 Mark Dominik Bürkle 2013-08-06 20:22:29 UTC
(In reply to Tom Wijsman (TomWij) from comment #48)
> we resolved another bug lately that had a blank screen
> related to hybrid graphics
> The temporary fix for that issue was to remove the two lines mentioned in
> 
> https://bugs.gentoo.org/show_bug.cgi?id=458746#c31
> 
> in the file "/usr/src/linux/drivers/gpu/drm/i915/i915_drv.c".

lines 550/551 commented out (// ...) in gentoo-sources-3.10.2,
                //list_for_each_entry(crtc, &dev->mode_config.crtc_list, head)
                //      dev_priv->display.crtc_disable(crtc);
compilation says:

  CC [M]  drivers/gpu/drm/i915/i915_drv.o
drivers/gpu/drm/i915/i915_drv.c: In function 'i915_drm_freeze':
drivers/gpu/drm/i915/i915_drv.c:520:19: warning: unused variable 'crtc' [-Wunused-variable]
  LD [M]  drivers/gpu/drm/i915/i915.o

lapmdb-hpl linux-3.10.2-gentoo #>> grep I915 .config
CONFIG_DRM_I915=m
CONFIG_DRM_I915_KMS=y

BTW, suspend-to-ram will not wake up correctly with the gentoo-sources-3.10.x, at least with 3.10.0 and 3.10.2. Will try that again, too.

Additionally, the cmdline will be += drm.debug=0xe and X will not be started automatically, so the AMD drivers will probably not be loaded, either - I'll check that with "cat /proc/cmdline; dmesg; lsmod"...
Comment 55 Mark Dominik Bürkle 2013-08-06 22:02:20 UTC
Booting with 3.10.2-gentoo with DRM_I915_KMS=y in .config and two lines commented out (see comment#54) leads to a GREY screen. Now, the backlight is not turned off any more, but typing is still a blind mans task.

In addition to the preparations above, the fglrx.ko module in /lib/modules/video/ was renamed to .ko_off to prevent it from being loaded (per request of upstream).

It didn't make a difference wether fglrx.ko was loaded or not.
But it was important, if DRM_I915_KMS=y was set or not in .config:

- with DRM_I915_KMS=y, the screen went GREY when i915 module was loaded.
  In addition, after closing, waiting about 20 seconds, and then opening the laptop again, it started to produce heat (cpu cooler running nearly at max) and did not react to ctrl-alt-del, "shutdown -r now" or other input. I had to turn the computer off, wait 3 seconds and turn it on again.

- with "# DRM_I915_KMS not set", the console continued to be visible when i915 module was loaded.
  In addition, after closing, waiting about 30 seconds, and then opening the laptop again, continued typing was possible, console just showing some syslog messages about ACPI event button/LID close and open being unhandled by userspace...

going to report upstream, too...