Typing Lag Issues on Manjaro XFCE After Installing Development Tools

Hi everyone,

I’m encountering a frustrating issue with my Manjaro XFCE installation, and I’m hoping someone might be able to help. Here’s the situation:

Initially, the system works perfectly fine after a fresh install. However, after installing some basic tools for front-end development like VS Code, Chromium, NvChad, Golang, Node.js, and npm, the system starts to lag—but only when I type. For example:

  • Typing in the terminal or input fields in Firefox causes characters to appear in chunks rather than one by one.
  • The issue worsens if I leave the laptop in sleep mode overnight without shutting it down. After waking it up, it can take up to 20 seconds to display what I’ve typed.
  • Restarting the system temporarily improves the lag but doesn’t fix it completely. Eventually, the lag returns and becomes just as bad.

What I’ve Tried:

  • Switching to different kernels
  • Updating graphics drivers
  • Adjusting system settings

Unfortunately, none of these have resolved the issue. For reference, this laptop worked flawlessly when running Windows, so it seems to be a software-related problem.

My Setup:

  • Laptop: Lenovo IdeaPad with AMD processor and graphics
  • OS: Manjaro XFCE (switched from KDE due to stability issues)
  • nstalled Tools: VS Code, Chromium, NvChad, Golang, Node.js, npm, etc.
  • Behavior: Lag appears only when typing, not in other operations. The mouse is not lagging and opening applications works fine.
  • cpu, gpu and ram are all low and not working at all. While I’m typing this out I can feel the lag kicking in.
ystem:
  Kernel: 6.12.1-4-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 14.2.1
  Desktop: Xfce v: 4.18.1 tk: Gtk v: 3.24.43 wm: xfwm4 dm: LightDM
    Distro: Manjaro base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 83D3 v: IdeaPad Pro 5 14AHP9
    serial: <superuser required> Chassis: type: 10 v: IdeaPad Pro 5 14AHP9
    serial: <superuser required>
  Mobo: LENOVO model: LNVNB161216 v: SDK0T76461 WIN
    serial: <superuser required> part-nu: LENOVO_MT_83D3_BU_idea_FM_IdeaPad Pro
    5 14AHP9 UEFI: LENOVO v: NBCN17WW date: 03/12/2024
Battery:
  ID-1: BAT0 charge: 72.0 Wh (86.0%) condition: 83.7/84.0 Wh (99.6%)
    volts: 17.9 min: 15.6 model: COSMX L23X4PF1 serial: <filter>
    status: charging
  Device-1: hidpp_battery_0 model: Logitech Marathon Mouse/Performance Plus
    M705 serial: <filter> charge: 55% (should be ignored) status: discharging
