Fail to start SDDM from a BTRFS snapshot in GRUB

Hi all :raised_hand_with_fingers_splayed:

I just did a fresh install of Manjaro KDE using BTRFS partitioning, using the manjaro installer.
I have installed also snapper snap-pac-grub snap-pac grub-btrfs to automatically take system snapshots and be able to boot on them from the Grub menu.
I have the following volume structure provided by the command sudo btrfs subvolume list /

ID 256 gen 7542 top level 5 path @
ID 257 gen 7542 top level 5 path @home
ID 343 gen 7527 top level 256 path .snapshots
ID 344 gen 5110 top level 343 path .snapshots/1/snapshot
ID 383 gen 6084 top level 343 path .snapshots/40/snapshot
ID 393 gen 6977 top level 343 path .snapshots/49/snapshot
ID 407 gen 7233 top level 343 path .snapshots/63/snapshot
ID 408 gen 7235 top level 343 path .snapshots/64/snapshot
ID 409 gen 7245 top level 343 path .snapshots/65/snapshot
ID 410 gen 7247 top level 343 path .snapshots/66/snapshot
ID 411 gen 7255 top level 343 path .snapshots/67/snapshot
ID 412 gen 7256 top level 343 path .snapshots/68/snapshot
ID 415 gen 7321 top level 343 path .snapshots/71/snapshot
ID 416 gen 7324 top level 343 path .snapshots/72/snapshot
ID 417 gen 7334 top level 343 path .snapshots/73/snapshot
ID 418 gen 7336 top level 343 path .snapshots/74/snapshot
ID 421 gen 7458 top level 343 path .snapshots/77/snapshot
ID 422 gen 7469 top level 343 path .snapshots/78/snapshot
ID 423 gen 7523 top level 343 path .snapshots/79/snapshot
ID 424 gen 7524 top level 343 path .snapshots/80/snapshot

I do have my snapshots listed on the Grub menu. However, when I try to boot from one of them, I get the following error :

[FAILED] Failed to start Simple Desktop Display Manager

I am struggling to find relevant information on the system journal.
I have many The X11 connection broke (error 1). Did the X11 server die?. But, is it connected ?

Has anyone seen that ? Would you have an idea on how to troubleshoot that ?

Thanks! :pray:

I have the exact same problem, when trying to boot a snapshot with grub btrfs.

Thanks for the feedback.

Since I have posted, I have changed my configuration. I use Timeshift + BTRFS instead of snapper + BTRFS.
I would then use Timeshift to restore a snapshot.

Kris

your Snapshots are probable readonly and your BTRFS subvolume layout donā€™t support then starting DE. Try

sudo btrfs property get /.snapshots/???/snapshot ro                                                                                                                            

to see if it readonly. Timeshift creates writeable snapshots to my knownledge, thats why i donā€™t use it.

To fully bootup a readonly root snapshot into GUI you have to change your BTRFS layout. Mine is

/dev/nvme0n1p3 on / type btrfs (rw,noatime,compress=zstd:5,ssd,space_cache,subvolid=256,subvol=/@)
/dev/nvme0n1p3 on /.snapshots type btrfs (rw,noatime,compress=zstd:5,ssd,space_cache,subvolid=263,subvol=/@snapshots)
/dev/nvme0n1p3 on /btrfs type btrfs (rw,noatime,compress=zstd:5,ssd,space_cache,subvolid=5,subvol=/)
/dev/nvme0n1p3 on /home type btrfs (rw,noatime,compress=zstd:5,ssd,space_cache,subvolid=257,subvol=/@home)
/dev/nvme0n1p3 on /opt type btrfs (rw,noatime,compress=zstd:5,ssd,space_cache,subvolid=261,subvol=/@opt)
/dev/nvme0n1p3 on /var type btrfs (rw,noatime,compress=zstd:5,ssd,space_cache,subvolid=259,subvol=/@var)
/dev/nvme0n1p3 on /root type btrfs (rw,noatime,compress=zstd:5,ssd,space_cache,subvolid=258,subvol=/@root)
/dev/nvme0n1p3 on /srv type btrfs (rw,noatime,compress=zstd:5,ssd,space_cache,subvolid=260,subvol=/@srv)
/dev/sda2 on /media/backup type btrfs (rw,noatime,compress=zstd:15,ssd,space_cache,subvolid=5,subvol=/)

Because of the @var subvolume i can boot readonly root snapshots into GUI. But i use this only to rollback and only in emergency.
Daily differential backups with snap-sync on external SSD formated with BTRFS on /dev/sda2.

Forgot: i use snapper, snap-sync, snap-pac, grub-btrfs. Snapper only to take snapshots and rollback manual because itā€™s easier. Folder /var is +C attribute set because the fstab mount option nodatacow isā€™nt working (eg. the first mount option in fstab is used for all btrfs subvols uptodate)

please read

/usr/share/doc/grub-btrfs/README.md
  1. you donā€™t need snap-pac-grub anymore if you enable ā€œgrub-btrfs.pathā€
  2. is explained how to boot readonly snapshots

The only tricky part is a Snapper Rollback, on my opinion to complicated, because in a readonly booted snapshot you canā€™t update Grub2. I use manual rollbacks. First i boot into a readonly snapshot and take a look if the problems are gone. Then I make a readonly snapshot of my previous damaged system. Then i delete this damaged subvolume. Then i replace this subvolume with a new writeable snapshot of the actual booted readonly snapshot. Thus i replaced the damaged default snapshot (eg. a subvolume is the same as an snapshot) with a writable snapshot of the actual booted readonly snapshot. Thats only three commands in the CLI. Then i reboot and because the GRUB holds the same menu configuration as prior we donā€™t have to update-grub.

sudo btrfs subvol delete /btrfs/@
sudo btrfs subvol snapshot /btrfs/@snapshots/#/snapshot /btrfs/@
sudo reboot
  • /btrfs as above seen is mounted SubVolID=5 to access easily all BTRFS subvolumes
  • snapshot number # is the actual booted readonly snapshot, mount | grep btrfs

And i use snapper-gui as ā€œreplacementā€ for Timeshifts GUI. Itā€™s not as good as Timeshift but most time enough to work seamless.