Sluggish program startup since last update

Since the last system update everything is slow to start up (it takes 2 seconds to launch the terminal dropdown for instance) which is infuriating.

Since I don’t know a way to debug this (I tried looking at dmesg), I think I want to downgrade/undo the last update. Why does this command not do what I want it to?

pacman -Q | awk '{print $1}' | xargs | downgrade --cached-only

It prints some unhelpful usage messagr for downgrade.

Please help, I just want a responsive system again without reinstalling the OS. There’s so much I would have to reinstall and re-enter my preferences.

I’m on XFCE.

good startup rant, but you’ve given no info. rather then downgrade perhaps there is a fixable issue.
device?
os desktop version? (gnome,kde,xfce, etc…)

using “time name-of-app” can give actual numbers rather than “it feels slower”, running the app from terminal will output any errors.

there are plenty of drop down terminal, it would be nice to know which 1 your talking about.
i know xfce4-terminal has a drop down mode, are you using xfce4?

Why is everyone always trying to downgrade things instead of trying to fix things with the current versions.

Simply restore from the system-backup you made prior to the update…

1 Like

Because usually it’s unfixable by people themselves. “Someone” has to do the bugfix and release it. Meanwhile it’s easier to just downgrade to last known good version and use that until proper fix is released…

Sorry for the rant, I was fed up. Nothing grinds my gears like an inexplicably slow machine.

I’m on xfce. I checked dmesg, xsession errors, but there’s nothing unusual going on in there. As for opening any program, it just takes 1-2 seconds to come up. Viewnior, thunar, etc. Those aren’t big sluggish programs and it used to be instantaneous.

I’m not sure what kind of info I can provide? Here’s inxi -Fxxxa fwiw

System:    Host: laptop Kernel: 5.10.42-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0 
           parameters: BOOT_IMAGE=/boot/vmlinuz-5.10-x86_64 root=UUID=6728ce00-ce32-457f-8cf7-54d2a6ef37d4 rw quiet 
           cryptdevice=UUID=72aea425-613d-4a0d-a0e2-d679a9e50959:luks-72aea425-613d-4a0d-a0e2-d679a9e50959 
           root=/dev/mapper/luks-72aea425-613d-4a0d-a0e2-d679a9e50959 apparmor=1 security=apparmor udev.log_priority=3 
           Desktop: Xfce 4.16.0 tk: Gtk 3.24.29 info: xfce4-panel wm: xfwm4 vt: 7 dm: LightDM 1.30.0 Distro: Manjaro Linux 
           base: Arch Linux 
Machine:   Type: Laptop System: HP product: HP Pavilion Gaming Laptop 15-ec0xxx v: N/A serial: <superuser required> Chassis: 
           type: 10 serial: <superuser required> 
           Mobo: HP model: 86D6 v: 96.31 serial: <superuser required> UEFI: AMI v: F.05 date: 11/06/2019 
Battery:   ID-1: BAT0 charge: 44.0 Wh (100.0%) condition: 44.0/44.0 Wh (100.0%) volts: 12.7 min: 11.6 
           model: Hewlett-Packard Primary type: Li-ion serial: N/A status: Full cycles: 395 