CPU:
  Info: 8-core model: AMD Ryzen 7 8845HS w/ Radeon 780M Graphics bits: 64
    type: MT MCP arch: Zen 4 rev: 2 cache: L1: 512 KiB L2: 8 MiB L3: 16 MiB
  Speed (MHz): avg: 400 min/max: 400/6681 boost: enabled cores: 1: 400
    2: 400 3: 400 4: 400 5: 400 6: 400 7: 400 8: 400 9: 400 10: 400 11: 400
    12: 400 13: 400 14: 400 15: 400 16: 400 bogomips: 121412
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
  Device-1: Advanced Micro Devices [AMD/ATI] Phoenix3 vendor: Lenovo
    driver: amdgpu v: kernel arch: RDNA-3 pcie: speed: 16 GT/s lanes: 16 ports:
    active: eDP-1 empty: DP-1, DP-2, DP-3, DP-4, DP-5, DP-6, HDMI-A-1,
    Writeback-1 bus-ID: 63:00.0 chip-ID: 1002:1900 temp: 43.0 C
  Device-2: Bison Integrated RGB Camera driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 bus-ID: 3-1:2 chip-ID: 5986:2169
  Display: x11 server: X.org v: 1.21.1.14 compositor: xfwm4 v: 4.18.0
    driver: X: loaded: amdgpu unloaded: modesetting alternate: fbdev,vesa
    dri: radeonsi gpu: amdgpu display-ID: :0.0
    note: <missing: xdpyinfo/xrandr>
  Monitor-1: eDP-1 model: Samsung 0x419f res: 2880x1800 dpi: 242
    diag: 356mm (14")
  API: EGL v: 1.5 platforms: device: 0 drv: radeonsi device: 1 drv: swrast
    gbm: drv: kms_swrast surfaceless: drv: radeonsi x11: drv: radeonsi
    inactive: wayland
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 24.2.8-arch1.1
    glx-v: 1.4 direct-render: yes renderer: AMD Radeon Graphics (radeonsi
    gfx1103_r1 LLVM 18.1.8 DRM 3.59 6.12.1-4-MANJARO) device-ID: 1002:1900
Audio:
  Device-1: Advanced Micro Devices [AMD/ATI] Rembrandt Radeon High Definition
    Audio vendor: Lenovo driver: snd_hda_intel v: kernel pcie: speed: 16 GT/s
    lanes: 16 bus-ID: 63:00.1 chip-ID: 1002:1640
  Device-2: Advanced Micro Devices [AMD] ACP/ACP3X/ACP6x Audio Coprocessor
    vendor: Lenovo driver: snd_pci_ps v: kernel pcie: speed: 16 GT/s lanes: 16
    bus-ID: 63:00.5 chip-ID: 1022:15e2
  Device-3: Advanced Micro Devices [AMD] Family 17h/19h HD Audio
    vendor: Lenovo driver: snd_hda_intel v: kernel pcie: speed: 16 GT/s
    lanes: 16 bus-ID: 63:00.6 chip-ID: 1022:15e3
  API: ALSA v: k6.12.1-4-MANJARO status: kernel-api with: aoss
    type: oss-emulator
  Server-1: JACK v: 1.9.22 status: off
  Server-2: PipeWire v: 1.2.7 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
Network:
  Device-1: MEDIATEK MT7922 802.11ax PCI Express Wireless Network Adapter
    vendor: Lenovo driver: mt7921e v: kernel pcie: speed: 5 GT/s lanes: 1
    bus-ID: 02:00.0 chip-ID: 14c3:0616
  IF: wlp2s0 state: up mac: <filter>
Bluetooth:
  Device-1: Foxconn / Hon Hai Bluetooth 5.2 Adapter [MediaTek MT7922]
    driver: btusb v: 0.8 type: USB rev: 2.1 speed: 480 Mb/s lanes: 1
    bus-ID: 1-5:3 chip-ID: 0489:e0d8
  Report: rfkill ID: hci0 rfk-id: 2 state: down bt-service: enabled,running
    rfk-block: hardware: no software: yes address: see --recommends
Drives:
  Local Storage: total: 953.87 GiB used: 44.74 GiB (4.7%)
  ID-1: /dev/nvme0n1 vendor: Western Digital model: WD PC SN740
    SDDPMQD-1T00-1101 size: 953.87 GiB speed: 63.2 Gb/s lanes: 4
    serial: <filter> temp: 35.9 C
Partition:
  ID-1: / size: 937.53 GiB used: 44.71 GiB (4.8%) fs: ext4 dev: /dev/nvme0n1p2
  ID-2: /boot/efi size: 299.4 MiB used: 32.3 MiB (10.8%) fs: vfat
    dev: /dev/nvme0n1p1
Swap:
  Alert: No swap data was found.
Sensors:
  System Temperatures: cpu: 49.2 C mobo: N/A gpu: amdgpu temp: 43.0 C
  Fan Speeds (rpm): N/A
Info:
  Memory: total: 28 GiB available: 27.21 GiB used: 5.61 GiB (20.6%)
  Processes: 376 Power: uptime: 57m wakeups: 0 Init: systemd v: 256
    default: graphical
  Packages: 1212 pm: pacman pkgs: 1205 pm: snap pkgs: 7 Compilers: N/A
    Shell: Bash v: 5.2.37 running-in: xfce4-terminal inxi: 3.3.36

6.12.1-4-MANJARO

> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
           video-linux            2024.05.06                true            PCI
journalctl -p3 -xb --no-hostname
[mink@mink-83d3 ~]$ journalctl -p3 -xb --no-hostname
Dec 10 13:02:58 kernel: integrity: Problem loading X.509 certificate -74
Dec 10 13:03:01 bluetoothd[880]: Failed to set mode: Failed (0x03)
Dec 10 13:03:29 lightdm[1098]: gkr-pam: unable to locate daemon control file

1 Like

Hi there MrMink… Welcome to the forum :people_hugging:

XFCE is not my area of expertise - but I’m sure if you added some journal to the end of your post it will give someone a headstart.

Formatted as code and possibly Hidden (under the cog at the top of the editor).

journalctl -p3 -xb --no-hostname 
1 Like

Welcome to the Manjaro Community! :smiley:

One thing you could do is to run top in a Terminal window to see what’s hogging the system. I prefer htop but you’d probably need to install that (it’s in the repos).

Although you appear to have plenty of RAM, it’s always recommended to have at least some swap available. This might not fix your issue (but then again, it might!).

2 Likes

Hey,

Thanks for the warm welcome!

This is what I got after running htop in the terminal

bump. This is only getting worse :smiling_face_with_tear: . any help is appreciated

Please don’t do that. See Forum Rules: Bumping.

1 Like

Sorry :pray:

1 Like

Update: I’ve noticed that the typing lag disappears if I keep moving the mouse while typing. When the system gets stuck, I can either wait about 15 seconds or move the mouse using the touchpad, and the text will instantly appear or delete as expected. This is a strange issue I’ve never encountered before.

Install development tools should not impact the overall responsiveness of the system.

Could you please supply a complete list of tools installed in form of a package list?

I have a Plasma system on Lenovo X13 AMD - and I have no issues with development tools.

1 Like

I also noticed that videos, text appearing on screen (chatgpt), selecting text and typing text all lag.

Hey hey good sir,

This site only allows 15 000 lines so I hosted the txt file on this link:

I created a script that runs all the commands that lists the installed packages and outputs it in this txt file. Let me know if this helped.

I cannot use that - a complete wall of text.

Repo packages with install reason explicit

pacman -Qqent

Thirdparty packages

pacman -Qqem
1 Like

Hope this helps:

pacman -Qqent and pacman -Qqem

===== Repo Packages (Explicit) =====
acpi
acpid
adobe-source-sans-fonts
amd-ucode
android-tools
audacious
b43-fwcutter
blueman
chromium
code
cpupower
dmraid
ecryptfs-utils
firefox
fontforge
galculator
gcolor3
glibc-locales
go
gparted
grub-theme-manjaro
gufw
htop
inetutils
intel-ucode
inxi
krita
lib32-mesa-utils
libreoffice-still
lightdm-gtk-greeter-settings
man-pages
manjaro-alsa
manjaro-browser-settings
manjaro-gstreamer
manjaro-hello
manjaro-modem
manjaro-pipewire
manjaro-printer
manjaro-release
manjaro-system
manjaro-wallpapers-18.0
manjaro-xfce-settings
manjaro-zsh-config
memtest86+
memtest86±efi
menulibre
mkinitcpio-openswap
mousepad
mtpfs
mugshot
nano-syntax-highlighting
neovim
network-manager-applet
networkmanager-openconnect
networkmanager-openvpn
networkmanager-pptp
networkmanager-vpnc
nfs-utils
ntp
numlockx
obs-studio
parole
picom
pidgin
plymouth-theme-manjaro
powertop
reiserfsprogs
ristretto
screenfetch
sof-firmware
spectacle
sysfsutils
terminus-font
thunderbird
timeshift-autosnap-manjaro
tmux
ttf-inconsolata
ttf-indic-otf
udiskie
vi
viewnior
vim
vlc
wallpapers-2018
wallpapers-juhraya
xcursor-simpleandsoft
xcursor-vanilla-dmz-aa
xdg-user-dirs
xf86-input-elographics
xf86-input-evdev
xf86-input-void
xf86-video-amdgpu
xf86-video-ati
xf86-video-intel
xf86-video-nouveau
xfburn
xfce4-appfinder
xfce4-artwork
xfce4-battery-plugin
xfce4-clipman-plugin
xfce4-cpufreq-plugin
xfce4-cpugraph-plugin
xfce4-dict
xfce4-diskperf-plugin
xfce4-eyes-plugin
xfce4-fsguard-plugin
xfce4-genmon-plugin
xfce4-mailwatch-plugin
xfce4-mount-plugin
xfce4-mpc-plugin
xfce4-netload-plugin
xfce4-notes-plugin
xfce4-places-plugin
xfce4-power-manager
xfce4-pulseaudio-plugin
xfce4-screenshooter
xfce4-sensors-plugin
xfce4-session
xfce4-settings
xfce4-smartbookmark-plugin
xfce4-systemload-plugin
xfce4-taskmanager
xfce4-terminal
xfce4-time-out-plugin
xfce4-timer-plugin
xfce4-verve-plugin
xfce4-wavelan-plugin
xfce4-weather-plugin
xfce4-whiskermenu-plugin
xfce4-xkb-plugin
xfdesktop
xfwm4-themes
xorg-xkill
yay
yelp

===== Third-Party Packages =====
lib32-libva-vdpau-driver
libva-vdpau-driver
postman-bin

There is nothing in the package list suggesting any issues.

I noted this from your sysinfo and it has been mentioned above

If you have many tabs open in Chromium and Firefox, system performance will suffer.

If you run picom compositor and xfce compositing simultanous, system permformance will suffer. Only one compositor should be active.

I suggest you run

fwupdmgr get-updates

And depending on the result run

fwupdmgr update

Lastly using the 6.12 kernel is the way to go - perhaps latest mainline 6.13 (kernel.org) - but you should remove 6.11 as it is EOL.

I appears as the APU is plagued as I have seen a several forum topics involving Lenovo systems and this APU.

I bought a Tuxedo Pulse system last year with that same APU - and the experience on Manjaro and Tuxedo OS was not great - in fact I RMA’d the system immediately and got refunded.

2 Likes

I used to have 2gb of swap memory but I updated it to 6:

free -h
           total        used        free      shared  buff/cache   available

Mem: 27Gi 8.1Gi 10Gi 346Mi 9.7Gi 19Gi
Swap: 6.0Gi 0B 6.0Gi

Ran fwupdmgr and it updated one thing and didn’t change much.

Something new that might help

To demonstrate the issue, I tried recording my screen using OBS, but strangely, the problem disappears whenever I’m recording or screensharing. Even just having OBS open—without recording—completely removes the lag, as long as I can see the OBS preview. However, as soon as I close OBS, the lag returns. To make the text appear smoothly while typing, I have to keep moving my mouse cursor. i have a theory that this might be something like screen tear.

EUREKA!
It turns out the issue wasn’t that Picom and XFCE were running simultaneously, but rather that I had both installed. By default, XFCE was being used, and each time I booted the system, it defaulted to XFCE’s compositor.

The solution was to edit my .xinitrc file. Initially, it looked like this:

Before
#!/bin/bash
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

SESSION=${1:-xfce-session}

# merge in defaults and keymaps

if [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then
    xrdb -merge "$userresources"
fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
    for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
        [ -x "$f" ] && . "$f"
    done
    unset f
fi

get_session(){
	local dbus_args=(--sh-syntax --exit-with-session)
	case "$1" in
		awesome) dbus_args+=(awesome) ;;
		bspwm) dbus_args+=(bspwm-session) ;;
		budgie) dbus_args+=(budgie-desktop) ;;
		cinnamon) dbus_args+=(cinnamon-session) ;;
		deepin) dbus_args+=(startdde) ;;
		enlightenment) dbus_args+=(enlightenment_start) ;;
		fluxbox) dbus_args+=(startfluxbox) ;;
		gnome) dbus_args+=(gnome-session) ;;
		i3|i3wm) dbus_args+=(i3 --shmlog-size 0) ;;
		jwm) dbus_args+=(jwm) ;;
		kde) dbus_args+=(startplasma-x11) ;;
		lxde) dbus_args+=(startlxde) ;;
		lxqt) dbus_args+=(lxqt-session) ;;
		mate) dbus_args+=(mate-session) ;;
		xfce) dbus_args+=(xfce4-session) ;;
		openbox) dbus_args+=(openbox-session) ;;
		*) dbus_args+=("$1") ;;
	esac

	echo "dbus-launch ${dbus_args[*]}"
}
exec $(get_session "$1")

