Lenovo Y570 missing dsm call #2

Closed
SimonSheehan opened this Issue Jan 6, 2012 · 209 comments

Comments

Projects
None yet

Update 2013-03-16: Linux 3.9-rc1 finally fixed the bug, everyone using 3.9-rc1 or newer can drop the acpi-handle-hack. ~L
Update 2013-03-29: Linux 3.8.5 also got the fix, you do not need any patching yourself for that kernel and newer!

Those who are looking for a solution, look at #2 (comment)


[17735.060526] bbswitch: No suitable _DSM call found.
[17773.660017] bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.PEG0.VGA_

Linux simon-fedora 3.1.6-1.fc16.x86_64 #1 SMP Wed Dec 21 22:41:17 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

Running Fedora 16

01:00.0 VGA compatible controller: nVidia Corporation Device 0deb (rev a1) (prog-if 00 [VGA controller])
    Subsystem: Lenovo Device 3981
    Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Interrupt: pin A routed to IRQ 16
    Region 0: Memory at f0000000 (32-bit, non-prefetchable) [size=16M]
    Region 1: Memory at c0000000 (64-bit, prefetchable) [size=256M]
    Region 3: Memory at d0000000 (64-bit, prefetchable) [size=32M]
    Region 5: I/O ports at 2000 [size=128]
    Expansion ROM at f1000000 [disabled] [size=512K]
    Capabilities: <access denied>
    Kernel modules: nouveau, nvidiafb

Owner

Lekensteyn commented Jan 6, 2012

This is a known issue, if you're using nouveau, please try Bumblebee-Project/Bumblebee-old#149 (comment) and report back.

For the record: the Lenovo Ideapad Y470 has the same ACPI tables and is therefore affected as well.

Owner

Lekensteyn commented Jan 16, 2012

@SimonSheehan could you try the latest version?

jm2 commented Jan 17, 2012

@Lekensteyn here is the info you wanted from Reporting bugs:

http://pastebin.com/jb80Fyc1 (Lenovo Ideapad Y570)

I have the same issue on IdeaPad Y570 with Ubuntu 11.10. I tried the 'known issue' link above but it is giving me a 404. Could someone please respond with the correct link?

Owner

Lekensteyn commented Jan 23, 2012

Commit 11ddd34 should have added support for the Lenovo Ideapad Y570. Could you try the module from develop?

I tried the version from the test PPA, is there a newer one?

brutall commented Jan 23, 2012

Nothing here, Y570: http://pastebin.com/HnPMtyY9

brutall commented Jan 23, 2012

I can enable and disable Nvidia card without any problem using acpi_call. Is it helpful for you?

Owner

Lekensteyn commented Jan 23, 2012

@malibu66 Nope, it's in git, the PPA only contains stable releases.

@brutall Thanks for your feedback. Investigating.

Owner

Lekensteyn commented Jan 23, 2012

I found the issue, the commit checked for the NVIDIA DSM UUID where the Lenovo Y570 uses the new Optimus UUID. I'll fix it tomorrow.

Lekensteyn added a commit that referenced this issue Jan 24, 2012

Support Optimus machines through WMMX (GH-2)
This should finally support machines like the Lenovo Y570. WMMX methods should
be more reliable than direct DSM probing so let's try that before calling DSM
directly.
Owner

Lekensteyn commented Jan 24, 2012

Please test the new code from develop! On my machine (BTO P-BOOK 17CL34 a.k.a. Clevo B7130), the WMMX method works.

brutall commented Jan 24, 2012

Module loaded successfully :-), but seems PM doesn't work: http://pastebin.com/emrSCDP6 .

Owner

Lekensteyn commented Jan 24, 2012

@brutall Well, we've progressed then, at least the method is detected well. Could you join #bumblebee on Freenode IRC for faster feedback?

Owner

Lekensteyn commented Jan 24, 2012

Ugh... The method \_SB.PCI0.PEG0.VGA._PS3 is called where \_SB.PCI0.PEG0.PEGP._PS3 should be called instead.

Is this fixed now? I'm trying to get the code from https://github.com/Bumblebee-Project/bbswitch. The latest I can find is 0.4.6 and I can't even load that version on my Y570.

Owner

Lekensteyn commented Jan 25, 2012

It's not fixed yet. I'll have to make a very hacky, specific workaround for this bug and am looking for a clean and compatible way to do this.

Owner

Lekensteyn commented Jan 27, 2012

On http://forums.lenovo.com/t5/IdeaPad-Y-and-U-series-Laptops/Y570-How-to-enable-Nvidia-Optimus-Technology/ta-p/479197 I see a switch. If this exists on the Y570 or Y470, please generate a new acpi_dump_info report as described in the README. (and mention whether it's a Y470 or Y570)

jm2 commented Jan 27, 2012

This switch does exist on the Y470; however it is a spring loaded switch that always returns to the same position and toggles whether the LED next to it is on (either switchable or integrated only) but it only has any effect on the LED in Windows 7, so I think it might be a software switch. Unfortunately I cannot test right now as the LCD on mine just died and I have to send it in for repairs.

brutall commented Jan 27, 2012

Yes, it exists, but it's a software switch, I think. I mean it isn't a two-state switch: you can push/press it (actually you drag it to right and then it returns to left), so discrete card is enabled/disabled. There is also a LED indicating current state of Optimus.

Switch/LED doesn't work outside of windows and this is the reason, why I think it's controlled by the software. In Ubuntu it lights all the time - no matter if you push the switch or disable discrete card using ascpi_call.

I wasn't clear on whether this was confirmed on the Y570 or not, but yes it is on the Y570 as well. Behavior is the same as above. Would be great if it could be made to work in Linux!

Yes its a 1 state switch. (Could be a button as well) It only works for sofware, The white led is always on in Linux *shows that GPU acceleration is enabled). No function for button yet In Linux Mint Lisa.
Owning a Y570 btw

Owner

Lekensteyn commented Jan 30, 2012

I'm about to report this issue on the kernel bugtracker. The wrong handle is being detected (that is arguable btw...). \_SB.PCI0.PEG0.VGA is being detected because it has a _DOS and _DOD method (as well as _PSx methods which are basically NOOP for the hardware). But the \_SB.PCI0.PEG0.PEGP handle contains the proper _DSM, _PSx and _ROM methods.
Can someone test bbswitch and/ or nouveau with the mainline kernel from http://kernel.org? Once the correct handle is being detected in the kernel, there should not be a need for changes in bbswitch.

brutall commented Jan 30, 2012

@Lekensteyn
Is it possible to easily hack bbswitch to work with Y570? I mean if you don't want to put hacks to the mainline of your tool, then maybe you could create a dirty patch and we will use it to build bbswitch for our laptops? Until the proper fix will be found.

Owner

Lekensteyn commented Jan 30, 2012

Well, the solution to Lenovo's buggy BIOS likely fixes the VBIOS/ROM issues of at least the nouveau driver. I'm already looking for possible ways to get the code patched for these laptops. I'm available on #bumblebee

Owner

Lekensteyn commented Jan 30, 2012

I've created a bug report for this: https://bugzilla.kernel.org/show_bug.cgi?id=42696

If anyone finds out how to enable nvidia gpu (manually or with optimus) on y570, please let me know. I'm newb in linux, but thi but thi is the only thing that keeps me from porting over.
Thanks a lot.

Lekensteyn added a commit that referenced this issue Feb 2, 2012

Owner

Lekensteyn commented Feb 3, 2012