CPU:       Info: Quad Core model: AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx bits: 64 type: MT MCP arch: Zen/Zen+ 
           note: check family: 17 (23) model-id: 18 (24) stepping: 1 microcode: 8108109 cache: L2: 2 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 33550 
           Speed: 1281 MHz min/max: 1400/2100 MHz boost: enabled Core speeds (MHz): 1: 1281 2: 1256 3: 1389 4: 1325 5: 1360 
           6: 1392 7: 1329 8: 1376 
           Vulnerabilities: Type: itlb_multihit status: Not affected 
           Type: l1tf status: Not affected 
           Type: mds status: Not affected 
           Type: meltdown status: Not affected 
           Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 mitigation: Full AMD retpoline, IBPB: conditional, STIBP: disabled, RSB filling 
           Type: srbds status: Not affected 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: NVIDIA TU116M [GeForce GTX 1660 Ti Mobile] vendor: Hewlett-Packard driver: nvidia v: 465.31 
           alternate: nouveau,nvidia_drm bus-ID: 01:00.0 chip-ID: 10de:2191 class-ID: 0300 
           Device-2: Advanced Micro Devices [AMD/ATI] Picasso vendor: Hewlett-Packard driver: amdgpu v: kernel bus-ID: 05:00.0 
           chip-ID: 1002:15d8 class-ID: 0300 
           Device-3: Quanta HP TrueVision HD Camera type: USB driver: uvcvideo bus-ID: 5-1:2 chip-ID: 0408:5365 class-ID: 0e02 
           Display: x11 server: X.Org 1.20.11 driver: loaded: amdgpu,nvidia display-ID: :0.0 screens: 1 
           Screen-1: 0 s-res: 2560x1440 s-dpi: 96 s-size: 677x381mm (26.7x15.0") s-diag: 777mm (30.6") 
           Monitor-1: HDMI-0 res: 2560x1440 dpi: 93 size: 697x392mm (27.4x15.4") diag: 800mm (31.5") 
           OpenGL: renderer: NVIDIA GeForce GTX 1660 Ti with Max-Q Design/PCIe/SSE2 v: 4.6.0 NVIDIA 465.31 direct render: Yes 
Audio:     Device-1: NVIDIA TU116 High Definition Audio vendor: Hewlett-Packard driver: snd_hda_intel v: kernel 
           bus-ID: 01:00.1 chip-ID: 10de:1aeb class-ID: 0403 
           Device-2: Advanced Micro Devices [AMD] Raven/Raven2/FireFlight/Renoir Audio Processor vendor: Hewlett-Packard 
           driver: N/A alternate: snd_pci_acp3x, snd_rn_pci_acp3x bus-ID: 05:00.5 chip-ID: 1022:15e2 class-ID: 0480 
           Device-3: Advanced Micro Devices [AMD] Family 17h HD Audio vendor: Hewlett-Packard driver: snd_hda_intel v: kernel 
           bus-ID: 05:00.6 chip-ID: 1022:15e3 class-ID: 0403 
           Sound Server-1: ALSA v: k5.10.42-1-MANJARO running: yes 
           Sound Server-2: JACK v: 0.125.0 running: no 
           Sound Server-3: PulseAudio v: 14.2 running: yes 
           Sound Server-4: PipeWire v: 0.3.30 running: no 
Network:   Device-1: Realtek RTL8822CE 802.11ac PCIe Wireless Network Adapter vendor: Hewlett-Packard driver: rtw_8822ce 
           v: N/A modules: rtw88_8822ce port: e000 bus-ID: 03:00.0 chip-ID: 10ec:c822 class-ID: 0280 
           IF: wlo1 state: down mac: d6:17:54:f2:ff:e8 
           Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Hewlett-Packard driver: r8169 v: kernel 
           port: d000 bus-ID: 04:00.0 chip-ID: 10ec:8168 class-ID: 0200 
           IF: eno1 state: up speed: 1000 Mbps duplex: full mac: f8:b4:6a:c1:58:28 
Bluetooth: Device-1: Realtek Bluetooth Radio type: USB driver: btusb v: 0.8 bus-ID: 3-4:3 chip-ID: 0bda:b00c class-ID: e001 
           serial: 00e04c000001 
           Report: rfkill ID: hci0 rfk-id: 1 state: down bt-service: enabled,running rfk-block: hardware: no software: yes 
           address: see --recommends 
Drives:    Local Storage: total: 476.94 GiB used: 198.83 GiB (41.7%) 
           SMART Message: Unable to run smartctl. Root privileges required. 
           ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Intel model: SSDPEKNW512G8H size: 476.94 GiB block-size: physical: 512 B 
           logical: 512 B speed: 31.6 Gb/s lanes: 4 rotation: SSD serial: BTNH94220BF0512A rev: HPS0 temp: 30.9 C scheme: GPT 
Partition: ID-1: / raw-size: 476.64 GiB size: 468.16 GiB (98.22%) used: 198.83 GiB (42.5%) fs: ext4 dev: /dev/dm-0 
           maj-min: 254:0 mapped: luks-72aea425-613d-4a0d-a0e2-d679a9e50959 
           ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%) used: 424 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p1 
           maj-min: 259:1 
