Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ASUS Z690-Plus] Reboot and shutdown fails with kernel 5.15+ #99

Open
1mehal opened this issue Dec 6, 2021 · 5 comments
Open

[ASUS Z690-Plus] Reboot and shutdown fails with kernel 5.15+ #99

1mehal opened this issue Dec 6, 2021 · 5 comments

Comments

@1mehal
Copy link

1mehal commented Dec 6, 2021

Distribution (run cat /etc/os-release):
NAME="Pop!_OS"
VERSION="21.10"

Related Application and/or Package Version (run apt policy $PACKAGE NAME):

Issue/Bug Description:

Pop!_OS freezes on every attempt to reboot or shutdown. First it shows a screen with a blinking cursor and then freezes.

Steps to reproduce (if you know):

Expected behavior:

Other Notes:
I would appreciate any suggestion on investigation the issue

@bflanagin
Copy link

What hardware are you running on @1mehal ?

@1mehal
Copy link
Author

1mehal commented Dec 7, 2021

@bflanagin
It's
i9 - 12900
GeForce RTX3080
Samsung 980GB NVMe M.2
Seagate 2TB
ASUS Z690-PLUS WIFI D4

Looks like issue is related to the kernel update.
I've tried following:

  1. Installed "20.04" version of Pop!_OS, system reboot and shutdown worked just fine for me. But I have upgraded to kernel 5.15 and it stopped working.
  2. Installed "20.10" version of Ubuntu - reboot and shutdown hangs
  3. Tried to install GRUB for dual-boot, tried to play with grub loading parameters (enabling EFI boot, forcing ACPI, etc). No success there.

I would appreciate any advise

@jacobgkau jacobgkau changed the title Pop!_OS 21.10 reboot and shutdown fails [ASUS Z690-Plus] Reboot and shutdown fails with kernel 5.15+ Dec 7, 2021
@jacobgkau jacobgkau transferred this issue from pop-os/pop Dec 7, 2021
@1mehal
Copy link
Author

1mehal commented Dec 7, 2021

Hello guys!
Just installed kernel 5.13.19 and reboot works just fine. But my WiFi adapter doesn't work with that kernel

@1mehal
Copy link
Author

1mehal commented Dec 7, 2021

With kernel 5.14.21 - everything seems to be working good.

@BenRemer
Copy link

i have the same problem on my system since updating pop os.

jackpot51 pushed a commit that referenced this issue Feb 28, 2022
[ Upstream commit 17da2d5 ]

As reported:

[  256.104522] ======================================================
[  256.113783] WARNING: possible circular locking dependency detected
[  256.120093] 5.16.0-rc6-yocto-standard+ #99 Not tainted
[  256.125362] ------------------------------------------------------
[  256.131673] intel-speed-sel/844 is trying to acquire lock:
[  256.137290] ffffffffc036f0d0 (punit_misc_dev_lock){+.+.}-{3:3}, at: isst_if_open+0x18/0x90 [isst_if_common]
[  256.147171]
[  256.147171] but task is already holding lock:
[  256.153135] ffffffff8ee7cb50 (misc_mtx){+.+.}-{3:3}, at: misc_open+0x2a/0x170
[  256.160407]
[  256.160407] which lock already depends on the new lock.
[  256.160407]
[  256.168712]
[  256.168712] the existing dependency chain (in reverse order) is:
[  256.176327]
[  256.176327] -> #1 (misc_mtx){+.+.}-{3:3}:
[  256.181946]        lock_acquire+0x1e6/0x330
[  256.186265]        __mutex_lock+0x9b/0x9b0
[  256.190497]        mutex_lock_nested+0x1b/0x20
[  256.195075]        misc_register+0x32/0x1a0
[  256.199390]        isst_if_cdev_register+0x65/0x180 [isst_if_common]
[  256.205878]        isst_if_probe+0x144/0x16e [isst_if_mmio]
...
[  256.241976]
[  256.241976] -> #0 (punit_misc_dev_lock){+.+.}-{3:3}:
[  256.248552]        validate_chain+0xbc6/0x1750
[  256.253131]        __lock_acquire+0x88c/0xc10
[  256.257618]        lock_acquire+0x1e6/0x330
[  256.261933]        __mutex_lock+0x9b/0x9b0
[  256.266165]        mutex_lock_nested+0x1b/0x20
[  256.270739]        isst_if_open+0x18/0x90 [isst_if_common]
[  256.276356]        misc_open+0x100/0x170
[  256.280409]        chrdev_open+0xa5/0x1e0
...

The call sequence suggested that misc_device /dev file can be opened
before misc device is yet to be registered, which is done only once.

Here punit_misc_dev_lock was used as common lock, to protect the
registration by multiple ISST HW drivers, one time setup, prevent
duplicate registry of misc device and prevent load/unload when device
is open.

We can split into locks:
- One which just prevent duplicate call to misc_register() and one
time setup. Also never call again if the misc_register() failed or
required one time setup is failed. This lock is not shared with
any misc device callbacks.

- The other lock protects registry, load and unload of HW drivers.

Sequence in isst_if_cdev_register()
- Register callbacks under punit_misc_dev_open_lock
- Call isst_misc_reg() which registers misc_device on the first
registry which is under punit_misc_dev_reg_lock, which is not
shared with callbacks.

Sequence in isst_if_cdev_unregister
Just opposite of isst_if_cdev_register

Reported-and-tested-by: Liwei Song <[email protected]>
Signed-off-by: Srinivas Pandruvada <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Hans de Goede <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants