keyboard
keyboard copied to clipboard
Excessive VRAM usage on Nvidia GPU
On my work laptop that uses an Nvidia GPU, Maliit is using 374 MB VRAM, even when it's just idle (i.e. I don't actually have the virtual keyboard open):
% sudo nvidia-smi
Wed Jul 17 17:45:08 2024
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 555.58.02 Driver Version: 555.58.02 CUDA Version: 12.5 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 3050 ... Off | 00000000:01:00.0 On | N/A |
| N/A 66C P3 12W / 35W | 2059MiB / 4096MiB | 17% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| 0 N/A N/A 156666 G /usr/bin/kwin_wayland 95MiB |
| 0 N/A N/A 156783 G /usr/bin/maliit-keyboard 370MiB |
| 0 N/A N/A 156796 G /usr/bin/Xwayland 62MiB |
| 0 N/A N/A 156839 G /usr/bin/ksmserver 1MiB |
| 0 N/A N/A 156841 G /usr/bin/kded6 1MiB |
| 0 N/A N/A 156850 G /usr/bin/plasmashell 290MiB |
| 0 N/A N/A 156896 G /usr/libexec/kactivitymanagerd 1MiB |
| 0 N/A N/A 156942 G ...6/polkit-kde-authentication-agent-1 1MiB |
| 0 N/A N/A 156943 G /usr/libexec/org_kde_powerdevil 1MiB |
| 0 N/A N/A 156947 G /usr/libexec/xdg-desktop-portal-kde 1MiB |
| 0 N/A N/A 157089 G kdeconnectd 1MiB |
| 0 N/A N/A 157202 C+G /usr/bin/xwaylandvideobridge 15MiB |
| 0 N/A N/A 157238 G /usr/bin/kaccess 1MiB |
| 0 N/A N/A 157240 G /usr/libexec/DiscoverNotifier 1MiB |
| 0 N/A N/A 157611 G /usr/lib64/firefox/firefox 340MiB |
| 0 N/A N/A 158047 G /usr/bin/kwalletd6 1MiB |
| 0 N/A N/A 158139 G ...bin/plasma-browser-integration-host 1MiB |
| 0 N/A N/A 158567 G /usr/libexec/baloorunner 1MiB |
| 0 N/A N/A 159072 G ...ec_t%2C iptables_exec_t%2C iptables 1MiB |
| 0 N/A N/A 159381 G ...bin/plasma-browser-integration-host 1MiB |
| 0 N/A N/A 159817 G ...erProcess --variations-seed-version 288MiB |
| 0 N/A N/A 161601 G /usr/bin/konsole 1MiB |
+-----------------------------------------------------------------------------------------+
This particular system only has 4GB VRAM, which means that Maliit is using nearly 10% of it. I'm not actually using Maliit, and disabling it in System Settings → Keyboard → Virtual Keyboard freed the VRAM.
This is an issue for GPUs with low VRAM because Nvidia's Linux drivers don't share system RAM, so hitting the VRAM limit often crashes the Xwayland process if not the entire desktop environment.
Environment:
- Lenovo X1 Extreme Gen 5
- Nvidia 3050Ti GPU with 4GB RAM
- Fedora 40
- Nvidia driver 555.58.02
the issue is the same on AMD, I just disabled the onscreen keyboard as I don't actively use it