Laptop misbehaving after trying to setup Auto-cpufreq

So today I ran some commands trying to optimize my battery with auto-cpufreq, and I ran into some issues which led me run even more commands including deleting python and something sql-related. I ended up being stuck in the terminal on boot and couldn't boot to GUI. I had to switch between gdm and lightdm a bit, reinstalled gnome, too. Now I can't find a lot of my apps, including appearance. The taskbar doesn't show either, but my working files and folders seem to be intact. My track pad soft-touch is not working, so I have to click the buttons. The whole system is slow, and even my terminal doesn't open. Been on this for hours and I need help, please. I'm very new to Linux and this is really frustrating.

It sounds like a lot of system files and configurations may have been altered or removed, causing a range of issues. Let's take this step by step to try and restore your system:

Step 1: Boot into Recovery Mode

  1. Restart your computer.
  2. When the GRUB menu appears (the menu you see when you first boot), select the option for Advanced options for Ubuntu.
  3. Select a recovery mode option (usually something like Ubuntu, with Linux 5.4.0-xx-generic (recovery mode)).
  4. This will bring you to a recovery menu. Select root to drop into a root shell prompt.

Step 2: Reinstall Critical Packages

  1. Update package list:

sh

Copy code

apt update
  1. Reinstall Gnome and other critical packages:

sh

Copy code

apt install --reinstall ubuntu-desktop gnome-shell gnome-control-center gnome-terminal
  1. Reinstall any other potentially removed critical packages:

sh

Copy code

apt install --reinstall network-manager lightdm gdm3

Step 3: Reconfigure the Display Manager

  1. Reconfigure the display manager:

sh

Copy code

dpkg-reconfigure gdm3
  • Choose gdm3 when prompted.

Step 4: Fix Potential Python and SQL Issues

  1. Ensure Python is installed:

sh

Copy code

apt install python3
  1. Ensure SQLite is installed (since you mentioned something SQL-related):

sh

Copy code

apt install sqlite3 libsqlite3-dev

Step 5: Reboot the System

  1. Exit the root shell and reboot:

sh

Copy code

exit
reboot

Step 6: Restore Missing Applications and Settings

  1. Log in to your system and open a terminal (you might need to use Ctrl+Alt+T if the taskbar is still missing).
  2. Reinstall any missing applications:

sh

Copy code

sudo apt install gnome-tweaks
sudo apt install <other-missing-apps>
  1. Restore GNOME settings:

sh

Copy code

dconf reset -f /org/gnome/
  1. Reconfigure GNOME settings:

sh

Copy code

gnome-shell --replace &

Step 7: Check for Any Remaining Issues

  1. Check system performance and functionality.
  2. Ensure all necessary applications are reinstalled.
  3. Verify touchpad settings and reconfigure if necessary:

sh

Copy code

sudo apt install xserver-xorg-input-libinput

If the terminal still does not open or the system is unresponsive, you may need to access it via a virtual terminal (Ctrl+Alt+F2 to F6) and perform the steps from there.

Additional Tips:

  • Backup important files regularly.
  • Be cautious with commands affecting critical system components.

If these steps do not resolve all issues, it might be worth considering a fresh reinstall of Ubuntu to ensure a clean and fully functional environment.

"ChatGPT"

2 Likes

Please use ChatGPT with caution.
For example;

There is no need to install lightdm along with gdm3 on Zorin OS Core.

This will install the base Ubuntu packaged desktop environment instead of the Zorin OS Desktop which would be sudo apt install --reinstall zorin-os-desktop

Any user can use ChatGPT on their own. There is no need to copy/paste unoriginal work onto the forum.
But if using ChatGPT, you can see it as a tool that may provide a guide or hints, not direct answers that require no research to understand.

6 Likes

Superuser privileges are very powerful, so you should understand what it is you are doing before sudo. Most commands can be viewed in the manual with man <command>. ChatGPT may not yet be smart enough to make these warnings.

2 Likes

Hello,

Can you provide us with the commands you ran?

2 Likes

Welcome to the Forum!

If the Stuff that @Aravisian suggested shouldn't help, I would recommend that You save Your Data and then make a fresh Install of Zorin.

1 Like

Thanks for the clarification, Aravisian. Funny enough, running commands straight from Chatgpt was what led me into this mess in the first place... Now I have serious trust issues with that bot.

I just ended up backing-up my important files and made a fresh install of Zorin. I installed Zorin 17 this time, and while I'm experiencing minor issues like occasional freezing, which never happened on my 16 pro installation, it's not too bad, at least for now. The freezing is probably due to auto-cpufreq, but that's just a guess.

4 Likes

Thanks, everyone.

1 Like

:upside_down_face: Maybe we should put it in a prominent place on this forum:

Chat with us, not ChatGPT.

1 Like

point taken ... :wink:

1 Like

Have you tried switching from Wayland (Z17 default) to X11 (Z16 default) using the cog icon on the login screen. Click as to login and the cog icon should appear.

3 Likes

All I can see is Zorin desktop and Zorin Desktop on Xorg - options.

Try Zorin Desktop on Xorg. X Window System is referred to by various abbreviations such as X11 or Xorg.

Still didn't help. The freezing is getting too frequent and now it's just frustrating. Had to uninstall auto-cpufreq cause I believed that to be the cause, and installed TLP instead. Same issue. Might just have to go through the hassle of reinstalling Zorin 16 pro. I wish there was a way to easily switch without having to lose all my stuff... Again.

1 Like

So I'm here again. made a clean install of Zorin 16 core, and I tried installing auto-cpufreq again. Ended up stuck with the exact same thing that put me into all this mess, so I decided to bring it to the community this time.

Funny enough, I was able to install and run it on Zorin 17... Please help.

auto-cpufreq --help
Traceback (most recent call last):
  File "/opt/auto-cpufreq/venv/bin/auto-cpufreq", line 5, in <module>
    from auto_cpufreq.bin.auto_cpufreq import main
  File "/opt/auto-cpufreq/venv/lib/python3.8/site-packages/auto_cpufreq/bin/auto_cpufreq.py", line 15, in <module>
    from auto_cpufreq.core import *
  File "/opt/auto-cpufreq/venv/lib/python3.8/site-packages/auto_cpufreq/core.py", line 29, in <module>
    from auto_cpufreq.utils.config import config
  File "/opt/auto-cpufreq/venv/lib/python3.8/site-packages/auto_cpufreq/utils/config.py", line 8, in <module>
    def find_config_file(args_config_file: str | None) -> str:
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'```

I just edited the python code in the specified file, and it works. I'm not too comfortable with this, tho, it seems a bit hacky.

Their github page lists 3 possible ways of installing: nixOS (not supported by zorin), compiling from source and the snap store

Did you install it by following the instructions to compile it from source or did you install the snap version of it?

I cloned the repo and ran the commands in the docs to install.