Swap:      Alert: No swap data was found. 
Sensors:   System Temperatures: cpu: 64.0 C mobo: 57.0 C 
           Fan Speeds (RPM): N/A 
           GPU: device: nvidia screen: :0.0 temp: 46 C device: amdgpu temp: 64.0 C 
Info:      Processes: 256 Uptime: 40m wakeups: 1 Memory: 13.64 GiB used: 3.95 GiB (29.0%) Init: systemd v: 248 tool: systemctl 
           Compilers: gcc: 11.1.0 alt: 8/9 clang: 12.0.0 Packages: pacman: 1782 lib: 486 flatpak: 0 Shell: Bash v: 5.1.8 
           running-in: xfce4-terminal inxi: 3.3.04 

As deemon said. I’ve done some attempts at trying to narrow it down but I can’t. And there’s so many interactions and dependencies on modern desktop environments that usually I don’t even really know where to start or to go.

Also, from experience I know that a filewise full system backup and restore (copy, then later paste/replace) doesn’t work. It just breaks stuff in weird ways. I can make a disk image, but really? You have to make a full system disk image before doing some updates? That’s an insane ask. I am using ext4, so I don’t have fancy rollback features like on btrfs either. Changing the filesystem would require substantial effort (to reinstall the system).

It does if you create it and restore it properly. Alternatively, there are tools that do this for you such as timeshift.

It is good it didn’t work because if it had worked, it wouldn’t have done what you want. Your packages need to be in sync. They don’t all get updated at the same time so if you downgraded every package one version you would probably have a very broken system.

If you want to rollback to before your update you need to go through the pacman log and only downgrade the packages that were updated since that update.

That being said, is it worth it? What is the plan after that? Are you never going to update again? Unless this is a widespread problem, it may not be fixed in the next update.

Have you tried the obvious things like creating a new user account and seeing if the problem exists in that user as well?

3 Likes

Why would that be obvious? Also, trying to start the programs from a terminal: same delay, no special output.

Edit: just tested with a new user. Issue persists.

Before this, I did sometimes notice firefox was slow to start when running on battery but never when running from wall power. Anyway, I’ve been connected to the wall the entire time.

just wondering, does the normal xfce4-terminal also have a delay or is it only the drop down?

i just can’t comprehend not waiting 2 seconds as an issue.

both terminals. gnome-calculator, thunar, viewnior, screenshooter, settings editor, I think actually every single program has a delay. And it does feel like an issue, it breaks your flow, especially when you are used to a non-sluggish system.

Yeah, probably. Still, a proper bug report with a bit more info than “shit don’t work anymore” would help.

So why don’t tell what you’ve tried so far?
That would be much more productive than this:

If you’d be more polite you’d get more support. :man_shrugging:
I’m out. Good luck.

2 Likes

You’re right about the rant, I’m sorry. Should I edit my post?

sounds like a gtk3 issue.

Have you looked at top or htop for clues?

A recent update for me had a similar slowdown, it turned out to be Baloo file indexer. It was quite slow due to a HDD rather than SSD, and my home having loads of files such as Android sdk.

Baloo came in uninvited on the package update as a dependency of Dolphin file browser.

Check your journalctl for any hints when you open a program.

Does anyone know of a way to do a profiling strace kind of command? That would show where it’s spending its time. edit: Performance analysis with strace - Adfinis.com This might shine some light on the issue. Another tool most likely will be ltrace.

Alternatively if the rolling release experience isn’t for you (such as this) perhaps it’s best switching to a LTS kind of environment like Ubuntu or something. Not a snark - it’s not always trivial solving issues especially when you have pressing work to do, but it’s also not fair to come and rant about things not working because this is what you signed up for.

It’s not insane, it’s actually an outstanding advice. Creating an image with for example fsarchiver takes several minutes, some more to restore an image.
Compare that to the time your wasted tinkering around with downgrade and waiting for replies.

I’ve opened vienior with strace and it’s working a good 2 seconds just open()ing and close()ing /usr/share files it seems, and a large amount of futex(0x7f6a62024068, FUTEX_WAKE_PRIVATE, 2147483647) = 0

