<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Electron on Daniel Zhang</title><link>https://zhangdapeng.dev/tags/electron/</link><description>Recent content in Electron on Daniel Zhang</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Mon, 09 Nov 2026 10:24:00 +0800</lastBuildDate><atom:link href="https://zhangdapeng.dev/tags/electron/index.xml" rel="self" type="application/rss+xml"/><item><title>Fix Blurry Icons and Input Method Issues in Linux QQ 3.2.35 on Ubuntu KDE</title><link>https://zhangdapeng.dev/p/fix-blurry-icons-and-input-method-issues-in-linux-qq-3.2.35-on-ubuntu-kde/</link><pubDate>Mon, 09 Nov 2026 10:24:00 +0800</pubDate><guid>https://zhangdapeng.dev/p/fix-blurry-icons-and-input-method-issues-in-linux-qq-3.2.35-on-ubuntu-kde/</guid><description>&lt;img src="https://zhangdapeng.dev/p/fix-blurry-icons-and-input-method-issues-in-linux-qq-3.2.35-on-ubuntu-kde/cover.png" alt="Featured image of post Fix Blurry Icons and Input Method Issues in Linux QQ 3.2.35 on Ubuntu KDE" /&gt;&lt;p&gt;After installing &lt;strong&gt;Linux QQ 3.2.35&lt;/strong&gt; on an Ubuntu system running the KDE desktop environment, some users may encounter an annoying display issue: avatars, icons, and images in chat windows appear blurry or heavily pixelated.&lt;/p&gt;
&lt;p&gt;Things can become even more frustrating when trying to fix the problem by changing Electron&amp;rsquo;s graphics backend or scaling parameters. The images become sharper, but the input method stops working. After restoring input method support, the display may occasionally become blurry again.&lt;/p&gt;
&lt;p&gt;This guide documents the troubleshooting process and presents two possible solutions for running Linux QQ under X11 (Xwayland) or native Wayland.&lt;/p&gt;
&lt;h2 id="1-understanding-the-problem"&gt;1. Understanding the Problem
&lt;/h2&gt;&lt;p&gt;Linux QQ 3.2.35 is built on Electron. Its rendering behavior, display scaling, and input method support depend on the interaction between Electron, the graphics backend, and the desktop environment.&lt;/p&gt;
&lt;p&gt;On Ubuntu KDE, two areas are particularly worth investigating.&lt;/p&gt;
&lt;h3 id="11-x11-mode-clear-images-but-potential-input-method-issues"&gt;1.1 X11 Mode: Clear Images but Potential Input Method Issues
&lt;/h3&gt;&lt;p&gt;You can force Electron to use X11 with the following launch argument:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;--ozone-platform&lt;span class="o"&gt;=&lt;/span&gt;x11
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In my testing environment, this mode resolved the blurry avatar and icon issue.&lt;/p&gt;
&lt;p&gt;However, when running an X11 application inside a KDE Wayland session, input method support also depends on the environment configuration between Xwayland and Fcitx5 or IBus.&lt;/p&gt;
&lt;p&gt;If the relevant environment variables are missing or incorrectly configured, the application may fail to activate the input method when typing.&lt;/p&gt;
&lt;h3 id="12-wayland-mode-working-input-methods-but-occasional-blurring"&gt;1.2 Wayland Mode: Working Input Methods but Occasional Blurring
&lt;/h3&gt;&lt;p&gt;To run QQ using the native Wayland backend, you can try:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;--ozone-platform&lt;span class="o"&gt;=&lt;/span&gt;wayland
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This mode can provide better integration with the Wayland input method protocol.&lt;/p&gt;
&lt;p&gt;However, additional non-integer scaling parameters, such as:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;--force-device-scale-factor&lt;span class="o"&gt;=&lt;/span&gt;1.25
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;may cause inconsistencies between Electron&amp;rsquo;s device scale factor and the desktop&amp;rsquo;s actual display scaling, especially on a standard-resolution monitor configured for 100% scaling.&lt;/p&gt;
&lt;p&gt;Depending on the Electron version and graphics environment, this may introduce unnecessary image resampling or texture-size mismatches, potentially causing avatars and icons to become blurry during certain rendering updates.&lt;/p&gt;
&lt;p&gt;If your display is configured for 100% scaling, it is worth restoring the device scale factor to &lt;code&gt;1.0&lt;/code&gt; before investigating other causes.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="2-solution-1-use-x11-mode-recommended-first"&gt;2. Solution 1: Use X11 Mode (Recommended First)
&lt;/h2&gt;&lt;p&gt;If your primary concern is blurry avatars, icons, and images, try running QQ in X11 mode first.&lt;/p&gt;
&lt;p&gt;Under KDE Wayland, X11 applications generally run through Xwayland. To restore input method support, configure the appropriate environment variables for your input method framework.&lt;/p&gt;
&lt;h3 id="21-for-fcitx5-users"&gt;2.1 For Fcitx5 Users
&lt;/h3&gt;&lt;p&gt;Open a terminal and run:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;GTK_IM_MODULE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;fcitx &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;QT_IM_MODULE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;fcitx &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;XMODIFIERS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;@im&lt;span class="o"&gt;=&lt;/span&gt;fcitx &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;qq --ozone-platform&lt;span class="o"&gt;=&lt;/span&gt;x11 --app-id&lt;span class="o"&gt;=&lt;/span&gt;qq
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="22-for-ibus-users"&gt;2.2 For IBus Users
&lt;/h3&gt;&lt;p&gt;If you use IBus instead, run:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;GTK_IM_MODULE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;ibus &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;QT_IM_MODULE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;ibus &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;XMODIFIERS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;@im&lt;span class="o"&gt;=&lt;/span&gt;ibus &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;qq --ozone-platform&lt;span class="o"&gt;=&lt;/span&gt;x11 --app-id&lt;span class="o"&gt;=&lt;/span&gt;qq
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Verify the results:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Does QQ launch successfully?&lt;/li&gt;
&lt;li&gt;Are avatars and icons displayed clearly?&lt;/li&gt;
&lt;li&gt;Can you switch input methods and type Chinese normally?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If all three checks pass, you can make the configuration permanent by modifying the desktop launcher.&lt;/p&gt;
&lt;h3 id="23-permanently-modify-the-desktop-launcher"&gt;2.3 Permanently Modify the Desktop Launcher
&lt;/h3&gt;&lt;p&gt;First, find the actual QQ executable path:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;command&lt;/span&gt; -v qq
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If the output is &lt;code&gt;/usr/local/bin/qq&lt;/code&gt;, edit the system desktop entry:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo nano /usr/share/applications/qq.desktop
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Find the line beginning with &lt;code&gt;Exec=&lt;/code&gt; and replace it with the following Fcitx5 configuration:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-ini" data-lang="ini"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="na"&gt;Exec&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;env GTK_IM_MODULE=fcitx QT_IM_MODULE=fcitx XMODIFIERS=@im=fcitx /usr/local/bin/qq --ozone-platform=x11 --app-id=qq %U&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For IBus users, replace the three environment variable values with their corresponding IBus settings.&lt;/p&gt;
&lt;p&gt;Save the file and launch QQ again from the KDE application menu.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The location of the &lt;code&gt;.desktop&lt;/code&gt; file and the executable path may vary depending on how QQ was installed. Check the actual launcher location before editing it to avoid creating duplicate application entries.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="3-solution-2-use-native-wayland-mode"&gt;3. Solution 2: Use Native Wayland Mode
&lt;/h2&gt;&lt;p&gt;If you prefer running QQ natively on Wayland rather than through Xwayland, try adjusting Electron&amp;rsquo;s launch parameters.&lt;/p&gt;
&lt;h3 id="31-update-the-launch-command"&gt;3.1 Update the Launch Command
&lt;/h3&gt;&lt;p&gt;Run:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;qq &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; --enable-features&lt;span class="o"&gt;=&lt;/span&gt;UseOzonePlatform &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; --ozone-platform&lt;span class="o"&gt;=&lt;/span&gt;wayland &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; --wayland-text-input-version&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; --force-device-scale-factor&lt;span class="o"&gt;=&lt;/span&gt;1.0 &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; --app-id&lt;span class="o"&gt;=&lt;/span&gt;qq
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The most important parameter to pay attention to is:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;--force-device-scale-factor&lt;span class="o"&gt;=&lt;/span&gt;1.0
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="32-why-use-a-scale-factor-of-10"&gt;3.2 Why Use a Scale Factor of 1.0?
&lt;/h3&gt;&lt;p&gt;If your monitor is already configured for 100% display scaling, Electron generally does not need an additional forced device scale factor.&lt;/p&gt;
&lt;p&gt;For example, forcing a scale factor of &lt;code&gt;1.25&lt;/code&gt; may cause the application to render its interface at a different scale before the desktop compositor adapts it to the actual display configuration.&lt;/p&gt;
&lt;p&gt;This can introduce unnecessary image resampling and potentially affect the appearance of bitmap resources such as avatars and icons.&lt;/p&gt;
&lt;p&gt;Restoring the scale factor to &lt;code&gt;1.0&lt;/code&gt; helps avoid this type of scaling inconsistency.&lt;/p&gt;
&lt;p&gt;Keep in mind that the actual behavior depends on the Electron version, monitor DPI, KDE scaling configuration, and application implementation. Not every blurry image issue is caused by the device scale factor.&lt;/p&gt;
&lt;h3 id="33-what-if-the-text-becomes-too-small"&gt;3.3 What If the Text Becomes Too Small?
&lt;/h3&gt;&lt;p&gt;If the chat text looks too small after switching back to &lt;code&gt;1.0&lt;/code&gt;, avoid immediately increasing Electron&amp;rsquo;s global scale factor.&lt;/p&gt;
&lt;p&gt;Instead, try:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Adjusting the chat font size under &lt;strong&gt;QQ Settings → General&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Changing font size or DPI in KDE System Settings.&lt;/li&gt;
&lt;li&gt;Keeping the desktop scaling and Electron device scale factor consistent.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This allows you to adjust text readability without unnecessarily affecting the rendering of the entire application.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="4-additional-troubleshooting-clear-old-version-caches"&gt;4. Additional Troubleshooting: Clear Old Version Caches
&lt;/h2&gt;&lt;p&gt;If some avatars remain blurry after changing the launch parameters, the local cache is another area worth investigating.&lt;/p&gt;
&lt;p&gt;If the issue started after upgrading QQ, an incompatible cache or configuration left behind by an older version may also be worth ruling out.&lt;/p&gt;
&lt;p&gt;You can test this by resetting the QQ configuration and allowing the application to regenerate its local data.&lt;/p&gt;
&lt;h3 id="41-completely-exit-qq"&gt;4.1 Completely Exit QQ
&lt;/h3&gt;&lt;p&gt;Make sure QQ is fully closed before modifying its configuration directory. This prevents running processes from continuing to write to the old configuration.&lt;/p&gt;
&lt;h3 id="42-back-up-the-existing-configuration"&gt;4.2 Back Up the Existing Configuration
&lt;/h3&gt;&lt;p&gt;Run:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;mv ~/.config/QQ ~/.config/QQ.bak
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This renames the existing configuration directory to &lt;code&gt;QQ.bak&lt;/code&gt; rather than permanently deleting it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; If &lt;code&gt;QQ.bak&lt;/code&gt; already exists, choose another backup name first. The actual configuration directory may also have a different name depending on the installation package, so verify that the directory exists before running the command.&lt;/p&gt;
&lt;h3 id="43-restart-qq"&gt;4.3 Restart QQ
&lt;/h3&gt;&lt;p&gt;Launch QQ again and scan the QR code to log in.&lt;/p&gt;
&lt;p&gt;The application should generate a new configuration and cache based on the current environment.&lt;/p&gt;
&lt;p&gt;If resetting the configuration does not solve the problem, close QQ and restore the previous configuration before continuing with other troubleshooting steps:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;mv ~/.config/QQ.bak ~/.config/QQ
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;hr&gt;
&lt;h2 id="5-final-recommendations"&gt;5. Final Recommendations
&lt;/h2&gt;&lt;p&gt;When Linux QQ 3.2.35 displays blurry avatars, distorted icons, or input method problems on Ubuntu KDE, start by investigating the graphics backend and display scaling configuration.&lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Running Mode&lt;/th&gt;
					&lt;th&gt;Main Characteristics&lt;/th&gt;
					&lt;th&gt;Recommended Use Case&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;X11 (Xwayland)&lt;/td&gt;
					&lt;td&gt;May improve image rendering; requires correct input method environment variables&lt;/td&gt;
					&lt;td&gt;Prioritizing image clarity&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Native Wayland&lt;/td&gt;
					&lt;td&gt;Uses the Wayland input method protocol and avoids Xwayland dependency&lt;/td&gt;
					&lt;td&gt;Preferring native Wayland integration&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;My recommendations:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If image clarity is your priority, try Solution 1 first.&lt;/li&gt;
&lt;li&gt;If you prefer native Wayland, try Solution 2 and start with a scale factor of &lt;code&gt;1.0&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;If neither solution works, investigate QQ&amp;rsquo;s local cache, Electron version, and KDE display scaling settings.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Keep in mind that Linux distributions, input method frameworks, and Electron versions can behave differently. These launch parameters are not guaranteed to work in every desktop environment or hardware configuration.&lt;/p&gt;
&lt;p&gt;Hopefully, this troubleshooting guide helps other Linux users avoid spending hours dealing with the same issues.&lt;/p&gt;</description></item></channel></rss>