System apps are lag/freezing after using apt autoremove (possible missing dependencies)
https://askubuntu.com/questions/1567986/system-apps-are-lag-freezing-after-using-apt-autoremove-possible-missing-depend
I'm currently using Ubuntu 26.04 LTS. When I first installed it, everything worked perfectly. I'm also quite new to Linux, so I've relied on ChatGPT a lot for help.
While using Ubuntu, I occasionally removed applications that I didn't need. Following ChatGPT's advice, I usually removed applications with:
sudo apt purge <app>
and then ran:
sudo apt autoremove
I was told that sudo apt autoremove only removes unused libraries and that if other applications still needed those libraries, they would either not be removed or could be reinstalled automatically, so it shouldn't affect the system. I trusted that advice.
After some time, I installed and removed many applications while trying to find software that suited my needs, and I'm sure that after uninstalling applications, I often ran sudo apt autoremove.
At some point, I started noticing that some system applications became slow or partially broken. For example, when I click a file upload button in a web browser and the file picker dialog opens, the file picker becomes very laggy and slow, although it doesn't completely freeze.
In addition, my default App Center now crashes and shows the following message:
"Is Not Responding. You may choose to wait a short while for it to continue or force the app to quit entirely."

> snap-store
Gtk-Message: 17:44:36.251: Not loading module "atk-bridge": The functionality is provided by GTK natively. Please try to not load it.
Gdk-Message: 17:44:36.497: Unable to load from the cursor theme
INFO snap-store: Logging to /home/{user}/snap/snap-store/1367/.local/share/snap-store/snap-store.log
ERROR error_observer: Provider ratingsModelProvider:RatingsModelProvider#f6400(null) failed
GrpcError: gRPC Error (code: 14, codeName: UNAVAILABLE, message: Error connecting: SocketException: Connection refused (OS Error: Connection refused, errno = 111), address = ratings.ubuntu.com, port = 43740, details: null, rawResponse: null, trailers: {})
ERROR error_observer: Provider ratingsModelProvider:RatingsModelProvider#87a8f(null) failed
GrpcError: gRPC Error (code: 14, codeName: UNAVAILABLE, message: Error connecting: SocketException: Connection refused (OS Error: Connection refused, errno = 111), address = ratings.ubuntu.com, port = 43740, details: null, rawResponse: null, trailers: {})
ERROR error_observer: Provider ratingsModelProvider:RatingsModelProvider#afa52(null) failed
GrpcError: gRPC Error (code: 14, codeName: UNAVAILABLE, message: Error connecting: SocketException: Connection refused (OS Error: Connection refused, errno = 111), address = ratings.ubuntu.com, port = 43740, details: null, rawResponse: null, trailers: {})
ERROR error_observer: Provider ratingsModelProvider:RatingsModelProvider#ff94b(null) failed
GrpcError: gRPC Error (code: 14, codeName: UNAVAILABLE, message: Error connecting: SocketException: Connection refused (OS Error: Connection refused, errno = 111), address = ratings.ubuntu.com, port = 43740, details: null, rawResponse: null, trailers: {})
ERROR error_observer: Provider ratingsModelProvider:RatingsModelProvider#a014b(null) failed
GrpcError: gRPC Error (code: 14, codeName: UNAVAILABLE, message: Error connecting: SocketException: Connection refused (OS Error: Connection refused, errno = 111), address = ratings.ubuntu.com, port = 43740, details: null, rawResponse: null, trailers: {})
ERROR error_observer: Provider ratingsModelProvider:RatingsModelProvider#4bb77(null) failed
GrpcError: gRPC Error (code: 14, codeName: UNAVAILABLE, message: Error connecting: SocketException: Connection refused (OS Error: Connection refused, errno = 111), address = ratings.ubuntu.com, port = 43740, details: null, rawResponse: null, trailers: {})
ERROR error_observer: Provider ratingsModelProvider:RatingsModelProvider#67808(null) failed
GrpcError: gRPC Error (code: 14, codeName: UNAVAILABLE, message: Error connecting: SocketException: Connection refused (OS Error: Connection refused, errno = 111), address = ratings.ubuntu.com, port = 43740, details: null, rawResponse: null, trailers: {})
ERROR error_observer: Provider ratingsModelProvider:RatingsModelProvider#4fd30(null) failed
GrpcError: gRPC Error (code: 14, codeName: UNAVAILABLE, message: Error connecting: SocketException: Connection refused (OS Error: Connection refused, errno = 111), address = ratings.ubuntu.com, port = 43740, details: null, rawResponse: null, trailers: {})
ERROR error_observer: Provider ratingsModelProvider:RatingsModelProvider#49eae(null) failed
GrpcError: gRPC Error (code: 14, codeName: UNAVAILABLE, message: Error connecting: SocketException: Connection refused (OS Error: Connection refused, errno = 111), address = ratings.ubuntu.com, port = 43740, details: null, rawResponse: null, trailers: {})
ERROR error_observer: Provider ratingsModelProvider:RatingsModelProvider#77065(null) failed
GrpcError: gRPC Error (code: 14, codeName: UNAVAILABLE, message: Error connecting: SocketException: Connection refused (OS Error: Connection refused, errno = 111), address = ratings.ubuntu.com, port = 43746, details: null, rawResponse: null, trailers: {})
ERROR error_observer: Provider ratingsModelProvider:RatingsModelProvider#30cef(null) failed
GrpcError: gRPC Error (code: 14, codeName: UNAVAILABLE, message: Error connecting: SocketException: Connection refused (OS Error: Connection refused, errno = 111), address = ratings.ubuntu.com, port = 43746, details: null, rawResponse: null, trailers: {})
ERROR error_observer: Provider ratingsModelProvider:RatingsModelProvider#e128b(null) failed
GrpcError: gRPC Error (code: 14, codeName: UNAVAILABLE, message: Error connecting: SocketException: Connection refused (OS Error: Connection refused, errno = 111), address = ratings.ubuntu.com, port = 43760, details: null, rawResponse: null, trailers: {})
I also experience the same issue with the RustDesk remote desktop application.