I can’t upload it to pastebin sadly, because it’s 1.5mb.

Also, to be fair, I am on the stable branch. But maybe you’re right, and Manjaro isn’t right for my need.

I just tried on mine and I get similar. Please try with strace -c and ctrl+c as soon as the program loads.

↳ strace -c viewnior
^Cstrace: Process 107262 detached
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 41.57    0.006250          21       293         1 futex
 22.89    0.003442          12       271       157 recvmsg
 10.12    0.001521           6       218         1 poll
  9.42    0.001416           1       888       700 newfstatat
  5.02    0.000755           2       260       107 openat
  1.98    0.000297           0       342        67 access
  1.72    0.000258           0       397           mmap
  1.62    0.000243           3        79           writev
  1.36    0.000205           0       224           read
  0.67    0.000101           0       156           close
  0.64    0.000096           0       128           mprotect
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 88,22    0,418351          88      4740           getdents64
  3,81    0,018046           2      6330      1716 newfstatat
  1,84    0,008706           3      2495       119 openat
  1,64    0,007794          22       345         6 futex
  1,58    0,007479           3      2378           close
  0,74    0,003503           3       922           brk
  0,74    0,003496           7       474           mmap
  0,31    0,001476           4       338        61 access
  0,30    0,001435           9       148           mprotect
  0,22    0,001027           4       240           poll
  0,20    0,000937           3       286           read
  0,08    0,000380           2       149        36 recvmsg
  0,07    0,000313           3       101           writev
  0,06    0,000272          10        27           write
  0,04    0,000190          19        10           clone
  0,04    0,000176          29         6           shmget
  0,01    0,000067           2        23           rt_sigprocmask
  0,01    0,000051           1        37           statx
  0,01    0,000049          12         4           munmap
  0,01    0,000047           7         6           eventfd2
  0,01    0,000045          15         3           connect
  0,01    0,000045           1        24           fcntl
  0,01    0,000036           1        20           getpid
  0,01    0,000036          12         3           socket
  0,01    0,000034           4         7         1 recvfrom
  0,01    0,000026           5         5         1 sendto
  0,00    0,000020           3         6           shmat
  0,00    0,000020           1        12         4 readlink
  0,00    0,000019           1        15           pread64
  0,00    0,000012           2         5           rt_sigaction
  0,00    0,000009           1         5           uname
  0,00    0,000009           9         1           sched_setattr
  0,00    0,000008           1         6           shmctl
  0,00    0,000008           8         1           sendmsg
  0,00    0,000008           8         1           getpeername
  0,00    0,000008           1         6         4 prctl
  0,00    0,000007           3         2           geteuid
  0,00    0,000007           7         1           gettid
  0,00    0,000006           2         3           lseek
  0,00    0,000006           3         2           getegid
  0,00    0,000006           6         1           sched_getattr
  0,00    0,000005           1         4           fstat
  0,00    0,000005           5         1           getsockname
  0,00    0,000005           2         2         2 mkdir
  0,00    0,000005           5         1           pipe2
  0,00    0,000005           5         1           memfd_create
  0,00    0,000004           2         2         1 arch_prctl
  0,00    0,000003           3         1           getrandom
  0,00    0,000002           2         1           setsockopt
  0,00    0,000002           2         1           ftruncate
  0,00    0,000002           1         2           umask
  0,00    0,000002           1         2           getuid
  0,00    0,000001           1         1           getgid
  0,00    0,000000           0         1           mremap
  0,00    0,000000           0         1           execve
  0,00    0,000000           0         2           shmdt
  0,00    0,000000           0         1           set_tid_address
  0,00    0,000000           0         1           set_robust_list
  0,00    0,000000           0         1           prlimit64
------ ----------- ----------- --------- --------- ----------------
100,00    0,474211          24     19214      1951 total

It says 0.5 seconds, but I actually timed it, it’s closer to 2 seconds.

Mine shows:
0.49 0.000073 2 26 getdents64

I do a tiny fraction of that call (listing directories) getdents64(2): directory entries - Linux man page

I, uhmm, am not sure where to go from here, but I think this could be the problem, which might be filesystem related?