Xsession Error after 19.1 KDE Kernel Upgrade

Forum rules
Before you post please read how to get help
Post Reply
ztrede
Level 1
Level 1
Posts: 17
Joined: Sun Dec 28, 2014 3:27 pm

Xsession Error after 19.1 KDE Kernel Upgrade

Post by ztrede » Sat Mar 30, 2019 2:55 pm

I recently updated the Kernel on my computer, and now I am unable to login without receiving the following, and then the computer freezes and requires a reboot. I am running Linux Mint 19.1 KDE on a Lenovo T460s.

Xsession: warning: unable to write to /tmp; x session may exit with an error

I remember I had this problem about a year ago, but I cannot remember how I solved it. I have already tried solutions I have found in another thread by trying chmod 777 /tmp, and performing a system check, but have not had any results.

I would appreciate any help thanks!

gm10
Level 17
Level 17
Posts: 7493
Joined: Thu Jun 21, 2018 5:11 pm

Re: Xsession Error after 19.1 KDE Kernel Upgrade

Post by gm10 » Sat Mar 30, 2019 3:01 pm

Post output of these two terminal commands:

Code: Select all

lsblk 
and

Code: Select all

df

ztrede
Level 1
Level 1
Posts: 17
Joined: Sun Dec 28, 2014 3:27 pm

Re: Xsession Error after 19.1 KDE Kernel Upgrade

Post by ztrede » Sat Mar 30, 2019 3:24 pm

I am running a dual boot of windows 10 and mint kde:

lsblk
Name MAJ:MIN Size
sda 8:0 238.5G
sda4 8:4 1000M
sda2 8:2 16M
sda7 8:7 142.6G /home
sda5 8:5 19.56G /
sda3 8:3 71.26
sda1 8:1 260M /boot/efi
sda6 8:6 3.9G (Swap)

When I ran df, it shows that my root partition sda5 has zero space available (which explains why nothing can be written to it). How do I clean this to make some free space? I have ran clean and auto clean, and have had issues with this when performing system updates but was able to clean the excess, but i guess when i did the kernel upgrade it just took up the rest of the memory.

gm10
Level 17
Level 17
Posts: 7493
Joined: Thu Jun 21, 2018 5:11 pm

Re: Xsession Error after 19.1 KDE Kernel Upgrade

Post by gm10 » Sat Mar 30, 2019 3:32 pm

ztrede wrote:
Sat Mar 30, 2019 3:24 pm
When I ran df, it shows that my root partition sda5 has zero space available (which explains why nothing can be written to it). How do I clean this to make some free space? I have ran clean and auto clean, and have had issues with this when performing system updates but was able to clean the excess, but i guess when i did the kernel upgrade it just took up the rest of the memory.
Yes, as expected. If you're using Timeshift and have it configured to store snapshots to your root partition then an easy way to make room would be to delete the snapshots. Your root partition is much too small to store the snapshots there.

If that's not an option then you'll have to find out what's filling up your partition:

Code: Select all

