Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 458746 - sys-kernel/gentoo-sources-3.6.0 to 3.9.6 - vga_switcheroo switch to Radeon blanks screen as Intel CRTC mode is disabled on card suspend, a MUX-ed system does not like this.
Summary: sys-kernel/gentoo-sources-3.6.0 to 3.9.6 - vga_switcheroo switch to Radeon bl...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL: https://bugzilla.kernel.org/show_bug....
Whiteboard: linux-3.6-regression watch-linux-bugz...
Keywords: UPSTREAM
Depends on:
Blocks:
 
Reported: 2013-02-22 14:15 UTC by Jimis Hol
Modified: 2013-08-07 09:09 UTC (History)
0 users

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


Attachments
difference of config of 3.5.7 and 3.8.0 (diff-of-config.txt,162.94 KB, text/plain)
2013-02-22 14:22 UTC, Jimis Hol
Details
dmesg with black screen when switch from untel to radeon (switcheroo-debug.log,60.23 KB, text/x-log)
2013-06-19 22:18 UTC, Jimis Hol
Details
3.9.6 current kernel config (.config,79.16 KB, text/x-mpsub)
2013-06-20 04:10 UTC, Jimis Hol
Details
git log v3.5..v3.7 --grep='switcheroo' (file_458746.txt,2.43 KB, text/plain)
2013-07-01 16:48 UTC, Tom Wijsman (TomWij) (RETIRED)
Details
bisect.log (bisect.log,3.02 KB, text/x-log)
2013-07-04 14:05 UTC, Jimis Hol
Details
history of my first try of bisecting (history of bisecting,1.51 KB, text/plain)
2013-07-04 14:06 UTC, Jimis Hol
Details
Xorg.0.log Got through ssh cause of black screen after switch to radeon. Kernel 3.9.6 (Xorg.0.log-from-3.9.6,34.60 KB, text/plain)
2013-07-04 19:42 UTC, Jimis Hol
Details
Xorg.0.log From working laptop, no black screen after succesfull switch to radeon. Kernel 3.5.7 (Xorg.0.log,34.60 KB, text/x-log)
2013-07-04 19:53 UTC, Jimis Hol
Details
this must be the right one (bisect.log,3.56 KB, text/x-log)
2013-07-05 23:14 UTC, Jimis Hol
Details
my dmidecode output (dmidecode.txt,10.81 KB, text/plain)
2013-07-23 20:58 UTC, Jimis Hol
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jimis Hol 2013-02-22 14:15:37 UTC
I use hprofile to switch by graphics cards ATI and Intel on my hybrid laptop HP-G62. kernels 3.6.11, 3.7.6 and 3.8.0 fails to switch to open source radeon when i try it and give me black screen with only option to power down the laptop.
Even before starting X, terminal disappears when i try to switch by "echo DIS e.t.c." Some times i see a message about vga_switcheroo client 1 or 0 refuse to awitch

Reproducible: Always

Actual Results:  
blank screen

Expected Results:  
to use radeon graphics card .