I updated it to:

After
#!/bin/bash
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

SESSION=${1:-xfce-session}

# Merge in defaults and keymaps

if [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then
    xrdb -merge "$userresources"
fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# Start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
    for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
        [ -x "$f" ] && . "$f"
    done
    unset f
fi

# Disable XFCE's built-in compositor
xfconf-query -c xfwm4 -p /general/use_compositing -s false

# Start Picom as the compositor
picom &

# Function to get the session
get_session(){
    local dbus_args=(--sh-syntax --exit-with-session)
    case "$1" in
        awesome) dbus_args+=(awesome) ;;
        bspwm) dbus_args+=(bspwm-session) ;;
        budgie) dbus_args+=(budgie-desktop) ;;
        cinnamon) dbus_args+=(cinnamon-session) ;;
        deepin) dbus_args+=(startdde) ;;
        enlightenment) dbus_args+=(enlightenment_start) ;;
        fluxbox) dbus_args+=(startfluxbox) ;;
        gnome) dbus_args+=(gnome-session) ;;
        i3|i3wm) dbus_args+=(i3 --shmlog-size 0) ;;
        jwm) dbus_args+=(jwm) ;;
        kde) dbus_args+=(startplasma-x11) ;;
        lxde) dbus_args+=(startlxde) ;;
        lxqt) dbus_args+=(lxqt-session) ;;
        mate) dbus_args+=(mate-session) ;;
        xfce) dbus_args+=(xfce4-session) ;;
        openbox) dbus_args+=(openbox-session) ;;
        *) dbus_args+=("$1") ;;
    esac

    echo "dbus-launch ${dbus_args[*]}"
}

# Start the session
exec $(get_session "$1")

After making these changes and rebooting, everything runs as smooth as butter! :tada:

Quick Test for Readers:

If you think you might have the same issue, you can quickly test this setup without editing .xinitrc by running the following commands in your terminal:

xfconf-query -c xfwm4 -p /general/use_compositing -s false
picom &

If it works, you can make these changes permanent by editing your .xinitrc file as shown above. Hope this helps someone! :blush:

3 Likes

Is supposed to be persistent, and not need to be run every login.
Then autolaunching picom (or even including preliminary xconf command if needed) can be included in autostart any which way. .xinitrc may work, but will not in the case of a wayland session (even if that is a ways off and/or currently requires a different WM). Other options include the built-in XFCE autostart. Though it can sometimes require a certain syntax like

/usr/bin/bash -c '/usr/bin/picom &'

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