Whonix Workstation Freezing

hi
i’ve been also experiencing these freezes for some time randomly, maybe every 2 weeks
it seems they started when i updated from Virtual Box 6 to 7
ram is set to 8Gb and cpu is set to 4
it looks like it’s only the workstation that freezes, i don’t recall the gateway [with gui] freezing

Why not 3 as per my above post?

yes, i actually set it now to 3 but experienced with 4 [previous value]
will update if it continues to happen then

Have you tried running gateway in CLI mode? Here check this out https://askubuntu.com/questions/1551182/whonix-is-running-slow-and-occasionally-freezes-up-on-me-how-do-i-fix-this

So first you said the toolbar is causing the freezing and now you say it’s not? I’m on Ubuntu 24.04 and indeed I’m using Wayland. But now you’re saying the toolbar has absolutely nothing to do with the freezing?

Hey OP did you give up on Whonix? Well first off are you on Ubuntu or Mint?

So I’m on Ubuntu 24.04 LTS. So I used the whonix installer to install Whonix. The whonix installer will install VirtualBox 7.0.16 if you’re on Ubuntu 24.04 LTS.

I think you should check out this whonix tutorial if you’re on Ubuntu or Mint https://askubuntu.com/questions/1550871/how-do-i-install-whonix-on-ubuntu-24-04-lts

Ok so to my point, so I used Whonix with VirtualBox 7.0.16 for like 3 or 4 months straight with no issues, well it’s not as fast as I’d like, there is some slight lag, but Whonix never once froze up on me during this time. And there is some slight lag cause VirtualBox is a what they call a type 2 hypervisor, also known as a hosted hypervisor, runs on top of an existing operating system as a software application, allowing virtual machines to be created and managed within the host OS. So this is why there is some lag while using Whonix on VirtualBox cause vbox runs on top of the host OS. Well there is some slight lag on my PC at least.

10 year old PC with 4 core AMD CPU and 16 gigs of ram and SSD.

So listen, on vbox 7.0.16 I had no freezing issues and then I installed vbox 7.1.10 (the latest version of vbox) just recently and whonix workstation started freezing on me basically instantaneously.

So I went back to vbox 7.0.16 thinking this would fix the freezing issue and to my utter horror it froze on me on my very first session back.

So I did some research, listen you need to install and use the htop tool to monitor your host OS performance and Whonix workstation performance. Here’s how you install htop

sudo apt update
sudo apt install htop

So I got this from Grok, read this, you’ll see my back and forth conversation with Grok, Grok is a really good teacher, you’ll learn a lot from this, read https://x.com/i/grok/share/fRWCoDBef78pkrDafqMx9ME54

So yeah htop can be used on your host OS and in workstation to monitor your CPU cores and memory usage so you can see where the bottleneck is, is it with the cores or the memory? Just follow that Grok link and read it, Grok explains it beautifully.

So just now I used Whonix for about 7 hours and I watched it’s performance with the htop tool and I had like 60 or 80 tabs open and it did not freeze up on me. It did use about 1.9 gigs of ram (this was what I saw in htop), the cores in workstation would go up in the 90s and then always fall back down, the cores on the host OS would bump into 100% (and then go back down) when doing some tasks but yeah it never froze up on me. So this is a good sign.

And yeah I went months using Whonix on vbox 7.0.16 and I don’t remember it freezing on me, so maybe coming back to vbox 7.0.16 after using vbox 7.1.10 for a couple of weeks, maybe that had something to do with it, it’s almost like the computer has adapted and is used to the work load, I don’t know…

So yeah using htop is a game changer though and I was able to monitor core and memory usage looking for bottlenecks.

I’m currently giving gateway 512 MB of ram (it opens in CLI mode) and 1 core. I give workstation 5 GB of ram (though I think next time I’ll go back down to 4 GB) and 2 cores and this leaves just 1 core for the host OS.

So yeah I’ll just continue to use Whonix on vbox 7.0.16 and see if it freezes up on me. I don’t think it will though. That must have been a fluke. I think using vbox 7.1.10 there for a couple of weeks had something to do with that.

Now listen, both your CPU and GPU use something called thermal paste and you have to replace this thermal paste after about 5 years cause the thermal paste drys out and cracks and just isn’t effective anymore. My PC is 10 years old and I’ve never replaced the thermal paste on my CPU so I’m going to do that here very soon and that should probably increase the performance of my CPU by a significant amount, especially during the hot summer months which we are about to enter. I don’t have air conditioning (can’t afford it) This is the thermal paste I got off Amazon Amazon.com

I replaced my nvidia GPU with an AMD GPU just a few years ago so I don’t need to replace the thermal paste on my GPU just yet. Linux gets along a lot better with AMD GPUs.

If you’re on Ubuntu you’re supposed to install VirtualBox using the apt command which installs it from the Ubuntu repository, packages in the Ubuntu repo are tested by the Ubuntu developers and are stable. So vbox 7.0.16 is the one that’s been tested by the Ubuntu developers and is “stable” on Ubuntu 24.04 LTS. You can read this thread here for more info on that https://www.reddit.com/r/Ubuntu/comments/1lm4mib/ok_so_if_i_use_the_apt_command_to_install/

I’ve got a question, so is it common for Whonix to freeze up on vbox, this only happens to a small minority of Whonix users right? I guess I’m just one of the unlucky ones right? The vast majority of users using whonix on vbox do not have this random freezing issue right?