I tried all kind of tricks with modeset etc. If i disable intel card booting freezes. 
jimishol@gentoo-laptop-g62 ~ $ emerge --info
Portage 2.1.11.52 (default/linux/amd64/13.0/desktop/gnome, gcc-4.6.3, glibc-2.16.0, 3.5.7-gentoo x86_64)
=================================================================
System uname: Linux-3.5.7-gentoo-x86_64-Intel-R-_Core-TM-_i5_CPU_M_460_@_2.53GHz-with-gentoo-2.2
KiB Mem:     3847596 total,   2847168 free
KiB Swap:    5241852 total,   5241852 free
Timestamp of tree: Thu, 21 Feb 2013 17:30:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p42
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.3-r3, 3.2.3-r2
dev-util/cmake:           2.8.10.2-r1
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.13.1
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.7 (virtual/os-headers)
sys-libs/glibc:           2.16.0
Repositories: gentoo
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA Broadcom AdobeFlash-10.3"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -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://ftp.cc.uoc.gr/mirrors/linux/gentoo/ ftp://ftp.cc.uoc.gr/mirrors/linux/gentoo/"
LANG="el_GR.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4 -l3.95"
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=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 aperfmperf apic arat arch_perfmon berkdb branding bts bzip2 cairo cdda cdr clflush cli cmov colord consolekit constant_tsc cracklib crypt cups cx16 cx8 cxx dbus de dri ds_cpl dtes64 dts dvd dvdr eds emboss encode ept est evo exif fam firefox flac flexpriority fortran fpu fxsr gdbm gif gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk ht iconv ida java jpeg lahf_lm lcms ldap libnotify lm mad mca mce mmx mng modules monitor mp3 mp4 mpeg msn msr mtrr mudflap multilib nautilus ncurses networkmanager nls nonstop_tsc nopl nptl nx ogg opengl openmp pae pam pango pat pbe pcre pdcm pdf pebs pge png pni policykit popcnt ppds pse pse36 pulseaudio qt3support rdtscp readline rep_good sdl sep session socialweb spell ss sse sse2 sse4_1 sse4_2 ssl ssse3 startup-notification svg syscall tcpd tiff tm tm2 tpr_shadow truetype tsc udev udisks unicode upower usb v4l v4l2 vme vmx vnmi vorbis vpid wxwidgets x264 xcb xml xtopology xtpr 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" 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 synaptics joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="el" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="radeon intel" 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 Jimis Hol 2013-02-22 14:22:09 UTC
Created attachment 339698 [details]
difference of config of 3.5.7 and 3.8.0

When i booted with kernel 3.5.6 all were ok. Since 3.5.6 isnt in portage i emerged 3.5.7
I attach the diff of these 2 kernels where i compare the configuration files. I tried to differ only in wireless access.
Comment 2 Jimis Hol 2013-02-22 14:30:47 UTC
Because of new CONFIG_X86_SMAP=y i even gave in grub nosmap and nosmep but without success,

x11-drivers/xf86-video-ati-7.1.0 was built with the following:
USE="udev (-glamor)"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,lazy"

sys-apps/hprofile-2.0_beta2 was built with the following:
USE="(multilib)" ABI_X86="64"
Comment 3 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-06-17 21:46:35 UTC
Do newer versions like gentoo-sources-3.9.6 and git-sources-3.10-rc6 still demonstrate this problem?

If still present on those versions, could you try to capture dmesg after a failed switch? You could schedule a short sleep and then redirect dmesg to a file and let it automatically reboot after that.
Comment 4 Jimis Hol 2013-06-19 22:16:35 UTC
txs for replying.

Today evening i tried with kernel 3.9.6 Problem remains

Started with intel and tried to go to radeon and got black screen.

i have a /usr/share/X11/xorg.conf.d/13-video.radeon as link to 13-video that says

Section "Device"
  Identifier "video"
  Driver "radeon"
  BusID       "PCI:01:00:0" #this one was added today 6-19-13
#	Option "RegistryDwords" "EnableBrightnessControl=1" not working either
EndSection

In dmesg i attach, note the changes at the like BusID
Perhaps the new udev is the reason. i dont know. As i said 3.5.7 works ok if i chose it for boot.
Comment 5 Jimis Hol 2013-06-19 22:18:30 UTC
Created attachment 351432 [details]
dmesg with black screen when switch from untel to radeon
Comment 6 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-06-19 22:28:39 UTC
(In reply to Jimis Hol from comment #5)
> Created attachment 351432 [details]
> dmesg with black screen when switch from untel to radeon

It says "[   11.995612] [Firmware Bug]: Duplicate ACPI video bus devices for the same VGA controller, please try module parameter "video.allow_duplicates=1"if the current driver doesn't work.".

1) Did 3.5.7 output this as well?
2) Can you try if adding that kernel parameter works?
Comment 7 Jimis Hol 2013-06-20 04:08:51 UTC
this is my start in grub.conf

title Gentoo Linux 3.9.6
root (hd0,5)
kernel /boot/3.9.6-gentoo root=/dev/sda7 radeon.agpmode=8 radeon.modeset=1 video.allow_duplicates=1

title Gentoo Linux 3.5.7
root (hd0,5)
kernel /boot/3.5.7-gentoo root=/dev/sda7 radeon.agpmode=8 radeon.modeset=1 video.allow_duplicates=1

Cannot remeber if there is some kernel option. 3.9.6 differs a lot from 3.5.7
I will attach my .config in case you are intersted. txs
Comment 8 Jimis Hol 2013-06-20 04:10:44 UTC
Created attachment 351438 [details]
3.9.6 current kernel config
Comment 9 Jimis Hol 2013-06-23 22:18:07 UTC
kernel 3.5.7 had DRM_RADEON_KMS 
3.9.6 has DRM_RADEON_UMS 

but when i try to switch i'm forced to sudo hprofile. Then i am gone to terminal where i log in again and sudo once more. It works to 3.5.7 but not later.

userspace modesetting with DRM_RADEON_UMS isnt working either on or off.
Comment 10 Jimis Hol 2013-06-24 20:53:40 UTC
I connected to laptop through ssh
ptest of vgaswitcheroo seems to give radeon. And switch file at /sys/kernel is ok. I didn't see any error in Xorg.0.log or dmesg
I think it isn't switcheroo after all. It must be open source radeon that maybe must be configured differently.
Comment 11 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-06-27 14:38:57 UTC
There is a bug about this upstream at https://bugzilla.kernel.org/show_bug.cgi?id=55311 but I forgot to tell you and set the URL wrong the first time, could you take a look there?
Comment 12 Jimis Hol 2013-06-27 20:27:14 UTC
Backlight for radeon never worked for me and a fixing of it was my main hope with new kernels but since i try upgrade them manually its time consuming. I 'll stick with kernel 3.5.7 hoping to read about some fix of this bug of black screen.
As I read in your last url and their links some guys have the 'opposite' problem of switching from working radeon to a black screen of intel.(My laptop starts with working intel). So something changed in >=3.6 kernels where fixing a bug gave rise to this problem and somehow intel or radeon drivers have to make adaptions. May be the title 'vgaswitcheroo fails to switch' is wrong failing to describe the problem.
Thank you for replies.
Comment 13 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-07-01 16:48:40 UTC
Created attachment 352412 [details]
git log v3.5..v3.7 --grep='switcheroo'

There apparently have not been a lot of vga_switcheroo commits between 3.5 (working) and 3.7 (broken), could you try versions in between the working 3.5 and broken 3.6 to indicate more specifically which commit might be failing?

You can do this by performing a git bisect; pass the last known to work version as well as the first broken version to it.

http://wiki.gentoo.org/wiki/Kernel_git-bisect

(A way to do less commits is to restrict by file; I would discourage you from doing that, because the fault might not lie with vga_switcheroo, but if you want to give it a try anyway you could run it once for ./drivers/gpu/vga/vga_switcheroo.c and once for ./include/linux/vga_switcheroo.h using the "git bisect start [--no-checkout] [<bad> [<good>...]] [--] [<paths>...]" syntax; if the reverse patch for the resulting bad commit does not fix it, you will still have to run a full bisect)
Comment 14 Jimis Hol 2013-07-02 20:47:46 UTC
Let us assume i could try bisect that seems little hard for me.
I don't know how to start it according to http://wiki.gentoo.org/wiki/Kernel_git-bisect.

My menuconfig is working, do to previous emerge --sync ONLY with kernels linux-3.5.7-gentoo and linux-3.9.6-gentoo They differ a lot!! The first that i tried and didnt worked was  linux-3.6.11-gentoo but i cant menuconfig it because of "make: *** No rule to make target `menuconfig'.  Stop."

