Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1564908 - Optimus mode on laptop snd_hda_intel 0000:01:00.1: Cannot lock devices! [NEEDINFO]
Summary: Optimus mode on laptop snd_hda_intel 0000:01:00.1: Cannot lock devices!
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 28
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-08 20:03 UTC by Pablo Estigarribia
Modified: 2018-08-29 15:03 UTC (History)
17 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-08-29 15:03:43 UTC
Type: Bug
jforbes: needinfo?


Attachments (Terms of Use)

Description Pablo Estigarribia 2018-04-08 20:03:55 UTC
Description of problem:
When I enable Nvidia optimus on BIOS setup on dell latitude E6420, I got this on dmesg:

[ 2359.436774] snd_hda_intel 0000:01:00.1: Cannot lock devices!
[ 2359.457659] ACPI: \_SB_.PCI0.PEG0.VID_: failed to evaluate _DSM
[ 2363.105477] snd_hda_intel 0000:01:00.1: Enabling via vga_switcheroo
[ 2369.920479] snd_hda_intel 0000:01:00.1: Disabling via vga_switcheroo
[ 2370.221251] snd_hda_intel 0000:01:00.1: Cannot lock devices!
[ 2370.244650] ACPI: \_SB_.PCI0.PEG0.VID_: failed to evaluate _DSM
[ 2374.593561] snd_hda_intel 0000:01:00.1: Enabling via vga_switcheroo
[ 2379.968799] snd_hda_intel 0000:01:00.1: Disabling via vga_switcheroo
[ 2380.268908] snd_hda_intel 0000:01:00.1: Cannot lock devices!
[ 2380.291028] ACPI: \_SB_.PCI0.PEG0.VID_: failed to evaluate _DSM


Doesn't happens with Optimus disabled.

Looks like the issue is with having two audio devices, but one of them turned off.

This mode helps saving power battery (one of the objetives of fedora 28), but having this issue of system audio trying to lock a powered off device makes very strange things on the system:

It causes lag on input, some lag on refresh on video, and other lags...


Version-Release number of selected component (if applicable):

Fedora 28 beta updated.

uname -a
Linux ultron1-localdomain 4.16.0-0.rc7.git0.1.fc28.x86_64 #1 SMP Mon Mar 26 15:01:02 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: 92HD90BXX Analog [92HD90BXX Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0



How reproducible:

Just enable optimus on setup BIOS and you will experience all these problems...


Actual results:

[ 2359.436774] snd_hda_intel 0000:01:00.1: Cannot lock devices!
[ 2359.457659] ACPI: \_SB_.PCI0.PEG0.VID_: failed to evaluate _DSM
[ 2363.105477] snd_hda_intel 0000:01:00.1: Enabling via vga_switcheroo
[ 2369.920479] snd_hda_intel 0000:01:00.1: Disabling via vga_switcheroo
[ 2370.221251] snd_hda_intel 0000:01:00.1: Cannot lock devices!
[ 2370.244650] ACPI: \_SB_.PCI0.PEG0.VID_: failed to evaluate _DSM
[ 2374.593561] snd_hda_intel 0000:01:00.1: Enabling via vga_switcheroo
[ 2379.968799] snd_hda_intel 0000:01:00.1: Disabling via vga_switcheroo
[ 2380.268908] snd_hda_intel 0000:01:00.1: Cannot lock devices!
[ 2380.291028] ACPI: \_SB_.PCI0.PEG0.VID_: failed to evaluate _DSM


Expected results:

no issues here, example:
dmesg | tail
[   15.060853] wlp3s0: send auth to cc:7b:35:eb:00:2c (try 1/3)
[   15.062685] wlp3s0: authenticated
[   15.063223] wlp3s0: associate with cc:7b:35:eb:00:2c (try 1/3)
[   15.066578] wlp3s0: RX AssocResp from cc:7b:35:eb:00:2c (capab=0x411 status=0 aid=3)
[   15.070068] wlp3s0: associated
[   15.107974] IPv6: ADDRCONF(NETDEV_CHANGE): wlp3s0: link becomes ready
[   15.456229] Bluetooth: hci0: command 0x0c39 tx timeout
[   15.456251] Bluetooth: hci0: sending frame failed (-19)
[   21.834062] fuse init (API version 7.26)
[   24.321559] rfkill: input handler disabled

