cm32181 module error blocking suspend

Bug #1988346 reported by Niall Murphy
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Undecided
Unassigned
Kinetic
Fix Released
Medium
Unassigned

Bug Description

After updating to 22.04.1 (from 20.04) suspend gets interrupted and the system returns after a few seconds.

journalctl output
```
Aug 31 19:59:32 nmurphy-laptop kernel: PM: suspend entry (deep)
Aug 31 19:59:32 nmurphy-laptop kernel: Filesystems sync: 0.044 seconds
Aug 31 19:59:37 nmurphy-laptop kernel: Freezing user space processes ... (elapsed 0.002 seconds) done.
Aug 31 19:59:37 nmurphy-laptop kernel: OOM killer disabled.
Aug 31 19:59:37 nmurphy-laptop kernel: Freezing remaining freezable tasks ... (elapsed 3.894 seconds) done.
Aug 31 19:59:37 nmurphy-laptop kernel: printk: Suspending console(s) (use no_console_suspend to debug)
Aug 31 19:59:37 nmurphy-laptop kernel: sd 0:0:0:0: [sda] Synchronizing SCSI cache
Aug 31 19:59:37 nmurphy-laptop kernel: PM: dpm_run_callback(): acpi_subsys_suspend+0x0/0x60 returns -121
Aug 31 19:59:37 nmurphy-laptop kernel: cm32181 i2c-CPLM3218:00: PM: failed to suspend: error -121
Aug 31 19:59:37 nmurphy-laptop kernel: sd 0:0:0:0: [sda] Stopping disk
Aug 31 19:59:37 nmurphy-laptop kernel: PM: Some devices failed to suspend, or early wake event detected
Aug 31 19:59:37 nmurphy-laptop kernel: sd 0:0:0:0: [sda] Starting disk
Aug 31 19:59:37 nmurphy-laptop kernel: tpm tpm0: TPM is disabled/deactivated (0x6)
Aug 31 19:59:37 nmurphy-laptop kernel: OOM killer enabled.
Aug 31 19:59:37 nmurphy-laptop kernel: Restarting tasks ... done.
Aug 31 19:59:37 nmurphy-laptop bluetoothd[1129]: Controller resume with wake event 0x0
Aug 31 19:59:37 nmurphy-laptop kernel: PM: suspend exit
Aug 31 19:59:37 nmurphy-laptop kernel: PM: suspend entry (s2idle)
Aug 31 19:59:37 nmurphy-laptop kernel: Filesystems sync: 0.051 seconds
Aug 31 19:59:44 nmurphy-laptop kernel: Freezing user space processes ... (elapsed 0.005 seconds) done.
Aug 31 19:59:44 nmurphy-laptop kernel: OOM killer disabled.
Aug 31 19:59:44 nmurphy-laptop kernel: Freezing remaining freezable tasks ...
Aug 31 19:59:44 nmurphy-laptop kernel: psmouse serio2: trackpoint: IBM TrackPoint firmware: 0x0e, buttons: 3/3
Aug 31 19:59:44 nmurphy-laptop kernel: input: TPPS/2 IBM TrackPoint as /devices/rmi4-00/rmi4-00.fn03/serio2/input/input196
Aug 31 19:59:44 nmurphy-laptop kernel: (elapsed 6.917 seconds) done.
Aug 31 19:59:44 nmurphy-laptop kernel: printk: Suspending console(s) (use no_console_suspend to debug)
Aug 31 19:59:44 nmurphy-laptop kernel: sd 0:0:0:0: [sda] Synchronizing SCSI cache
Aug 31 19:59:44 nmurphy-laptop kernel: PM: dpm_run_callback(): acpi_subsys_suspend+0x0/0x60 returns -121
Aug 31 19:59:44 nmurphy-laptop kernel: cm32181 i2c-CPLM3218:00: PM: failed to suspend: error -121
Aug 31 19:59:44 nmurphy-laptop kernel: sd 0:0:0:0: [sda] Stopping disk
Aug 31 19:59:44 nmurphy-laptop kernel: PM: Some devices failed to suspend, or early wake event detected
Aug 31 19:59:44 nmurphy-laptop kernel: sd 0:0:0:0: [sda] Starting disk
Aug 31 19:59:44 nmurphy-laptop kernel: tpm tpm0: TPM is disabled/deactivated (0x6)
Aug 31 19:59:44 nmurphy-laptop kernel: OOM killer enabled.
Aug 31 19:59:44 nmurphy-laptop kernel: Restarting tasks ... done.
Aug 31 19:59:44 nmurphy-laptop kernel: PM: suspend exit
Aug 31 19:59:44 nmurphy-laptop systemd[1]: NetworkManager-dispatcher.service: Deactivated successfully.
Aug 31 19:59:44 nmurphy-laptop bluetoothd[1129]: Controller resume with wake event 0x0
Aug 31 19:59:44 nmurphy-laptop systemd-sleep[65536]: Failed to put system to sleep. System resumed again: Remote I/O error
Aug 31 19:59:44 nmurphy-laptop systemd-sleep[65624]: /dev/sda:
Aug 31 19:59:44 nmurphy-laptop systemd-sleep[65624]: setting Advanced Power Management level to 0xfe (254)
Aug 31 19:59:44 nmurphy-laptop systemd-sleep[65624]: APM_level = 254
Aug 31 19:59:44 nmurphy-laptop NetworkManager[1131]: <info> [1661972384.8203] audit: op="radio-control" arg="wwan-enabled:off" pid=65646 uid=0 result="success"
Aug 31 19:59:44 nmurphy-laptop systemd[1]: systemd-suspend.service: Main process exited, code=exited, status=1/FAILURE
Aug 31 19:59:44 nmurphy-laptop systemd[1]: systemd-suspend.service: Failed with result 'exit-code'.
Aug 31 19:59:44 nmurphy-laptop systemd[1]: Failed to start System Suspend.
Aug 31 19:59:44 nmurphy-laptop systemd[1]: Dependency failed for Suspend.
Aug 31 19:59:44 nmurphy-laptop systemd[1]: suspend.target: Job suspend.target/start failed with result 'dependency'.
Aug 31 19:59:44 nmurphy-laptop systemd[1]: Stopped target Sleep.
Aug 31 19:59:44 nmurphy-laptop systemd-logind[1159]: Operation 'sleep' finished.
```

I think the problem is:
> Aug 31 19:59:44 nmurphy-laptop kernel: PM: dpm_run_callback(): acpi_subsys_suspend+0x0/0x60 returns -121
> Aug 31 19:59:44 nmurphy-laptop kernel: cm32181 i2c-CPLM3218:00: PM: failed to suspend: error -121

This issue occurs in kernels:
* 5.15.0-47-generic
* Ubuntu 5.15.0-48.54-generic 5.15.53

Description: Ubuntu 22.04.1 LTS
Release: 22.04
---
ProblemType: Bug
ApportVersion: 2.20.11-0ubuntu82.1
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: nmurphy 2467 F.... wireplumber
 /dev/snd/controlC1: nmurphy 2467 F.... wireplumber
 /dev/snd/seq: nmurphy 2465 F.... pipewire
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
DistroRelease: Ubuntu 22.04
HibernationDevice: RESUME=UUID=a88327a5-ac06-4a19-9409-c95dbaec6636
InstallationDate: Installed on 2014-06-25 (2989 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140417)
MachineType: LENOVO 20A70066UK
Package: linux (not installed)
ProcFB: 0 i915drmfb
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-5.15.0-48-generic root=/dev/mapper/ubuntu--vg-root ro quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 5.15.0-48.54-generic 5.15.53
PulseList: Error: command ['pacmd', 'list'] failed with exit code 1: No PulseAudio daemon running, or not running as session daemon.
RelatedPackageVersions:
 linux-restricted-modules-5.15.0-48-generic N/A
 linux-backports-modules-5.15.0-48-generic N/A
 linux-firmware 20220329.git681281e4-0ubuntu3.4
Tags: wayland-session jammy
Uname: Linux 5.15.0-48-generic x86_64
UpgradeStatus: Upgraded to jammy on 2022-08-19 (12 days ago)
UserGroups: docker sudo
WifiSyslog:

