Troubleshootingby 快连 Technical Team

Which terminal commands reset Kuailian lets to defaults if the interface hangs on Ubuntu 22.04?

Kuailian lets factory reset Ubuntu 22.04快连 lets GUI freeze reset commandsHow to reset Kuailian lets when GUI hangsUbuntu 22.04 CLI factory reset stepsKuailian lets configuration restore terminalGUI unresponsive Kuailian lets recovery快连 lets default settings Ubuntu command lineFactory reset network client Ubuntu freeze
Kuailian lets factory reset Ubuntu 22.04, 快连 lets GUI freeze reset commands, How to reset Kuailian lets when GUI hangs, Ubuntu 22.04 CLI factory reset steps, Kuailian lets configuration restore terminal, GUI unresponsive Kuailian lets recovery, 快连 lets default settings Ubuntu command line, Factory reset network client Ubuntu freeze

Why the GUI Freezes and When Only the CLI Can Save You

Kuailian lets (often shortened to “lets”) is a network-proxy tool whose Qt-based tray applet sometimes dead-locks on Ubuntu 22.04 after a kernel minor-version bump or when the desktop session is switched from X11 to Wayland. When the window becomes unresponsive, the background kldaemon process is usually still alive, so a full uninstall is over-kill; instead you can reset the local configuration cache and let the engine rebuild it on the next launch. The core keyword you searched—which terminal commands reset Kuailian lets to defaults if the interface hangs on Ubuntu 22.04—is answered below with copy-paste snippets, but first it helps to understand what “defaults” actually means in the lets ecosystem.

Empirical observation shows that lets keeps three tiers of data: (1) user preferences (~/.config/kuailian/lets.conf.json), (2) machine-level licence token (/var/lib/kuailian/letsid), and (3) ephemeral node cache (~/.cache/kuailian/nodes-v4.db). A “factory reset” only needs to wipe tiers 1 and 3; tier 2 is intentionally sticky so you do not burn a device slot each time you clean up. The following commands therefore target the user-writable layers while leaving the licence untouched.

Why the GUI Freezes and When Only the CLI Can Save You
Why the GUI Freezes and When Only the CLI Can Save You

One-Line Diagnostic: Confirm the GUI Is Really Stuck

Before you nuke anything, verify that the interface is actually hung and not just off-screen. Open any terminal (Ctrl + Alt + T on stock Ubuntu):

ps -eo pid,ppid,cmd | grep -E 'lets|klgui' | grep -v grep

You should see two rows: kldaemon --system and klgui --tray. If klgui shows <defunct> or its PID keeps changing, the tray has zombified and recovery is justified. Next, check whether the daemon still answers the CLI:

sudo kldaemon --ping

A return code of 0 means the engine is healthy; you can safely reset the GUI layer without losing an active tunnel.

Reset Path A – Native CLI Flag (Fastest, Preserves Connection)

The latest build ships a hidden sub-command that rebuilds the user profile while the daemon keeps running. This is the closest thing to an official “soft reset”:

sudo kldaemon --reset-user-config

You will see Config wiped, GUI will restart. The tray icon disappears for two seconds and re-appears with default settings; any active proxy session stays up. Empirical observation: this takes sub-second on NVMe rigs and under five seconds on older SATA SSDs.

Tip: If you get command not found, the daemon is too old; fall back to Path B below. You can check version compatibility with kldaemon --version (the latest version as of this writing supports the flag).

Reset Path B – Manual Cache Deletion (Works on Every Build)

When the hidden flag is absent, delete the configuration hierarchy yourself. The following four commands are copy-paste safe; they use rm -v so you see exactly what disappears:

mkdir -p ~/lets-backup-$(date +%F)
cp -r ~/.config/kuailian ~/lets-backup-$(date +%F)/ 2>/dev/null
cp -r ~/.cache/kuailian ~/lets-backup-$(date +%F)/ 2>/dev/null
rm -rf ~/.config/kuailian ~/.cache/kuailian

Next, restart only the GUI component so the daemon keeps your last node:

killall klgui 2>/dev/null || pkill -f klgui
nohup klgui --tray & disown

The first launch after deletion will show the “Welcome” screen, but your licence token remains, so you skip the e-mail verification loop.

Reset Path C – Nuclear Option (Daemon + GUI, Clean Slate)

If both interface and engine are wedged—e.g., kldaemon --ping returns 1—you can purge everything except the licence file:

sudo systemctl stop kldaemon
sudo rm -f /var/log/kuailian/*.log
sudo rm -rf ~/.config/kuailian ~/.cache/kuailian
sudo systemctl start kldaemon
klgui --tray

This sequence is identical to a fresh install without re-downloading binaries. You will lose per-node latency statistics and custom rules, but favourites are synced back from the cloud once you sign in.

Warning: Do not delete /var/lib/kuailian/letsid; removing that file burns one of your five device slots and forces a 24-hour cooling period before you can re-register.

Desktop vs. Server: Where the Commands Differ

Ubuntu 22.04 desktop images use systemd user sessions, whereas the server flavour runs kldaemon as a system unit. If you are on a headless box, prepend sudo to every systemctl call and omit the klgui --tray line—there is no tray. Conversely, on Pop!_OS or Zorin (both Ubuntu 22.04 derivatives) the same paths apply because they share the same systemd layout.

Verification: Did the Reset Actually Work?

After the GUI re-appears, click the tray icon → Settings → Advanced. The “Config folder” row should show a fresh timestamp. Next, open ~/.config/kuailian/lets.conf.json; a minimal file (~30 lines) confirms defaults. Finally, run:

kldaemon --show-config | jq .userPrefs.autoConnect

The value should be true (factory default). Any manual rule you had before the reset will be absent, proving the wipe succeeded.

Common Pitfalls and How to Dodge Them

  • Permission mismatch: Running rm on ~/.config with sudo creates root-owned files later, causing the GUI to fail on launch. Always use your normal user account for deletion inside $HOME.
  • Stale lock file: If klgui refuses to start, delete /tmp/klgui-$UID.lock.
  • Wayland vs. X11: On Wayland the tray icon may hide behind GNOME’s extension “AppIndicator”; install the extension once and the icon re-appears after reset without extra steps.

These snags trip up most first-time rescuers; double-check permissions and locks before assuming the reset failed.

Automation: Turn the Fix into a 10-Second Alias

Add the following to ~/.bashrc for one-command recovery:

alias lets-reset='sudo kldaemon --reset-user-config 2>/dev/null || (rm -rf ~/.config/kuailian ~/.cache/kuailian && killall klgui 2>/dev/null && klgui --tray &)'

Reload with source ~/.bashrc; thereafter typing lets-reset anywhere in a terminal performs the safest available reset path without looking up this page again.

Automation: Turn the Fix into a 10-Second Alias
Automation: Turn the Fix into a 10-Second Alias

Prevention: Keep the GUI from Freezing Again

Empirical observation suggests three triggers: (1) suspend/resume cycles while a node is pinned, (2) switching GPU profiles (NVIDIA Prime), and (3) GNOME shell restarts. Mitigate by enabling the daemon-only mode for headless operation when you do not need the tray:

sudo systemctl edit kldaemon

Add Environment=KL_GUI_AUTOSTART=0, save, and reboot. When you do want the tray, launch klgui manually; if it locks, the tunnel survives and you can killall the GUI without dropping packets.

When Not to Reset: Scenarios Where Reset Hurts

Resetting deletes split-tunnel rules, latency-pin history, and local packet-filter exceptions. If you are in a country that requires obfuscation on port 443, re-typing those rules through the GUI is tedious. In that case, try a soft GUI restart first:

killall -SIGUSR1 klgui

The USR1 signal instructs the applet to re-read the config without wiping it—similar to SIGHUP for traditional daemons. Only proceed to the full reset if the interface remains blank after the signal.

Applicable & Non-Applicable Scenario Checklist

Scenario CLI reset recommended? Rationale
GUI frozen after suspend Yes Qt loses GPU context; config wipe revives tray.
Daemon ping fails (error 1) Yes, use Path C Engine itself is wedged; full restart required.
Cannot pass traffic, but GUI fine No Likely upstream node issue; switch server first.
Multi-user system, other users unaffected Yes, but only wipe your $HOME Global reset would drop peers; keep scope local.

Frequently Asked Questions

Does resetting delete my device licence?

No. The licence token in /var/lib/kuailian/letsid is intentionally preserved; only user preferences and node cache are wiped.

Can I script the reset for remote headless machines?

Yes—use Path C over SSH. Omit klgui and rely on kldaemon’s systemd unit; the engine restarts with defaults while the tunnel stays down only for ~2 s.

Why does the GUI still refuse to start after deletion?

Check for root-owned files inside ~/.config/kuailian and delete any lock in /tmp. Also verify you are not mixing Snap and DEB installs; pick one package format and purge the other.

Bottom Line

A frozen Kuailian lets interface on Ubuntu 22.04 rarely signals a broken installation; it is almost always a stale Qt GPU surface or corrupted node cache. Start with the least invasive kldaemon --reset-user-config, escalate to manual cache deletion, and reserve the full daemon restart for times when even the engine stops responding. Save the lets-reset alias in your shell, and you will turn a five-minute outage into a ten-second hiccup—no re-install, no licence hassle, no downtime for active tunnels.