Thursday, August 31, 2023

WTF! Uninstalling Firefox Snap removes bookmarks???

https://askubuntu.com/questions/1131855/does-uninstalling-firefox-snap-remove-bookmarks

Yes, unlike the Firefox deb package, it erases your profile.

This is despite Mozilla flatly stating that removing Firefox does not remove profiles, with no caveat concerning snap.

Unfortunately yes. After the upgrade of Ubuntu 20.04 to a new 22.04, I realized that the default web browser was no more pointing to the firefox. The reason was the snap version of the application (instead of the apt based one). I removed the snap version (in order to install the apt based one) and as a side effect I lost all my bookmarks, saved passwords, everything :-(

wtf wtf wtf wtf wtf

Pycharm keeps crashing, crashes on startup, can't even see the error

Somehow I have managed to get Pycharm into a state where it crashes on startup. I don't even have enough time to read the error report before it just closes itself immediately.

FUCK GOD DAMMIT

Firefox protip: turn on browser.sessionstore.restore_pinned_tabs_on_demand

I currently have around 2000 tabs open in my Firefox in one of my VMs. Unfortunately, I upgraded Firefox and now restoring all those tabs is taking too much RAM, causing the VM to freeze. I don't want to give the VM any more RAM so I decided to look for a way to reduce the memory usage when I came across this wonderful option:

browser.sessionstore.restore_pinned_tabs_on_demand

See, one of the problems is that I had too many pinned tabs (over 30) and having them get automatically loaded on startup was causing Firefox to use a lot of CPU and RAM.

Enabling this option solved that problem.

Monday, August 28, 2023

Kernel dazed and confused

Message from syslogd@fedora at Aug 28 16:49:31 ...
kernel:Uhhuh. NMI received for unknown reason 0c on CPU 11.

Message from syslogd@fedora at Aug 28 16:49:31 ...
kernel:Dazed and confused, but trying to continue

Friday, August 25, 2023

rr reverse-step, reverse-stepi, and reverse-next super slow... 😭😭😭💔

Trying to use rr

I recorded a replay and now I'm reverse-stepping through the program

Except the reverse-step and reverse-next commands take ages to run - sometimes multiple seconds, sometimes multiple minutes.

I tried recompiling my program with optimization turned off, that didn't help.

I tried recording with the -n flag (rr record -n), that didn't help.

I tried recording with -c 1 and -c 1000, didn't make a difference.

Even reverse-stepi was slow sometimes. It is often fast but sometimes it would be slow.

Why is it so slow...could it be a KVM problem? I'll run it on my bare metal box.

EDIT: Running on my bare metal box didn't help...it's still slow. 😭😭😭💔

EDIT: I think this may be due to the fact that my box had a Ryzen CPU (it's very recent - 7th gen). I will try on Intel box when I get it.  

UPDATE: See the follow-up post here: https://1f6042.blogspot.com/2024/01/psa-rr-is-much-slower-on-ryzen-than-on.html

Annoying bug with snapd-installed VSCode

So I installed vscode using snap inside my VM, and I encountered this weird bug where trying to paste anything inside nano in the vscode terminal caused the terminal to become totally unresponsive. I tried changing keyboard shortcuts for paste and that didn't work - bug continued to occur. I also saw the libgiolibproxy.so error message printed in the terminal which appears to be snap related.

Anyway I removed the vscode snap package and installed vscode using dnf and now it works.


Thursday, August 24, 2023

God damn Virt Manager qemu-KVM display issues

So I have a qemu-KVM Fedora guest that is set to turn off display after a few minutes inactivity.

Originally I was using virtio, but the performance was awful, visible screen tearing even just scrolling down a web page, it took like a second to redraw the screen.

So I switched to QXL and the performance was significantly better, BUT whenever the guest display turned off (due to inactivity) the screen it would just go black permanently and become unresponsive.

So I switched back to virtio and tried to enable 3D acceleration but it gave me error saying "opengl is not available".

So then I went to Display Spice and changed the Listen type to None and checked OpenGL. 

Now it seems to work...fingers crossed.

EDIT: Now I can't suspend the VM, I get "virgl is not yet migratable"...

Wednesday, August 23, 2023

Dammit, only GNOME has auto-resize in qemu-kvm???

Daily reminder to always choose the most popular software, because the most popular software tend to:

1. Have more users, so bugs are more likely to be reported.

2. Have more resources, so the most common reported bugs are more likely to be fixed.

I just read this post today about GNOME vs other desktops. This is specifically about GNOME VM auto-resize in qemu-kvm:

The gnome desktop, mutter, has some hotplug code that deals with the resize.

If you have any other desktop like xfce4 or KDE or a bare .xinitrc file running compiz like I do, you are pretty stuck, but I think I finally found an elegant and easy solution. Source: https://superuser.com/questions/1183834/no-auto-resize-with-spice-and-virt-manager


Fucking NVIDIA on Linux!!!!!

I've finally had enough of my computer crashing 3-4 times a day forcing power cycle to fix, and losing all my unsaved data, so I switched out my NVIDIA GPU for a cheaper AMD GPU. 

Wow! The performance is actually...no worse than on the NVIDIA! In fact, I am getting 144Hz on my AMD card where before I could only get 100Hz with the NVIDIA card (I was using the default Linux driver not the proprietary NVIDIA driver). With the NVIDIA card, trying to set the refresh rate higher than 100Hz caused the monitor to just go black. Whereas with the AMD card, the monitor happily accepted the 144Hz refresh rate.

Hopefully this is the end of my system instability troubles...

EDIT: Okay, I am seeing display problems with video playback not being smooth, but this happened with the NVIDIA card too...

EDIT2: Okay, so the video playback is only not smooth in the browser. When playing on VLC the video is smooth. So I guess it's a problem with Firefox rather than with my GPU or driver.