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.
> 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
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!).
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.
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.
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!
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:
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