Boot slow since latest update, related to USB hub

Hi,

I have used manjaro for a few months now, and I have liked the experience so far. It’s been a bit messy since I have a pretty old integrated/dedicated graphics card combo in my laptop (ASUS N56VB), but these days I’m on the 5.10 kernel using the latest Nvidia 460 drivers, completely bypassing the integrated graphics. This seems to work, and since I’ve had some glitches and trouble with it, I don’t know if it’s related to the following problem.

I have a laptop, but I use it as a desktop. This means I have a USB hub connected to it, to which everything is connected. Mouse, keyboard, usb ethernet, usb sound card, wireless headset dongle, usb webcam… Simply because the laptop doesn’t have enough outputs, but also so that if I need to take the laptop anywhere, I can unplug the one usb cable and be done.

However, since yesterday’s (20-1-2021) update, my boot time has become considerably longer. The boot seems normal, but right before I see the sign in screen, I see a black screen with a mouse pointer. After a while, the sign in screen pops up, but I can only use my laptop’s keyboard to log in. Then during that process and after the desktop has appeared, my USB devices slowly come alive.
If I simply disconnect the USB hub, I don’t have to wait at the black screen, and the sign in screen becomes available immediately, as it has before. Nor have I experienced the USB hub being this slow before.

This is systemd-analyze blame without the usb hub

4.341s optimus-manager.service                                                  
1.446s systemd-random-seed.service                                              
 691ms tlp.service                                                              
 557ms var-lib-snapd-snap-snapd-10707.mount                                     
 554ms var-lib-snapd-snap-runescape-43.mount                                    
 551ms var-lib-snapd-snap-core18-1944.mount                                     
 513ms apparmor.service                                                         
 489ms var-lib-snapd-snap-core-10583.mount                                      
 481ms var-lib-snapd-snap-core-10577.mount                                      
 479ms lvm2-monitor.service                                                     
 472ms var-lib-snapd-snap-snapd-10492.mount                                     
 469ms var-lib-snapd-snap-gtk\x2dcommon\x2dthemes-1514.mount                    
 469ms var-lib-snapd-snap-spotify-43.mount                                      
 465ms var-lib-snapd-snap-runescape-42.mount                                    
 423ms var-lib-snapd-snap-core18-1932.mount                                     
 417ms var-lib-snapd-snap-gnome\x2d3\x2d28\x2d1804-145.mount                    
 364ms snapd.service                                                            
 316ms dev-sda2.device                                                          
 243ms dev-loop2.device                                                         
 238ms cups.service                                                             
 227ms dev-loop0.device                                                         
 214ms upower.service                                                           
 164ms polkit.service                                                           
 160ms dev-loop1.device                                                         
 158ms user@1000.service                                                        
 143ms systemd-udevd.service                                                    
 142ms dev-loop3.device                                                         
 132ms systemd-tmpfiles-clean.service                                           
 113ms avahi-daemon.service                                                     
 110ms boot-efi.mount                    
etc...

This is systemd-analyze blame with the usb hub connected

58.629s upower.service                                                           
 4.361s optimus-manager.service                                                  
 1.603s systemd-random-seed.service                                              
  686ms tlp.service                                                              
  557ms var-lib-snapd-snap-runescape-42.mount                                    
  544ms var-lib-snapd-snap-spotify-43.mount                                      
  486ms lvm2-monitor.service                                                     
  485ms apparmor.service                                                         
  483ms var-lib-snapd-snap-gtk\x2dcommon\x2dthemes-1514.mount                    
  479ms var-lib-snapd-snap-snapd-10492.mount                                     
  472ms var-lib-snapd-snap-snapd-10707.mount                                     
  413ms var-lib-snapd-snap-runescape-43.mount                                    
  411ms var-lib-snapd-snap-core-10577.mount                                      
  404ms var-lib-snapd-snap-core18-1944.mount                                     
  402ms var-lib-snapd-snap-gnome\x2d3\x2d28\x2d1804-145.mount                    
  385ms var-lib-snapd-snap-core-10583.mount                                      
  383ms var-lib-snapd-snap-core18-1932.mount                                     
  380ms snapd.service                                                            
  379ms dev-sda2.device                                                          
  265ms ldconfig.service                                                         
  236ms cups.service                                                             
  168ms user@1000.service                                                        
  164ms dev-loop1.device                                                         
  163ms polkit.service                                                           
  152ms dev-loop0.device                                                         
  141ms dev-loop4.device                                                         
  124ms systemd-udevd.service                                                    
  121ms dev-loop3.device                                                         
  119ms dev-loop2.device                                                         
  111ms avahi-daemon.service        
etc...

upon searching I’ve seen others request systemd-analyze critical chain to resolve problems with upower.service. However, mine doesn’t seem to show anything relevant:

$ systemd-analyze critical-chain upower.service
The time when unit became active or started is printed after the "@" character.
The time the unit took to start is printed after the "+" character.

upower.service +58.384s
└─basic.target @1.907s
  └─sockets.target @1.907s
    └─snapd.socket @1.906s +647us
      └─sysinit.target @1.903s
        └─systemd-backlight@backlight:intel_backlight.service @1.817s +86ms
          └─system-systemd\x2dbacklight.slice @1.286s
            └─system.slice @411ms
              └─-.slice @411ms

The problem obviously lies in the upower service, but I can’t figure out what it is, or why it has become an issue yesterday.
Also, I don’t know why optimus-manager is running, as I assume I just ran the graphics card directly.

I would appreciate any pointers or help. Thanks in advance.

Okay, I’m super confused now.
The good news is that the issue is resolved.

I wanted to try and single out what the problem was. So I disconnected everything from the hub and connected the hub only. The boot was fast, as usual.
Then one by one, I connected all devices making sure to connect them to the same port they were in, and rebooted every time. But the boot remained fast.
Now, I am exactly in the position I was before. The same USB hub, same devices connected to the same ports, and my boot time is still as quick as it has always been before yesterday.

The only thing I can think of is a fault in one of the devices. And since the USB hub is receiving external power, the USB devices are always powered, even if my PC is off. This allowed the fault to persist. And now, after manually disconnecting everything, it has reset. Maybe simply power cycling the USB hub would have been enough, who knows…

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.