Boot problem - Only get to tty1, can't start graphical interface and disk seems to be full (it shouldn't)

I am running OpenSuse Tumbleweed.
Yesterday I started as usual the machine, but only got to tty1. I entered username/password and then tried to start the graphical interface using startx

After typing startx I got:

xauth: error in locking authority file /home/javierhilda/.serverauth.3506
xauth: error in locking authority file /home/javierhilda/.Xauthority
xauth: error in locking authority file /home/javierhilda/.Xauthority
xauth: error in locking authority file /home/javierhilda/.Xauthority
xauth: (stdin):1: bad display name "install:0" in "add" command

Waiting for X server to begin accepting connections
.(EE)
Fatal server error:
(EE) Could not create lock file in /tmp/.tX0-lock
(EE)
Please consult the X.Org Foundation Support at http://wiki.x.org for help
(EE)
xinit: giving up
xinit: unable to connect to X server: connection refused
xinit: server error
--------------------------------------------------------------------------
xinit failed. /usr/bin/Xorg is not setuid, maybe that's the reason?
If so either use a display manager (strongly recommended) or adjust /etc/permissions.local and run "chkstat --system --set" afterwards
xauth: error in locking authority file /home/javierhilda/.Xauthority 

I also tried the same (startx command) from root user with no results.

I rebooted and the system informed me it entered in recovery mode, so it asked several (a lot) of times for root password, it was painfully slow to get to the cursor.

Once I did, I tried to move some files from one directory to another, and it would not let me do that because there was no space left on the drive (there were yesterday several GB of free space).

Please help me recover control of my computer, thanks in advance for your cooperation.

Wild guess, but it appears to me that you are booting to a read-only file system. Perhaps a BTRFS problem, maybe someone with that experience will jump in now that I have replied to you.

Meantime, I will see if I can dig something up, but I don’t use BTRFS myself. Good luck.

Can you check which .Xauthority-files are in your home folder with

 ls -l .Xauthority*

Removing all of these files and apparently .serverauth.3506 from your home directory (everything without sudo/root privileges) could solve the issue with X not starting.

After removing the files you would have to restart X / reboot.

What size is your / filesystem? Snapshotting configured by a default installation with BTRFS as the / filesystem can easily exhaust freespace on an otherwise adequately sized partition if not administratively maintained.

Do not log into GUI as root it can cause this kind of problem. Only become root when you need to be

Thanks for your answer.
I tried what you suggested, but didn’t work out. The file didn’t exist.

ls -l .Xauthority
  ls: no se puede acceder a '.Xauthority*': no existe el fichero o el directorio

Thanks for your answer. Yes, I use root only when necessary

Thanks for answering. The system is not read-only, I used it just a few hours before this issue and I’m creating files and editing all the time.

Thank you for answering. I run this command

sudo fdisk -l /dev/sda
    Disco /dev/sda: 465,76 GiB, 500107862016 bytes, 976773168 sectores
    Modelo de disco: WDC WD500LPVX-2
    Unidades: sectores de 1 * 512 = 512 bytes
    Tamaño de sector (lógico/físico): 512 bytes / 4096 bytes
    Tipo de etiqueta de disco: gpt
    Identificador de disco: 84629602-5EC2-4FDB-B2F2-E2CEE566FFB7

Disposit.        Comienzo     Final    Sectores    Tamaño Tipo
/dev/sda1            2078   1230847     1228800      600M Entorno de recuperación de Windows
/dev/sda2         1230848   1845247      614400      300M Sistema EFI
/dev/sda3         1845248   2107391      262144      128M Reservado para Microsoft
/dev/sda4         2107392 491880447   489773056    233,5G Datos básicos de Microsoft
/dev/sda5       948938752 976773119    27834368     13,3G Entorno de recuperación de Windows
/dev/sda6       491880448 944744447   452864000    215,9G Sistema de ficheros de Linux
/dev/sda7       944744448 948938751     4194304        2G Linux swap

Las entradas en la tabla de particiones no están en el orden del disco

I also tried

sudo -i
du -ah / | sort -rh | head -n 20
   sort: cannot create temporary file in '/tmp': No space left on device

