понеделник, 4 декември 2023 г.

Debug kde panic related to appimagelauncherd

I had several kernel panics or kde panics, hard to tell. My first suspicion was that I had a problem with my SSD, so I wanted to run smartctl to check it out:

>sudo smartctl -t short /dev/nvme0 

To see the results:  

>sudo  smartctl -l selftest /dev/nvme0

To see full summary of disk usage:

>sudo  smartctl -x /dev/nvme0

Then I had to check out the logs from journalctl for the X and the kernel.  

>journalctl -xb 

>journalctl -xe

(with -k you can see kernel drama from the previous boot (see manual)

>journalctl -kb

Then I checked dmesg 

>dmesg|grep error

Also the state of the sensors (they were ok) 

>sensors

The systemctl log for failed processes:

>systemctl --user --failed

And finally, by suggestion of a forum, the core dumps.

>coredumpctl list

I saw a problem with the following service (appimagelauncherd) that was spamming my core dumps with tons of errors and at some point it seemed that the space for dumps ended and the computer crashed. Basically I got 1000 variations of the following error all over the logs:


"
traps: appimagelaunche[1232] general protection fault ip:7f2d012ca394 sp:7ffc8910b128 error:0 in libstdc++.so.6.0.32[7f2d0129c000+137000]"

I tried to stop it the right way as above, but it gave me errors. 

>systemctl --user status appimagelauncherd.service
>systemctl --user disable --now appimagelauncherd.service
>systemctl --user status appimagelauncherd.service

In the end, I got annoyed and I removed it in the most brutal way:

cd /usr/lib/systemd/user/

sudo mv appimagelauncherd.service ~/scripts
cd ~/.config/systemd/user/default.target.wants/
sudo mv appimagelauncherd.service ~/scripts

Note, this thing has also settings: AppImageLauncherSettings (where you can click that it stops relaunching after you kill it, but I didn't do it at the time), so maybe that could have stopped it without manually removing the service but I discovered it afterwards. Right now the computer has been working for 5 days and it works ok. I don't know if this solved my problem, but for now at least it doesn't crash every 5 minutes.

P.S. Another error I saw in dmesg and tried to fx is about the bt_coex_acitve, so I did the following (but I'm not srue the driver for the wifi accepted it (link)):

sudo modprobe -r iwlmvm
sudo modprobe iwlmvm bt_coex_active=N

Another error I was getting was:

"kwin_core: XCB error: 152 (BadDamage), sequence: 10052, resource id: 16910493, major code: 143 (DAMAGE), minor code: 3 (Subtract)"

which according to Manjaro forum can be removed with editing "~/.bash_profile" to include:

# suppress QT logging
QT_LOGGING_RULES='*=false'
export QT_LOGGING_RULES

Finaly, I was getting an error from Akonadi

akonadiserver[1706]: org.kde.pim.akonadiserver: arguments: ("--defaults-file=~/.local/share/akonadi/mysql.conf", "- -datadir=~/.local/share/akonadi/db_data/", "--socket=/run/user/1000/akonadi/mysql.socket", "--pid-file=/run/user/ 1000/akonadi/mysql.pid")

and I did as advised in Manjaro forum:

mv ~/.local/share/akonadi/db_data/ibdata1 ~/.local/share/akonadi/db_data/ibdata1.old
akonadictl start
It took a while to restart akonadictl but it finished. 

Also to limit the space that journalctl takes:

journalctl --vacuum-time=2weeks

вторник, 21 ноември 2023 г.

Activate and update a missing conda environment

I use conda to manage my python packages and libraries because otherwise, system updates break everything way too often. Recently, I had two problems with it:

1. After one of the system updates, conda got messed up and I copied the files from my backup. So the names of the conda environments disappeared.

1. To fix the names if you installed your environments in a new directory, you can use:

$conda config --show envs_dirs

this shows where your default directories are and then to add another path, use (link):

$conda config --append envs_dirs /home/<user>/anaconda3/envs

or if you want to keep your default dir (which I didn't care about):
$conda config --prepend envs_dirs /home/<user>/anaconda3/envs)
This at least added my old environments to the environment.txt

You can list the path to all environments -

$conda env list

And then, if you activate with either

$conda activate NAMEENV

or, if the short name is not available, you can do it with the full path:

$conda activate /home/user/anaconda3/envs/NAMEENV
 

Other imporant files and command:

$cat  /home/denijane/.condarc

$conda info

$conda info -e

2. I was getting a problem in jupyter with one of my packages
libstdc++.so.6: version `GLIBCXX_3.4.32' not found
This was solved by:

$conda activate /home/user/anaconda3/envs/NAMEENV

$conda update --all

which updated all the packages and fixed their broken dependencies. I tried with "conda install libgcc" but conda wouldn't install it.

I also tried to modify the PATH

$export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/your/path/to/conda/env/lib 

because I thought the file is there but it cannot find it, ut again, but this didn't work and in the end I had to do the "update --all"

четвъртък, 28 септември 2023 г.

sudo not acceptimg my password

It happened after I had to kill plasma and kwin because everything froze over an external wifi adapter. I found the answer here:

systemctl status systemd-homed

If it says something other than active, use

systemctl start systemd-homed

to start it again. After that I had my password working again.

събота, 2 септември 2023 г.

Error unmounting /dev/sda: target is busy

 My ssd had wouldn't unmount for unknown reasons, since everything that was using it was closed I was very surprised and annoyed. The error it would give me when I tried to unmount it in console was:

umount /run/media/user/ssd
Error unmounting block device 8:0: GDBus.Error:org.freedesktop.UDisks2.Error.DeviceBusy: Error unmounting /dev/sda: target is busy

So I had to do (following this):

 sudo lsof /dev/sda

That gave me the process that was "using" the hard. It was xdg-docum for a movie that was not playing or anything but apparently, the hard drive thought it was. So after I killed the process I could normally unmount it from Dolphin.

понеделник, 21 август 2023 г.

How to find lost hard disk space

 1. Instal ncdu

sudo pacman -S ncdu

2. Clear caches:

yay -Sc

pip cache purge
 

3. Install Filelight

It shows very nicely where is your lost disk space. Mine is obviously in The Witcher 3 and Skyrim. Oh well.

петък, 9 юни 2023 г.

How to create liveusb from terminal

1.  Download the iso (https://linuxmint.com/download.php)

2. Optional, check the sha256 sums. 

3. Plug in your usb. In my case, I had to delete the partitions, but I didn't create a new partition. Confirm the path to your usb with $df  - mine was at /dev/sda

4.  sudo dd bs=4M if=/home/user/linuxmint-21.1-cinnamon-64bit.iso of=/dev/sda status=progress oflag=sync

5. Voila

четвъртък, 9 февруари 2023 г.

How to install nvidia-dkms on Manjaro

I just installed manjaro-xandmod to test if my laptop will continue to freeze. It just got way too annoying having these freezes every 2 days since I like to keep my laptop working non-stop for months. And since I couldn't figure what freezes exactly, I decided to return to xanmod with which I had good memories. So anyway, I installed xanmod from aur (from Pamac where I have aur added) and then tried to install nvidia-dkms. It complained that it's in conflict with nvidia610 and wouldn't remove it. This is the line that solved the problem:

sudo pacman -S --needed nvidia-dkms nvidia-utils lib32-nvidia-utils


 

сряда, 18 януари 2023 г.

How to make Chrome open magnet links qith qBittorrent

Chrome was opening my magnet files with Stremio which didn't work at all. So I wanted to convince it to open them with my torrent client qBittorent. What I did is that I edited:

/home/denijane/.config/mimeapps.list

adding the line:

x-scheme-handler/magnet=org.qbittorrent.qBittorrent.desktop

I saved it and restarted Chrome and voila! 

Useful konsole commands:

xdg-mime query default x-scheme-handler/magnet

and

gio mime x-scheme-handler/magnet

and also the .desktop files seem to reside in  /usr/share/applications/

Also you can try to update the database with "update-desktop-database" but in my case it didn't seem to work, but closing and opening Chrome did.