good performance and no lags.

Additional info:

There are some forums that report this on other distros too, I haven't found someone reporting this on fedora, but probably because it was not tried on fedora.

Some info on howto disable some of the cards as workarounds:
https://forums.opensuse.org/showthread.php/432571-Disable-one-of-two-soundcards-using-the-same-module

similar bug on other distros:
https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1450663

https://bbs.archlinux.org/viewtopic.php?id=187542

Option to enable only one card:

options snd-hda-intel enable=0,1,0

---

Probably better woraround is to detect if working switcheroo and one of the cards is turned off

https://ask.fedoraproject.org/en/question/94033/how-to-switch-hybrid-graphics/

Test case (needs more info):

http://fedoraproject.org/wiki/QA:Testcase_vga_switcheroo

Comment 1 Pablo Estigarribia 2018-04-21 12:26:38 UTC
I'm not 100% sure about what I'm seeing now, but looks like:

When I try to move the mouse it takes a second to appear in the screen.

Then I see message:

[ 2374.593561] snd_hda_intel 0000:01:00.1: Enabling via vga_switcheroo

After some seconds I see message:

[ 2379.968799] snd_hda_intel 0000:01:00.1: Disabling via vga_switcheroo
[ 2380.268908] snd_hda_intel 0000:01:00.1: Cannot lock devices!
[ 2380.291028] ACPI: \_SB_.PCI0.PEG0.VID_: failed to evaluate _DSM

And that repeats, even when using mouse or trackpad.

When vga_switcheroo is disabled the mouse doesn't moves? So it enables it and the mouse moves????

So maybe it's not an issue, just normal behaviour? when enabling optimus is normal to have this behaviour about mouse???

Comment 2 Pablo Estigarribia 2018-04-21 12:35:02 UTC
(In reply to Pablo Estigarribia from comment #1)
> I'm not 100% sure about what I'm seeing now, but looks like:
> 
> When I try to move the mouse it takes a second to appear in the screen.
> 
> Then I see message:
> 
> [ 2374.593561] snd_hda_intel 0000:01:00.1: Enabling via vga_switcheroo
> 
> After some seconds I see message:
> 
> [ 2379.968799] snd_hda_intel 0000:01:00.1: Disabling via vga_switcheroo
> [ 2380.268908] snd_hda_intel 0000:01:00.1: Cannot lock devices!
> [ 2380.291028] ACPI: \_SB_.PCI0.PEG0.VID_: failed to evaluate _DSM
> 
> And that repeats, even when using mouse or trackpad.
> 
> When vga_switcheroo is disabled the mouse doesn't moves? So it enables it
> and the mouse moves????
Misstyped here, correct message:
When vga_switcheroo disables device snd_hda_intel 0000:01:00.1 mouse input doesn't works? So it enables it and the mouse moves????
> 
> So maybe it's not an issue, just normal behaviour? when enabling optimus is
> normal to have this behaviour about mouse???

Comment 3 Justin M. Forbes 2018-07-23 14:54:20 UTC
*********** MASS BUG UPDATE **************

We apologize for the inconvenience.  There are a large number of bugs to go through and several of them have gone stale.  Due to this, we are doing a mass bug update across all of the Fedora 28 kernel bugs.

Fedora 28 has now been rebased to 4.17.7-200.fc28.  Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel.

If you experience different issues, please open a new bug report for those.

Comment 4 Justin M. Forbes 2018-08-29 15:03:43 UTC
*********** MASS BUG UPDATE **************
This bug is being closed with INSUFFICIENT_DATA as there has not been a response in 5 weeks. If you are still experiencing this issue, please reopen and attach the relevant data from the latest kernel you are running and any data that might have been requested previously.


Note You need to log in before you can comment on or make changes to this bug.