Ubuntu 23.04升级后挂起/恢复会话时Gnome扩展(Dash to Panel、ArcMenu、Bing Image等)无法加载的问题求助
Hey there! Sorry to hear you're stuck with this annoying extension glitch after upgrading to Ubuntu 23.04 — that's definitely frustrating, especially since your manual workaround of disabling/re-enabling works but isn't a long-term fix. Let's walk through some practical solutions to get Dash to Panel, Arc Menu, and your other extensions loading properly after suspend/resume automatically:
Reset all extensions to default state
Sometimes corrupted extension configurations or cached data can cause this kind of post-suspend issue. Open a terminal and run:gnome-extensions reset-all
This won't delete any of your extensions, just reset their settings to factory defaults. Reboot your system after running this and test if the problem goes away.Double-check extension dependencies
Even if you installed recommended packages, some extensions might rely on specific GNOME Shell libraries that didn't get installed. Open the GNOME Extensions app, find Dash to Panel and Arc Menu, check their "Details" tabs to confirm all listed dependencies are present. If anything's missing, useapt installto grab the required packages (look for packages starting withgir1.2-orgnome-shell-extension-).Automate your workaround with a systemd service
Since manually toggling extensions works, we can turn that into an automatic process that runs when your system wakes up:- Create a script file at
~/.local/bin/restore-extensions.shwith this content:#!/bin/bash gnome-extensions disable --all sleep 2 gnome-extensions enable --all - Make the script executable:
chmod +x ~/.local/bin/restore-extensions.sh - Create a systemd service file at
~/.config/systemd/user/extension-restore.servicewith:[Unit] Description=Restore GNOME extensions after suspend/resume After=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target [Service] Type=oneshot ExecStart=%h/.local/bin/restore-extensions.sh [Install] WantedBy=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target - Enable and start the service:
systemctl --user enable --now extension-restore.service
Now every time your system wakes up, it'll run your workaround automatically in the background.
- Create a script file at
Clear GNOME Shell cache
Old cache files from your previous Ubuntu version might conflict with GNOME 44. Run this command to delete the cache:rm -rf ~/.cache/gnome-shell
Reboot your system, and GNOME will generate fresh cache files.
Give these steps a try in order — the reset and cache clear are quick wins, so start with those. Let me know if any of these fix the issue, or if you need help with any of the steps!
备注:内容来源于stack exchange,提问作者Naveen

