Sudo doesn't work after sleep

matik

New Member
Joined
Jun 8, 2023
Messages
4
Reaction score
2
Credits
40
Hi
I have a problem that every time I close laptop lid, kubuntu goes to sleep, and when I open it there are some issues.
1) I have no internet connection :(
2) I can't make anything to fix it because when I run sudo with any command terminal freezes and even ctrl+c can't stop it.

I have this problem for about 1 year know so I don't use linux too much, because it is very annoying. I hoped that update would eventually fix it, but it didn't :\ It also happens when I click sleep without closing lid.

Any idea what is wrong and how can I fix?
 


Any idea what is wrong and how can I fix?

Power management on Linux still isn't the greatest. This seems to be more true with laptops and I suspect it's that OEMs aren't properly adhering to the standards when it comes to the various suspend modes. (You may find your BIOS offers a couple of suspend modes, as there are at least a couple of standards.)

It doesn't take long to start Linux. If your laptop is efficient, you can tell it just to power off the screen when the cover closes. But, if there's a chance of the fan clicking on you'd not want to then stuff it into a backpack or anything like that.

In my case, I don't take a laptop with me often. If I do, I just power it down. If it's sitting around the house, I just plug it in and tell it to kill the monitor when the lid is closed.
 
Here are my journal logs when laptop goes to sleep and then wakes up after 3 mins.
I don't understand it, but maybe You will catch something.
cze 10 01:53:05 MatikAsus systemd[1]: nvidia-suspend.service: Deactivated successfully.
cze 10 01:53:05 MatikAsus systemd[1]: Finished NVIDIA system suspend actions.
cze 10 01:53:05 MatikAsus obexd[3702]: DISCONNECT(0x1), <unknown>(0xff)
cze 10 01:53:05 MatikAsus obexd[3702]: DISCONNECT(0x1), Success(0x20)
cze 10 01:53:05 MatikAsus obexd[3702]: disconnected: Transport got disconnected
cze 10 01:53:05 MatikAsus bluetoothd[1159]: src/profile.c:ext_io_disconnected() Unable to get io data for Phone Book Access: getpeername: Transport endpoint is not connected (107)
cze 10 01:53:05 MatikAsus systemd[1]: Starting System Suspend...
cze 10 01:53:05 MatikAsus systemd-sleep[7090]: Entering sleep state 'suspend'...
cze 10 01:53:05 MatikAsus kernel: PM: suspend entry (s2idle)
cze 10 01:53:05 MatikAsus kernel: Filesystems sync: 0.001 seconds
cze 10 01:53:05 MatikAsus PackageKit[3492]: get-updates transaction /1793_ddaebebb from uid 1000 finished with success after 473ms
cze 10 01:56:38 MatikAsus kernel: Bluetooth: hci0: Timed out waiting for suspend events
cze 10 01:56:38 MatikAsus kernel: Bluetooth: hci0: Suspend timeout bit: 6
cze 10 01:56:38 MatikAsus kernel: Bluetooth: hci0: Suspend notifier action (3) failed: -110
cze 10 01:56:38 MatikAsus kernel: Freezing user space processes ... (elapsed 0.002 seconds) done.
cze 10 01:56:38 MatikAsus kernel: OOM killer disabled.
cze 10 01:56:38 MatikAsus kernel: Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
cze 10 01:56:38 MatikAsus kernel: printk: Suspending console(s) (use no_console_suspend to debug)
cze 10 01:56:38 MatikAsus kernel: ACPI: EC: interrupt blocked
cze 10 01:56:38 MatikAsus kernel: ACPI: EC: interrupt unblocked
cze 10 01:56:38 MatikAsus kernel: pcieport 0000:00:1c.3: Data Link Layer Link Active not set in 1000 msec
cze 10 01:56:38 MatikAsus kernel: mt7921e 0000:2e:00.0: can't change power state from D3cold to D0 (config space inaccessible)
cze 10 01:56:38 MatikAsus kernel: mt7921e 0000:2e:00.0: can't change power state from D3cold to D0 (config space inaccessible)
cze 10 01:56:38 MatikAsus kernel: PM: dpm_run_callback(): pci_pm_resume+0x0/0x100 returns -5
cze 10 01:56:38 MatikAsus kernel: mt7921e 0000:2e:00.0: PM: failed to resume async: error -5
cze 10 01:56:38 MatikAsus kernel: OOM killer enabled.
cze 10 01:56:38 MatikAsus kernel: Restarting tasks ...
cze 10 01:56:38 MatikAsus kernel: mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_component_ops [i915])
cze 10 01:56:38 MatikAsus systemd-resolved[783]: Clock change detected. Flushing caches.
cze 10 01:56:38 MatikAsus kernel: done.
cze 10 01:56:38 MatikAsus systemd[1]: Starting Update the plocate database...
cze 10 01:56:38 MatikAsus systemd-sleep[7090]: System returned from sleep state.
cze 10 01:56:38 MatikAsus bluetoothd[1159]: Controller resume with wake event 0x0
cze 10 01:56:38 MatikAsus kernel: PM: suspend exit
cze 10 01:56:39 MatikAsus systemd-sleep[7212]: Notice: some ASUS laptops silently ignore charge thresholds other than 40, 60 or 80. Please check if STOP_CHARGE_THRESH_BAT0="95" works as expected.
cze 10 01:56:39 MatikAsus systemd[1]: systemd-suspend.service: Deactivated successfully.
cze 10 01:56:39 MatikAsus systemd[1]: Finished System Suspend.
cze 10 01:56:39 MatikAsus systemd[1]: Stopped target Sleep.
cze 10 01:56:39 MatikAsus systemd[1]: Reached target Suspend.
cze 10 01:56:39 MatikAsus systemd-logind[1201]: Operation 'sleep' finished.
cze 10 01:56:39 MatikAsus ModemManager[1336]: <info> [sleep-monitor-systemd] system is resuming
cze 10 01:56:39 MatikAsus bluetoothd[1159]: Endpoint registered: sender=:1.121 path=/MediaEndpoint/A2DPSource/ldac
cze 10 01:56:39 MatikAsus bluetoothd[1159]: Endpoint registered: sender=:1.121 path=/MediaEndpoint/A2DPSink/aptx_hd
cze 10 01:56:39 MatikAsus bluetoothd[1159]: Endpoint registered: sender=:1.121 path=/MediaEndpoint/A2DPSource/aptx_hd
cze 10 01:56:39 MatikAsus bluetoothd[1159]: Endpoint registered: sender=:1.121 path=/MediaEndpoint/A2DPSink/aptx
cze 10 01:56:39 MatikAsus bluetoothd[1159]: Endpoint registered: sender=:1.121 path=/MediaEndpoint/A2DPSource/aptx
cze 10 01:56:39 MatikAsus bluetoothd[1159]: Endpoint registered: sender=:1.121 path=/MediaEndpoint/A2DPSink/aac
cze 10 01:56:39 MatikAsus bluetoothd[1159]: Endpoint registered: sender=:1.121 path=/MediaEndpoint/A2DPSource/aac
cze 10 01:56:39 MatikAsus bluetoothd[1159]: Endpoint registered: sender=:1.121 path=/MediaEndpoint/A2DPSink/sbc
cze 10 01:56:39 MatikAsus bluetoothd[1159]: Endpoint registered: sender=:1.121 path=/MediaEndpoint/A2DPSource/sbc
cze 10 01:56:39 MatikAsus bluetoothd[1159]: Endpoint registered: sender=:1.121 path=/MediaEndpoint/A2DPSink/sbc_xq
cze 10 01:56:39 MatikAsus bluetoothd[1159]: Endpoint registered: sender=:1.121 path=/MediaEndpoint/A2DPSource/sbc_xq
cze 10 01:56:39 MatikAsus bluetoothd[1159]: Endpoint registered: sender=:1.121 path=/MediaEndpoint/A2DPSource/aptx_ll_1
cze 10 01:56:39 MatikAsus bluetoothd[1159]: Endpoint registered: sender=:1.121 path=/MediaEndpoint/A2DPSource/aptx_ll_0
cze 10 01:56:39 MatikAsus bluetoothd[1159]: Endpoint registered: sender=:1.121 path=/MediaEndpoint/A2DPSource/aptx_ll_duplex_1
cze 10 01:56:39 MatikAsus bluetoothd[1159]: Endpoint registered: sender=:1.121 path=/MediaEndpoint/A2DPSource/aptx_ll_duplex_0
cze 10 01:56:39 MatikAsus bluetoothd[1159]: Endpoint registered: sender=:1.121 path=/MediaEndpoint/A2DPSource/faststream
cze 10 01:56:39 MatikAsus bluetoothd[1159]: Endpoint registered: sender=:1.121 path=/MediaEndpoint/A2DPSource/faststream_duplex
cze 10 01:56:39 MatikAsus bluetoothd[1159]: Endpoint registered: sender=:1.121 path=/MediaEndpoint/A2DPSink/opus_05
cze 10 01:56:39 MatikAsus bluetoothd[1159]: Endpoint registered: sender=:1.121 path=/MediaEndpoint/A2DPSource/opus_05
cze 10 01:56:39 MatikAsus bluetoothd[1159]: Endpoint registered: sender=:1.121 path=/MediaEndpoint/A2DPSink/opus_05_duplex
cze 10 01:56:39 MatikAsus bluetoothd[1159]: Endpoint registered: sender=:1.121 path=/MediaEndpoint/A2DPSource/opus_05_duplex
cze 10 01:56:39 MatikAsus systemd[1]: Starting NVIDIA system resume actions...
cze 10 01:56:39 MatikAsus systemd[1]: Stopped target Suspend.
cze 10 01:56:39 MatikAsus NetworkManager[1162]: <info> [1686354999.3447] manager: sleep: wake requested (sleeping: yes enabled: yes)
cze 10 01:56:39 MatikAsus NetworkManager[1162]: <info> [1686354999.3448] device (wlo1): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
cze 10 01:56:39 MatikAsus suspend[7377]: nvidia-resume.service
cze 10 01:56:39 MatikAsus logger[7377]: <13>Jun 10 01:56:39 suspend: nvidia-resume.service
cze 10 01:56:39 MatikAsus systemd[1]: nvidia-resume.service: Deactivated successfully.
cze 10 01:56:39 MatikAsus systemd[1]: Finished NVIDIA system resume actions.
cze 10 01:56:40 MatikAsus kernel: mt7921e 0000:2e:00.0: driver own failed
cze 10 01:56:40 MatikAsus kernel: mt7921e 0000:2e:00.0: chip reset
cze 10 01:56:40 MatikAsus bluetoothd[1159]: plugins/policy.c:reconnect_timeout() Reconnecting services failed: Device or resource busy (16)
cze 10 01:56:41 MatikAsus wireplumber[2868]: RFCOMM receive command but modem not available: AT+BTRH?
cze 10 01:56:41 MatikAsus wireplumber[2868]: RFCOMM receive command but modem not available: AT+XEVENT=Bose SoundLink,158
cze 10 01:56:41 MatikAsus kernel: input: Black Diamond (AVRCP) as /devices/virtual/input/input26
cze 10 01:56:41 MatikAsus wireplumber[2868]: Failed to register battery provider. Error: org.freedesktop.DBus.Error.UnknownMethod
cze 10 01:56:41 MatikAsus wireplumber[2868]: BlueZ Battery Provider is not available, won't retry to register it. Make sure you are running BlueZ 5.56+ with experimental features to use Battery Provider.
cze 10 01:56:41 MatikAsus systemd-logind[1201]: Watching system buttons on /dev/input/event23 (Black Diamond (AVRCP))
cze 10 01:56:41 MatikAsus ModemManager[1336]: <info> [base-manager] couldn't check support for device '/sys/devices/pci0000:00/0000:00:1c.3/0000:2e:00.0': not supported by any plugin
cze 10 01:56:41 MatikAsus obexd[3702]: CONNECT(0x0), <unknown>(0xff)
cze 10 01:56:41 MatikAsus obexd[3702]: CONNECT(0x0), <unknown>(0x0)
cze 10 01:56:41 MatikAsus obexd[3702]: SETPATH(0x5), <unknown>(0xff)
cze 10 01:56:41 MatikAsus obexd[3702]: stat(/home/matik/phonebook/): No such file or directory (2)
cze 10 01:56:41 MatikAsus obexd[3702]: SETPATH(0x5), Not Found(0x44)
cze 10 01:56:42 MatikAsus systemd[1]: NetworkManager-dispatcher.service: Deactivated successfully.
cze 10 01:56:45 MatikAsus NetworkManager[1162]: <warn> [1686355005.3711] platform-linux: do-change-link[2]: failure changing link: failure 110 (Connection timed out)
cze 10 01:56:45 MatikAsus NetworkManager[1162]: <info> [1686355005.3716] manager: NetworkManager state is now CONNECTED_LOCAL
cze 10 01:56:45 MatikAsus kernel: mt7921e 0000:2e:00.0: Message 00000046 (seq 1) timeout
cze 10 01:56:46 MatikAsus kernel: mt7921e 0000:2e:00.0: driver own failed
cze 10 01:56:46 MatikAsus kernel: ------------[ cut here ]------------
cze 10 01:56:46 MatikAsus kernel: WARNING: CPU: 0 PID: 7181 at kernel/kthread.c:611 kthread_park+0x8a/0xa0
cze 10 01:56:46 MatikAsus kernel: Modules linked in: ntfs3 ccm veth rfcomm xt_nat xt_tcpudp xt_conntrack nft_chain_nat xt_MASQUERADE nf_nat nf_conntrack_netlink nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xfrm_user xfrm_algo nft_counter xt_addrtype nft_compat nf_tables libcrc32c nfnetlink br_netfilter bridge stp snd_seq_dummy llc snd_hrtimer vboxnetadp(O) vboxnetflt(O) vboxdrv(O) cmac algif_hash algif_skcipher af_alg overlay bnep nvidia_uvm(PO) btusb uvcvideo btrtl btbcm videobuf2_vmalloc btintel videobuf2_memops videobuf2_v4l2 bluetooth videobuf2_common videodev rtsx_usb_ms ecdh_generic ecc memstick mc snd_hda_codec_hdmi intel_tcc_cooling x86_pkg_temp_thermal joydev binfmt_misc nls_iso8859_1 snd_sof_pci_intel_tgl snd_sof_intel_hda_common soundwire_intel soundwire_generic_allocation soundwire_cadence snd_sof_intel_hda snd_hda_codec_realtek snd_sof_pci snd_sof_xtensa_dsp snd_hda_codec_generic snd_sof intel_powerclamp snd_soc_hdac_hda snd_hda_ext_core snd_soc_acpi_intel_match snd_soc_acpi soundwire_bus
cze 10 01:56:46 MatikAsus kernel: ledtrig_audio snd_soc_core coretemp snd_compress ac97_bus snd_pcm_dmaengine snd_hda_intel snd_intel_dspcfg snd_intel_sdw_acpi mt7921e snd_hda_codec mt76_connac_lib snd_hda_core kvm_intel nvidia_drm(PO) mei_hdcp intel_rapl_msr snd_hwdep mt76 kvm nvidia_modeset(PO) snd_pcm mac80211 snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq cfg80211 snd_seq_device snd_timer processor_thermal_device_pci_legacy input_leds rapl snd nvidia(PO) intel_cstate serio_raw asus_nb_wmi wmi_bmof hid_multitouch libarc4 processor_thermal_device processor_thermal_rfim mei_me processor_thermal_mbox soundcore mei processor_thermal_rapl intel_rapl_common ucsi_acpi typec_ucsi pmt_telemetry pmt_class igen6_edac intel_soc_dts_iosf typec int3403_thermal int340x_thermal_zone int3400_thermal acpi_tad acpi_thermal_rel acpi_pad mac_hid sch_fq_codel msr parport_pc ppdev lp parport ramoops reed_solomon pstore_blk pstore_zone efi_pstore ip_tables x_tables autofs4 rtsx_usb_sdmmc rtsx_usb i915 crct10dif_pclmul
cze 10 01:56:46 MatikAsus kernel: mfd_aaeon crc32_pclmul ghash_clmulni_intel hid_generic aesni_intel i2c_algo_bit asus_wmi ttm nvme sparse_keymap crypto_simd nvme_core platform_profile drm_kms_helper cryptd syscopyarea sysfillrect sysimgblt i2c_i801 fb_sys_fops i2c_smbus cec intel_lpss_pci rc_core xhci_pci thunderbolt intel_lpss xhci_pci_renesas vmd drm idma64 intel_pmt i2c_hid_acpi i2c_hid wmi hid video pinctrl_tigerlake
cze 10 01:56:46 MatikAsus kernel: CPU: 0 PID: 7181 Comm: kworker/u16:56 Tainted: P O 5.15.0-73-generic #80-Ubuntu
cze 10 01:56:46 MatikAsus kernel: Hardware name: ASUSTeK COMPUTER INC. Vivobook_ASUSLaptop X3500PC_K3500PC/X3500PC, BIOS X3500PC.302 08/08/2022
cze 10 01:56:46 MatikAsus kernel: Workqueue: mt76 mt7921_mac_reset_work [mt7921e]
cze 10 01:56:46 MatikAsus kernel: RIP: 0010:kthread_park+0x8a/0xa0
cze 10 01:56:46 MatikAsus kernel: Code: 32 31 c0 5b 41 5c 5d c3 cc cc cc cc 0f 0b 49 8b 9c 24 28 0a 00 00 a8 04 74 ab 0f 0b b8 da ff ff ff 5b 41 5c 5d c3 cc cc cc cc <0f> 0b b8 f0 ff ff ff eb d0 0f 0b eb cc 66 0f 1f 84 00 00 00 00 00
cze 10 01:56:46 MatikAsus kernel: RSP: 0018:ffffa99a48223dd0 EFLAGS: 00010202
cze 10 01:56:46 MatikAsus kernel: RAX: 0000000000000004 RBX: ffff9a3b891fa880 RCX: ffff9a3b8f14a368
cze 10 01:56:46 MatikAsus kernel: RDX: 0000000000000001 RSI: 0000000000000003 RDI: ffff9a3b93265e80
cze 10 01:56:46 MatikAsus kernel: RBP: ffffa99a48223de0 R08: 0000000000000000 R09: ffffa99a48223d78
cze 10 01:56:46 MatikAsus kernel: R10: 0000000065313239 R11: 000000003937746d R12: ffff9a3b93265e80
cze 10 01:56:46 MatikAsus kernel: R13: ffff9a3b8f14a020 R14: ffff9a3b8f148820 R15: ffff9a3b8f14a2e0
cze 10 01:56:46 MatikAsus kernel: FS: 0000000000000000(0000) GS:ffff9a3efb600000(0000) knlGS:0000000000000000
cze 10 01:56:46 MatikAsus kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
cze 10 01:56:46 MatikAsus kernel: CR2: 0000562ab7b71f04 CR3: 0000000161b9a006 CR4: 0000000000770ef0
cze 10 01:56:46 MatikAsus kernel: PKRU: 55555554
cze 10 01:56:46 MatikAsus kernel: Call Trace:
cze 10 01:56:46 MatikAsus kernel: <TASK>
cze 10 01:56:46 MatikAsus kernel: mt7921_mac_reset+0x9e/0x24c [mt7921e]
cze 10 01:56:46 MatikAsus kernel: mt7921_mac_reset_work+0xa3/0x153 [mt7921e]
cze 10 01:56:46 MatikAsus kernel: ? mt7921_pm_wake_work+0xc3/0x130 [mt7921e]
cze 10 01:56:46 MatikAsus kernel: process_one_work+0x228/0x3d0
cze 10 01:56:46 MatikAsus kernel: worker_thread+0x53/0x420
cze 10 01:56:46 MatikAsus kernel: ? process_one_work+0x3d0/0x3d0
cze 10 01:56:46 MatikAsus kernel: kthread+0x127/0x150
cze 10 01:56:46 MatikAsus kernel: ? set_kthread_struct+0x50/0x50
cze 10 01:56:46 MatikAsus kernel: ret_from_fork+0x1f/0x30
cze 10 01:56:46 MatikAsus kernel: </TASK>
cze 10 01:56:46 MatikAsus kernel: ---[ end trace 6a57dbebf433b142 ]---
cze 10 01:56:50 MatikAsus NetworkManager[1162]: <error> [1686355010.3750] device (wlo1): Couldn't initialize supplicant interface: Timeout was reached
cze 10 01:56:51 MatikAsus systemd[1]: plocate-updatedb.service: Deactivated successfully.
cze 10 01:56:51 MatikAsus systemd[1]: Finished Update the plocate database.
cze 10 01:56:51 MatikAsus systemd[1]: plocate-updatedb.service: Consumed 7.699s CPU time.
 
For now, open the "Power Management" settings in Kubuntu and check the "When laptop lid is closed" option. Make sure it is set to "Do nothing" or "Lock screen" instead of "Suspend" or "Hibernate". This should prevent your laptop from going to sleep when you close the lid. I don't know whether it's different on KDE but this is how you can change power settings on XFCE. Try and let us know if it works.

Also, did you try running "su -"?
 

Members online


Top