On Wednesday, 24 June 2020 16:30:25 BST Серега Филатов wrote:
> Hello. I am upset about one issue that pops up from time to time which
> I see now even more frequently than before. This has literally become
> a pain in some place for me.
> The issue is simple: gentoo, linux kernel 4.19.97, regular asus
> laptop. I'm doing my business, closing the lid. I expect it to suspend
> and stay in that mode.
> And my laptop doesn't.
> 
> Some time ago the reason was mounted sshfs (I see fuse stuff in the
> backtrace). Today, as you can see, baloo from KDE. Sometimes I see
> "file.so".

Ahh, yes, the baloo pain ...

You could configure baloo to only index parts of your filesystem you care to 
find when running semantic searches.  I typically switch it off completely, or 
only allow it to index a small part of the /home filesystem.  If you have it 
enabled and it indexes not only file names but also content, plus emails and 
what have you, then it will chew up an inordinate amount of resources.


> When closing the lid it try for 20 seconds and gives up. Then some
> time it tries again, always without success. Suddenly it gives up to
> suspend and stays in a working state or some weird state when fan
> still spinning but slowing down, power light is on and it wakes up
> only by power button. It can discharge during the night or I can just
> throw it in a bag where it stays awake and become hot.

Not good!  You could lose data like this.


> Is there some way to tweak a kernel to not do that? I've noticed that
> it is not only the gentoo or this laptop. I see this on different
> hardware and different system (ubuntu specifically). I started to
> think if it's a systemd thing because I've started to see it probably
> the same time ubuntu switched to systemd.
> 
> Windows have no issues to sleep on the same hardware and suspends every
> time.
> 
> Part of dmesg with this message. I closed the lid, power light is on.
> After a while I opened it and stroke a power button:
> 
> [  283.880396] PM: suspend entry (deep)
> [  283.880398] PM: Syncing filesystems ... done.
> [  284.176615] Freezing user space processes ...
> [  304.175823] Freezing of tasks failed after 20.004 seconds (1 tasks
> refusing to freeze, wq_busy=0):
> [  304.175864] baloo_file_extr D13184 11112  11111 0x00000004
> [  304.175874] Call Trace:
> [  304.175888]  ? __schedule+0x26f/0x720
> [  304.175893]  schedule+0x2d/0x80
> [  304.175898]  io_schedule+0xd/0x30
> [  304.175904]  generic_file_read_iter+0x319/0xa30
> [  304.175910]  ? page_cache_tree_insert+0xd0/0xd0
> [  304.175915]  __vfs_read+0x11e/0x170
> [  304.175920]  vfs_read+0x98/0x150
> [  304.175924]  ksys_pread64+0x60/0xa0
> [  304.175929]  do_syscall_64+0x43/0xf0
> [  304.175933]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
> [  304.175937] RIP: 0033:0x7fae63191733
> [  304.175947] Code: Bad RIP value.
> [  304.175949] RSP: 002b:00007ffd5069d670 EFLAGS: 00000293 ORIG_RAX:
> 0000000000000011
> [  304.175953] RAX: ffffffffffffffda RBX: 00005573b13dcff0 RCX:
> 00007fae63191733 [  304.175955] RDX: 0000000000000100 RSI: 00005573b13dd031
> RDI: 0000000000000013 [  304.175956] RBP: 00005573b13dd031 R08:
> 0000000000000000 R09: 0000000000000007 [  304.175958] R10: 0000000002b08e9a
> R11: 0000000000000293 R12: 00007ffd5069dac8 [  304.175960] R13:
> 00007ffd5069d7d0 R14: 00000000ffffffff R15: 00007ffd5069d860 [  304.175987]
> OOM killer enabled.
> [  304.175988] Restarting tasks ... done.
> [  304.193089] PM: suspend exit
> [  304.193150] PM: suspend entry (s2idle)
> [  304.193151] PM: Syncing filesystems ... done.
> [  304.626894] Freezing user space processes ... (elapsed 0.002 seconds)
> done. [  304.629577] OOM killer disabled.
> [  304.629578] Freezing remaining freezable tasks ... (elapsed 0.000
> seconds) done.
> [  304.630520] Suspending console(s) (use no_console_suspend to debug)
> [  304.631663] wlp2s0: deauthenticating from xx:xx:xx:xx:xx:xx by
> local choice (Reason: 3=DEAUTH_LEAVING)
> [  304.640435] sd 0:0:0:0: [sda] Synchronizing SCSI cache
> [  304.640478] sd 2:0:0:0: [sdb] Synchronizing SCSI cache
> [  304.640656] sd 0:0:0:0: [sda] Stopping disk
> [  304.644025] sd 2:0:0:0: [sdb] Stopping disk
> [  305.415243] ACPI: EC: interrupt blocked
> [  751.841563] ACPI: EC: interrupt unblocked
> [  751.983903] hpet1: lost 310 rtc interrupts
> [  751.991105] sd 0:0:0:0: [sda] Starting disk
> [  751.991126] sd 2:0:0:0: [sdb] Starting disk
> [  751.993715] iwlwifi 0000:02:00.0: Applying debug destination
> EXTERNAL_DRAM [  752.124938] iwlwifi 0000:02:00.0: Applying debug
> destination EXTERNAL_DRAM [  752.192844] iwlwifi 0000:02:00.0: FW already
> configured (0) - re-configuring [  752.302228] ata3: SATA link up 6.0 Gbps
> (SStatus 133 SControl 300) [  752.302619] ata1: SATA link up 6.0 Gbps
> (SStatus 133 SControl 300) [  752.306480] ata3.00: configured for UDMA/133
> [  754.031499] ata1.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES)
> succeeded [  754.031504] ata1.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY
> FREEZE LOCK) filtered out
> [  754.031508] ata1.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE
> CONFIGURATION OVERLAY) filtered out
> [  754.035587] ata1.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES)
> succeeded [  754.035592] ata1.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY
> FREEZE LOCK) filtered out
> [  754.035596] ata1.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE
> CONFIGURATION OVERLAY) filtered out
> [  754.037029] ata1.00: configured for UDMA/100
> [  754.045288] ata3.00: Enabling discard_zeroes_data
> [  754.046007] OOM killer enabled.
> [  754.046009] Restarting tasks ... done.
> [  754.195279] PM: suspend exit

You have OOM messages there.  It seems your baloo process eats up all your RAM 
and when the time comes to put the OS to sleep, there is not enough RAM to do 
so.  I don't know if using a swap file or swap partition would help, but 
controlling how much baloo is indexing will help both in terms of load on the 
CPU as well as in terms of RAM when awake and RAM when you suspend it. 

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to