Today gentoo-sources (i use testing ~amd64) goes up from 3.4.51 to 3.7.10-r1 (fortunately i installed specifically 3.5.7 so i didn't lost menuconfig) So how can i start bisect?
In http://git.kernel.org/pub/scm/linux/kernel/git/ i didn't recognised a thing!!

Is it proper the
root # cd /usr/src
root # git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-stable

and afterwards the
root # git bisect bad v3.6.11 | tee -a /root/bisect.log #OR v3.7.10-r1
root # git bisect good v3.5.7 | tee -a /root/bisect.log

Txs Tom
Comment 15 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-07-03 13:49:33 UTC
(In reply to Jimis Hol from comment #14)
> My menuconfig is working, do to previous emerge --sync ONLY with kernels
> linux-3.5.7-gentoo and linux-3.9.6-gentoo They differ a lot!! The first that
> i tried and didnt worked was  linux-3.6.11-gentoo but i cant menuconfig it
> because of "make: *** No rule to make target `menuconfig'.  Stop."

Can I get the full output of that? Is there a Makefile in /usr/src/linux? This sounds like an incomplete kernel sources install to me.

> Today gentoo-sources (i use testing ~amd64) goes up from 3.4.51 to 3.7.10-r1
> (fortunately i installed specifically 3.5.7 so i didn't lost menuconfig) So
> how can i start bisect?

You don't need gentoo-sources for the bisect.

> In http://git.kernel.org/pub/scm/linux/kernel/git/ i didn't recognised a
> thing!!
> 
> Is it proper the
> root # cd /usr/src
> root # git clone
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
> linux-stable

Don't forget to `cd linux-stable` after cloning it.

Perhaps do `eselect kernel set linux-stable` too if you use genkernel.

> and afterwards the
> root # git bisect bad v3.6.11 | tee -a /root/bisect.log #OR v3.7.10-r1
> root # git bisect good v3.5.7 | tee -a /root/bisect.log

Yes; after that you can build the kernel, boot into the newly built kernel and if it works you run `git bisect good` and if it is broken you run `git bisect bad`, then it will pick a new commit and you repeat this paragraph. (Build --> Test --> Good / Bad --> Build --> Test --> Good / Bad --> ... --> You'll eventually find the bad commit)
Comment 16 Jimis Hol 2013-07-04 14:03:51 UTC
Something must gone wrong with my bisecting because
1) the first bad commit doesn't seemed to be related with graphics or expceted anyway as i read it
2)building with git didn't reproduced the excact behaviour. All of  my "bisect bad" were given because i couldn't start X nor had a /sys/kernel/debug/vgaswitcheroo folder BUT i had text with console. So not really black screens

(I slept with no wireless even with kernel 3.5.7 but by the first poweron in the morning all are as usual). Are gentoo-sources included in linux-stable.git?

I attach the bisect.log and some history of my procedure with the hope you can pinpoint what i did wrong. Maybe i could retry.

txs again
Comment 17 Jimis Hol 2013-07-04 14:05:45 UTC
Created attachment 352608 [details]
bisect.log
Comment 18 Jimis Hol 2013-07-04 14:06:46 UTC
Created attachment 352610 [details]
history of my first try of bisecting
Comment 19 Jimis Hol 2013-07-04 14:25:22 UTC
Since i was propably wrong and xgi has to do with graphics, this is my cards

lspci -v |grep VGA
00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 02) (prog-if 00 [VGA controller])
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Park [Mobility Radeon HD 5430/5450/5470] (prog-if 00 [VGA controller])
Comment 20 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-07-04 14:41:03 UTC
XGI framebuffer, related to XGI video driver. Seems irrelevant.

(In reply to Jimis Hol from comment #16)
> 2)building with git didn't reproduced the excact behaviour. All of  my
> "bisect bad" were given because i couldn't start X nor had a
> /sys/kernel/debug/vgaswitcheroo folder BUT i had text with console. So not
> really black screens

Sorry to disappoint you. The gist of it is that it should either 1) work (good) or 2) go black (black) otherwise the bisect will be meaningless; anything in between, is indeed the result of a wrong kernel upgrade.

I think you need to rebuild external modules if you have any; you can do this with `emerge @module-rebuild` for the kernel modules as well as `emerge @x11-module-rebuild` for X11 modules.

Can you attach the /var/log/Xorg.0.log if it still goes wrong?

You might want to script parts of this so you don't have to retype all the commands. For instance, add the following two commands to .bashrc so you can do `doprep` followed by `git bisect good_or_bad_here | tee -a /root/bisect.log` followed by `dotest` followed by `reboot`.

doprep() {
    cd /usr/src/linux
    mount /dev/sda6 /boot
}

dotest() {
    cp ../linux-3.5.7-gentoo/.config .config
    make oldconfig
    make -j2 && make modules_install
    cp arch/x86_64/boot/bzImage /boot/gentoo-bisect
}

You could combine them even more so all you have to type is `bisect bad` or `bisect good`, but if you go for that make sure you get it to check the return codes right.

You can get back to start by running `git bisect reset` after which you can do the `git bisect start` again.
Comment 21 Jimis Hol 2013-07-04 19:42:59 UTC
Created attachment 352618 [details]
Xorg.0.log Got through ssh cause of black screen after switch to radeon. Kernel 3.9.6
Comment 22 Jimis Hol 2013-07-04 19:53:48 UTC
Created attachment 352620 [details]
Xorg.0.log From working laptop, no black screen after succesfull switch to radeon. Kernel 3.5.7

I'm too tiered today. Till i try again bisect i post 2 Xorg.0.log The error about Failed to load module "modesetting" doesn't seem to affect functionality because it appears even before succesfully switch to radeon with kernel 3.5.7

Worth noting that when was in black screen with kernel 3.9.6 i switched to intel using ssh connection but ended with a blinking cursor at top left of black screen failing to see gdm screen.
Comment 23 Jimis Hol 2013-07-04 20:24:39 UTC
I dont know the significance of this but first oldconfig again ends without asking any new option but with
warning: (DRM) selects DMA_SHARED_BUFFER which has unmet direct dependencies (EXPERIMENTAL)

As in previous attempt i ignored it this time i will pass through menuconfig too
Comment 24 Jimis Hol 2013-07-05 23:14:01 UTC
Created attachment 352696 [details]
this must be the right one

Finally being more carefull this time with kernel update i think i managed to finish bisecting procedure. Txs Tom
Comment 25 Jimis Hol 2013-07-05 23:17:17 UTC
I cant help but ask if might be this bug to be related with the fact that changing the brightness never worked with radeon in this hybrid setup
Comment 26 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-07-06 09:04:57 UTC
(In reply to Jimis Hol from comment #25)
> I cant help but ask if might be this bug to be related with the fact that
> changing the brightness never worked with radeon in this hybrid setup

I don't think the brightness is related but it definitely can cause the screen to blank because this is the Cathode Ray Tube Controller (CRTC) which controls video timings.

http://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?id=a261b246ebd552fd5d5a8ed84cc931bb821c427f

As can be seen on above URL, the commit is relatively small; can you please try to go back to your current kernel and remove the intel_modeset_disable(dev); instruction from the file /drivers/gpu/drm/i915/i915_drv.c?

I think that when it is trying to put the card to sleep there (when you switch to Radeon) that this command wrongly turns off the display; this shouldn't happen in your case, since you want the Intel card to route the output from your Radeon card. I think you have a MUX-ed system, where both GPUs are connected to the display via switching multiplexer located on or near the Intel card.

I think this call should be guarded to check whether vga_switcheroo is present.

When removing the line helps, could you report a new kernel bug upstream about that at https://bugzilla.kernel.org such that they can fix this for you in the future? You might also instead choose to send a mail to the kernel mailing list (http://www.tux.org/lkml/) with a patch to fix this; since it is a patch and not a bug, it will get faster looked into. Though, to write a patch the appropriate vga_switcheroo check should be written and I'm not entirely sure how to do that. Or who knows, maybe the line should just not be there; you'd have to be a video card developer to know that...

I hope that lines help you fix your issue.
Comment 27 Jimis Hol 2013-07-06 13:27:29 UTC
Tom Wijsman !!!
I thank you from the deeps of my heart.

For the first time i saw 
Gallium 0.4 on AMD CEDAR 

in my

Linux gentoo-laptop-g62 3.9.6-gentoo #8 SMP Sat Jul 6 15:53:14 EEST 2013 x86_64 Intel(R) Core(TM) i5 CPU M 460 @ 2.53GHz GenuineIntel GNU/Linux

I putted
intel_modeset_disable(dev); of 524 row in /*   */ and became
/* intel_modeset_disable(dev); */
from the /usr/src/linux/drivers/gpu/drm/i915/i915_drv.c

gave
make clean
make -j2 && make modules_install
and
emerge -av @x11-module-rebuild
just in case that it would be neccesary and.....

I have both my cards
# lspci -v |grep VGA
00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 02) (prog-if 00 [VGA controller])
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Park [Mobility Radeon HD 5430/5450/5470] (prog-if 00 [VGA controller])

