Boot delay troubleshooting and fix (pmouse)

Hi all, since a week or 2 after a kernel update i had alot of weird boots delays. After some digging and using ChatGPT to rule things out “we” managed to track down the issue. Anyone knows what got changed in the kernel ? i never got this issue before.

Here are the results, maybe someone has the same issue and can make use of this post.

EndeavourOS – MSI Crosshair 15 boot delay troubleshooting and fix

System

  • Laptop: MSI Crosshair 15 B12UGSZ
  • OS: EndeavourOS / Arch Linux
  • Kernel: 7.2.7-arch1-1
  • Initramfs: dracut 112
  • NVIDIA driver: 615.71.09
  • Storage: 2× Samsung 990 PRO 4 TB
  • Bootloader: systemd-boot
  • Desktop: KDE Wayland
  • Touchpad: I²C, disabled
  • Mouse: USB G5 mouse

1. Identify the boot delay

The laptop originally took approximately 21 seconds to boot.

We checked the boot time with:

systemd-analyze

Original result:

Startup finished in 5.409s (firmware)
+ 0.842s (loader)
+ 1.981s (kernel)
+ 8.353s (initrd)
+ 4.557s (userspace)
= 21.145s

The main problem was clearly the 8.353 seconds spent in the initrd.


2. Inspect the boot log

We checked the boot log with:

journalctl -b 0 -o short-monotonic --no-pager

The important messages were related to psmouse and serio1.

For example:

psmouse serio1: Failed to reset mouse on isa0060/serio1: -71

Later:

psmouse serio1: Failed to deactivate mouse on isa0060/serio1: -71

and:

psmouse serio1: Failed to enable mouse on isa0060/serio1

The timing showed that the PS/2 mouse initialization was taking several seconds.

A PS/2 Generic Mouse was eventually detected as well.


3. Check which input devices are actually present

We checked the input devices with:

cat /proc/bus/input/devices | grep -A6 -B2 -i 'mouse\|ps/2'

The system has:

USB mouse

USB Optical Mouse
Vendor=30fa Product=0400

This is the USB G5 mouse.

I²C touchpad

MSNB0001:00 06CB:7E7E Mouse

This is the laptop’s I²C touchpad.

PS/2 mouse

The problematic device appeared as:

PS/2 Generic Mouse

This was associated with the serio1 interface and psmouse.


4. Check the input device nodes

We also checked:

ls -l /sys/class/input/

Before the fix, a PS/2 mouse device was present as a mouse3 device.

The important distinction was:

serio0 → PS/2/AT keyboard
serio1 → PS/2 mouse

We did not want to disable the entire i8042 controller because the keyboard still uses serio0.


5. Check the psmouse module

We inspected the module with:

modinfo psmouse

and checked whether it was loaded:

lsmod | grep psmouse

It showed:

psmouse 245760 0

This confirmed that the Linux psmouse driver was loaded.


6. Perform a temporary test

Before making any permanent changes, we tested whether psmouse was actually responsible for the delay.

A temporary kernel parameter was added during boot:

modprobe.blacklist=psmouse

After booting, we verified it with:

cat /proc/cmdline

and:

lsmod | grep psmouse

The latter returned no output.

We then measured the boot time again:

systemd-analyze

The initrd time dropped from approximately:

8.35 seconds

to approximately:

2.89 seconds

This was the decisive test.

The temporary psmouse blacklist removed roughly 5.5 seconds from the initrd boot time.


7. Make the fix permanent with dracut

Because the system uses dracut, we did not modify mkinitcpio.

We created:

sudo nano /etc/dracut.conf.d/20-no-psmouse.conf

The file contains:

omit_drivers+=" psmouse "

This tells dracut:

Do not include the psmouse module in the initramfs.

The kernel module itself was not removed from the system.


8. Rebuild the kernel/initramfs

We rebuilt the kernel images with:

sudo reinstall-kernels

The output included:

Installing kernel 7.2.7-arch1-1

9. Verify that psmouse was removed from the initramfs

First we located the correct initramfs:

find /efi -name 'initrd*' -o -name '*7.2.7*'

The normal initramfs was:

/efi/38fdd1fb90724b55b7ba0eb5f909633d/7.2.7-arch1-1/initrd

We then checked its contents:

sudo lsinitrd /efi/38fdd1fb90724b55b7ba0eb5f909633d/7.2.7-arch1-1/initrd | grep psmouse

There was no output.

This confirmed that psmouse was no longer included in the normal initramfs.