So it’s confirmed that somehow the disk is full (as I said, just a day before it had plenty of space).

I don’t know which files would be safe to delete in order to be able to start the GUI properly and also how to fix this (I guess it had to do with the upgrades of the system).

Thanks in advance to all of you that are helping me.

(I added the *, as that might have been just a typo in your post)

Okay, there should be still some files, as can be seen in your error message
Try ls -a | grep .Xauthority from your home directory.

You were right, it was a typo. I am copying from the notes I took, because I am using the same notebook (but running Windows now, as you may have noticed it’s a dual boot system).
So , I did type

ls -l .Xauthority*

When I finally could access the system, after several “exit” commands, I got this:

exit
  Reloading system manager configuration.
  Starting default.target
  [ 2610.804181 ][ T1227 ] /var/lib/snapd/snaps/core_15925.snap: Can't lookup blockdev
  [ 2634.177767 ][ T1286 ] /var/lib/snapd/snaps/snapd_19993.snap: Can't lookup blockdev
  [ 2637.879979 ][ T1291 ] /var/lib/snapd/snaps/teams-for-linux_436.snap: Can't lookup blockdev
  /bin/mv: cannot overwrite '/var/log/boot.omsg': No queda espacio en el dispositivo
  /bin/sh: línea 1: /var/log/boot.msg: No queda espacio en el dispositivo

Welcome to openSUSE Tumbleweed 20240205 - Kernel  6.7.2-1-default (tty1)

The statement “No queda espacio en el dispositivo” means “No space left on device

Remount /tmp using tmpfs (RAM FS): sudo mount -t tmpfs none /tmp.
If you’re absolutely sure, you can delete some of the snapper snapshots.
That should save up some space.
Next would be large media files.
This should free up just enough space to enable getting the system in a working state again.

If zypper is configured to keep downloaded packages, you can gain space by removing them: sudo zypper clean.

Check the subdirectory in /var/log/journal/. If it has files more than 6 months old or file count is more than a dozen or so, its doing a lot of space wasting. Space it uses is configurable in /etc/systemd/journald.conf.

Snapshots can be humonguous space consumers. Ancient snapshots aren’t needed. Delete excess.

Thank you all for answering.

I tried first the idea of dealing with /var/log/journal but I had not such directory.

Then I tried the idea of checking the snapshots. I found the ./snapshots directory.
I used

sudo snapper delete 1002
sudo snapper delete 1003

I had snapshots

1002   Feb 6   05:52
1003   Feb 6   06:15
1004   Feb 7   01:16
1005   Feb 7   01:27
1006   Feb 7   22:45

and it worked, now I am running again the system in GUI.

I still did not try the idea of remounting /tmp

Also, I would like to know what would be the best way to prevent the same situation with the snapshots?

Thank you all for your help, I really appreciate it

First you need to finish the search for waste. How old is this installation? How often have you been doing upgrades? If old installation and keeping packages in cache your space problem could be almost entirely /var/log/cache/zypp/. Did you try sudo zypper clean? Your 200GB+ TW filesystem shouldn’t have a problem supporting more than 5 snapshots, unless you have been saving many large files such as videos or .isos.

Originally I had installed version 15.2, then (last year) switched to Tumbleweed. The system offers different package upgrades quite often, sometimes there are several hundreds packages to update.

I did try sudo zypper clean, although I don´t know how much space was recovered with that command.

/var/log/cache/zypp

does not exist on my system. However I do have /var/cache/zypp wich has 106,8 MB.

And yes, I do have some large files on my system (not too large, but there are many, that amounts to about 150 GB).

That was error missed at the time, and the forum software doesn’t allow edits after 10 minutes. /var/cache/zypp/packages/ is what I should have typed.

Between the 233.5G / filesystem size, your 150G files on / instead of /home/, and the OS with BTRFS and snapshotting, I can see freespace able to run short if snapshot count gets past a relatively small number.

How much is your current freespace? How many snapshots remain?

I deleted snapshots 1002 and 1003, still remaining are 1004, 1005 y 1006.

I run this to see the disk usage at the moment:

df -h