at my HP G62 laptop AGAIN!!
(of course still without the ability to change brigthness as usual :D )

Will this bug change to a resolved one? 
Thank you!!
Comment 28 Jimis Hol 2013-07-06 14:05:53 UTC
I am not member of bugzilla.kernel.org, nor belong there as my knowlenges of the subject are zero. I use only this bugs.gentoo.org and i am just a dedicated gentoo user.
I never used mailing list and by visiting http://www.tux.org/lkml/ I was out of my abilties

So I cant report this bug farther (I tried but i couldnt even find a proper title in my mind). If you can't do it for me because you obviously missing my hardware that is needing for testing, i will try to subscribe myself in bugzilla.kernel. Mailing list is totally strange for me.
Comment 29 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-07-06 21:48:39 UTC
I have better news, upon checking the latest kernels this appears fixed in 3.10.

http://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?id=24576d23976746cb52e7700c4cadbf4bc1bc3472
Comment 30 Jimis Hol 2013-07-07 07:20:24 UTC
My dear Tom
I was happy to give 
emerge -av =sys-kernel/gentoo-sources-3.10.0 and make oldconfig from the 3.9.6 configuration
but black screen persist and there is no
intel_modeset_disable(dev); line
in /usr/src/linux/drivers/gpu/drm/i915/i915_drv.c
so as to do the same trick as i did with 3.9.6

It seems that bisecting from 3.5.7 all the way to 3.10.0 would be tedious.
as i dont think that a bisecting from our modified 3.9.6 can be done.

Sorry to disappoint you, i was so willing to confirm that 3.10.0 was ok :(
Comment 31 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-07-07 09:48:23 UTC
Eh, it represents itself in a different form there.

    list_for_each_entry(crtc, &dev->mode_config.crtc_list, head)
        dev_priv->display.crtc_disable(crtc);

Removing these two lines in 3.10.0 should work for you.

I now see that these two lines also disable CRTC; heh, I'll report this soon.
Comment 32 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-07-07 09:51:41 UTC
The bug I gave earlier appears to be the same so we don't need to file a duplicate; I am closing this bug to track the upstream bug.
Comment 33 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-07-23 17:47:42 UTC
Upstream asks for dmidecode information to add a quirk to fix this in the kernel; please `emerge sys-apps/dmidecode` and attach the `dmidecode` output upstream.
Comment 34 Jimis Hol 2013-07-23 20:58:00 UTC
Created attachment 354040 [details]
my dmidecode output

dmidecode was already installed if it matters. Txs for conserning about it :)