_MarkForUpload: True
dmi.bios.date: 05/29/2014
dmi.bios.release: 1.15
dmi.bios.vendor: LENOVO
dmi.bios.version: GRET38WW (1.15 )
dmi.board.asset.tag: Not Available
dmi.board.name: 20A70066UK
dmi.board.vendor: LENOVO
dmi.board.version: SDK0E50510 Pro
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.ec.firmware.release: 1.13
dmi.modalias: dmi:bvnLENOVO:bvrGRET38WW(1.15):bd05/29/2014:br1.15:efr1.13:svnLENOVO:pn20A70066UK:pvrThinkPadX1Carbon2nd:rvnLENOVO:rn20A70066UK:rvrSDK0E50510Pro:cvnLENOVO:ct10:cvrNotAvailable:skuLENOVO_MT_20A7_BU_Think_FM_ThinkPadX1Carbon2nd:
dmi.product.family: ThinkPad X1 Carbon 2nd
dmi.product.name: 20A70066UK
dmi.product.sku: LENOVO_MT_20A7_BU_Think_FM_ThinkPad X1 Carbon 2nd
dmi.product.version: ThinkPad X1 Carbon 2nd
dmi.sys.vendor: LENOVO

CVE References

Revision history for this message
Niall Murphy (nmurphy) wrote :
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1988346

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Niall Murphy (nmurphy) wrote : AlsaInfo.txt

apport information

tags: added: apport-collected jammy wayland-session
description: updated
Revision history for this message
Niall Murphy (nmurphy) wrote : CRDA.txt

apport information

Revision history for this message
Niall Murphy (nmurphy) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Niall Murphy (nmurphy) wrote : IwConfig.txt

apport information

Revision history for this message
Niall Murphy (nmurphy) wrote : Lspci.txt

apport information

Revision history for this message
Niall Murphy (nmurphy) wrote : Lspci-vt.txt

apport information

Revision history for this message
Niall Murphy (nmurphy) wrote : Lsusb.txt

apport information

Revision history for this message
Niall Murphy (nmurphy) wrote : Lsusb-t.txt

apport information

Revision history for this message
Niall Murphy (nmurphy) wrote : Lsusb-v.txt

apport information

Revision history for this message
Niall Murphy (nmurphy) wrote : PaInfo.txt

apport information

Revision history for this message
Niall Murphy (nmurphy) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Niall Murphy (nmurphy) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Niall Murphy (nmurphy) wrote : ProcEnviron.txt

apport information

Revision history for this message
Niall Murphy (nmurphy) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Niall Murphy (nmurphy) wrote : ProcModules.txt

apport information

Revision history for this message
Niall Murphy (nmurphy) wrote : RfKill.txt

apport information

Revision history for this message
Niall Murphy (nmurphy) wrote : UdevDb.txt

apport information

Revision history for this message
Niall Murphy (nmurphy) wrote : acpidump.txt

apport information

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Thanks for the bug report.

Does the ambient light sensor works after system suspend, prior to the kernel upgrade?

Changed in linux (Ubuntu):
assignee: nobody → Kai-Heng Feng (kaihengfeng)
Revision history for this message
Niall Murphy (nmurphy) wrote :

I did not know my laptop (Lenovo X1 Carbon Gen2) had an ambient light sensor until I upgraded to 22.04 so I cannot say it was working after suspend.
I can say that with Ubuntu 20.04 suspend would proceed as normal and waking from suspend worked as normal.

I can scan some log files and see if I can find any mentions cm32181 from before the upgrade.

Is there an example script or C program I can run to verify the device is working and see its output?

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

You can find the value of ambient light by reading "in_illuminance_input".

$ find /sys 2>/dev/null | grep in_illuminance_input
...to find it's full path.

Revision history for this message
Niall Murphy (nmurphy) wrote :

The previous Kernel I used was 5.4.0-81-generic on ubuntu 20.04.
Grepping through /var/log there is no mention of cm32181 before the upgrade data (August 19th).

After the upgrade to 5.15.0-47-generic and Ubuntu 22.04 the "cm32181 i2c-CPLM3218:00: PM: failed to suspend: error -121" appears.
These errors continue with 5.15.0-48-generic

If I run
```bash
while true; do cat /sys/devices/pci0000:00/INT33C3:00/i2c-0/i2c-CPLM3218:00/iio:device0/in_illuminance_input; sleep 0.1; done
```
it returns 0, then if i shine a torch at the top left corner of the screen it registers different numbers, the max I saw was 500.

