Bug 64746 - optimus don't use nouveau card
Summary: optimus don't use nouveau card
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/nouveau (show other bugs)
Version: 9.1
Hardware: Other All
: medium normal
Assignee: Nouveau Project
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-18 22:59 UTC by Marc Collin
Modified: 2015-05-13 13:28 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
dmesg (81.03 KB, text/plain)
2013-05-18 22:59 UTC, Marc Collin
Details
var log message when i'm tried vgaswitch (216.34 KB, text/plain)
2013-05-21 19:37 UTC, Marc Collin
Details
Xorg file (99.15 KB, text/plain)
2013-08-17 18:41 UTC, Marc Collin
Details
dmesg august 2013 (81.54 KB, text/plain)
2013-08-30 13:53 UTC, Marc Collin
Details
glxinfo (15.23 KB, text/plain)
2013-08-30 13:54 UTC, Marc Collin
Details
glxinfo_dri_prime (15.23 KB, text/plain)
2013-08-30 13:54 UTC, Marc Collin
Details
xorg_0_log_august (42.91 KB, text/plain)
2013-08-30 13:55 UTC, Marc Collin
Details

Description Marc Collin 2013-05-18 22:59:14 UTC
Created attachment 79507 [details]
dmesg

i have a lenovo s430 laptop it have a intel 4000 and nvidia GT 620M video card.
in bios, optimus is selected.

when i start suse 12.3, nouveau card is never used, intel is used.

when i go in console, try to go back to my kde session... that crash and go back to kdm login.


in log i see

nouveau W[DRM] voltage table 0x50 unknown
[3.409915] nouveau  [DRM] 3: core 475MHz shader 950MHz memory 900MHz voltage 10mV

xorg.0.log file
http://fr.pastebin.ca/2378194
Comment 1 Marc Collin 2013-05-21 19:36:51 UTC
i tried to use vgaswitch

cat /sys/kernel/debug/vgaswitcheroo/switch 
0:IGD:+:Pwr:0000:00:02.0
1:DIS: :Pwr:0000:01:00.0

first i tried
init 3
echo "0000:00:02.0" /sys/kernel/debug/vgaswitcheroo/switch 
init 5

still intel video card used by glxgears -info


init 3
echo "0000:01:00.0" /sys/kernel/debug/vgaswitcheroo/switch 
init 5

still intel video card used by glxgears -info
Comment 2 Marc Collin 2013-05-21 19:37:30 UTC
Created attachment 79625 [details]
var log message when i'm tried vgaswitch
Comment 3 Emil Velikov 2013-08-14 23:29:23 UTC
Hi Marc

Can you attach your xorg.log, the link provided returns a 404

What is the output of
$ DRI_PRIME=1 glxinfo | grep render

Note that Optimus is a very "funny" case and your experience may vary depending on the connections between the GPUs and the outputs - special thanks goes to your laptop manufacturer :)

For further information take a look at our wiki [1]
[1] http://nouveau.freedesktop.org/wiki/Optimus/
Comment 4 Marc Collin 2013-08-17 18:41:08 UTC
Created attachment 84183 [details]
Xorg file
Comment 5 Marc Collin 2013-08-17 18:41:37 UTC
DRI_PRIME=1 glxinfo | grep render

return nothing
Comment 6 Emil Velikov 2013-08-30 13:03:38 UTC
Hmm something unusual is happening here

* the var/messages does not indicate any writes to vgaswitcheroo/switch
* the Xorg.log still indicates that the intel card is setup and used as primary

So to get a better picture (including timeline) can you do the following

1. Toggle/switch to the nv card
$ cat /sys/kernel/debug/vgaswitcheroo/switch 
$ echo "0000:01:00.0" /sys/kernel/debug/vgaswitcheroo/switch

2. Confirm that the nv card is used (paste the output in your reply)
$ cat /sys/kernel/debug/vgaswitcheroo/switch 

3. Start X
$ init 5 #startx # systemd start {g,k,x}dm

and then attach the output of the following (plain text, please)

* dmesg
* Xorg.0.log
* LIBGL_DEBUG=verbose glxinfo
* LIBGL_DEBUG=verbose DRI_PRIME=1 glxinfo

Thanks
Comment 7 Marc Collin 2013-08-30 13:53:15 UTC
cat /sys/kernel/debug/vgaswitcheroo/switch 
0:DIS: :Pwr:0000:01:00.0
1:IGD:+:Pwr:0000:00:02.0

don't seem switched?

i tried
echo DIS > /sys/kernel/debug/vgaswitcheroo/switch

but the screen get completly black...

so i switched back with 
echo IGD > /sys/kernel/debug/vgaswitcheroo/switch
Comment 8 Marc Collin 2013-08-30 13:53:44 UTC
Created attachment 84911 [details]
dmesg august 2013
Comment 9 Marc Collin 2013-08-30 13:54:12 UTC
Created attachment 84912 [details]
glxinfo
Comment 10 Marc Collin 2013-08-30 13:54:51 UTC
Created attachment 84913 [details]
glxinfo_dri_prime
Comment 11 Marc Collin 2013-08-30 13:55:25 UTC
Created attachment 84914 [details]
xorg_0_log_august
Comment 12 Emil Velikov 2013-08-30 14:43:32 UTC
(In reply to comment #7)
> cat /sys/kernel/debug/vgaswitcheroo/switch 
> 0:DIS: :Pwr:0000:01:00.0
> 1:IGD:+:Pwr:0000:00:02.0
> 
> don't seem switched?
> 
> i tried
> echo DIS > /sys/kernel/debug/vgaswitcheroo/switch
> 
> but the screen get completly black...
> 
With "screen" I believe that you're talking about the laptop LVDS?

In that case it seems like the nv card is not wired to that output, thus you'll need to do the following

* forget about vgaswitcheroo
* Follow the instructions on our wiki [1]



[1] http://nouveau.freedesktop.org/wiki/Optimus/
Comment 13 Ilia Mirkin 2014-08-21 21:01:24 UTC
Is this still an issue with newer kernels? (e.g. 3.13.x or newer)
Comment 14 Tobias Klausmann 2015-05-13 13:28:29 UTC
(In reply to Ilia Mirkin from comment #13)
> Is this still an issue with newer kernels? (e.g. 3.13.x or newer)

no answer for a long time plus offloading works fine with newer version of the kernel today, so i assume this is fixed.

Feel free to reopen the bug if the problem persists...


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.