S.ficheros     Tamaño Usados  Disp Uso% Montado en
/dev/sda6        216G   195G   21G  91% /
devtmpfs         4,0M   8,0K  4,0M   1% /dev
tmpfs            1,9G    96M  1,8G   6% /dev/shm
efivarfs         120K    38K   78K  33% /sys/firmware/efi/efivars
tmpfs            761M    41M  720M   6% /run
/dev/sda2        296M    56M  241M  19% /boot/efi
/dev/sda6        216G   195G   21G  91% /.snapshots
/dev/sda6        216G   195G   21G  91% /boot/grub2/i386-pc
/dev/sda6        216G   195G   21G  91% /home
/dev/sda6        216G   195G   21G  91% /root
/dev/sda6        216G   195G   21G  91% /opt
/dev/sda6        216G   195G   21G  91% /srv
/dev/sda6        216G   195G   21G  91% /tmp
/dev/sda6        216G   195G   21G  91% /usr/local
/dev/sda6        216G   195G   21G  91% /boot/grub2/x86_64-efi
/dev/sda6        216G   195G   21G  91% /var
/dev/loop5        64M    64M     0 100% /snap/core20/2105
/dev/loop2       128K   128K     0 100% /snap/bare/5
/dev/loop6        64M    64M     0 100% /snap/core20/2015
/dev/loop9        74M    74M     0 100% /snap/core22/864
/dev/loop0        56M    56M     0 100% /snap/core18/2812
/dev/loop7        75M    75M     0 100% /snap/core22/1033
/dev/loop4       106M   106M     0 100% /snap/core/16202
/dev/loop1        56M    56M     0 100% /snap/core18/2796
/dev/loop8       165M   165M     0 100% /snap/gnome-3-28-1804/194
/dev/loop13       30M    30M     0 100% /snap/ruby/317
/dev/loop12       92M    92M     0 100% /snap/gtk-common-themes/1535
/dev/loop14       41M    41M     0 100% /snap/snapd/20671
/dev/loop17       94M    94M     0 100% /snap/mysql-shell/29
/dev/loop16       62M    62M     0 100% /snap/mysql-server/9
/dev/loop18      377M   377M     0 100% /snap/zoom-client/218
/dev/loop19      497M   497M     0 100% /snap/gnome-42-2204/141
/dev/loop20       21M    21M     0 100% /snap/node/6195
/dev/loop21       21M    21M     0 100% /snap/node/5857
/dev/loop15       41M    41M     0 100% /snap/snapd/20290
/dev/loop23       32M    32M     0 100% /snap/ruby/323
/dev/loop24       86M    86M     0 100% /snap/teams-for-linux/523
/dev/loop11      338M   338M     0 100% /snap/inkscape/10555
/dev/loop22       86M    86M     0 100% /snap/teams-for-linux/521
/dev/loop10      165M   165M     0 100% /snap/gnome-3-28-1804/198
tmpfs            381M    76K  381M   1% /run/user/1000
/dev/loop25      106M   106M     0 100% /snap/core/16574

The 150GB are on a directory inside /home

Actually, for BTRFS system, it’s preferred to run this:

# btrfs filesystem usage -T /

Thanks aggie. Here is the result:


btrfs filesystem usage -T /
Overall:
    Device size:                 215.94GiB
    Device allocated:            215.94GiB
    Device unallocated:            1.00MiB
    Device missing:                  0.00B
    Device slack:                    0.00B
    Used:                        193.90GiB
    Free (estimated):             20.78GiB      (min: 20.78GiB)
    Free (statfs, df):            20.78GiB
    Data ratio:                       1.00
    Metadata ratio:                   2.00
    Global reserve:              292.27MiB      (used: 0.00B)
    Multiple profiles:                  no

             Data      Metadata System                              
Id Path      single    DUP      DUP      Unallocated Total     Slack
-- --------- --------- -------- -------- ----------- --------- -----
 1 /dev/sda6 211.82GiB  4.06GiB 64.00MiB     1.00MiB 215.94GiB     -
-- --------- --------- -------- -------- ----------- --------- -----
   Total     211.82GiB  2.03GiB 32.00MiB     1.00MiB 215.94GiB 0.00B
   Used      191.04GiB  1.43GiB 48.00KiB  ```