If I suspend the laptop, the suspend will fail.
After the failed suspend I can still run the above cat command and get a brightness readout.

Is there any other debugging I can do to help figure out what is wrong?
Perhaps I just need to tell the suspend system to ignore i2c?

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Can you please see if it's working after suspend on previous kernel versions like 5.15.0-46?

Revision history for this message
Niall Murphy (nmurphy) wrote :

I have booted with kernel 5.15.0-46.

Before suspend, the light detector is working
```bash
while true; do cat /sys/devices/pci0000:00/INT33C3:00/i2c-0/i2c-CPLM3218:00/iio:device0/in_illuminance_input; sleep 0.1; done
```
spits out a stream of numbers that change with light levels.

I can then suspend and resume the laptop with no issue.

Now the light detector is outputting only the number 16941.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Thanks, please give this kernel a try:

https://people.canonical.com/~khfeng/lp1988346/

Revision history for this message
Niall Murphy (nmurphy) wrote :

Update on the kernel 5.15.0-46 status.
The light sensor does work after resuming from suspend, however the numbers reported are an order of magnitude greater than before.
During day light it maxes out at 16941, but at night it will report 0, then if we shine light on it, return numbers > 1000 (before suspend it will return numbers < 100).

Revision history for this message
Niall Murphy (nmurphy) wrote :
Download full text (4.7 KiB)

I have removed the repository 5.15.0-48 kernel and installed the kernels you linked to.
(using dpkg -i *.deb).

The system suspends successfully, but it does not wake from suspend.

Here is the log showing the end of the suspend.
At 23:10 I started suspend.
At 23:13 I attempted to wake the machine from suspend but it did not respond.
At 23:15 I held the power button to force restart the machine.

The log below shows no activity between suspend at 23:10 and reboot at 23:15.

Sep 06 23:10:01 nmurphy-laptop systemd-resolved[968]: wlan1: Bus client reset search domain list.
Sep 06 23:10:01 nmurphy-laptop systemd-resolved[968]: wlan1: Bus client set default route setting: no
Sep 06 23:10:01 nmurphy-laptop systemd-resolved[968]: wlan1: Bus client reset DNS server list.
Sep 06 23:10:01 nmurphy-laptop gnome-shell[2605]: An active wireless connection, in infrastructure mode, involves no access point?
Sep 06 23:10:02 nmurphy-laptop NetworkManager[1158]: <info> [1662502202.0029] device (wlan1): state change: disconnected -> unmanaged (reason 'sleeping', sys-iface-state: 'managed')
Sep 06 23:10:02 nmurphy-laptop charon[1506]: 11[KNL] interface wlan1 deactivated
Sep 06 23:10:02 nmurphy-laptop wpa_supplicant[1189]: p2p-dev-wlan1: CTRL-EVENT-DSCP-POLICY clear_all
Sep 06 23:10:02 nmurphy-laptop wpa_supplicant[1189]: p2p-dev-wlan1: CTRL-EVENT-DSCP-POLICY clear_all
Sep 06 23:10:02 nmurphy-laptop wpa_supplicant[1189]: nl80211: deinit ifname=p2p-dev-wlan1 disabled_11b_rates=0
Sep 06 23:10:02 nmurphy-laptop wpa_supplicant[1189]: wlan1: CTRL-EVENT-DSCP-POLICY clear_all
Sep 06 23:10:02 nmurphy-laptop dropbox[2870]: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
Sep 06 23:10:02 nmurphy-laptop wpa_supplicant[1189]: wlan1: CTRL-EVENT-DSCP-POLICY clear_all
Sep 06 23:10:02 nmurphy-laptop wpa_supplicant[1189]: nl80211: deinit ifname=wlan1 disabled_11b_rates=0
Sep 06 23:10:02 nmurphy-laptop gnome-shell[2605]: Timelines with detached actors are not supported. <dashtodockContainer>[<StBin>:0x55d177cdad10] in animation of duration 500ms but not on stage.
Sep 06 23:10:03 nmurphy-laptop systemd[1]: Reached target Sleep.
Sep 06 23:10:03 nmurphy-laptop systemd[1]: Starting Record successful boot for GRUB...
Sep 06 23:10:03 nmurphy-laptop systemd[1]: Starting System Suspend...
Sep 06 23:10:03 nmurphy-laptop systemd[1]: grub-common.service: Deactivated successfully.
Sep 06 23:10:03 nmurphy-laptop systemd[1]: Finished Record successful boot for GRUB.
Sep 06 23:10:03 nmurphy-laptop systemd-sleep[3490]: Entering sleep state 'suspend'...
Sep 06 23:10:03 nmurphy-laptop kernel: PM: suspend entry (deep)
Sep 06 23:10:03 nmurphy-laptop kernel: Filesystems sync: 0.040 seconds
Sep 06 23:10:03 nmurphy-laptop bluetoothd[1156]: src/profile.c:ext_io_disconnected() Unable to get io data for Hands-Free Voice gateway: getpeername: Transport endpoint is not connected (107)
Sep 06 23:10:03 nmurphy-laptop acpid[1153]: input device has been disconnected, fd 21
Sep 06 23:10:03 nmurphy-laptop gsd-media-keys[2734]: Unable to get default sink
Sep 06 23:10:03 nmurphy-laptop dbus-daemon[1157]: [system] Rejected send message, 0 matched rules; type="method_return", sender=":1.77"...

Read more...

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Thanks for the testing. First, let's make sure the resume fail was caused by cm32181.

So can you please run `sudo modprobe -r cm32181`, and see if your system can resume successfully?

Revision history for this message
Niall Murphy (nmurphy) wrote :

After running `sudo modprobe -r cm32181` suspend works and it wakes up from suspend perfectly.

As expected `find /sys/devices | grep illu` cannot find anything.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Thanks for testing.

Following #31, does running `sudo modprobe cm32181` after resume make the sensor working?

Revision history for this message
Niall Murphy (nmurphy) wrote :

Thanks for trying to solve this.

After removing the module the device directory looks like this.

$ ls -a /sys/devices/pci0000:00/INT33C3:00/i2c-0/i2c-CPLM3218:00
total 0
drwxr-xr-x 3 root root 0 Sep 13 2022 .
drwxr-xr-x 6 root root 0 Sep 13 2022 ..
lrwxrwxrwx 1 root root 0 Sep 13 00:01 firmware_node -> ../../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/INT33C3:00/CPLM3218:00
-r--r--r-- 1 root root 4096 Sep 12 23:57 modalias
-r--r--r-- 1 root root 4096 Sep 12 23:57 name
drwxr-xr-x 2 root root 0 Sep 12 23:59 power
lrwxrwxrwx 1 root root 0 Sep 13 2022 subsystem -> ../../../../../bus/i2c
-rw-r--r-- 1 root root 4096 Sep 13 2022 uevent

It is missing the iio:device0 directory and I cannot read light levels.

the files above report the following

$ cat name
CPLM3218:00
$ cat modalias
acpi:CPLM3218:CPLM3218:
$ cat uevent
MODALIAS=acpi:CPLM3218:CPLM3218:

If I run modprobe I see no output.
The /sys/devices directory above is unchanged, so still no iio:device so I cannot read light levels.
The machine can recover from suspend.

If I remove the module again, then load with "-v" I get some output

$ sudo modprobe -v cm32181
insmod /lib/modules/5.15.0-48-generic/kernel/drivers/iio/industrialio.ko
insmod /lib/modules/5.15.0-48-generic/kernel/drivers/iio/light/cm32181.ko

And in my journalctl I see the following error 16 when loading the module.

Sep 13 00:04:52 nmurphy-laptop sudo[5338]: nmurphy : TTY=pts/1 ; PWD=/home/nmurphy/computer_issues ; USER=root ; COMMAND=/usr/sbin/modprobe -r cm32181
Sep 13 00:04:52 nmurphy-laptop sudo[5338]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000)
Sep 13 00:04:52 nmurphy-laptop sudo[5338]: pam_unix(sudo:session): session closed for user root
Sep 13 00:04:55 nmurphy-laptop sudo[5346]: nmurphy : TTY=pts/1 ; PWD=/home/nmurphy/computer_issues ; USER=root ; COMMAND=/usr/sbin/modprobe -v cm32181
Sep 13 00:04:55 nmurphy-laptop sudo[5346]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000)
Sep 13 00:04:55 nmurphy-laptop sudo[5346]: pam_unix(sudo:session): session closed for user root
Sep 13 00:04:55 nmurphy-laptop kernel: i2c i2c-0: Failed to register i2c client dummy at 0x48 (-16)
Sep 13 00:04:55 nmurphy-laptop kernel: cm32181: probe of i2c-CPLM3218:00 failed with error -16

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Sorry for the belated response. Can you please give this one a try:
https://people.canonical.com/~khfeng/lp1988346-2/

Revision history for this message
Niall Murphy (nmurphy) wrote :

Hi Kai-Heng,

Thanks for the new kernel.

* When my laptop suspends a red light should slowly pulse on the laptop, with this kernel the light stays on.
* the adaptive function keys (Lenovo X1 Carbon 2nd Gen) stay on.
* The laptop does not wake up from suspend, I have to force restart.

Journalctl reports the following lines:
Oct 01 22:06:44 nmurphy-laptop systemd-sleep[4549]: Entering sleep state 'suspend'...
Oct 01 22:06:44 nmurphy-laptop kernel: PM: suspend entry (deep)

However the adaptive function keys and power light are still on.
At this point I have to restart.
The next line in the log is the restart

-- Boot 536b6d4bfa9f4c639c9e345f884b873f --
Oct 01 22:08:17 nmurphy-laptop kernel: microcode: microcode updated early to revision 0x26, date = 2019-11-12
Oct 01 22:08:17 nmurphy-laptop kernel: Linux version 5.15.0-1050-generic (ubuntu@ip-10-0-157-25) (gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #56 SMP Thu Sep 29 12:49:45 UTC 2022 (Ubuntu 5.15.0-1050.56-generic 5.15.60)

Grepping CPLM3218 or cm32181 in the log during boot and suspend sequences does not find anything.

If I unload the cm32181 module, suspend works:

remove the module
> sudo modprobe -r cm32181

Suspend now works fine.

load the kernel
> sudo modprobe -v cm32181
Does not succeed.
> dmseg
1027 [ 263.162041] i2c i2c-0: Failed to register i2c client dummy at 0x48 (-16)
1028 [ 263.162095] cm32181: probe of i2c-CPLM3218:00 failed with error -16

Is there any other logging I can do to help debug this?

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Can you please install and boot this kernel, and attach dmesg here? Thanks!
https://people.canonical.com/~khfeng/lp1988346-3/

Revision history for this message
Niall Murphy (nmurphy) wrote :

Boot Dmesg

Revision history for this message
Niall Murphy (nmurphy) wrote :

Suspend Fail Dmesg

Revision history for this message
Niall Murphy (nmurphy) wrote :

Unload the module, then suspend succeeds Dmesg.

Reloading the module results in.

[ 308.882904] i2c i2c-0: Failed to register i2c client dummy at 0x48 (-16)
[ 308.882977] cm32181: probe of i2c-CPLM3218:00 failed with error -16

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Please give this kernel a try. It disables suspend for cm3218.
https://people.canonical.com/~khfeng/lp1988346-4/

Revision history for this message
Niall Murphy (nmurphy) wrote :

With Kernel 4 when I suspend:
* screen goes black and the computer stops responding
* Keyboard light, adaptive function keys, and fan stay on
After 5 minutes, the situation does not change, so I force reboot.

DMSEG starting at suspend, then the forced reboot.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

This is very weird. The suspend function of cm32181 shouldn't be called on your laptop.

Does removing cm32181 before suspend help?

Revision history for this message
Niall Murphy (nmurphy) wrote :

Yes, with kernel number 4, if I unload the kernel module it suspends and resumes fine.
I attach the DMESG log of the successful suspend/resume without cm32181.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Thanks for your testing so far!

Please give this kernel a try:
https://people.canonical.com/~khfeng/lp1988346-5/

I made CM32181's suspend/resume routine dummy functions.

Revision history for this message
Niall Murphy (nmurphy) wrote :

Sorry for the delay.
Thank for for continuing to work on this.

I have tested kernel 5.

* It suspends correctly and resumes correctly.
* Light sensor does not work after suspend.

I attach the DMSEG logs for the boot and suspend/resume cycle.

Revision history for this message
Niall Murphy (nmurphy) wrote :

Kernel lp1988346-5 boot DMSEG

Revision history for this message
Niall Murphy (nmurphy) wrote :

Kernel lp1988346-5 successful suspend/resume DMSEG

Revision history for this message
Niall Murphy (nmurphy) wrote :

Kernel lp1988346-5 successful suspend resume.

Revision history for this message
Johannes Mayrhofer (vuimuich) wrote (last edit ):

Hi,
I am experiencing this exact same bug on Manjaro with Kernels 6.0.x and 6.1.x.
@Kai-Heng Feng, could you please provide the patch you used for `lp1988346-5` so I could test if this fixes in those kernels as well?
Thanks for your work!

Edit: would this patch be the same as https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/iio/light/cm32181.c?h=v6.0-rc7&id=68c1b3dd5c48b2323067f8c1f0649ae2f31ab20b or is this a different matter?

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Sorry for belated respose.

Johannes, does your system use S3 or S2idle?

Revision history for this message
Johannes Mayrhofer (vuimuich) wrote :

Hi,
also sorry, now for my delayed response.

My `/sys/power/mem_sleep` says:
s2idle [deep]

So, if I read this correctly, this means s3 is selected, right? (Currently checking from a session in Kernel 5.15, as I was testing other things not being smooth with 6.1 for me. But I presume this would be the same for all installed Kernels, right?)

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Hi,

Please apply this patch, then run `echo 1 | sudo tee /sys/bus/iio/devices/iio\:device0/disable`, assuming the cm32181 sensor is "iio:device0".

And check what's being printed in dmesg.

tags: added: patch
Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Please give this patch a try, thanks!

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Please let me know if anyone needs prebuilt Ubuntu kernel binary.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :
Changed in linux (Ubuntu):
assignee: Kai-Heng Feng (kaihengfeng) → nobody
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-oem-6.1/6.1.0-1008.8 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-jammy' to 'verification-done-jammy'. If the problem still exists, change the tag 'verification-needed-jammy' to 'verification-failed-jammy'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: kernel-spammed-jammy-linux-oem-6.1 verification-needed-jammy
Revision history for this message
Niall Murphy (nmurphy) wrote :

6.1.0-1008-oem is working fine.

Suspends and resumes with now issues so far.

I think i have changed the tag from verification-needed-jammy to verification-done-jammy

tags: added: verification-done-jammy
removed: verification-needed-jammy
Revision history for this message
Johannes Mayrhofer (vuimuich) wrote (last edit ):

Hi, sorry for this incredibly delayed response.
I have been running on 6.2.x versions (on Manjaro still) since early February and with one minor version it was all working fine again with suspend and hibernate.

Not sure if it is the same fix, but thanks a ton to look into this!

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux/5.19.0-41.42 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-kinetic' to 'verification-done-kinetic'. If the problem still exists, change the tag 'verification-needed-kinetic' to 'verification-failed-kinetic'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: kernel-spammed-kinetic-linux verification-needed-kinetic
Stefan Bader (smb)
Changed in linux (Ubuntu Kinetic):
importance: Undecided → Medium
status: New → Fix Committed
Revision history for this message
Niall Murphy (nmurphy) wrote :

Distributor ID: Ubuntu
Description: Ubuntu 22.10
Release: 22.10
Codename: kinetic

Kernel: 5.19.0-42-generic

Suspends and resumes, Light detector works after resume.

tags: added: verification-done-kinetic
removed: verification-needed-kinetic
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-nvidia-5.19/5.19.0-1010.10 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-jammy' to 'verification-done-jammy'. If the problem still exists, change the tag 'verification-needed-jammy' to 'verification-failed-jammy'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: kernel-spammed-jammy-linux-nvidia-5.19 verification-needed-jammy
removed: verification-done-jammy
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (72.0 KiB)

This bug was fixed in the package linux - 5.19.0-42.43

---------------
linux (5.19.0-42.43) kinetic; urgency=medium

  * kinetic/linux: 5.19.0-42.43 -proposed tracker (LP: #2016503)

  * selftest: fib_tests: Always cleanup before exit (LP: #2015956)
    - selftest: fib_tests: Always cleanup before exit

  * Debian autoreconstruct Fix restoration of execute permissions (LP: #2015498)
    - [Debian] autoreconstruct - fix restoration of execute permissions

  * Kinetic update: upstream stable patchset 2023-04-10 (LP: #2015812)
    - drm/etnaviv: don't truncate physical page address
    - wifi: rtl8xxxu: gen2: Turn on the rate control
    - drm/edid: Fix minimum bpc supported with DSC1.2 for HDMI sink
    - clk: mxl: Switch from direct readl/writel based IO to regmap based IO
    - clk: mxl: Remove redundant spinlocks
    - clk: mxl: Add option to override gate clks
    - clk: mxl: Fix a clk entry by adding relevant flags
    - powerpc: dts: t208x: Mark MAC1 and MAC2 as 10G
    - clk: mxl: syscon_node_to_regmap() returns error pointers
    - random: always mix cycle counter in add_latent_entropy()
    - KVM: x86: Fail emulation during EMULTYPE_SKIP on any exception
    - KVM: SVM: Skip WRMSR fastpath on VM-Exit if next RIP isn't valid
    - can: kvaser_usb: hydra: help gcc-13 to figure out cmd_len
    - powerpc: dts: t208x: Disable 10G on MAC1 and MAC2
    - powerpc/vmlinux.lds: Ensure STRICT_ALIGN_SIZE is at least page aligned
    - powerpc/64s/radix: Fix RWX mapping with relocated kernel
    - uaccess: Add speculation barrier to copy_from_user()
    - wifi: mwifiex: Add missing compatible string for SD8787
    - audit: update the mailing list in MAINTAINERS
    - ext4: Fix function prototype mismatch for ext4_feat_ktype
    - Revert "net/sched: taprio: make qdisc_leaf() see the per-netdev-queue pfifo
      child qdiscs"
    - bpf: add missing header file include
    - wifi: ath11k: fix warning in dma_free_coherent() of memory chunks while
      recovery
    - sched/psi: Stop relying on timer_pending() for poll_work rescheduling
    - docs: perf: Fix PMU instance name of hisi-pcie-pmu
    - randstruct: disable Clang 15 support
    - ionic: refactor use of ionic_rx_fill()
    - Fix XFRM-I support for nested ESP tunnels
    - arm64: dts: rockchip: drop unused LED mode property from rk3328-roc-cc
    - ARM: dts: rockchip: add power-domains property to dp node on rk3288
    - HID: elecom: add support for TrackBall 056E:011C
    - ACPI: NFIT: fix a potential deadlock during NFIT teardown
    - btrfs: send: limit number of clones and allocated memory size
    - ASoC: rt715-sdca: fix clock stop prepare timeout issue
    - IB/hfi1: Assign npages earlier
    - neigh: make sure used and confirmed times are valid
    - HID: core: Fix deadloop in hid_apply_multiplier.
    - x86/cpu: Add Lunar Lake M
    - bpf: bpf_fib_lookup should not return neigh in NUD_FAILED state
    - net: Remove WARN_ON_ONCE(sk->sk_forward_alloc) from sk_stream_kill_queues().
    - vc_screen: don't clobber return value in vcs_read
    - scripts/tags.sh: fix incompatibility with PCRE2
    - usb: dwc3: pci: add support for the Intel Meteor Lake-M
    - USB: serial: option: add suppo...

Changed in linux (Ubuntu Kinetic):
status: Fix Committed → Fix Released
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-gcp/5.19.0-1024.26 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-kinetic' to 'verification-done-kinetic'. If the problem still exists, change the tag 'verification-needed-kinetic' to 'verification-failed-kinetic'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: kernel-spammed-kinetic-linux-gcp verification-needed-kinetic
removed: verification-done-kinetic
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-allwinner/5.19.0-1012.12 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-kinetic' to 'verification-done-kinetic'. If the problem still exists, change the tag 'verification-needed-kinetic' to 'verification-failed-kinetic'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: kernel-spammed-kinetic-linux-allwinner
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-aws/5.19.0-1027.28 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-kinetic' to 'verification-done-kinetic'. If the problem still exists, change the tag 'verification-needed-kinetic' to 'verification-failed-kinetic'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: kernel-spammed-kinetic-linux-aws
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-azure/5.19.0-1028.31 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-kinetic' to 'verification-done-kinetic'. If the problem still exists, change the tag 'verification-needed-kinetic' to 'verification-failed-kinetic'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: kernel-spammed-kinetic-linux-azure
To post a comment you must log in.