Update: there is a hack to fix the real issue that makes the driver and bbswitch module to fail. It has been tested on a Lenovo IdeaPad Y570, but it supposed to work for Y470 as well. Please note that this hack is by no means a real solution (it's a very ugly one, but it works).

Basically, a wrong ACPI handle is being detected (https://bugzilla.kernel.org/show_bug.cgi?id=42696). The hack overwrites the detected ACPI handle when the module is loaded. It's recommended that the module is loaded before bbswitch and bumblebeed loads, otherwise bbswitch won't work.

See the README on https://github.com/Bumblebee-Project/bbswitch/tree/hack-lenovo for details.

LasVegas commented Feb 3, 2012

Lekensteyn,
This latest works for me on my Y570! Thanks. I have Suse Linux 11.4 and had to do things like:
" dkms build -m acpi-handle-hack -v 0.0.1 " rather than what the README showed. Using the latest NVIDIA-Linux-x86_64-295.17.run driver.

I can now do:

optirun deviceQuery
[deviceQuery] starting...
deviceQuery Starting...

CUDA Device Query (Runtime API) version (CUDART static linking)

Found 1 CUDA Capable device(s)

Device 0: "GeForce GT 555M"
CUDA Driver Version / Runtime Version 4.2 / 4.1
CUDA Capability Major/Minor version number: 2.1
Total amount of global memory: 1024 MBytes (1073414144 bytes)
( 2) Multiprocessors x (48) CUDA Cores/MP: 96 CUDA Cores
GPU Clock Speed: 1.50 GHz
Memory Clock rate: 1570.00 Mhz
Memory Bus Width: 128-bit
L2 Cache Size: 131072 bytes
Max Texture Dimension Size (x,y,z) 1D=(65536), 2D=(65536,65535), 3D=(2048,2048,2048)
Max Layered Texture Size (dim) x layers 1D=(16384) x 2048, 2D=(16384,16384) x 2048
Total amount of constant memory: 65536 bytes
Total amount of shared memory per block: 49152 bytes
Total number of registers available per block: 32768
Warp size: 32
Maximum number of threads per block: 1024
Maximum sizes of each dimension of a block: 1024 x 1024 x 64
Maximum sizes of each dimension of a grid: 65535 x 65535 x 65535
Maximum memory pitch: 2147483647 bytes
Texture alignment: 512 bytes
Concurrent copy and execution: Yes with 1 copy engine(s)
Run time limit on kernels: Yes
Integrated GPU sharing Host Memory: No
Support host page-locked memory mapping: Yes
Concurrent kernel execution: Yes
Alignment requirement for Surfaces: Yes
Device has ECC support enabled: No
Device is using TCC driver mode: No
Device supports Unified Addressing (UVA): Yes
Device PCI Bus ID / PCI location ID: 1 / 0
Compute Mode:
< Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 4.2, CUDA Runtime Version = 4.1, NumDevs = 1, Device = GeForce GT 555M
[deviceQuery] test results...
PASSED

exiting in 3 seconds: 3...2...1...done!

and even "optirum matlab" works as well - letting matlab use the 555M graphics card for the first time since I bought this (lovely, other than the nvidia card issue) 7 months ago.

Cheers! And Thanks again!

brutall commented Feb 3, 2012

Works for me as well, Y570. Thank you very much! :-)

gsgatlin commented Feb 3, 2012

Hello. Does not appear to work on the y470 yet. (at least for me anyways) I was able to install acpi-handle-hack in my initramfs and it takes a little longer to first boot now. (Instructions were slightly different on Red Hat) But bbswitch still gives errors. My system is a Lenovo Y470. By longer I mean the screen has a blinking text cursor in the
screen after the grub screen but before rhgb (now called plymoth) starts longer than it used to. I think it takes several seconds before the first X windows screen starts now.

dkms add -m acpi-handle-hack -v 0.0.1
dkms build -m acpi-handle-hack -v 0.0.1
dkms install -m acpi-handle-hack -v 0.0.1
edit /etc/dracut.conf
change:
#add_drivers+=""
to
add_drivers+="acpi-handle-hack"
cd /boot
dracut
reboot

modprobe -l | grep acpi-handle
extra/acpi-handle-hack.ko

[gsgatlin@y470 bbswitch]$ sudo make load
[sudo] password for gsgatlin:
/sbin/rmmod bbswitch
ERROR: Module bbswitch does not exist in /proc/modules
make: [load] Error 1 (ignored)
/sbin/insmod bbswitch.ko
insmod: error inserting 'bbswitch.ko': -1 No such device
make: *** [load] Error 1

[gsgatlin@y470 bbswitch]$ dmesg | tail
readahead-collector: starting delayed service auditd
readahead-collector: sorting
hda-intel: IRQ timing workaround is activated for card #0. Suggest a bigger bdlpos_adj.
readahead-collector: finished
fuse init (API version 7.13)
SELinux: initialized (dev fuse, type fuse), uses genfs_contexts
bbswitch: version 0.4.1
bbswitch: Found integrated VGA device 0000:00:02.0: _SB.PCI0.GFX0
bbswitch: Found discrete VGA device 0000:01:00.0: _SB.PCI0.PEG0.VGA
bbswitch: No suitable _DSM call found.

Kernel is 2.6.32-220.4.1.el6.x86_64 and distro is centos 6. Any ideas welcome. :)

Owner

Lekensteyn commented Feb 3, 2012

What messages are printed in dmesg when loading the acpi-handle-hack module?

I've managed to get it working on my Y470 on Ubuntu 11.10 following the readme in the hack-lenovo branch. The only change I had to make was renaming the acpi-handle-hack.conf file to dkms.conf.

Owner

Lekensteyn commented Feb 3, 2012

Updated README, thanks for catching.

gsgatlin commented Feb 3, 2012

Hello, thank you for looking into this issue.

The only message I see when loading acpi-handle-hack is:

Setting new ACPI handle for discrete video card

when I unload it I see:

Restoring original ACPI handle for discrete video card

I will try adding acpi-handle-hack to the initramfs on a newer (mainline) kernel and report back the results. I had to rename acpi-handle-hack.conf file to dkms.conf also. I might have been wrong about startup taking longer after taking a second look.

gsgatlin commented Feb 4, 2012

Kind of surprised, but did not work with 3.2 kernel from elrepo either. :(

I still see messages about [drm] nouveau 0000:01:00.0: No valid BIOS image found in dmesg.

cd /boot
lsinitrd initramfs-3.2.2-0.el6.elrepo.x86_64.img | grep acpi-handle-hack
-rw-r--r-- 1 root root 5808 Feb 3 18:52 lib/modules/3.2.2-0.el6.elrepo.x86_64/extra/acpi-handle-hack.ko

/sbin/modprobe -l | grep acpi-handle-hack

[root@localhost ~]# uname -a
Linux localhost.localdomain 3.2.2-0.el6.elrepo.x86_64 #1 SMP Fri Jan 27 12:37:49 EST 2012 x86_64 x86_64 x86_64 GNU/Linux

hmnnn. Oh well. can't use ubuntu with my job.

gsgatlin commented Feb 4, 2012

Doh. didn't paste the output from modprobe correctly above. sorry.

/sbin/modprobe -l | grep acpi-handle-hack
extra/acpi-handle-hack.ko

Also, don't mean to come accross as ungrateful or anything. Thank you Lekensteyn for going to so much trouble to make a module at all. Perhaps the kernel devs will get this issue properly fixed at some point. I just had my hopes up a little today. ;)

gsgatlin commented Feb 4, 2012

Ok. I made a STUPID mistake. I was not loading the module at boot time. I created a /etc/sysconfig/modules/acpi-handle-hack.modules to load it at boot time and bbswitch was able to load. It appears to be working. Now I need to figure out how to get optirun to work... hmnn.

cat /proc/acpi/bbswitch
0000:01:00.0 ON

gsgatlin commented Feb 4, 2012

O.K. One last comment and I am done, I promise. I have both modules auto loading at boot time in the correct order.
dmesg shows:

Setting new ACPI handle for discrete video card
bbswitch: version 0.4.1
bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.PEG0.PEGP
bbswitch: detected an Optimus _DSM function
bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is on

and I am reading the docs for bumblebee (bumblebee-3.0) and figuring out what rpms to install before I try to build it. So I could turn it off if needed. Was able to turn card on/off in tests.

So any further issues I may have are not Lenovo Y470 related. Thanks so much for this workaround. I take back what I said on the Hybrid-graphics-linux mailing list about don't buy a lenovo ideapad 470/570. :)

Interestingly, there is a light on the front of the ideapad Y470 that was supposed to have something to do with optimus. (There is a switch next to it) It was turned on from when windows was loaded but the loading of modules seems to have turned the light (led) off on my machine. I'm not dual booting anymore so I don't think I can turn it back on but it is weird, eh?

Owner

Lekensteyn commented Feb 4, 2012

See http://wiki.bumblebee-project.org/Install-and-usage for installing Bumblebee. AFAIK there are no rpm's for Bumblebee so you need to compile it manually. For turning off the card, see the README on http://bumblebee-project.org/bbswitch

That switch (or button on other machines such as mine) is currently not really useful (it does nothing). Perhaps we can find out how to use it later.

Only tested yet with glxgears and glxsphere and HATS DOWN sir, u made a miracle.
Now i can start to port over from Windows, you just paved my way.
Thanks a lot.

malibu66 commented Feb 6, 2012

I have a Y570 with ubuntu 11.10 and my screen goes black with some type of dump from the noveau driver when I do optirun glxgears. Here is what I did:

  • followed directions to install acpi-handle-hack, so far so good:
# modprobe -l | grep acpi-handle-hack
updates/dkms/acpi-handle-hack.ko
  • in the bbswitch dir, did make and make load and it works fine.
  • made a git clone of development bumblebee
  • installed prereqs, ran ./configure
  • make
  • make install
  • ran bumblebeed --daemon
  • tee /proc/acpi/bbswitch <<<OFF
  • optirun glxgears
    ----- crash at this point
Owner

Lekensteyn commented Feb 6, 2012

Have you installed xorg-edgers/ppa and kernel 3.2? The nouveau driver supplied with Ubuntu 11.10 is outdated.

malibu66 commented Feb 6, 2012

I read in the faq about getting the latest nvidia-current and did that, I cannot remember what the ppa was. That was the only non-repository thing I did.. I usually trust the repos to keep me up to date unless told otherwise. Yeah I still have kernel 3.0.0.15. I will try the upgrade and report back if I have any issues. It makes me a bit uncomfortable to be going away from the standard repo.

Owner

Lekensteyn commented Feb 6, 2012

@malibu66 Oh, I was under the assumption that you want to use nouveau. If you just want to use the nvidia blob, you do not need xorg-edgers. If you've installed it and want to remove it, use sudo ppa-purge ppa:xorg-edgers/ppa. Could you post your logs (/var/log/kern.log, /var/log/syslog, also check the .1 files if the logs start at a later date) from the initial installation?

malibu66 commented Feb 6, 2012

I was using the nouveau driver up until now. Really which ever driver gives the better final result I will use. I was not aware I needed the 3.2 kernel in order to utilize the newest nouveau driver, that is all.

Owner

Lekensteyn commented Feb 6, 2012

The nvidia blob have an overall better performance, but may give issues when suspending. If the system behaves weird -> blame the nvidia driver.

malibu66 commented Feb 6, 2012

For me the nouveau driver will work better then. My Ubuntu partition is just for development, I'm looking for better battery life with this and that is about it. Maybe the odd time I will use optirun for something.

malibu66 commented Feb 6, 2012

Ok I did a dist-upgrade to 3.2 and rebuilt everything, including a dkms install of bbswitch and everything seems to be working as expected. Battery life is better then before and within the range of my expectations just not of my hopes. My only issue now is when I run 'optirun glxspheres' I don't see anything happen. After a delay I see a message: Polygons in scene: 62464 and it returns to the prompt. glxspheres works without optirun.

Owner

Lekensteyn commented Feb 7, 2012

Does the issue persist after a reboot? Please stop the service with sudo stop bumblebeed and pastebin the output of sudo bumblebeed --debug after running optirun glxspheres

malibu66 commented Feb 8, 2012

Yes, it persists a reboot. Here is the output:
http://pastebin.com/p4NA0eP5

jm2 commented Feb 8, 2012

I finally got my Y470 back and I can report that the hack works wonderfully on Arch with bumblebee/bbswitch and the proprietary nvidia driver. Thanks again!

Owner

Lekensteyn commented Feb 8, 2012

@malibu66 Please provide the optirun --debug glxspheres output as well.

malibu66 commented Feb 8, 2012

[DEBUG]Active configuration:
[DEBUG] bumblebeed config file: /usr/local/etc/bumblebee/bumblebee.conf
[DEBUG] X display: :8
[DEBUG] LD_LIBRARY_PATH:
[DEBUG] Socket path: /var/run/bumblebee.socket
[DEBUG] VGL Compression: proxy
[DEBUG]optirun version 3.0 starting...
[INFO]Response: Yes. X is active.

[INFO]Running application through vglrun.
[DEBUG]Process vglrun started, PID 9577.
Polygons in scene: 62464
[DEBUG]SIGCHILD received, but wait failed with No child processes
[DEBUG]Socket closed.
[DEBUG]Killing all remaining processes.

Owner

Lekensteyn commented Feb 8, 2012

@malibu66 It looks like you're immediately closing the program. Can you try optirun bash and run glxspheres from the spawned shell?

malibu66 commented Feb 8, 2012

Here is what I get:

$ glxspheres
Polygons in scene: 62464
Segmentation fault

Owner

Lekensteyn commented Feb 8, 2012

That's weird, such a basic program shold not crash. Please run it with a debugger after installing virtualgl-libs-dbg:

  1. Run optirun bash
  2. In that shell, run gdb glxspheres
  3. In the gdb shell, run run
  4. When it crashes, run bt
  5. Copy the output and pastebin it. You can use quit to stop the debugger.

Hello. In comment number 5 in bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=907241#c5

Tony Camuso understandably says that "Because the hardware the reporter listed is not certified to run Red Hat Enterprise Linux, we are limited in our ability to diagnose and fix problems that may arise on it.

If you can supply us with one of the systems exhibiting this problem, we would have a much better chance of being able to backport and integrate the upstream patch that fixes it."

I do not have like $1000 bucks to drop down on a newish lenovo that might have this problem. Not sure if that might also affect the bugzilla here https://bugzilla.redhat.com/show_bug.cgi?id=903360 also as far as fixing the bug...

Does anyone have any ideas about how we could get such a laptop into Red Hats hands? Like maybe someone was thinking of throwing away or donating their ideapad to charity and would be willing to consider donating it to Red Hat instead? Another idea I had was to appeal to lenovo corp. to ask them if they might be interested in donating a affected laptop to red hat so that red hat based distros might work better on their hardware if they did that? Like I'm thinking even if it had a cracked screen it could still be used to test the kernel bug with an external monitor. Perhaps I could do that on the lenovo Linux forums since I doubt calling a support number would get me anywhere...

Anyways, any ideas or wording for a question directed at lenovo would be awesome. Thanks a lot.

Owner

Lekensteyn commented Feb 19, 2013

I am unauthorized to view that private (?) bug. I was thinking of, screw Redhat, there are already patches available which you can use. Any enterprise customer using these laptops should be able to give RH a look at it (and as an enterprise customer, you do generally do not use non-approved hardware).

Hmnn. Yes. It is odd they made that private. Not sure when they did that. Ok. Thanks for your thoughts on that.

If red hat is so uptight about this issue, let them go to hell. Do they have all the hardware their software runs? Do they have supecomputers?
Optimus is not even supported or authorized by nvidia on linux. Why David airlie is working to give support in linux ?
I 'll stick to my Arch and Debian.

Owner

Lekensteyn commented Feb 20, 2013

Well, it is enterprise (= money), so it is expected. Let's keep such hash, off-topic messages away from this thread. Thanks :-)

Owner

Lekensteyn commented Feb 21, 2013

The only possible related commit is:

commit 33f767d767e9a684e9cd60704d4c049a2014c8d5
Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Date:   Thu Jan 10 13:13:49 2013 +0100

    ACPI: Rework acpi_get_child() to be more efficient

    Observe that acpi_get_child() doesn't need to use the helper
    struct acpi_find_child structure and change it to work without it.
    Also, using acpi_get_object_info() to get the output of _ADR for the
    given device is overkill, because that function does much more than
    just evaluating _ADR (let alone the additional memory allocation
    done by it).

    Moreover, acpi_get_child() doesn't need to loop any more once it has
    found a matching handle, so make it stop in that case.  To prevent
    the results from changing, make it use do_acpi_find_child() as
    a post-order callback.

    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Still, this one does not seem to solve the issue here.

ok; I had a look at http://article.gmane.org/gmane.linux.acpi.devel/59807 but I can't seem to find http://thread.gmane.org/gmane.linux.acpi.devel/58442 since the latter was the only one tested and confirmed working by me; am I missing something?
also http://article.gmane.org/gmane.linux.kernel/1412445/ has no reference what so ever to the issue; why should it fix it?

Owner

Lekensteyn commented Feb 21, 2013

Can you test whether the 3.9 kernel fixes the issue? The commit talks about efficiency changes, it does not seem to change ordering or something.

I tried 3.9 from fedora rawhide. I have attached the dmesg. If you want any more details, I 'm here for it.

dmesg
http://dl.dropbox.com/u/106654446/dmesg3.9
/var/log/messages
http://dl.dropbox.com/u/106654446/messages

I couldn't do anything more than that, becoz I couldn't get past lxdm screen at all.

@Lekensteyn Lekensteyn referenced this issue in Bumblebee-Project/Bumblebee Mar 2, 2013

Closed

Bumblebee for Lenovo Ideapad #346

With Arch Linux kernel arch 3.9.0-1-mainline built today still not finding the discrete card, Is there any patch which could be used for 3.9 kernel for proper aCPI handling ?

Lenovo Hack stopped working when upgraded to kernel v3.7.10
Systemd produces error:

Mar 12 14:41:46 bean-laptizz systemd-modules-load[174]: Failed to insert 'acpi_handle_hack': No such device
Mar 12 14:41:47 bean-laptizz systemd[1]: systemd-modules-load.service: main process exited, code=exited, status=1/FAILURE

Same thing when trying to manually modprobe acpi-handle-hack


Here are my system details:

$ uname -a
Linux bean-laptizz 3.7.10-1-MANJARO #1 SMP PREEMPT Thu Feb 28 19:40:34 CET 2013 x86_64 GNU/Linux
$ lspci -vnn | grep '\''[030[02]\]'
00:02.0 VGA compatible controller [0300]: Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09) (prog-if 00 [VGA controller])
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GF108 [GeForce GT 630M] [10de:0de9] (rev a1) (prog-if 00 [VGA controller])
$ dmesg | grep -C 10 bbswitch:
[   13.126332] fb0: inteldrmfb frame buffer device
[   13.126333] drm: registered panic notifier
[   13.126672] [Firmware Bug]: ACPI(PEGP) defines _DOD but not _DOS
[   13.132640] acpi device:37: registered as cooling_device8
[   13.132882] ACPI: Video Device [PEGP] (multi-head: yes  rom: yes  post: no)
[   13.133004] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:35/LNXVIDEO:00/input/input14
[   13.140960] acpi device:43: registered as cooling_device9
[   13.141267] ACPI: Video Device [GFX0] (multi-head: yes  rom: no  post: no)
[   13.141421] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:01/input/input15
[   13.141578] [drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 0
[   19.318381] bbswitch: version 0.5
[   19.318393] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
[   19.318400] bbswitch: cannot find ACPI handle for VGA device 0000:01:00.0
[   19.318403] bbswitch: No discrete VGA device found
[   25.147225] EXT4-fs (sda5): re-mounted. Opts: commit=0
[   25.153681] EXT4-fs (sda6): re-mounted. Opts: commit=0
[   41.131218] fuse init (API version 7.20)
$ cat /proc/acpi/dump_info 
0000:00:00.0 060000 
0000:00:01.0 060400 \_SB_.PCI0.PEG0
0000:00:02.0 030000 \_SB_.PCI0.GFX0
0000:00:14.0 0c0330 \_SB_.PCI0.XHC_
0000:00:16.0 078000 
0000:00:1a.0 0c0320 \_SB_.PCI0.EHC2
0000:00:1b.0 040300 \_SB_.PCI0.HDEF
0000:00:1c.0 060400 \_SB_.PCI0.RP01
0000:00:1c.1 060400 \_SB_.PCI0.RP02
0000:00:1d.0 0c0320 \_SB_.PCI0.EHC1
0000:00:1f.0 060100 \_SB_.PCI0.LPCB
0000:00:1f.2 010601 \_SB_.PCI0.SAT0
0000:00:1f.3 0c0500 \_SB_.PCI0.SBUS
0000:01:00.0 030000 
0000:02:00.0 020000 \_SB_.PCI0.RP01.PXSX
0000:03:00.0 028000 \_SB_.PCI0.RP02.PXSX

My get-acpi-info.sh


Update: Patched https://bugzilla.kernel.org/attachment.cgi?id=89731 to kernel 3.8.2. Running successfully on Arch/Manjaro

Read this thread from here.
#2 (comment)

All you need is already here.

Concerning my earlier comment about RHEL and Enterprise Linux...

I have obtained a slightly dinged up y470 to mail to Red Hat. But we are still figuring out if its better for me to hold on to it until RHEL 7 comes out or mail it now. I have confirmed it suffers from the bug.

As far as the fedora bugzilla goes, I have uploaded the 3.8 patch, and confirmed it works. (At least with nvidia)

The bugzilla is here if anyone is following that:

https://bugzilla.redhat.com/show_bug.cgi?id=903360

Cheers.

@hadrons123 Thank you, I used that for 3.7.6 but does not work for 3.7.10. glue.c not present

EDIT: My knowledge of proper kernel source and compiling was lacking. glue.c found.

I did not try 3.7.10 kernel. I moved to 3.8.1 with https://patchwork.kernel.org/patch/1917651/ patch and with a bbswitch-git from AUR. Everything works fine with these in Arch Linux.

I would like to confirm that I patched with https://bugzilla.kernel.org/attachment.cgi?id=89731 and I am successfully running bumblebee on Lenovo G780 with Arch/Manjaro kernel version 3.8.2.

Hello. I am running Chakra linux on a y570. The kernel is 3.7.6. I am not sure of how to apply kernel patches, but with guidance I could confirm whether the patch works on my system.

I have applied the patch and I have placed the tarball in my dropbox. http://dl.dropbox.com/u/106654446/linux.tar.gz for 3.7.6 kernel.
If you know how to build from source it would be easier.
But since chakra is arch-based, I guess the archwiki would help you build pkg from sources.

1.Install the dev tools.
2.Extract the tarball.
3. cd the folder
4.makepkg
It would take at least 1 hour to build it.
You should understand a bit about the anatomy of a PKGBUILD by reading the wikis and then you would be ready.
I have no background in computer science and If I can patch kernels and build it from source I think you can too , if you are willing

https://wiki.archlinux.org/index.php/PKGBUILD.

ok; today I tried kernel 3.9 rc2
first with patch --> not compilable kernel
reverted patch --> bbswitch works; optirun works
this would mean the ISSUE IS FIXED
can someone else try?
(on my Y480)

When you say patch, what patch are you referring to?

Yea it works, Without any patches. I don't know what commit brought this change.

uname -a
Linux arch 3.9.0-1-mainline #1 SMP PREEMPT Mon Mar 11 16:06:47 CET 2013 x86_64 GNU/Linux
edit:
I have reverted the bbswitch recent changes too.

YES !! I confirm that bbswitch is loading and working with kernel 3.9-rc2 without any patches / tweaks on my Y570 !
Cheers !

Owner

Lekensteyn commented Mar 15, 2013

Could it be this commit?

commit 53540098b23c3884b4a0b4f220b9d977bc496af3
Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Date:   Sun Mar 3 22:35:20 2013 +0100

    ACPI / glue: Add .match() callback to struct acpi_bus_type

(compared v3.9-rc1 against master)

Only Rafael can say :) @Lekensteyn like more advanced user can you alert Rafael about it ?