10. Reboot and measure the result

After rebooting, we ran:

systemd-analyze

The new result was:

Startup finished in 5.578s (firmware)
+ 733ms (loader)
+ 1.849s (kernel)
+ 2.880s (initrd)
+ 3.848s (userspace)
= 14.890s

Comparison:

Component Before After
Firmware 5.409 s 5.578 s
Loader 0.842 s 0.733 s
Kernel 1.981 s 1.849 s
Initrd 8.353 s 2.880 s
Userspace 4.557 s 3.848 s
Total 21.145 s 14.890 s

The total boot time improved by approximately:

21.145 - 14.890 = 6.255 seconds

So the laptop now boots approximately 6.3 seconds faster.


11. Verify that the psmouse errors are gone

We checked the new boot log with:

journalctl -b 0 -o short-monotonic --no-pager | grep -E 'psmouse|serio1|dracut'

The dracut initqueue now completed much earlier:

2.444789 Starting dracut initqueue hook
4.476815 Finished dracut initqueue hook

There were no longer any psmouse or serio1 errors.


12. Check why psmouse still appears in lsmod

After the reboot:

lsmod | grep psmouse

still showed:

psmouse 245760 0

We investigated this rather than immediately changing anything.

First:

systemctl status systemd-modules-load.service --no-pager

It showed:

Active: active (exited)
status=0/SUCCESS

Then:

journalctl -b 0 | grep -i psmouse

returned no output.

And:

grep -Rni psmouse /etc/modprobe.d /etc/modules-load.d 2>/dev/null

also returned no output.

So there was no explicit configuration loading psmouse.


13. Check the actual input devices again

We ran:

cat /proc/bus/input/devices | grep -A6 -B2 -i 'mouse\|ps/2'

The current mouse devices were:

mouse0 → USB Optical Mouse
mouse1 → I²C touchpad
mouse2 → I²C touchpad

There was no mouse3 anymore.

We also checked:

ls -l /sys/class/input/

and confirmed that only:

mouse0
mouse1
mouse2

were present.

The old PS/2 Generic Mouse device was gone.

The PS/2 keyboard was still present through:

i8042/serio0

so the keyboard was unaffected.


Final result

The original boot problem was caused by the PS/2 mouse / psmouse initialization on serio1 during the dracut/initramfs stage.

The problematic sequence was essentially:

i8042
 ├── serio0 → keyboard → OK
 └── serio1 → PS/2 mouse → psmouse errors/delay

The permanent solution was:

/etc/dracut.conf.d/20-no-psmouse.conf

containing:

omit_drivers+=" psmouse "

followed by:

sudo reinstall-kernels

The result was:

21.145 seconds → 14.890 seconds

or approximately:

6.3 seconds faster boot time.

The initrd itself improved from:

8.353 seconds → 2.880 seconds

The USB mouse, keyboard and other input devices remain functional.


Commands used for the final fix

The essential commands were:

systemd-analyze
journalctl -b 0 -o short-monotonic --no-pager
modinfo psmouse
lsmod | grep psmouse

Temporary test:

modprobe.blacklist=psmouse

Permanent configuration:

sudo nano /etc/dracut.conf.d/20-no-psmouse.conf

with:

omit_drivers+=" psmouse "

Rebuild:

sudo reinstall-kernels

Verify initramfs:

sudo lsinitrd /efi/38fdd1fb90724b55b7ba0eb5f909633d/7.2.7-arch1-1/initrd | grep psmouse

Verify after reboot:

lsmod | grep psmouse
journalctl -b 0 -o short-monotonic --no-pager | grep -E 'psmouse|serio1|dracut'

And finally:

cat /proc/bus/input/devices | grep -A6 -B2 -i 'mouse\|ps/2'
ls -l /sys/class/input/

Final status: problem solved.

Very nice methodology! Glad you got to the bottom of your lag. I have the opposite problem on my desktop system, all my delay is in the firmware (12s before I even see the boot menu), although I can shave a few seconds off the initrd times. When I find some free time I’ll dig into optimizing.

Startup finished in 12.786s (firmware)
+5.653s (loader) 
+548ms (kernel)
+7.229s (initrd)
+3.877s (userspace) = 30.095s

My laptop has a very different boot sequence where there’s a huge delay in the userspace. Interesting…

Startup finished in 7.855s (firmware) 
+ 3.858s (loader) 
+ 1.669s (kernel) 
+ 1.685s (initrd) 
+ 21.231s (userspace) = 36.299s