Slow boot: sched_ext: lavd: Xwayland[3147] failed to run for 43.340s

Hi there

I’m using CahcyOS with default kernel and my system is full up to date. Not sure when this started (few weeks) but around 50% of the time I boot into my system, I get a really slow boot.

I have my system auto-login and this happens just before Plasma loads my desktop. Here is a snippet of dmesg when a 43 sec slow down happens.

[   14.615640] Bluetooth: RFCOMM TTY layer initialized
[   14.615647] Bluetooth: RFCOMM socket layer initialized
[   14.615650] Bluetooth: RFCOMM ver 1.11
[   15.139179] r8169 0000:22:00.0 enp34s0: Link is Up - 1Gbps/Full - flow control rx/tx
[   57.935247] sched_ext: BPF scheduler "lavd" disabled (runnable task stall)
[   57.935250] sched_ext: lavd: Xwayland[3147] failed to run for 43.340s
[   57.935251]    scx_watchdog_workfn+0x119/0x1b0
[   57.935255]    process_scheduled_works+0x1f7/0x470
[   57.935257]    worker_thread+0x1ae/0x310
[   57.935259]    kthread+0x14d/0x170
[   57.935261]    ret_from_fork+0x3a/0x50
[   57.935263]    ret_from_fork_asm+0x1a/0x30
[   58.875880] Bluetooth: hci0: ACL packet for unknown connection handle 2
[   58.875890] Bluetooth: hci0: ACL packet for unknown connection handle 2
[   58.875892] Bluetooth: hci0: ACL packet for unknown connection handle 2
[   58.875894] Bluetooth: hci0: ACL packet for unknown connection handle 2
[   58.875896] Bluetooth: hci0: ACL packet for unknown connection handle 3
[   58.875898] Bluetooth: hci0: ACL packet for unknown connection handle 3
[   58.875900] Bluetooth: hci0: ACL packet for unknown connection handle 3
[   58.875901] Bluetooth: hci0: ACL packet for unknown connection handle 3
[   58.875903] Bluetooth: hci0: ACL packet for unknown connection handle 4
[   58.875905] Bluetooth: hci0: ACL packet for unknown connection handle 4
[   58.875907] Bluetooth: hci0: ACL packet for unknown connection handle 5
[   58.875909] Bluetooth: hci0: ACL packet for unknown connection handle 5
[   58.875910] Bluetooth: hci0: ACL packet for unknown connection handle 5
[   58.875912] Bluetooth: hci0: ACL packet for unknown connection handle 5
[   58.875914] Bluetooth: hci0: ACL packet for unknown connection handle 6
[   58.875915] Bluetooth: hci0: ACL packet for unknown connection handle 6
[   59.042659] hid-generic 0005:0000:0000.0012: unknown main item tag 0x0

Any thoughts on what this could be? Not sure where to begin troubleshooting or what that xwayland error relates to. My system seems to function just fine once I’m in.

Many thanks for your help and continued hard work on this amazing distro!

This seems to be an issue with sched-ext schedulers in general (or atleast lavd, bpfland and flash). Not sure if it’s an issue there or something conflicting in the CachyOS environment. It’s known that ananicy-cpp works badly with sched-ext schedulers so you could try disabling that.

sudo systemctl disable --now ananicy-cpp

Ah thank you. I missed the bit in the wiki where it’s recommended to disable ananicy-cpp when using sched-ext. Will test it with it disabled to see if it helps.

Hi - Unfortunately this only worked for a few days then the 43s stall issue returned. Not every boot, but often enough. Exactly the same error message.

I can confirm the ananicy-cpp service is disabled.

Any other thoughts on how I can trouleshoot?

Many thanks.

I will open an issue in the scx github in the next few days regarding this, as it is reproducible on both scx_bpfland and scx_flash, so I assume it is affecting all sched-ext schedulers. Can you perhaps provide the flags you are using with scx_lavd? Thanks.

Great, thank you. As far as I am aware, I’m not using any specific flags. Here is my /etc/default/scx

# List of scx_schedulers: scx_bpfland scx_central scx_lavd scx_layered scx_nest scx_qmap scx_rlfifo scx_rustland scx_rusty scx_simple scx_userland
SCX_SCHEDULER=scx_lavd

# Set custom flags for each scheduler, below is an example of how to use
SCX_FLAGS=" "

I haven’t really played around with it much yet so let me know if I need to check somewhere else.

1 Like