Here within a week or so, I am gonna attempt to install KVM and the virt-manager, I’m curious how that compares to vbox performance wise. KVM is a type 1 hypervisor built into the Linux kernel, it runs directly on the hardware so it is supposed to have much better performance than vbox, almost native performance they say.

So I’m going to sit down and put in the hard work and figure out how to install KVM and virt-manager on Ubuntu, figure out how to get Whonix up and running on it and then I’ll go over to askubuntu and make a tutorial that shows you how to do this. This is just my way of giving back to the community and helping whonix grow. From all the tutorials I’ve read so far on KVM, they say it runs right on the hardware and it can achieve near native performance when running a VM. So I think KVM is gonna have much better performance compared to vbox so I’m excited to try it out. And then yeah I’ll make a tutorial on askbuntu and show you how to do this on Ubuntu. I mean I wish I had an easy to understand tutorial that would hold my hand and walk me through this, but I’ll create this kind of tutorial once I figure this out. Again just my way of giving back to the community. It’s a team effort right? This is a group effort. It’s a think tank, we’re all pooling our brains together to figure this out.

I mean if you’ve got a modern PC and whonix keeps freezing on you, well, have you tried KVM? In fact, you’ll notice in this thread https://www.reddit.com/r/Ubuntu/comments/1lm4mib/ok_so_if_i_use_the_apt_command_to_install/ someone said to me “Sincere question, out of curiosity. Why use virtualbox over kvm?” and I’ve seen KVM recommended elsewhere too.

So yeah, actually, I’ll only stick with vbox just a little while longer (just to see if it freezes on me again) and then I’m going to install KVM. And then I’ll be very helpful to the community and make a tutorial that shows you how to install and use whonix with KVM on Ubuntu cause there is no such tutorial on the internet I’ve looked.

So yeah, if you have a modern PC and Whonix keeps freezing up on you, well, have you tried KVM instead? I’ve seen many experts recommend KVM over vbox. KVM is supposedly a lot better than VirtualBox performance wise. I’m curious so I’m gonna try it out.

p.s. So yeah even when I got rid of the HDD and installed the SSD in my PC, it greatly sped up Whonix workstation but it’s still just slightly laggy and I think VirtualBox being a type 2 hypervisor is the reason why so I’m very curious to see if KVM will solve this. KVM is supposed to achieve near native performance.

I didn’t say it causes the freezing. I said that it can cause a kind of a freezing that isn’t this.

https://forums.virtualbox.org/viewtopic.php?t=105041

I’m sorry are you referring to the toolbar at the bottom of the screen when you’re in Whonix workstation? And you’re saying the mouse freezes up? Nothing else just the mouse.

Yes and it freezes immediately when clicking on screen after going full screen. You don’t notice it?

Can you tell me what CPU you have. What gen if it’s Intel?

My PC is 10 years old, it’s an AMD CPU and AMD GPU. For Linux it really is best to go with AMD since AMD is open source. I think Intel is open source too but the community behind AMD is massive on Linux. I had problems when I had an Nvidia GPU and so I got rid of it for an AMD GPU. I had a bug with the Nvidia GPU that I couldn’t fix til I replaced it with an AMD GPU.

Linux works best with AMD.

Good to know that it happens on old AMD too. I asked because I wanted to debunk that the freezing could have something to do with this. Whonix for KVM

Hi, i had exactly the same problem for more than a year and didnt know what to do, i experimented with all kinds of fixes, settings and kernel/grub parameters but nothing helped. On my previous older hardware it worked all perfect - AMD FX CPU + 8GB RAM and decent MBO but since i upgraded to Ryzen 2700x platform i had my VMs freezing all the time, but it was a very strange freezing with no errors in log…the more resources i gave to VM the more frequent freezing was, i also had SIGIL/SIGTRAP errors in chromium based browsers…even i thought its something wrong with my RAM so i upgraded to higher quality b-die ram but problem was not solved.

Then i started to experiment with different kernel versions and BIOS settings and what i noticed was that on kernel 6.10.11 (which im using right now for a long time) freezing is now gone, thats the only kernel that works for me and also i noticed that changing settings in BIOS helped to stabilize my system a lot - PSS Support, Global C-State control to ENABLE and C1 declaration to DISABLE.

Thats my experience i wanted to share with you.

1 Like

I have Fedora kernel version 6.15. I used Whonix Virtual Box on Kubuntu 22.04 with a xanmod kernel 6.1.x before I installed Fedora half a year ago and it did freeze on it too. I had to stay on that old kernel because KDE broke every time I tried to change it.

No my friend, I can do whatever I want with the toolbar at the bottom of the screen and it won’t cause my workstation to freeze up.

I have an AMD CPU and GPU.

Hey have you tried using KVM with virt-manager with Whonix? KVM is a type 1 hypervisor built directly into the Linux kernel and is supposed to achieve near native performance. I have had many people recommend KVM over VirtualBox. VirtualBox is a type 2 hypervisor that runs on top of the host OS unlike type 1 hypervisors which run directly on the hardware.

I’m going to keep using VirtualBox with Whonix for a least a few more weeks and then I’ll install KVM and virt-manager and use it with Whonix to see how it performs, it’s supposed to have better performance.

And then I’ll go over to askubuntu and make a tutorial that shows you how to install KVM/virt-manager for use with Whonix (on Ubuntu) cause no such tutorial exists on the internet. I’ve checked. And I wish there was a tutorial like that, so I’ll just have to create it myself.

Hopefully in the future Whonix will completely abandon VirtualBox altogether and move over to KVM. Is that ever going to happen Patrick?

Moderation comment:

Off-topic.