Ok Ive done more research. Maybe this is the answer to my problem. I typed cpu stuck at 0.78 Ghz into google
https://www.dell.com/community/XPS/Dell-xps15-9560-cpu-stuck-at-0-78-Ghz/td-p/6222936this is a quote from a guy who posted a fix on dell. Similar to my problem. I am going to give it a try
Fixing your Dell XPS CPU stuck at minimum frequency
XPS Discussion
Backstory
Since Christmas I have owned a Dell XPS 15 running Debian. It was unbelievably slow and laggy at first and I eventually chalked it up to an intel_pstate bug causing my CPU to be stuck at 800Mhz as I thought was confirmed by this thread that links to this kernel.org bug discussion.
However, over this timeline, I also installed Windows just to update the Thunderbolt firmware for my great USB-C experiment that I posted on here.
On a whim, I opened up task manager on Windows and noticed that the CPU on Windows was also stuck at 797Mhz. Okay, so not an intel_pstate Linux bug. wtf?
BIOS resets and BIOS + firmware updates to latest did not resolve the problem.
Stumbling upon the fix
I've been searching around all sorts of forums, bug reports, and subreddits for any mention of the Dell XPS and stuck or throttled frequencies. After a couple weeks of searching, I finally stumbled across this Dell Community thread.
You need to shutdown the PC, then open the bottom lid up (unscrew 10 torx t5 screws and 2 philips ph1 under the XPS plate) and disconnect the battery for 10-15 seconds, then reconnect it back. On my notebook it returned the speedstep back.
Verdict
In a last act of desperation, I purchased a Torx screwdriver set and tried the fix. And it worked! Both Windows and, with intel_pstate reenabled, Linux now scale the CPU correctly between 800Mhz and 3.20Ghz.
I also think my GPU must have been throttled because, as a photographer, I use Darktable under Linux and it was very, very slow even when I was using the ondemand governor for Linux. It's now super snappy!
It has to be because of something that shows up in my BIOS logs that a user on the same Dell Community thread mentions:
...it was suggested that either a "bad" power supply or a "thermal" event may trigger this "safe" mode...
I did have a log entry of a bad power supply connected in early December. Clearing the logs did not fix it, only disconnecting the battery. It must be a hardware flag of some sort.
TL;DR
Use the service manual as a guide to remove the bottom of the laptop, disconnect the battery, press power for 5 seconds, and viola - fixed.