sudo du /var/* -sht 100M
sudo du / -hxd 1 -t 100M
(the second one may take a while to run)

ztrede
Level 1
Level 1
Posts: 17
Joined: Sun Dec 28, 2014 3:27 pm

Re: Xsession Error after 19.1 KDE Kernel Upgrade

Post by ztrede » Sat Mar 30, 2019 3:35 pm

thanks! since I cannot log into my system except in recovery mode, I am swapping back and forth between windows and linux to post of the forum, so I will probably not be able to transcribe the output. I do not have a timeshift installed, but after I fix this, i will be sure to get it.

gm10
Level 17
Level 17
Posts: 7493
Joined: Thu Jun 21, 2018 5:11 pm

Re: Xsession Error after 19.1 KDE Kernel Upgrade

Post by gm10 » Sat Mar 30, 2019 3:39 pm

Well, the point is just to see where your disk space went. Common culprits would be /var/log or possibly /boot, so look out for those.

ztrede
Level 1
Level 1
Posts: 17
Joined: Sun Dec 28, 2014 3:27 pm

Re: Xsession Error after 19.1 KDE Kernel Upgrade

Post by ztrede » Sat Mar 30, 2019 3:43 pm

it didnt take too long:

du /var/* -sht 100M
174M /var/cache
1.9G /var/lib
548M /var/tmp

du / -hxd 1 -t 100M
11G /usr
1.2G /boot
2.6G /var
4.5G /lib
19G /

ztrede
Level 1
Level 1
Posts: 17
Joined: Sun Dec 28, 2014 3:27 pm

Re: Xsession Error after 19.1 KDE Kernel Upgrade

Post by ztrede » Sat Mar 30, 2019 3:48 pm

what do you think? is this something I need to manually go into and clean out? I only have documents saved in the /home partition, so I am not sure why the root partition is filling up. Did I make this partition too small when installing linux mint?

gm10
Level 17
Level 17
Posts: 7493
Joined: Thu Jun 21, 2018 5:11 pm

Re: Xsession Error after 19.1 KDE Kernel Upgrade

Post by gm10 » Sat Mar 30, 2019 3:57 pm

First let's get you into your desktop again. From your rescue prompt, run these commands:

Code: Select all

mount -o rw,remount /
rm -rfv /tmp/*
reboot
After the reboot you will hopefully be at your desktop. Go Update Manager > View > Linux Kernels > Remove old kernels... - that hopefully completes without errors. After that you'll have a little breathing room, but you'll have to see what's taking up the space in /usr - probably some flatpak applications (see flatpak list) or maybe you just installed a ton of other stuff. See if you really need all of that, and if you do, then yes, your partition needs to be increased in size. You can do that by booting the installation medium and running GParted, that allows you to resize partitions.

ztrede
Level 1
Level 1
Posts: 17
Joined: Sun Dec 28, 2014 3:27 pm

Re: Xsession Error after 19.1 KDE Kernel Upgrade

Post by ztrede » Sat Mar 30, 2019 4:14 pm

I did the following while in recovery mode:
I entered the commands you posted and rebooted through cli, but it started back through the grub menu, then gives me the same xsession error as before.
I tried the same commands again, then exited the root menu and selected resume and allowed the system to boot from recovery mode and had the same errors.

Am I not in the correct menu?

ztrede
Level 1
Level 1
Posts: 17
Joined: Sun Dec 28, 2014 3:27 pm

Re: Xsession Error after 19.1 KDE Kernel Upgrade

Post by ztrede » Sat Mar 30, 2019 4:17 pm

I do agree, now that you have pointed it out, that the old kernels are what is taking up the root partition memory, as I have been running this system for a while and there is many installed.

If I am unable to login through the gui, is there a way to remove the old kernels through cli instead of the update manager?

gm10
Level 17
Level 17
Posts: 7493
Joined: Thu Jun 21, 2018 5:11 pm

Re: Xsession Error after 19.1 KDE Kernel Upgrade

Post by gm10 » Sat Mar 30, 2019 4:24 pm

ztrede wrote:
Sat Mar 30, 2019 4:14 pm
I did the following while in recovery mode:
I entered the commands you posted and rebooted through cli, but it started back through the grub menu, then gives me the same xsession error as before.
Is it filling up /tmp again? Unusual, there shouldn't be that much data in there on boot. Well, best just skip right to the step where you resize the partitions I guess. Otherwise you'll have to make some room from the recovery prompt, E.g. rm -rfv /usr/lib/locale/* should free a couple hundred megabytes. You can remove old kernels, too, run

Code: Select all

apt list -i "linux-*"
and then just

Code: Select all

apt purge "linux-*XXX*" 
with XXX being the version number of whichever old kernel you want to remove. Don't try to remove the one you're currently using though.

ztrede
Level 1
Level 1
Posts: 17
Joined: Sun Dec 28, 2014 3:27 pm

Re: Xsession Error after 19.1 KDE Kernel Upgrade

Post by ztrede » Sat Mar 30, 2019 4:44 pm

Thank you so much for your help, this totally solved the problem. I appreciate you taking the time to walk me through this. Now that I have been looking at it it makes so much sense, and I feel silly for not catching the old kernels, but I am back up and running again!

gm10
Level 17
Level 17
Posts: 7493
Joined: Thu Jun 21, 2018 5:11 pm

Re: Xsession Error after 19.1 KDE Kernel Upgrade

Post by gm10 » Sat Mar 30, 2019 5:10 pm

Glad to hear it. But just from the kernels you would have recovered at most 900 MB, so disk space will remain an issue.

ztrede
Level 1
Level 1
Posts: 17
Joined: Sun Dec 28, 2014 3:27 pm

Re: Xsession Error after 19.1 KDE Kernel Upgrade

Post by ztrede » Sun Mar 31, 2019 10:19 pm

understood, I will change that partition so this doesnt happen again. Thanks again for your assistance!

Post Reply

Return to “KDE”