> rustdesk
Try setting transparent
flutter: launch args: []
flutter: initializing FFI main
flutter: _appType:main,info1-id:079652093ce34d1ba82309e4efcdee2b,info2-name:Ubuntu,dir:/home/hiepld/Documents
flutter: _globalFFI init
flutter: registerEventHandler callback_query_onlines address book peer
flutter: registerEventHandler load_address_book_peers address book peer
flutter: registerEventHandler callback_query_onlines group peer
flutter: registerEventHandler load_group_peers group peer
flutter: registerEventHandler callback_query_onlines recent peer
flutter: registerEventHandler load_recent_peers recent peer
flutter: registerEventHandler callback_query_onlines fav peer
flutter: registerEventHandler load_fav_peers fav peer
flutter: registerEventHandler callback_query_onlines discovered peer
flutter: registerEventHandler load_lan_peers discovered peer
flutter: _globalFFI init end
flutter: registerEventHandler native_ui native_ui
flutter: registerEventHandler check_software_update_finish check_software_update_finish
flutter: registerEventHandler callback_query_onlines AllPeersLoader
flutter: restore lpos: 800.0/600.0, offset:0.0/0.0, isMaximized: false, isFullscreen: false
flutter: handled by uni links: false
flutter: [MultiWindowHandler] active window changed: {0}
This makes me suspect that I may have accidentally removed some library that these applications depend on. I've also noticed that this problem seems to affect mainly applications built with Flutter, while most other applications work normally, except that a few of them become laggy during certain operations, like the file picker example I mentioned.
Is there any way to diagnose and fix this problem without reinstalling Ubuntu? I have a lot of important data and would really prefer not to reinstall the operating system.
I have already tried uninstalling and reinstalling the affected applications, but the problem still persists.