Owner

Lekensteyn commented Mar 15, 2013

I found the fixing commit already:

commit 33f767d767e9a684e9cd60704d4c049a2014c8d5
Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Date:   Thu Jan 10 13:13:49 2013 +0100

    ACPI: Rework acpi_get_child() to be more efficient

    Observe that acpi_get_child() doesn't need to use the helper
    struct acpi_find_child structure and change it to work without it.
    Also, using acpi_get_object_info() to get the output of _ADR for the
    given device is overkill, because that function does much more than
    just evaluating _ADR (let alone the additional memory allocation
    done by it).

    Moreover, acpi_get_child() doesn't need to loop any more once it has
    found a matching handle, so make it stop in that case.  To prevent
    the results from changing, make it use do_acpi_find_child() as
    a post-order callback.

    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Introduced with 3.9-rc1, it has a similar termination condition as the patch I proposed at https://bugzilla.kernel.org/attachment.cgi?id=86101

so this issue is solved ?

for my y480 and @hadrons123 Y580 at least; yes

My Y570 is working without any patches / hacks too :)

fixed in 3.8.5 upstream kernel too.

Confirm that 3.8.5 - stable is working without any patches / hacks and etc. on Lenovo IdeaPad Y570

Owner

ArchangeGabriel commented Mar 31, 2013

