sched-ext / scx

sched_ext schedulers and tools
https://bit.ly/scx_slack
GNU General Public License v2.0
692 stars 48 forks source link

"rusty" scheduler causing system hang at login. #354

Open SQalliT opened 3 weeks ago

SQalliT commented 3 weeks ago

I use CachyOS (Arch based) and have the scx service enabled, with the rusty scheduler specified. After logging in after first boot I get a black screen for several minutes that can only be skipped by switching to another tty and back. The issue is not present when using scx_simple for example.

CachyOS Linux x86_64 Kernel: 6.9.3-4-cachyos (issue persists on 6.10.rc3-1 too) DE: KDE Plasma 6.0.5 CPU: AMD Ryzen 9 5950X

Below is the excerpt from my most recent boot:

Jun 13 12:38:26 ra kernel: sched_ext: BPF scheduler "rusty" errored, disabling
Jun 13 12:38:26 ra kernel: sched_ext: runnable task stall (kworker/31:1[311] failed to run for 13.736s)
Jun 13 12:38:26 ra kernel:    scx_watchdog_workfn+0x154/0x1e0
Jun 13 12:38:26 ra kernel:    process_one_work+0x18e/0x350
Jun 13 12:38:26 ra kernel:    worker_thread+0x2fa/0x490
Jun 13 12:38:26 ra kernel:    kthread+0xd2/0x100
Jun 13 12:38:26 ra kernel:    ret_from_fork+0x34/0x50
Jun 13 12:38:26 ra kernel:    ret_from_fork_asm+0x1a/0x30

Below is an excerpt from a previous boot with more information:

May 09 13:14:15 ra kernel: sched_ext: BPF scheduler "rusty" errored, disabling 
May 09 13:14:15 ra kernel: sched_ext: runnable task stall (kworker/31:1[311] failed to run for 39.079s) 
May 09 13:14:15 ra kernel:   scx_watchdog_workfn+0x154/0x1e0 
May 09 13:14:15 ra kernel:   process_one_work+0x193/0x3c0 
May 09 13:14:15 ra kernel:   worker_thread+0x393/0x540 
May 09 13:14:15 ra kernel:   kthread+0xd2/0x100 
May 09 13:14:15 ra kernel:   ret_from_fork+0x34/0x50 
May 09 13:14:15 ra kernel:   ret_from_fork_asm+0x1a/0x30 
May 09 13:14:15 ra systemd[1]: scx.service: Main process exited, code=exited, status=1/FAILURE 
May 09 13:14:15 ra systemd[1]: scx.service: Failed with result 'exit-code'. 
May 09 13:14:16 ra systemd[1]: scx.service: Scheduled restart job, restart counter is at 1. 
May 09 13:14:16 ra systemd[1]: Started Start scx_scheduler. 
May 09 13:14:16 ra systemd[1246]: plasma-ksplash.service: start operation timed out. Terminating. 
May 09 13:14:26 ra kernel: rcu_tasks_wait_gp: rcu_tasks grace period number 41 (since boot) is 10096 jiffies old. 
May 09 13:14:26 ra xdg-desktop-por[1297]: Failed to create file chooser proxy: Error calling StartServiceByName for org.freedesktop.impl.portal.desktop.kde: Timeout was reached 
May 09 13:14:26 ra xdg-desktop-por[1297]: No skeleton to export 
May 09 13:14:36 ra plasma_waitforname[1284]: org.kde.knotifications: WaitForName: Service was not registered within timeout 
May 09 13:14:36 ra systemd[1246]: dbus-:1.2-org.kde.KSplash@0.service: Main process exited, code=exited, status=1/FAILURE 
May 09 13:14:36 ra systemd[1246]: dbus-:1.2-org.kde.KSplash@0.service: Failed with result 'exit-code'. 
May 09 13:14:47 ra kernel: sched_ext: BPF scheduler "rusty" errored, disabling 
May 09 13:14:47 ra kernel: sched_ext: runnable task stall (kworker/31:1H[426] failed to run for 30.658s) 
May 09 13:14:47 ra kernel:   scx_watchdog_workfn+0x154/0x1e0 
May 09 13:14:47 ra kernel:   process_one_work+0x193/0x3c0 
May 09 13:14:47 ra kernel:   worker_thread+0x393/0x540 
May 09 13:14:47 ra kernel:   kthread+0xd2/0x100 
May 09 13:14:47 ra kernel:   ret_from_fork+0x34/0x50 
May 09 13:14:47 ra kernel:   ret_from_fork_asm+0x1a/0x30 
May 09 13:14:47 ra systemd[1]: scx.service: Main process exited, code=exited, status=1/FAILURE 
May 09 13:14:47 ra systemd[1]: scx.service: Failed with result 'exit-code'. 
May 09 13:14:47 ra systemd[1]: scx.service: Scheduled restart job, restart counter is at 2. 
May 09 13:14:47 ra systemd[1]: Started Start scx_scheduler. 
May 09 13:14:51 ra xdg-desktop-por[1297]: Failed to create app chooser proxy: Error calling StartServiceByName for org.freedesktop.impl.portal.desktop.kde: Timeout was reached 
May 09 13:14:51 ra xdg-desktop-por[1297]: No skeleton to export 
May 09 13:14:56 ra kernel: rcu_tasks_wait_gp: rcu_tasks grace period number 41 (since boot) is 40208 jiffies old. 
May 09 13:14:56 ra systemd[1246]: plasma-ksplash.service: State 'stop-sigterm' timed out. Killing. 
May 09 13:14:56 ra systemd[1246]: plasma-ksplash.service: Killing process 1293 (ksplashqml) with signal SIGKILL. 
May 09 13:15:06 ra systemd[1246]: plasma-kcminit.service: start operation timed out. Terminating. 
May 09 13:15:06 ra systemd[1246]: xdg-desktop-portal.service: start operation timed out. Terminating. 
May 09 13:15:06 ra systemd[1246]: xdg-desktop-portal.service: Failed with result 'timeout'. 
May 09 13:15:06 ra systemd[1246]: Failed to start Portal service. 
May 09 13:15:17 ra systemd[1246]: Started Konsole - Terminal. 
May 09 13:15:17 ra systemd[1246]: Starting Portal service... 
May 09 13:15:18 ra systemd[1246]: plasma-ksplash.service: Main process exited, code=killed, status=15/TERM 
May 09 13:15:18 ra systemd[1246]: plasma-ksplash.service: Failed with result 'timeout'. 
May 09 13:15:18 ra systemd[1246]: Failed to start Splash screen shown during boot. 
May 09 13:15:18 ra systemd[1246]: plasma-kcminit.service: Failed with result 'timeout'. 
May 09 13:15:18 ra systemd[1246]: Failed to start KDE Config Module Initialization. 
May 09 13:15:18 ra systemd[1246]: Dependency failed for KDE Configuration Module Initialization (Phase 1). 
May 09 13:15:18 ra systemd[1246]: plasma-kcminit-phase1.service: Job plasma-kcminit-phase1.service/start failed with result 'dependency'. 
May 09 13:15:18 ra kernel: sched_ext: BPF scheduler "rusty" errored, disabling 
May 09 13:15:18 ra kernel: sched_ext: runnable task stall (Xwayland[1374] failed to run for 30.634s) 
May 09 13:15:18 ra kernel:   scx_watchdog_workfn+0x154/0x1e0 
May 09 13:15:18 ra kernel:   process_one_work+0x193/0x3c0 
May 09 13:15:18 ra kernel:   worker_thread+0x393/0x540 
May 09 13:15:18 ra kernel:   kthread+0xd2/0x100 
May 09 13:15:18 ra kernel:   ret_from_fork+0x34/0x50 
May 09 13:15:18 ra kernel:   ret_from_fork_asm+0x1a/0x30 
May 09 13:15:18 ra systemd[1]: scx.service: Main process exited, code=exited, status=1/FAILURE 
May 09 13:15:18 ra systemd[1]: scx.service: Failed with result 'exit-code'. 
May 09 13:15:18 ra kwin_wayland[1290]: kf.windowsystem: static bool KX11Extras::mapViewport() may only be used on X11 
May 09 13:15:18 ra systemd[1246]: Starting KDE Session Management Server... 
May 09 13:15:18 ra kwin_wayland_wrapper[1484]: The XKEYBOARD keymap compiler (xkbcomp) reports: 
May 09 13:15:18 ra kwin_wayland_wrapper[1484]: > Warning:        Unsupported maximum keycode 708, clipping. 
May 09 13:15:18 ra kwin_wayland_wrapper[1484]: >                 X11 cannot support keycodes above 255. 
May 09 13:15:18 ra systemd[1246]: Started Unlock kwallet from pam credentials. 
May 09 13:15:18 ra kwin_wayland_wrapper[1484]: > Warning:        Could not resolve keysym XF86KbdInputAssistPrevgrou 
May 09 13:15:18 ra kwin_wayland_wrapper[1484]: > Warning:        Could not resolve keysym XF86KbdInputAssistNextgrou 
May 09 13:15:18 ra kwin_wayland_wrapper[1484]: Errors from xkbcomp are not fatal to the X server 
May 09 13:15:18 ra systemd[1246]: Starting KDE Daemon 6... 
May 09 13:15:18 ra pam_kwallet_init[1490]: 2024/05/09 13:15:18 socat[1490] W address is opened in read-write mode but only supports read-only 
May 09 13:15:18 ra kcminit[1486]: Initializing "/usr/lib/qt6/plugins/plasma/kcms/systemsettings/kcm_fonts.so" 
May 09 13:15:18 ra kcminit[1486]: Initializing "/usr/lib/qt6/plugins/plasma/kcms/systemsettings/kcm_style.so" 
May 09 13:15:18 ra systemd[1246]: Started KDE Daemon 6. 
May 09 13:15:18 ra kded6[1487]: org.kde.libkbolt: Failed to connect to Bolt manager DBus interface: 
May 09 13:15:18 ra kded6[1487]: org.kde.bolt.kded: Couldn't connect to Bolt DBus daemon 
May 09 13:15:18 ra NetworkManager[1054]: <info> [1715256918.4972] agent-manager: agent[c3df4899cf53b27f,:1.38/org.kde.plasma.networkmanagement/1000]: agent registered 
May 09 13:15:18 ra NetworkManager[1054]: <info> [1715256918.4973] policy: auto-activating connection 'VM9490937' (9401069b-a2e6-45e4-852a-c1f48f44da58) 
May 09 13:15:18 ra NetworkManager[1054]: <info> [1715256918.4975] device (wlan0): Activation: starting connection 'VM9490937' (9401069b-a2e6-45e4-852a-c1f48f44da58) 
May 09 13:15:18 ra NetworkManager[1054]: <info> [1715256918.4975] device (wlan0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed') 
May 09 13:15:18 ra NetworkManager[1054]: <info> [1715256918.4977] manager: NetworkManager state is now CONNECTING 
May 09 13:15:18 ra kded6[1487]: QDBusObjectPath: invalid path "/modules/plasma-session-shortcuts" 
May 09 13:15:18 ra kded6[1487]: kf.dbusaddons: The kded module name "plasma-session-shortcuts" is invalid! 
May 09 13:15:18 ra systemd[1]: scx.service: Scheduled restart job, restart counter is at 3. 
May 09 13:15:18 ra NetworkManager[1054]: <info> [1715256918.5076] device (wlan0): set-hw-addr: reset MAC address to 7C:50:79:07:6F:DE (preserve) 
May 09 13:15:18 ra NetworkManager[1054]: <info> [1715256918.5086] device (wlan0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed') 
May 09 13:15:18 ra NetworkManager[1054]: <info> [1715256918.5087] device (wlan0): Activation: (wifi) access point 'VM9490937' has security, but secrets are required. 
May 09 13:15:18 ra NetworkManager[1054]: <info> [1715256918.5087] device (wlan0): state change: config -> need-auth (reason 'none', sys-iface-state: 'managed') 
May 09 13:15:18 ra NetworkManager[1054]: <info> [1715256918.5088] sup-iface[36a9694bd6cd1c04,0,wlan0]: wps: type pbc start... 
May 09 13:15:18 ra NetworkManager[1054]: <info> [1715256918.5090] device (wlan0): supplicant interface state: disconnected -> inactive 
May 09 13:15:18 ra NetworkManager[1054]: <info> [1715256918.5090] device (p2p-dev-wlan0): supplicant management interface state: disconnected -> inactive 
May 09 13:15:18 ra wpa_supplicant[1111]: wlan0: WPS-PBC-ACTIVE 
May 09 13:15:18 ra systemd[1246]: Started dbus-:1.2-org.kde.KSplash@1.service. 
May 09 13:15:18 ra systemd[1246]: Started KDE Session Management Server. 
May 09 13:15:18 ra systemd[1]: Started Start scx_scheduler. 
May 09 13:15:18 ra systemd[1246]: Starting KDE Plasma Workspace...

This is one of my first issue submissions so please let me know if you need any more information or if Ive done anything wrong.

ptr1337 commented 3 weeks ago

This should be fixed in scx-scheds-git. Could you please retry, when installing the scx-scheds-git package?

SQalliT commented 3 weeks ago

Ive installed the scx-scheds-git package and still get the issue. Please see below for the most recent journalctl showing boot and plasma ksplash failure:

Jun 14 13:57:54 ra kernel: sched_ext: BPF scheduler "rusty" errored, disabling
Jun 14 13:57:54 ra kernel: sched_ext: runnable task stall (ksplashqml[1290] failed to run for 13.937s)
Jun 14 13:57:54 ra kernel:    scx_watchdog_workfn+0x154/0x1e0
Jun 14 13:57:54 ra kernel:    process_one_work+0x18e/0x350
Jun 14 13:57:54 ra kernel:    worker_thread+0x2fa/0x490
Jun 14 13:57:54 ra kernel:    kthread+0xd2/0x100
Jun 14 13:57:54 ra kernel:    ret_from_fork+0x34/0x50
Jun 14 13:57:54 ra kernel:    ret_from_fork_asm+0x1a/0x30
Jun 14 13:57:54 ra systemd[1]: scx.service: Main process exited, code=exited, status=1/FAILURE
Jun 14 13:57:54 ra systemd[1]: scx.service: Failed with result 'exit-code'.
Jun 14 13:57:54 ra systemd[1]: scx.service: Scheduled restart job, restart counter is at 1.
Jun 14 13:57:54 ra systemd[1]: Started Start scx_scheduler.
Jun 14 13:57:56 ra kernel: usb 1-1: USB disconnect, device number 2
Jun 14 13:58:04 ra kernel: rcu_tasks_wait_gp: rcu_tasks grace period number 41 (since boot) is 10088 jiffies old.
Jun 14 13:58:05 ra xdg-desktop-por[1294]: Failed to create settings proxy: Error calling StartServiceByName for org.freedesktop.impl.portal.desktop.kde: Timeout was reached
Jun 14 13:58:05 ra xdg-desktop-por[1294]: No skeleton to export
Jun 14 13:58:05 ra kernel: sched_ext: BPF scheduler "rusty" errored, disabling
Jun 14 13:58:05 ra kernel: sched_ext: runnable task stall (kworker/31:1[311] failed to run for 10.172s)
Jun 14 13:58:05 ra kernel:    scx_watchdog_workfn+0x154/0x1e0
Jun 14 13:58:05 ra kernel:    process_one_work+0x18e/0x350
Jun 14 13:58:05 ra kernel:    worker_thread+0x2fa/0x490
Jun 14 13:58:05 ra kernel:    kthread+0xd2/0x100
Jun 14 13:58:05 ra kernel:    ret_from_fork+0x34/0x50
Jun 14 13:58:05 ra kernel:    ret_from_fork_asm+0x1a/0x30
Jun 14 13:58:05 ra systemd[1]: scx.service: Main process exited, code=exited, status=1/FAILURE
Jun 14 13:58:05 ra systemd[1]: scx.service: Failed with result 'exit-code'.
Jun 14 13:58:05 ra systemd[1]: scx.service: Scheduled restart job, restart counter is at 2.
Jun 14 13:58:05 ra systemd[1]: Started Start scx_scheduler.
Jun 14 13:58:10 ra systemd[1]: systemd-localed.service: Deactivated successfully.
Jun 14 13:58:16 ra kernel: sched_ext: BPF scheduler "rusty" errored, disabling
Jun 14 13:58:16 ra kernel: sched_ext: runnable task stall (kworker/31:1[311] failed to run for 10.179s)
Jun 14 13:58:16 ra kernel:    scx_watchdog_workfn+0x154/0x1e0
Jun 14 13:58:16 ra kernel:    process_one_work+0x18e/0x350
Jun 14 13:58:16 ra kernel:    worker_thread+0x2fa/0x490
Jun 14 13:58:16 ra kernel:    kthread+0xd2/0x100
Jun 14 13:58:16 ra kernel:    ret_from_fork+0x34/0x50
Jun 14 13:58:16 ra kernel:    ret_from_fork_asm+0x1a/0x30
Jun 14 13:58:16 ra systemd[1]: scx.service: Main process exited, code=exited, status=1/FAILURE
Jun 14 13:58:05 ra kernel: sched_ext: BPF scheduler "rusty" errored, disabling
Jun 14 13:58:05 ra kernel: sched_ext: runnable task stall (kworker/31:1[311] failed to run for 10.172s)
Jun 14 13:58:05 ra kernel:    scx_watchdog_workfn+0x154/0x1e0
Jun 14 13:58:05 ra kernel:    process_one_work+0x18e/0x350
Jun 14 13:58:05 ra kernel:    worker_thread+0x2fa/0x490
Jun 14 13:58:05 ra kernel:    kthread+0xd2/0x100
Jun 14 13:58:05 ra kernel:    ret_from_fork+0x34/0x50
Jun 14 13:58:05 ra kernel:    ret_from_fork_asm+0x1a/0x30
Jun 14 13:58:05 ra systemd[1]: scx.service: Main process exited, code=exited, status=1/FAILURE
Jun 14 13:58:05 ra systemd[1]: scx.service: Failed with result 'exit-code'.
Jun 14 13:58:05 ra systemd[1]: scx.service: Scheduled restart job, restart counter is at 2.
Jun 14 13:58:05 ra systemd[1]: Started Start scx_scheduler.
Jun 14 13:58:10 ra systemd[1]: systemd-localed.service: Deactivated successfully.
Jun 14 13:58:16 ra kernel: sched_ext: BPF scheduler "rusty" errored, disabling
Jun 14 13:58:16 ra kernel: sched_ext: runnable task stall (kworker/31:1[311] failed to run for 10.179s)
Jun 14 13:58:16 ra kernel:    scx_watchdog_workfn+0x154/0x1e0
Jun 14 13:58:16 ra kernel:    process_one_work+0x18e/0x350
Jun 14 13:58:16 ra kernel:    worker_thread+0x2fa/0x490
Jun 14 13:58:16 ra kernel:    kthread+0xd2/0x100
Jun 14 13:58:16 ra kernel:    ret_from_fork+0x34/0x50
Jun 14 13:58:16 ra kernel:    ret_from_fork_asm+0x1a/0x30
Jun 14 13:58:16 ra systemd[1]: scx.service: Main process exited, code=exited, status=1/FAILURE
Jun 14 13:58:16 ra systemd[1]: scx.service: Failed with result 'exit-code'.
Jun 14 13:58:16 ra systemd[1]: scx.service: Scheduled restart job, restart counter is at 3.
Jun 14 13:58:16 ra systemd[1]: scx.service: Start request repeated too quickly.
Jun 14 13:58:16 ra systemd[1]: scx.service: Failed with result 'exit-code'.
Jun 14 13:58:16 ra systemd[1]: Failed to start Start scx_scheduler.
Jun 14 13:58:20 ra systemd[1244]: plasma-ksplash.service: start operation timed out. Terminating.
Jun 14 13:58:30 ra xdg-desktop-por[1294]: Failed to create file chooser proxy: Error calling StartServiceByName for org.freedesktop.impl.portal.desktop.kde: Timeout was reached
Jun 14 13:58:30 ra xdg-desktop-por[1294]: No skeleton to export
Jun 14 13:58:34 ra kernel: rcu_tasks_wait_gp: rcu_tasks grace period number 41 (since boot) is 40200 jiffies old.
Jun 14 13:58:37 ra kernel: usb 1-1: new full-speed USB device number 6 using xhci_hcd
Jun 14 13:58:37 ra kernel: usb 1-1: New USB device found, idVendor=706b, idProduct=0011, bcdDevice= 0.01
Jun 14 13:58:37 ra kernel: usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Jun 14 13:58:37 ra kernel: usb 1-1: Product: ikki68 Aurora
Jun 14 13:58:37 ra kernel: usb 1-1: Manufacturer: wuque studio
Jun 14 13:58:37 ra kernel: input: wuque studio ikki68 Aurora as /devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:07:00.1/usb1/1-1/1-1:1.0/0003:706B:0011.000B/input/input23
Jun 14 13:58:37 ra kernel: hid-generic 0003:706B:0011.000B: input,hidraw0: USB HID v1.11 Keyboard [wuque studio ikki68 Aurora] on usb-0000:07:00.1-1/input0
Jun 14 13:58:37 ra kernel: hid-generic 0003:706B:0011.000C: hiddev96,hidraw1: USB HID v1.11 Device [wuque studio ikki68 Aurora] on usb-0000:07:00.1-1/input1
Jun 14 13:58:37 ra kernel: input: wuque studio ikki68 Aurora Mouse as /devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:07:00.1/usb1/1-1/1-1:1.2/0003:706B:0011.000D/input/input24
Jun 14 13:58:37 ra kernel: input: wuque studio ikki68 Aurora System Control as /devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:07:00.1/usb1/1-1/1-1:1.2/0003:706B:0011.000D/input/i>
Jun 14 13:58:37 ra kernel: input: wuque studio ikki68 Aurora Consumer Control as /devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:07:00.1/usb1/1-1/1-1:1.2/0003:706B:0011.000D/input>
Jun 14 13:58:37 ra kernel: input: wuque studio ikki68 Aurora Keyboard as /devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:07:00.1/usb1/1-1/1-1:1.2/0003:706B:0011.000D/input/input27
Jun 14 13:58:37 ra kernel: hid-generic 0003:706B:0011.000D: input,hidraw3: USB HID v1.11 Mouse [wuque studio ikki68 Aurora] on usb-0000:07:00.1-1/input2
Jun 14 13:58:37 ra mtp-probe[1451]: checking bus 1, device 6: "/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:07:00.1/usb1/1-1"
Jun 14 13:58:37 ra mtp-probe[1451]: bus: 1, device: 6 was not an MTP device
Jun 14 13:58:37 ra systemd-logind[1013]: Watching system buttons on /dev/input/event6 (wuque studio ikki68 Aurora Consumer Control)
Jun 14 13:58:37 ra systemd-logind[1013]: Watching system buttons on /dev/input/event2 (wuque studio ikki68 Aurora)
Jun 14 13:58:37 ra systemd-logind[1013]: Watching system buttons on /dev/input/event4 (wuque studio ikki68 Aurora System Control)
Jun 14 13:58:37 ra systemd-logind[1013]: Watching system buttons on /dev/input/event7 (wuque studio ikki68 Aurora Keyboard)
Jun 14 13:58:37 ra mtp-probe[1486]: checking bus 1, device 6: "/sys/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:07:00.1/usb1/1-1"
Jun 14 13:58:37 ra mtp-probe[1486]: bus: 1, device: 6 was not an MTP device
Jun 14 13:58:40 ra plasma_waitforname[1281]: org.kde.knotifications: WaitForName: Service was not registered within timeout
Jun 14 13:58:40 ra systemd[1244]: dbus-:1.2-org.kde.KSplash@0.service: Main process exited, code=exited, status=1/FAILURE
Jun 14 13:58:40 ra systemd[1244]: dbus-:1.2-org.kde.KSplash@0.service: Failed with result 'exit-code'.
Jun 14 13:58:40 ra systemd[1244]: plasma-ksplash.service: Main process exited, code=killed, status=15/TERM
Jun 14 13:58:40 ra systemd[1244]: plasma-ksplash.service: Failed with result 'timeout'.
Jun 14 13:58:40 ra systemd[1244]: Failed to start Splash screen shown during boot.
Byte-Lab commented 3 weeks ago

Thanks @SQalliT, I'll take a look

Byte-Lab commented 3 weeks ago

Wasn't able to reproduce this on 6.9.3-1 with gnome. Let me see if it happens on 6.9.4, and then also try it with kde.

SQalliT commented 2 weeks ago

@ptr1337 Unfortunately the issue still persists on scx-scheds-git

Daktyl198 commented 2 weeks ago

I have this same issue, but with scx_rustland. The black screen eventually clears itself however.

Additionally, I have general system lag on login when using the systemd service. Stopping the service and restarting it seems to fix the issue. I'm unsure if that's related to this issue, but it seems like it might be.

ptr1337 commented 2 weeks ago

Could you verify if https://github.com/sched-ext/scx/pull/387 helps?

SQalliT commented 2 weeks ago

Could you verify if #387 helps?

Im not sure I follow how to do that, my scx.service is as follows:

[Unit]
Description=Start scx_scheduler
ConditionPathIsDirectory=/sys/kernel/sched_ext
StartLimitIntervalSec=30
StartLimitBurst=2

[Service]
Type=simple
EnvironmentFile=/etc/default/scx
ExecStart=/bin/bash -c 'exec ${SCX_SCHEDULER_OVERRIDE:-$SCX_SCHEDULER} ${SCX_FLAGS_OVERRIDE:-$SCX_FLAGS} '
Restart=on-failure
StandardError=journal
LogNamespace=sched-ext

[Install]
WantedBy=graphical.target
SQalliT commented 2 weeks ago

Could you verify if #387 helps?

Im not sure I follow how to do that, my scx.service is as follows:

[Unit]
Description=Start scx_scheduler
ConditionPathIsDirectory=/sys/kernel/sched_ext
StartLimitIntervalSec=30
StartLimitBurst=2

[Service]
Type=simple
EnvironmentFile=/etc/default/scx
ExecStart=/bin/bash -c 'exec ${SCX_SCHEDULER_OVERRIDE:-$SCX_SCHEDULER} ${SCX_FLAGS_OVERRIDE:-$SCX_FLAGS} '
Restart=on-failure
StandardError=journal
LogNamespace=sched-ext

[Install]
WantedBy=graphical.target
ptr1337 commented 2 weeks ago

Just put following into the service:

[Unit]
Description=Start scx_scheduler
ConditionPathIsDirectory=/sys/kernel/sched_ext
StartLimitIntervalSec=30
StartLimitBurst=2
After=graphical.target

[Service]
Type=simple
EnvironmentFile=/etc/default/scx
ExecStart=/bin/bash -c 'exec ${SCX_SCHEDULER_OVERRIDE:-$SCX_SCHEDULER} ${SCX_FLAGS_OVERRIDE:-$SCX_FLAGS} '
Restart=on-failure
StandardError=journal
LogNamespace=sched-ext

[Install]
WantedBy=multi-user.target
SQalliT commented 2 weeks ago

That seems to have fixed the issue. Thanks for the help

sirlucjan commented 2 weeks ago

Your're welcome

SQalliT commented 2 weeks ago

Sadly I may have jumped the gun, still getting issues:

Jun 25 16:27:29 ra kernel: sched_ext: BPF scheduler "rusty" errored, disabling
Jun 25 16:27:29 ra kernel: sched_ext: runnable task stall (Xwayland[1371] failed to run for 14.157s)
Jun 25 16:27:29 ra kernel:    scx_watchdog_workfn+0x154/0x1e0
Jun 25 16:27:29 ra kernel:    process_one_work+0x18e/0x350
Jun 25 16:27:29 ra kernel:    worker_thread+0x2fa/0x490
Jun 25 16:27:29 ra kernel:    kthread+0xd2/0x100
Jun 25 16:27:29 ra kernel:    ret_from_fork+0x34/0x50
Jun 25 16:27:29 ra kernel:    ret_from_fork_asm+0x1a/0x30

my scx.service is:

[Unit]
Description=Start scx_scheduler
ConditionPathIsDirectory=/sys/kernel/sched_ext
StartLimitIntervalSec=30
StartLimitBurst=2
After=graphical.target

[Service]
Type=simple
EnvironmentFile=/etc/default/scx
ExecStart=/bin/bash -c 'exec ${SCX_SCHEDULER_OVERRIDE:-$SCX_SCHEDULER} ${SCX_FLAGS_OVERRIDE:-$SCX_FLAGS} '
Restart=on-failure
StandardError=journal
LogNamespace=sched-ext

[Install]
WantedBy=multi-user.target
sirlucjan commented 2 weeks ago

Could you add:

[Unit]
Description=Run scx schedulers

[Timer]
OnBootSec=30sec
Unit=scx.service

[Install]
WantedBy=multi-user.target

into /usr/lib/systemd/system/scx.timer (you've create this file) and run

sudo systemctl enable scx.timer

And then try to reboot the system?

Of course, first disable scx.service.

SQalliT commented 2 weeks ago

Still getting:

Jun 25 16:42:53 ra kernel: sched_ext: BPF scheduler "rusty" errored, disabling
Jun 25 16:42:53 ra kernel: sched_ext: runnable task stall (kworker/31:1[311] failed to run for 14.672s)
Jun 25 16:42:53 ra kernel:    scx_watchdog_workfn+0x154/0x1e0
Jun 25 16:42:53 ra kernel:    process_one_work+0x18e/0x350
Jun 25 16:42:53 ra kernel:    worker_thread+0x2fa/0x490
Jun 25 16:42:53 ra kernel:    kthread+0xd2/0x100
Jun 25 16:42:53 ra kernel:    ret_from_fork+0x34/0x50
Jun 25 16:42:53 ra kernel:    ret_from_fork_asm+0x1a/0x30
Jun 25 16:42:53 ra systemd[1]: scx.service: Main process exited, code=exited, status=1/FAILURE
Jun 25 16:42:53 ra systemd[1]: scx.service: Failed with result 'exit-code'.
Jun 25 16:42:54 ra systemd[1]: scx.service: Scheduled restart job, restart counter is at 1.
Jun 25 16:42:54 ra systemd[1]: Started Start scx_scheduler.
Jun 25 16:43:02 ra systemd[1]: systemd-hostnamed.service: Deactivated successfully.
Jun 25 16:43:03 ra xdg-desktop-por[1291]: Failed to create settings proxy: Error calling StartServiceByName for org.freedesktop.impl.portal.desktop.kde: Timeout was reached
Jun 25 16:43:03 ra xdg-desktop-por[1291]: No skeleton to export
Jun 25 16:43:03 ra kernel: rcu_tasks_wait_gp: rcu_tasks grace period number 69 (since boot) is 10086 jiffies old.
Jun 25 16:43:04 ra kernel: sched_ext: BPF scheduler "rusty" errored, disabling
Jun 25 16:43:04 ra kernel: sched_ext: runnable task stall (kworker/31:1[311] failed to run for 10.218s)
Jun 25 16:43:04 ra kernel:    scx_watchdog_workfn+0x154/0x1e0
Jun 25 16:43:04 ra kernel:    process_one_work+0x18e/0x350
Jun 25 16:43:04 ra kernel:    worker_thread+0x2fa/0x490
Jun 25 16:43:04 ra kernel:    kthread+0xd2/0x100
Jun 25 16:43:04 ra kernel:    ret_from_fork+0x34/0x50
Jun 25 16:43:04 ra kernel:    ret_from_fork_asm+0x1a/0x30

scx.service:

[Unit]
Description=Start scx_scheduler
ConditionPathIsDirectory=/sys/kernel/sched_ext
StartLimitIntervalSec=30
StartLimitBurst=2
After=graphical.target

[Service]
Type=simple
EnvironmentFile=/etc/default/scx
ExecStart=/bin/bash -c 'exec ${SCX_SCHEDULER_OVERRIDE:-$SCX_SCHEDULER} ${SCX_FLAGS_OVERRIDE:-$SCX_FLAGS} '
Restart=on-failure
StandardError=journal
LogNamespace=sched-ext

[Install]
WantedBy=multi-user.target

scx.timer:

[Unit]
Description=Run scx schedulers

[Timer]
OnBootSec=30sec
Unit=scx.service

[Install]
WantedBy=graphical.target

Systemctl status':

❯ systemctl status scx.service
● scx.service - Start scx_scheduler
     Loaded: loaded (/usr/lib/systemd/system/scx.service; enabled; preset: disabled)
     Active: active (running) since Tue 2024-06-25 16:43:04 BST; 1min 57s ago
 Invocation: fb432f8e74424d8bb214d8c1437a3081
TriggeredBy: ● scx.timer
   Main PID: 1416 (scx_rusty)
      Tasks: 12 (limit: 38332)
     Memory: 226.9M (peak: 237.7M)
        CPU: 240ms
     CGroup: /system.slice/scx.service
             └─1416 scx_rusty

Jun 25 16:45:02 ra bash[1416]: 15:45:02 [INFO] dir= 1.24 dir_greedy= 0.00 dir_greedy_far= 0.00
Jun 25 16:45:02 ra bash[1416]: 15:45:02 [INFO] dsq=14.46 greedy_local= 0.12 greedy_xnuma= 0.00
Jun 25 16:45:02 ra bash[1416]: 15:45:02 [INFO] kick_greedy= 0.12 rep= 0.00
Jun 25 16:45:02 ra bash[1416]: 15:45:02 [INFO] dl_clamped= 3.96 dl_preset=10.63
Jun 25 16:45:02 ra bash[1416]: 15:45:02 [INFO] slice_length=20000us
Jun 25 16:45:02 ra bash[1416]: 15:45:02 [INFO] direct_greedy_cpumask=0b11111111111111111111111111111111
Jun 25 16:45:02 ra bash[1416]: 15:45:02 [INFO]   kick_greedy_cpumask=0b11111111111111111111111111111111
Jun 25 16:45:02 ra bash[1416]: 15:45:02 [INFO] NODE[00] load=0.04 imbal=+0.00 load_delta=+0.00
Jun 25 16:45:02 ra bash[1416]: 15:45:02 [INFO]   DOMAIN[00] load=0.02 imbal=+0.00 load_delta=+0.00
Jun 25 16:45:02 ra bash[1416]: 15:45:02 [INFO]   DOMAIN[01] load=0.02 imbal=-0.00 load_delta=-0.00

~
❯ systemctl status scx.timer
● scx.timer - Run scx schedulers
     Loaded: loaded (/usr/lib/systemd/system/scx.timer; enabled; preset: disabled)
     Active: active (elapsed) since Tue 2024-06-25 16:42:32 BST; 2min 33s ago
 Invocation: b88a4c8c2e8e4125bedaff148c4a3463
    Trigger: n/a
   Triggers: ● scx.service

Jun 25 16:42:32 ra systemd[1]: Started Run scx schedulers.

~
ptr1337 commented 2 weeks ago

could you share following: systemd-analyze and which CPU you have?

SQalliT commented 2 weeks ago
❯ sudo systemd-analyze
Startup finished in 9.013s (firmware) + 4.127s (loader) + 3.621s (kernel) + 3.292s (userspace) = 20.055s 
graphical.target reached after 3.292s in userspace.

CPU: AMD Ryzen 9 5950X

sirlucjan commented 1 week ago

I have this same issue, but with scx_rustland. The black screen eventually clears itself however.

Additionally, I have general system lag on login when using the systemd service. Stopping the service and restarting it seems to fix the issue. I'm unsure if that's related to this issue, but it seems like it might be.

Does PR #392 make a difference?

Daktyl198 commented 1 week ago

After updating to the git of sched-ext and using the latest version of the .service file, I have no issues anymore. Everything works as expected.

sirlucjan commented 1 week ago

After updating to the git of sched-ext and using the latest version of the .service file, I have no issues anymore. Everything works as expected.

@Daktyl198 So now the question: is it a matter of sched-ext fixes or systemd service.

SQalliT commented 1 week ago

Ive disabled and deleted my scx.timer and scx.service, updated to the newest sched-ext git and re-enabled scx.service, and rebooted. Sadly I am still getting the issue.

htejun commented 6 days ago

@SQalliT if you can reproduce the problem, can you please attach the output of journalctl -u scx.service -b -1? Thanks.