Skip to content
This repository

Lenovo Y570 missing dsm call #2

Closed
SimonSheehan opened this Issue January 06, 2012 · 209 comments
Simon Sheehan

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

Peter Wu
Owner

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.
Peter Wu
Owner

@SimonSheehan could you try the latest version?

jm2
jm2 commented January 17, 2012

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

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

malibu66

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?

Peter Wu
Owner

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

malibu66

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

brutall

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

brutall

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

Peter Wu
Owner

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

@brutall Thanks for your feedback. Investigating.

Peter Wu
Owner

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.

Peter Wu Lekensteyn referenced this issue from a commit January 24, 2012
Peter Wu 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.
0ec41fa
Peter Wu
Owner

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

brutall

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

Peter Wu
Owner

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

Peter Wu
Owner

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

malibu66

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.

Peter Wu
Owner

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.

Peter Wu
Owner

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
jm2 commented January 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

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.

malibu66

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!

dragonreborn

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

Peter Wu
Owner

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

@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.

Peter Wu
Owner

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

Peter Wu
Owner

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

dragonreborn

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.

Peter Wu
Owner

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

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

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

gsgatlin

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. :)

Peter Wu
Owner

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

Mark Mathis

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.

Peter Wu
Owner

Updated README, thanks for catching.

gsgatlin

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

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

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

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

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?

Peter Wu
Owner

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.

dragonreborn

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

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
Peter Wu
Owner

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

malibu66

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.

Peter Wu
Owner

@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

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.

Peter Wu
Owner

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

malibu66

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

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.

Peter Wu
Owner

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

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

jm2

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!

Peter Wu
Owner

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

malibu66

[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.

Peter Wu
Owner

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

malibu66

Here is what I get:

$ glxspheres
Polygons in scene: 62464
Segmentation fault

Peter Wu
Owner

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.
Peter Wu
Owner

By installing libgl1-mesa-dri-dbg and libgl1-mesa-glx-dbg, the backtrace would give a more meaningful result. In addition, where did you install the packages from? It can be checked with apt-cache policy libgl1-mesa-glx. Please include /var/log/syslog or /var/log/kern.log too. Please create a new issue on https://github.com/Bumblebee-Project/Bumblebee since it has nothing to do with bbswitch anymore.

Roy Feldman

Has anyone tried using the lenovo-hack on Ubuntu 12.04? (https://github.com/Bumblebee-Project/bbswitch/tree/hack-lenovo)

It is working fine for me with Ubuntu 11.10 on my Y470. For obvious reasons, I would like to know if it works before I upgrade to Ubuntu 12.04. ;-)

Peter Wu
Owner

@royzino I don't have that Lenovo machine, but it's supposed to work. If you want to be sure, boot a livecd with the boot param modprobe.blacklist=nouveau. Then install the hack and a driver. (in that order)

brutall
brutall commented May 01, 2012

@royzino Yes, it works for me on a Y570 and Ubuntu 12.04.

Roy Feldman
royzino commented May 01, 2012

@Lekensteyn and @brutall, thank you for the info and the good news.

wildcard36qs

Thanks everyone! Y570 w/ Ubuntu 12.04:
optirun glxspheres
Polygons in scene: 62464
Visual ID of window: 0x21
Context is Direct
OpenGL Renderer: GeForce GT 555M/PCIe/SSE2
99.253151 frames/sec - 110.766517 Mpixels/sec
104.351595 frames/sec - 116.456380 Mpixels/sec
104.003231 frames/sec - 116.067606 Mpixels/sec
106.178892 frames/sec - 112.720710 Mpixels/sec
113.813039 frames/sec - 110.164648 Mpixels/sec
111.696851 frames/sec - 108.116296 Mpixels/sec
114.466459 frames/sec - 110.797123 Mpixels/sec
111.700409 frames/sec - 108.119741 Mpixels/sec
109.377344 frames/sec - 105.871144 Mpixels/sec
110.507101 frames/sec - 106.964686 Mpixels/sec
110.280218 frames/sec - 106.745075 Mpixels/sec
112.579816 frames/sec - 108.970957 Mpixels/sec

wildcard36qs

How do I disable the GPU? Using bbswitch it states that it is OFF, but when I optirun anything it is still ON. Switching it ON or OFF does not change anything other than it is telling me it is off and my battery still is not getting regular life.

Peter Wu
Owner

@wildcard36qs Check whether your BIOS is configured to always use the nvidia card. Also, have a look at the README file as it describes how to use bbswitch.

wildcard36qs

@Lekensteyn Bios does not have that option. All I did was install bumblebee per https://wiki.ubuntu.com/Bumblebee and then did these following steps for bbswitch per the Readme:

git clone git://github.com/Bumblebee-Project/bbswitch.git -b hack-lenovo
cd bbswitch
mkdir /usr/src/acpi-handle-hack-0.0.1
cp Makefile acpi-handle-hack.c /usr/src/acpi-handle-hack-0.0.1
cp dkms/acpi-handle-hack.conf /usr/src/acpi-handle-hack-0.0.1/dkms.conf
dkms add acpi-handle-hack/0.0.1
dkms build acpi-handle-hack/0.0.1
dkms install acpi-handle-hack/0.0.1

If everything goes well, you now need to get the hack loaded on boot. On Ubuntu and Debian, this can be done with:

echo acpi-handle-hack | sudo tee -a /etc/modules
sudo update-initramfs -u

I am more of a Step 1 do this, Step 2 etc...so I am unsure if I did everything I am supposed to.

Peter Wu
Owner

@wildcard36qs Do you have a Lenovo IdeaPad Y570 or Lenovo IdeaPad Y470? Have you checked the kernel log (dmesg | tail)?

wildcard36qs

@Lekensteyn
Here is the output:
[ 265.119242] nvidia 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 265.119250] nvidia 0000:01:00.0: setting latency timer to 64
[ 265.119256] vgaarb: device changed decodes: PCI:0000:01:00.0,olddecodes=io+mem,decodes=none:owns=none
[ 265.119376] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 295.40 Thu Apr 5 21:37:00 PDT 2012
[ 278.086547] nvidia 0000:01:00.0: PCI INT A disabled
[ 278.091209] bbswitch: disabling discrete graphics
[ 278.091571] bbswitch: Result of Optimus _DSM call: 11000059
[ 278.106091] pci_raw_set_power_state: 22 callbacks suppressed
[ 278.106104] pci 0000:01:00.0: Refused to change power state, currently in D0
[ 278.306063] pci 0000:01:00.0: power state changed by ACPI to D3

Peter Wu
Owner

That goes off correctly. Are you sure there is an issue? When optirun quits, the card is disabled again.

brutall
brutall commented May 08, 2012

@wildcard36qs
If you have Y570 then run "lspci -vnnn | grep -i vga". You should see two lines of output: first is Intel, second - Nvidia. If you don't see "[VGA controller]" on the end of the second line then you can be sure discrete graphics is disabled. I have Y570 for nearly a year, I was using several methods to control Optimus and above method was always a good source of reliable info about the status of my GF.

wildcard36qs

@brutall @Lekensteyn Thanks for the help guys, seems to be working good then:
00:02.0 VGA compatible controller [0300]: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller 8086:0116 (prog-if 00 [VGA controller])
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GF108 [GeForce GT 555M] 10de:0deb (prog-if ff)

Rafal Bera
RexxPL commented June 07, 2012

Hello. I've question - It's possible to enable LVDS1 output for nvidia gt555m?
CRT-0 != VGA1. What's CRT-0?
With CustomEDID didn't work too.
Thanks in advance.

System (probably not important):
Y570, 47CN28WW(V2.06)
3.5.0-rc1+ (custom) with acpi_handle_hack (loaded ;)
X.Org X Server 1.12.0 (Fedora 17beta)
NVIDIA-Linux-x86_64-302.11

Configuration:

Driver         "nvidia"
BusID          "PCI:1:0:0"

Interesting part of Xorg.0.log:

(WW) NVIDIA(GPU-0): Unable to read EDID for display device CRT-0
.. NVIDIA(0): Valid display device(s) on GeForce GT 555M at PCI:1:0:0
(--) NVIDIA(0): CRT-0 (connected)
(--) NVIDIA(0): CRT-0: 400.0 MHz maximum pixel clock
.. NVIDIA(0): Validated modes:
(II) NVIDIA(0): "CRT-0:nvidia-auto-select"
(II) NVIDIA(0): Virtual screen size determined to be 1024 x 768
(WW) NVIDIA(0): Unable to get display device CRT-0's EDID; cannot compute DPI
(WW) NVIDIA(0): from CRT-0's EDID.
[..]

Output from xrandr -q

Nvidia:

Screen 0: minimum 8 x 8, current 1024 x 768, maximum 16384 x 16384
VGA-0 connected 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
1024x768 60.0*+
800x600 72.2 60.3 56.2
640x480 59.9
512x384 120.0
400x300 144.4
320x240 120.1

Intel:

Screen 0: minimum 320 x 200, current 1366 x 768, maximum 8192 x 8192
LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
1366x768 60.0*+
1024x768 60.0
800x600 60.3 56.2
640x480 59.9
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)

Peter Wu
Owner

Not possible unless there is a BIOS option for that ("discrete mode"), LVDS is your laptop screen. Also, your post is slightly off-topic.

Michal Petrucha

I just want to report Y580 is affected as well. I just don't know how exactly to get the desired output out of dmidecode and friends which I'll be happy to post if anyone gives me a hint. (-: I'd love support for this model to be added to the hack-lenovo branch…

Michal Petrucha

Never mind, I went ahead and tried to patch it myself; it seems to work all right now. See pull request #22.

Peter Wu
Owner

Applied, thanks! I will soon prepare a new tarball.

Sergio Perez

My Y480 is affected as well; I patched it. See pull request #24

Peter Wu Lekensteyn referenced this issue in Bumblebee-Project/Bumblebee August 15, 2012
Closed

Lenovo G580 "No suitable _DSM call found" and much more! #230

presianbg

Hi guys ,

This morning i got update of nvidia drivers and mesa stuff and now i get :

optirun chrome
[ 616.826352] [ERROR]Cannot access secondary GPU - error: Could not load GPU driver

[ 616.826442] [ERROR]Aborting because fallback start is disabled.

Could you please help me ?

Tell me if you need more output information (and how to get it )
10x in advance !

Sergio Perez

I can assure you it is not that mesa broke it; I am running nvidia 304.37 and mesa stuff git
optirun --debug chrome
and the xorg log from the optirun screen would be useful information

Bruno Pagani

@presianbg Just edit /etc/bumblebee/bumblebee.conf and change KernelDriver=nvidia-current with KernelDriver=nvidia. Then reboot.

presianbg

@TheSiege The problem is not only with chrome , it's with everything i try to run with optirun. I'ma kinda bad of getting logs , tell me where and which part of it to take ?

optirun --debug chrome
[ 418.182374] [DEBUG]optirun version 3.0.1 starting...
[ 418.182402] [DEBUG]Active configuration:
[ 418.182406] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[ 418.182409] [DEBUG] X display: :8
[ 418.182411] [DEBUG] LD_LIBRARY_PATH:
[ 418.182414] [DEBUG] Socket path: /var/run/bumblebee.socket
[ 418.182417] [DEBUG] VGL Compression: proxy
[ 418.283883] [INFO]Response: No - error: Could not load GPU driver

[ 418.283903] [ERROR]Cannot access secondary GPU - error: Could not load GPU driver

[ 418.283908] [DEBUG]Socket closed.
[ 418.283920] [ERROR]Aborting because fallback start is disabled.
[ 418.283924] [DEBUG]Killing all remaining processes.

@ArchangeGabriel Just tried and still not working :( :

optirun glxspheres
[ 287.948867] [ERROR]Cannot access secondary GPU - error: Could not load GPU driver

[ 287.948892] [ERROR]Aborting because fallback start is disabled.

Bruno Pagani

That's right, I forgot that you also have to change Driver= to Driver=nvidia. And also, do not forget to restart bumblebee daemon.

presianbg

@ArchangeGabriel it's Driver=nvidia.
Also i noticed that i have nvidia-current installed at the moment. :(

Here is my bumblebee.conf ( it worked last night , just since the update this morning things went wrong) :
(Removed by ArchangeGabriel)

Bruno Pagani

Yes, the package is nvidia-current.

Could you tell me what happens if you try the following things :

sudo modprobe nvidia-current
sudo modprobe nvidia
lsmod | grep nvidia

What PPA do you use (xorg-edgers, x-updates, ...) ?

presianbg

@ArchangeGabriel PPA is “Ubuntu-X” team X Updates

sudo modprobe nvidia-current
[sudo] password for presian:
FATAL: Module nvidia_current not found.
presian@IdeaPad-Y570:~$ sudo modprobe nvidia
presian@IdeaPad-Y570:~$ lsmod | grep nvidia
nvidia 11244255 0

Sergio Perez

@presianbg
the log I am looking for is most likely called Xorg.8.log
and the whole output of optirun --debug chrome
full logs please and in english please

Bruno Pagani

So you have Driver=nvidia, KernelDriver=nvidia, and rebooted ?

Then, indeed, please past the result of : optirun -vv glxinfo

presianbg

@TheSiege I pasted the whole output of optirun --debug chrome

EDIT : Nevermind :) Silly me ! Problem is solved as ArchangeGabriel said ! 10x a lot guys !! You are awesome !

presianbg

Hello,

With 12.10 coming closer and closer , there is one question :

Will be a problem direct upgrade from 12.04 to 12.10 with everything working (optimus on lenovo y570 , Nvidia gt555m 0x0deb) ?

Cheers !

Peter Wu
Owner

It is supposed to work though you may need to add the following to the ServerLayout section in your xorg.conf.n{ouveau,vidia}:

Option "AutoAddGPU" "false"
Peter Wu Lekensteyn referenced this issue in Bumblebee-Project/Bumblebee September 20, 2012
Closed

Error: No such device #258

Peter Wu
Owner

If you are able to compile a kernel, please test the proposed real fix at
https://bugzilla.kernel.org/show_bug.cgi?id=42696#c7

Disable the handle hack as it is no longer necessary.

Sergio Perez

seems to fix it for my Y480

Peter Wu
Owner

Can i add your name and public email in a Tested-by line to the patch? If yes, can I have your name and email? If you don't want to publish your name/email, understood, then I won't include it.

Sergio Perez

yes; you can; my github profile is up to date on that info
else
Sergio Perez
Dagobertstaler@gmail.com

presianbg

Hi,

Can someone explain how to disable the handle hack and apply the real fix ? ( Sorry but i'm still noob in those things)

Thank you in advance :) !

Best Regards,
P. Yankulov

Sergio Perez

before make, apply the .patch file from the buzilla entry with
patch -p1 < .../path/to/patch.patch
remove call for dkms is:
dkms remove acpi-handle-hack/0.0.1 --all

presianbg

So :
1. dkms remove acpi-handle-hack/0.0.1 --all
2. Download the patch from bugzilla
3. Apply the patch with patch -p1 < .../path/to/patch.patch
And should work ?
Is kernel compile necessary ?

Peter Wu
Owner

Kernel recompilation is necessary. (3) needs to be executed in the kernel tree.

Not sure if it is coincidence, but since I upgraded from 3.7-rc4 to 3.7-rc5 and applying this patch, i sometimes have issues with shutdown, suspend/resume and wireless. I also had a message that my CMOS got reset due to invalid date/time on startup and then wireless was hard off (via rfkill). Again, this is possibly unrelated to this patch, but I am just throwing my experience out here in case people get strange issues too. Now I need to find out which commit hurted me :P

presianbg

@Lekensteyn Thank you . Can you explain kernel recompilation with something like tutorial ?

Peter Wu
Owner

@presianbg Example: http://askubuntu.com/q/115955/6969
If you want to have a simple .deb package you can install, you could also follow this:

  1. download kernel sources from http://www.kernel.org/
  2. cd into the tree
  3. apply the patch
  4. Copy .config from /boot/config-$(uname -r)
  5. Run make INSTALL_MOD_STRIP=1 deb-pkg -j8
  6. Now that the kernel is built, install with sudo dpkg -i linux-{headers,image}*.deb (replace * by the exact version if you have ran the build command multiple times)

If you have no idea how to proceed, then I suggest to look at the other guides or let others test it.

presianbg

So now what ? Future kernel release with implemented fix ?

Michal Petrucha
Peter Wu
Owner

I posted a patch to http://thread.gmane.org/gmane.linux.acpi.devel/57228 but it is not accepted. See the thread for more details. Basically, they're not sure if the fix does not break other machines.

Peter Wu
Owner

Can somebody provide the information from https://bugzilla.kernel.org/show_bug.cgi?id=42696#c13 ?
Basically:

lspci -d10de: -vvvnn
ls -la /sys/bus/pci/drivers/nouveau/
presianbg

Hi,

And again after some updates on Ubuntu 12.10 , I ended up here :

presian@IdeaPad-Y570:~$ nvidiaON
[sudo] password for presian:
tee: /proc/acpi/bbswitch: No such file or directory
ON
presian@IdeaPad-Y570:~$ optirun glxspheres
[ 72.727844] [ERROR]Cannot access secondary GPU - error: XORG NVIDIA(0): Failed to initialize the NVIDIA GPU at PCI:1:0:0. Please

[ 72.727880] [ERROR]Aborting because fallback start is disabled.

Tried to re-install the hack, but it's not working again. Would you be so kind to help me ?

Best Regards,
Presian

PS : Also i have some messages on boot screen :

[ 12.097560] No ACPI handle found for discrete
[ 12.134585] bbswitch : No discrete VGA device found
[ 12.325168 No ACPI handle found for discrete
[ 12.340480] No ACPI handle found for discrete
[ 12.356525] No ACPI handle found for discrete

Also had something like that :
KVM disabled by bios

But I solved it by enabling Intel Virtual Technology under bios

http://imageshack.us/f/715/screenshotfrom201211290.png/ - those are the things i updated this morning. Also tried to reinstall bumblebee but still not working .

presianbg

It's me again ...

Also tried to purge everything and install all from scratch. When i try to load bbswitch :

sudo modprobe bbswitch
FATAL: Error inserting bbswitch (/lib/modules/3.7.0-4-generic/updates/dkms/bbswitch.ko): No such device

Peter Wu
Owner

Apply the hack and watch your kernel log for errors.

presianbg

Can I use tail -f /var/log/kern.log do this ?

Nov 29 19:44:48 IdeaPad-Y570 kernel: [ 13.339301] acpi_handle_hack: No ACPI handle found for discrete video card
Nov 29 19:44:48 IdeaPad-Y570 kernel: [ 13.394432] bbswitch: version 0.4.2
Nov 29 19:44:48 IdeaPad-Y570 kernel: [ 13.394438] bbswitch: Found integrated VGA device 0000:00:02.0: _SB_.PCI0.GFX0
Nov 29 19:44:48 IdeaPad-Y570 kernel: [ 13.394449] bbswitch: cannot find ACPI handle for VGA device 0000:01:00.0
Nov 29 19:44:48 IdeaPad-Y570 kernel: [ 13.394452] bbswitch: No discrete VGA device found
Nov 29 19:44:48 IdeaPad-Y570 kernel: [ 13.591649] acpi_handle_hack: No ACPI handle found for discrete video card
Nov 29 19:44:48 IdeaPad-Y570 kernel: [ 13.593381] acpi_handle_hack: No ACPI handle found for discrete video card
Nov 29 19:44:48 IdeaPad-Y570 kernel: [ 13.594415] acpi_handle_hack: No ACPI handle found for discrete video card
Nov 29 19:44:48 IdeaPad-Y570 kernel: [ 13.595434] acpi_handle_hack: No ACPI handle found for discrete video card
Nov 29 19:44:48 IdeaPad-Y570 kernel: [ 13.596422] acpi_handle_hack: No ACPI handle found for discrete video card
Nov 29 19:44:48 IdeaPad-Y570 kernel: [ 13.597430] acpi_handle_hack: No ACPI handle found for discrete video card

Peter Wu
Owner

Have you messed with your BIOS settings?

presianbg

Nope I didn't touch them. Tried to load default settings but still no change. I think the problem is related to kernel 3.7.0-4.12 . Everything worked out of the box until updates.

presianbg

Yep kernel 3.7.0-4.12 form xorg-edgers ppa broken my system. I did clean install and everything is fine now :)

Gonzalo Bulnes Guilpain

I confirm the Lenovo hack fixes the optirun issue on my Lenovo Y480.

I use the 304.64 version of the nvidia driver from the X-Updates PPA on Ubuntu.

$ uname -a
Linux cassis 3.5.0-18-generic #29-Ubuntu SMP Fri Oct 19 10:26:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Many thanks @Lekensteyn .

presianbg

Hello,

Finally i managed to compile patched kernel with https://bugzilla.kernel.org/show_bug.cgi?id=42696#c7 .
I confirm that it works perfectly !

presian@IdeaPad-Y570:~$ lsmod | grep acpi
presian@IdeaPad-Y570:~$ uname -a
Linux IdeaPad-Y570 3.6.9 #3 SMP Wed Dec 5 11:09:59 EET 2012 x86_64 x86_64 x86_64 GNU/Linux
presian@IdeaPad-Y570:~$ nvidiaON
ON
presian@IdeaPad-Y570:~$ cat /proc/acpi/bbswitch
0000:01:00.0 ON

Cheers !

Peter Wu
Owner

Request from the ACPI maintainer, please test the patch from https://bugzilla.kernel.org/show_bug.cgi?id=42696#c17 on 3.8-rc1 (or Linus tree).

presianbg

Seems that 3.8-rc1 don't like nvidia-experimental-310 . Do you have an idea if i change it to nvidia-current it should work ?

Sergio Perez

one should expect nvidia not compiling with the latest RC kernel;
thankfully people have fixed it:
https://forums.opensuse.org/english/get-technical-help-here/pre-release-beta/481690-linux-kernel-3-8-rcx-has-been-released-test-post-your-comments-here.html#post2513408
I tested the patch mentioned in c17 from the bug with rc-1
it still leaves me with a working optirun

Peter Wu
Owner

@TheSiege Thank you for your feedback, just to be sure, is this with previous patches and hacks disabled? Can you also confirm that the bug is still visible when you do not apply the patch?

Sergio Perez

yes this kernel has no previous patches or hack; and when I revert the patch my kernel can't even boot

presianbg

So Y570 and the other effected machines should work with stable 3.8.x without any hacks and patches ?

hadrons123

I am using Y580.
I tried 3.8.rc4 mainline kernel with Arch linux and I can't login to X server. The screen goes black. acpi=off in kernel command line get me to ttys but not X server. I am not using any patch. I am not using this patch from https://bugzilla.kernel.org/attachment.cgi?id=89731. The kernel from Arch or Fedora with 3.6.11 kernels were able to boot to X without any acpi handle patch. I had similar experience with Fedora 3.7.3.204 kernel. I am not sure if something happened between 3.6.11 arch vanilla and 3.7.3 or 3.8 RC4 arch mainline kernels. I can post more details if you want.

edit:
found a fix at

https://bugs.freedesktop.org/show_bug.cgi?id=59726

sorry for the noise.

gsgatlin

hadrons123:
Was this with the latest fedora, fedora 18? (3.7.3.204) So you were able to load bbswitch module WITHOUT acpi-handle-hack on newest kernel?

gsgatlin

When I try to compile kernel kernel-3.7.2-204.fc18.src.rpm from fedora 18 with this patch, I get:

drivers/acpi/glue.c: In function 'acpi_get_child_device':
drivers/acpi/glue.c:124:4: error: implicit declaration of function 'acpi_handle_warn' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[2]: *** [drivers/acpi/glue.o] Error 1
make[1]: *** [drivers/acpi] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....

Any idea what I am doing wrong?

gsgatlin

Also, it seems acpi-handle-hack does not work with a 3.7 kernel from Red Hat. I'm guessing there would be no hope of fixing that for 3.7 or 3.8 kernels now that this bug is better understood?

Peter Wu
Owner

@gsgatlin You do not need to apply my patch on 3.8. A different approach was taken, see https://patchwork.kernel.org/patch/1917651/

gsgatlin

Hmnn. I'm not sure when fedora will use a 3.8 kernel. maybe by fedora 19?

Looks like maybe I will just need to sit out fedora 18 then and maybe wait for fedora 19. Or learn to build a newer kernel, like maybe the one from rawhide. I destroyed my rawhide vms but I've been meaning to re-create them again...

It seems this patch has too many issues for the 3.7 kernel, So I'm not sure I could make a bugzilla which was what I was trying to do with a patched up kernel. I commented out the acpi_handle_warn part but now I get

drivers/pci/pci-acpi.c:357:2: error: implicit declaration of function 'ACPI_HANDLE' [-Werror=implicit-function-declaration]

So... thanks so much for all your work on this issue. I do appreciate it. I think I should give Erunur on the fedora forums the bad news and tell him he might need to sit this version of fedora out also. He has a Y580 I think. Maybe he can go back to f17 or something. :)

I'm ok myself because I'm on CentOS 6 for most things and on 2.6.32-279.19.1 acpi-handle-hack works great.

gsgatlin

I will try that new patch just to see if it works any better in a 3.7 kernel before I completely give up. :) Thanks for the link!

gsgatlin

Just to follow up, never could figure out how to add the patch that fixes this bug to 3.7.. I'm still going to try to look at 3.8 in rawhide to see if a bugzilla could be made so that at least by f19 it might get fixed. When trying to modprobe acpi-handle-hack version 0.0.2 to 3.7.2-204.fc18.x86_64 the error generated in the logs is

Jan 21 19:27:37 localhost kernel: [ 148.906221] acpi_handle_hack: No ACPI handle found for discrete video card

Odd. I guess maybe some structures changed or similar from 3.6 to 3.7.

RedDove

@Lekensteyn @ArchangeGabriel
Is right that bumblebee can't enable nvidia optimus GT 630m in toshiba p870/023 ? as it mentioned here http://www.linlap.com/toshiba_satellite_p870
Have a look
Issue #40: Bumblebee: problem with Gt 630m

Peter Wu
Owner

@gsgatlin I now see that you were trying to apply a patch intended for 3.8 (https://bugzilla.kernel.org/attachment.cgi?id=89731). That will probably not work as it depends on earlier work in 3.8. Does my other patch or hack work for you on 3.7?

@RedDove You are affected by this bug, but the DMI whitelist is probably not including you. Please run sudo dmidecode > dmidecode.txt and attach it somewhere (pastebin, my mail, whatever).

gsgatlin

@Lekensteyn No. I couldn't get either patch to work with 3.7.2-204 with red hat's stuff added into it. I made the patches be the last one applied but it chokes on the error: implicit declaration of function 'ACPI_HANDLE' [-Werror=implicit-function-declaration]. What I'm going to do over the next few days is set up a fedora "rawhide" vm which is kind of tricky to do. I read on the fedora developer mailing list that rawhide is using kernel 3.8 already. Then once I can actually log into such a system, I could find out the exact version of the kernel and google for the source rpm and download it. And then I could apply the patch to that (Assuming its still even needed, not clear on if its in the vanilla upstream kernel yet or if its a proposed patch) and if that works then I could make a bugzilla report at red hat's bugzilla with tha patch as an attachment. Then maybe it will get fixed by the time RHEL 7 or fedora 19 comes out. I hope! Gotta keep my fingers crossed... What I really care about is RHEL 7 which won't be out for another year or so.

I am going to update the acpi-handle-hack dkms rpm in my testing repo from 0.0.1 to 0.0.2 today so that anyone running older fedora's or CentOS, such as myself, can use the newer version of that module. I'll also update my wiki page to warn about lenovo ideapad users and fedora 18 and or a 3.7.X kernel. Unless you can think of an easy way to make acpi-handle-hack work on a 3.7 kernel? If not no worries. :) Cheers.

Peter Wu
Owner

ACPI_HANDLE is new in v3.8, the patch won't apply on older versions. My patch that changes the first _ADR return does apply though.

So, for clarity:
Linux 3.6 and older: use acpi-handle-hack or the patch I mentioned above.
Linux 3.7 and older: use acpi-handle-hack or the patch I mentioned above.
Linux 3.8 and newer: no patches needed use the patch I mentioned above or this alternative (possibly safer) method.

gsgatlin

@Lekensteyn : Thank you so much! That patch worked. I did not see it before. So let me be clear also.

The kernel patch in the above comment worked to fix my issues in 3.7.2-204. I decided to put these patched up kernel packages on the web for a few days in case it helps someone else in testing their laptop with fedora 18. The kernels are at:

http://install.linux.ncsu.edu/pub/yum/itecs/public/bumblebee/kernelbug/

There are A LOT of rpms there. The only ones I think you probably need are:

kernel-3.7.2-205.fc18.x86_64.rpm
kernel-devel-3.7.2-205.fc18.x86_64.rpm
kernel-headers-3.7.2-205.fc18.x86_64.rpm

I just made up a internal release number. (205) So hopefully they skip that one.

So now I will try to make a bugzilla tomorrow morning at bugzilla.redhat.com about this bug. Hopefully I can figure out how to word it properly.

Now, about acpi-handle-hack which is a separate but related issue.

acpi-handle-hack does not work with 3.7.2-204 in fedora 18. I am sorry about that..

Here is some info that might help?

[root@y470 ~]# uname -a
Linux y470.eos.ncsu.edu 3.7.2-204.fc18.x86_64 #1 SMP Wed Jan 16 16:22:52 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
[root@y470 ~]# modinfo acpi-handle-hack
filename: /lib/modules/3.7.2-204.fc18.x86_64/extra/acpi-handle-hack.ko
version: 0.0.2
author: Peter Lekensteyn lekensteyn@gmail.com
description: Dirty ACPI handle hack for Lenovo IdeaPad Y[45]70
license: GPL
srcversion: 44A636616BED3B105189F2D
depends:

vermagic: 3.7.2-204.fc18.x86_64 SMP mod_unload
[root@y470 ~]# modprobe acpi-handle-hack
ERROR: could not insert 'acpi_handle_hack': No such device

in /var/log/messages:

Jan 22 19:29:25 y470 kernel: [ 311.549588] acpi_handle_hack: No ACPI handle found for discrete video card

I'll post a link to the bugzilla with your kernel patch as an attachment as soon as I make it tomorrow morning. Thanks a lot for all your help. If you can't get acpi-handle-hack to work in 3.7.2-XXX its not that big of a deal for me personally now that I can compile my own patched kernel rpms. Hopefully red hat / fedora will be willing to accept / apply the patch so it will just get fixed in fedora 18 at some point...

hadrons123

acpi-handle-hack didnt work for 3.7.3 in Debian experimental too. Got same results as @gsgatlin
root@localhost:~# modprobe acpi-handle-hack
ERROR: could not insert 'acpi_handle_hack': No such device

root@localhost:~# modinfo acpi-handle-hack
filename: /lib/modules/3.7-trunk-amd64/updates/dkms/acpi-handle-hack.ko
version: 0.0.2
author: Peter Lekensteyn lekensteyn@gmail.com
description: Dirty ACPI handle hack for Lenovo IdeaPad Y[45]70
license: GPL
srcversion: 44A636616BED3B105189F2D
depends:

vermagic: 3.7-trunk-amd64 SMP mod_unload modversions

edit:
Arch kernel 3.7.3 doesn't work with acpi-handle-hack either.

[root@arch ~]# modinfo acpi-handle-hack
filename: /lib/modules/3.7.3-1-ARCH/extramodules/acpi-handle-hack.ko
version: 0.0.2
author: Peter Lekensteyn lekensteyn@gmail.com
description: Dirty ACPI handle hack for Lenovo IdeaPad Y[45]70
license: GPL
srcversion: C5A2660BA2C32F923A5AF71
depends:

vermagic: 3.7.3-1-ARCH SMP preempt mod_unload modversions
[root@arch ~]# modprobe acpi-handle-hack
modprobe: ERROR: could not insert 'acpi_handle_hack': No such device

Peter Wu
Owner

@hadrons123, funny I just commented on the hack-lenovo AUR package just to find out your comment here :P The bugzilla patch requires a kernel rebuild. I don't know what changed in 3.7 which broke acpi-handle-hack, looking in the git history atm.

hadrons123

@ gsgatlin Your packages works on my Fedora 18 Y580. But I wonder if I 'll loose the patch when fedora moves to 3.7.4.X series.
@Lekensteyn Is your patch the same that is going to be implemented in 3.8? or is it a rewrite of ACPI by the kernel team?

Peter Wu
Owner

@hadrons123 My patch is not implemented in 3.8, they took a different approach.

My approach: observe that two ACPI devices are found with the same PCI Bus ID. The wrong one is picked due to the detection order. To "solve" this, reverse the detection order. Based on guesswork, I did not have any problems when running with this patch though.

The approach taken in 3.8: observe that the ACPI device we expect to be correct has an _INI method whereas the dummy handle does not have such a thing. The modification takes this observation into account: it does not overwrite a previously found device if this _INI method does not exist. This approach is safer than my patch.

So far I have found one possible commit in 3.7 that broke acpi-handle-hack:

commit 1033f9041d526dd694e2b2e12744e47c41040c4d
Author: Lan Tianyu <tianyu.lan@intel.com>
Date:   Fri Aug 17 14:44:09 2012 +0800

    ACPI: Allow ACPI binding with USB-3.0 hub

Can I ask you for kernel logs and acpi_dump_info (see README)?

Sergio Perez

is the [PATCH] PCI / ACPI: Rework ACPI device nodes lookup for the PCI bus type already in 3.8? still had to patch rc4 here; maybe I missed something can you reference me to the git commit?

Peter Wu
Owner

@TheSiege I assumed that it made it to the linus tree given this comment, but if it has not been accepted at this point, it will probably go into 3.9. I have sent a reply to https://lkml.org/lkml/2013/1/3/434, waiting for feedback.

gsgatlin

@hadrons123 Yes. Without extra precautions the kernel will be upgraded. So this was more of a test it to see if it works kind of thing.

I have created a bugzilla for fedora 18 here: https://bugzilla.redhat.com/show_bug.cgi?id=903360

We'll see what they have to say... :)

Peter Wu
Owner

It looks like you have to wait longer for a fix to arrive in git: http://lkml.kernel.org/r/3268331.1fmya6KvOh@vostro.rjw.lan

hadrons123

@Lekensteyn
patching Arch Linux 3.7.4 stock kernel with your patch https://bugzilla.kernel.org/attachment.cgi?id=86101 works. thank you!

Does your same patch work for 3.8 mainline kernels, since acpi fix is not going to land soon as per your link in the above post?

@TheSiege
What patch did you use for 3.8 kernel?

Peter Wu
Owner

@hadrons1234 Not sure whether my patch still works for 3.8. If it compiles, it should work though, but I suggest to use the patch linked by TheSiege for 3.8 since that should have a lesser chance of breakage.

hadrons123

@Lekensteyn You have asked for a kernel.log in post #2 (comment)
My journalctl is 2.2 MB file. Ok here it is
http://dl.dropbox.com/u/106654446/journalctl%20log
http://dl.dropbox.com/u/106654446/LENOVO-20132.tar.gz
other info
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:1c.3 060400 _SB_.PCI0.RP04
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 _SB_.PCI0.PEG0.PEGP
0000:02:00.0 020000 _SB_.PCI0.RP01.PXSX
0000:03:00.0 028000 _SB_.PCI0.RP02.PXSX
0000:04:00.0 088000 _SB_.PCI0.RP04.PXSX
0000:04:00.2 080501 _SB_.PCI0.RP04.J382
0000:04:00.3 088000 _SB_.PCI0.RP04.J383
0000:04:00.4 088000 _SB_.PCI0.RP04.J384

Peter Wu
Owner

This is the output after the system is patched. Can reboot without the patch and generate the output where acpi-handle-hack fails to load?

hadrons123

No it has everything. The line you ask for is here in line 2332
Jan 23 11:20:30 arch kernel: acpi_handle_hack: No ACPI handle found for discrete video card

Peter Wu
Owner

I guess this is a patched kernel?

Jan 25 10:54:34 arch kernel: Linux version 3.7.4-1-ARCH (flexible@arch) (gcc version 4.7.2 (GCC) ) #1 SMP PREEMPT Fri Jan 25 10:03:30 IST 2013
...
Jan 25 10:54:34 arch kernel: acpi_handle_hack: Handle has already been changed to PEGP

And this looks like the stock one where the bug occurs:

Jan 24 21:28:16 arch kernel: Linux version 3.7.4-1-ARCH (tobias@T-POWA-LX) (gcc version 4.7.2 (GCC) ) #1 SMP PREEMPT Mon Jan 21 23:05:29 CET 2013
...
Jan 24 21:28:16 arch kernel: acpi_handle_hack: No ACPI handle found for discrete video card

Right, the graphics device was properly detected (otherwise you would get "No discrete video card found"), I think this breakage was caused by the commit I referred before. I am not going to fix this as bbswitch (and possibly the nvidia drivers) use similar detection techniques. Patch the kernel instead. Thanks for your feedback @hadrons123!

presianbg

Heellooo,

I patched kernel 3.7.6 (with Peter's patch) and 3.8-rc6 (Rafael's patch) but when i tried to install them :

Setting up linux-image-3.8.0-rc6 (3.8.0-rc6-1) ...
ERROR (dkms apport): kernel package linux-headers-3.8.0-rc6 is not supported
Error! Application of patch buildfix_kernel_3.8.patch failed.
Check /var/lib/dkms/nvidia-310/310.32/build/ for more information.

At the moment I am with kernel 3.7.5 and everything is OK .

Best Regards,
Presian

Peter Wu
Owner

Have you checked your dkms logs in the "Check ... for more info" directory already? Note that the 3.8 kernel needs a different patch than 3.7: http://hg.nxtoo.org/hg/nxtoo/nxtoo-overlay/file/86a2fe2b5a70/x11-drivers/nvidia-drivers/files/kernel38.patch

presianbg

In that dkms log there is no useful information and also as I mentioned in my previous post , 3.7.6 patched with https://bugzilla.kernel.org/attachment.cgi?id=86101 and 3.8-rc6 with https://patchwork.kernel.org/patch/1917651/ . In both cases : ERROR (dkms apport): kernel package linux-headers-3.x.x.x. is not supported .

When i purge nvidia-* drivers kernels are installed OK , but after that cant get nvidia working. There is something fishy with headers I think.

Roy Feldman

I am considering upgrading from Ubuntu 12.04 to 12.10. I am currently running hack-lenovo on my Y470 with no problems. Does hack-lenovo work in 12.10 with the Y470? If so, which kernel version is best for me in 12.10?

Thanks in advance,

Roy

hadrons123

It depends on what kernel version you are going to move into.
see this post
#2 (comment)

presianbg

Anyone managed to compile kernel 3.6.7 with working nvidia drivers ?

Bruno Pagani ArchangeGabriel referenced this issue in Bumblebee-Project/Bumblebee February 06, 2013
Closed

Removing bbswitch hack for Lenovo Y570 #326

Roy Feldman

Hadrons123, it appears that the initial Ubuntu 12.10 installs a 3.5.x kernel. Looking at the Ubuntu kernel repo, it looks like that if did a full upgrade at this point it would take me to 3.6.0.

Are either or both of these kernels compatible with hack-lenovo for a Y470? Is there a kernel that I should avoid in the future when it goes into the Ubuntu kernel mainline?

Thanks in advance,

Roy

Roy Feldman

I really appreciate all the work that has gone into hack-lenovo! Without it I would have had to ditch my Y470, which would have been a real bummer. There is no laptop I would trade it in for in its class, plus I got an great deal on it. ;-)

Two questions:

  • Can I generally assume that any statements in this forum about the Y570 apply to the Y470 as well?

    Both have the same Intel graphics card and seem to vary only slightly in their Nvidia cards. The Y470 has a Nvidia 550M 1GB and the Y570 has a Nvidia 550M 1GB.

  • Does anyone have any idea when the kernel bug that requires the hack-lenovo workaround will be fixed, if ever?

gsgatlin

I can perhaps answer these.

The models affected by this bug that are known of are:

Lenovo IdeaPad Y470
Lenovo IdeaPad Y480
Lenovo IdeaPad Y570
LENOVO IDEAPAD Y570 /* sys-product-name: PIQY0 /
Lenovo IdeaPad Y580
PSPLBE-01V00HFR /
TOSHIBA SATELLITE P870 */
Lenovo G580
Lenovo G780

I personally own a ideapad Y470.

So question 1, yes.

For fedora / rhel 6 (My favourite distro) I have filed these 2 bugzillas:

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

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

I have compiled test kernels for fedora 18 / rhel 6 here:

http://install.linux.ncsu.edu/pub/yum/itecs/public/bumblebee/kernelbug/fedora18-bz903360/

http://install.linux.ncsu.edu/pub/yum/itecs/public/bumblebee/kernelbug/rhel6-bz907241/

I was going to file a bugzilla for "rawhide" and I was able to compile the kernel-3.8.0-0.rc6.git0.1.fc19.src.rpm with the "safer" patch. And I am pretty sure it worked. Because bbswitch loaded. (It didn't without the patch) But I could not get the nvidia drivers to work. It compiled but using optirun just locked up everything after a bit. And it did not work. And I can't test nouveau module due to a different bug. (#298) So I'm going to wait a bit before looking at 3.8 again. Because I can't prove I "fixed" anything if there are no spinning gears running on the dgpu. So no bugzilla for that 3.8 kernel yet in red hat rawhide land. But hopefully I'll make one at some point.

Question 2.
@Lekensteyn thought this kernel bug should hopefully get fixed by kernel 3.9. Then I guess its up to the various Linux distros as to whether they backport the fixes? Or you just have to wait a bit for them to use 3.9 after it comes out. I have entered these fedora / rhel bugzillas to try to encourage the red hat kernel guys to backport a fix once one is decided upon by the kernel developers... At least they are now aware of the problems.

Hope that helps a little bit.

gsgatlin

@royzino One other thing. My experiences with fedora were that acpi-handle-hack worked in 3.6 but the distro updated to 3.7 and for me it stopped working. Perhaps similar will be true in Ubuntu at some later date? I don't know how they handle their kernel upgrades.

Peter Wu
Owner

Early versions (just 3.7.0 iirc) contained a bug which was exposed when run time PM was enabled. It will probably take a while if (at all) the changes end up in older versions due to the necessary core changes.

gsgatlin

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.

Peter Wu
Owner

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).

gsgatlin

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

hadrons123

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.

Peter Wu
Owner

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

Peter Wu
Owner

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.

Sergio Perez

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?

Peter Wu
Owner

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.

hadrons123

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.

Peter Wu Lekensteyn referenced this issue in Bumblebee-Project/Bumblebee March 02, 2013
Closed

Bumblebee for Lenovo Ideapad #346

hadrons123

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 ?

beanaroo

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

hadrons123

Read this thread from here.
#2 (comment)

All you need is already here.

gsgatlin

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.

beanaroo

@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.

hadrons123

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.

beanaroo

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.

Diego Torres

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.

hadrons123

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.

Sergio Perez

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)

hadrons123

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

hadrons123

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.

presianbg

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

Peter Wu
Owner

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)

presianbg

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

Peter Wu
Owner

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

presianbg

so this issue is solved ?

Sergio Perez

for my y480 and @hadrons123 Y580 at least; yes

presianbg

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

hadrons123

fixed in 3.8.5 upstream kernel too.

presianbg

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

Bruno Pagani

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

Peter Wu
Owner

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

Peter Wu Lekensteyn closed this March 31, 2013
Peter Wu
Owner

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.

Sergio Perez

both patches on top of my 3.10 and everything still works

Peter Wu
Owner

@TheSiege Thank you for confirming!

Lan Tianyu

@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

Sergio Perez

can't test rc1 doesn't boot for me

Lan Tianyu

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

Sergio Perez

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

Lan Tianyu

@TheSiege Great, Thanks for test.

Peter Wu
Owner

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.

Sergio Perez

everything keeps working (tested on 3.11-rc2)

Peter Wu
Owner

@TheSiege Thank you for reporting back!

Peter Wu
Owner

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.

Sergio Perez

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)
Peter Wu
Owner

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

For the _DSM warning, see ee0591b

Sergio Perez

@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

Peter Wu
Owner

Thank you for confirming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.