Can we consider closing this issue now that it is fixed upstream?

Owner

Lekensteyn commented Mar 31, 2013

Sure, I have updated the nobody-READs-ME of the lenovo-hack branch already, so that should be informative enough.

@Lekensteyn Lekensteyn closed this Mar 31, 2013

Owner

Lekensteyn commented Jul 17, 2013

Guys, this patch caused an regression on #65. Can users of 3.8.5+, 3.9-rc1+ (and thus 3.10/3.11 are included) confirm that applying the following commits still work for you:

Without the first patch, I expect bbswitch to get broken again. However, with the second patch applied on top of the first, things should not break. Please confirm if it still works for you, otherwise v3.10/v3.11 will be a regression for you.

both patches on top of my 3.10 and everything still works

Owner

Lekensteyn commented Jul 17, 2013

@TheSiege Thank you for confirming!

@TheSiege, Could you test the following patch with commit c7d9ca9 which has been merged into v3.11-rc1? Check whether bbswitch works on your machine with them.
https://bugzilla.kernel.org/attachment.cgi?id=106909

commit c7d9ca9 link.
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/patch/?id=c7d9ca9

can't test rc1 doesn't boot for me

You also can test both patches on v3.10. Commit c7d9ca9 should be applied firstly.

reverting the previous patches and applying the newly suggested ones;
everything is still working for me

@TheSiege Great, Thanks for test.

Owner

Lekensteyn commented Jul 27, 2013

If you have time, please test https://bugzilla.kernel.org/attachment.cgi?id=107027&action=diff&format=raw and report any regressions (or none). I do not expect regressions though.

everything keeps working (tested on 3.11-rc2)

Owner

Lekensteyn commented Jul 28, 2013

@TheSiege Thank you for reporting back!

Owner

Lekensteyn commented Sep 9, 2013

Affected user of this bug, can you please test the patch in https://bugzilla.kernel.org/show_bug.cgi?id=60829#c12? It can be applied on top of 3.10.10+ or 3.11-rc1+. It should not introduce a regression for your laptop, but we would like to have a confirmation.

TheSiege commented Sep 9, 2013

all is well
kernel 3.11
Y480
just getting polluted with stuff like (a lot)

[  172.732210] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20130517/nsarguments-95)
Owner

Lekensteyn commented Sep 9, 2013

@TheSiege Just to be sure, did you apply the patch or just test 3.11 without patching?

For the _DSM warning, see ee0591b

TheSiege commented Sep 9, 2013

@Lekensteyn yes I indeed applied the patch

sorry for the confusion; wasn't used to geting these warnings; but they happen on unpatched as well

Owner

Lekensteyn commented Sep 9, 2013

Thank you for confirming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment