You are not logged in.

#1 2024-01-02 07:17:29

Jazztache
Member
Registered: 2022-10-07
Posts: 65

Booting Arch Without X11/Wayland On Startup Launch Option

Hello!

I was wondering if there was a way to add a custom system-d boot boot option that launches Arch Linux, but without starting X, KWin or KDE Plasma.

I would like this because I can use a terminal workflow for some CPU intensive apps and would like the option to do this on boot.

I've looked on https://wiki.archlinux.org/title/system … figuration and it seems like I can create a new boot option, which would be the best way of implementing this, but I have no idea to make such that it makes Arch skip over running X11 (or Wayland but I always use X11).
I would rather it skip over booting into X11 or Wayland rather than taking the method of `killall x11`, since it's a bit cleaner and less hack-y.

How would I go about this? What documentation should I read first in order to get an idea of how to do this?

Note: I run KDE Plasma, I'm using systemd-boot and I installed my system using Archinstall.

Last edited by Jazztache (2024-01-02 07:18:03)

Offline

#2 2024-01-02 08:13:12

just4arch
Member
Registered: 2023-01-07
Posts: 126

Re: Booting Arch Without X11/Wayland On Startup Launch Option

Just add a boot entry with systemd.unit=multi-user.target added to the kernel command line?
Or disable auto-starting X and manually start it when you need it.

Offline

#3 2024-01-02 08:19:18

Jazztache
Member
Registered: 2022-10-07
Posts: 65

Re: Booting Arch Without X11/Wayland On Startup Launch Option

With the first option, what does systemd.unit=multi-user.target specifically do?
As for auto-disabling the usual display stack, I usually do need it, but I want to have an alternate option to not use it for some sessions. It's like a 80 / 20 split between 'i need it this session' and 'tty is fine'.

Offline

#4 2024-01-02 10:44:43

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: Booting Arch Without X11/Wayland On Startup Launch Option

Jazztache wrote:

what does systemd.unit=multi-user.target specifically do?

Read the "KERNEL COMMAND LINE" section in systemd(1), that explains the option.


Jin, Jîyan, Azadî

Offline

#5 2024-01-03 00:25:37

Jazztache
Member
Registered: 2022-10-07
Posts: 65

Re: Booting Arch Without X11/Wayland On Startup Launch Option

Sorry for the late reply!

I had a look at the systemd manual, and I couldn't find anything specifically relating to `multi-user.target`. I know that systemd.unit= lets you pick which unit to override, but I couldn't find that specific entry.
My `/multi-user` in man gave me no results...

Usually, I'm all for reading documentation, but would it be alright if someone explained it in laymans terms, please? I haven't done any systemd configuration before manually so this is new territory for me. Just want to make sure I know what I need to know in the event any boot issues arise. If an Arch Wiki article explains this much better than I would be OK with that.

Thankyou for the help!

Offline

#6 2024-01-03 00:31:35

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,727

Re: Booting Arch Without X11/Wayland On Startup Launch Option

Offline

#7 2024-01-03 00:33:26

Jazztache
Member
Registered: 2022-10-07
Posts: 65

Re: Booting Arch Without X11/Wayland On Startup Launch Option

Ah, non-graphical. I'm guessing I just use this in a systemd boot entry and I'm ready to go?

Offline

#8 2024-01-03 08:45:15

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,034

Re: Booting Arch Without X11/Wayland On Startup Launch Option

What do you think it the worst possible outcome if you just tried?

Offline

#9 2024-01-03 10:46:13

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: Booting Arch Without X11/Wayland On Startup Launch Option

Jazztache wrote:

I had a look at the systemd manual, and I couldn't find anything specifically relating to `multi-user.target`

You have to read the man pages recursively. In this case the relevant information can be found in systemd.special(7).

The documentation for systemd really is first rate, comparable to OpenBSD's man pages IMO.


Jin, Jîyan, Azadî

Offline

#10 2024-01-03 21:09:22

Jazztache
Member
Registered: 2022-10-07
Posts: 65

Re: Booting Arch Without X11/Wayland On Startup Launch Option

seth wrote:

What do you think it the worst possible outcome if you just tried?

Murphy's Law - anything that can go wrong will go wrong smile
If anything goes wrong I recon it's easily reversible with a live CD and chroot though, it's just a massive hassle and I want to make absolute sure that I know what I need to know. The systemd manpages have been helpful btw.

Head_on_a_Stick wrote:

You have to read the man pages recursively.

OK. By recursively, do you mean follow the links that are in the manpages? Unsure what it would mean to read manpages *recursively* in this context.
I did find a better explanation of multi-user.target though.

I'll probably just go ahead with it later when I have some time.

Offline

#11 2024-02-09 05:00:22

Jazztache
Member
Registered: 2022-10-07
Posts: 65

Re: Booting Arch Without X11/Wayland On Startup Launch Option

Solution:
Add a file at /boot/loader/entries/yourbootnamehere.conf, and write to following to it:

title Arch Linux - TTY (linux)
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux.img
options root=PARTUUID=<yourpartitionuuidforroothere> zswap.enabled=0 rw rootfstype=ext4 systemd.unit=multi-user.target

be sure to replace yourpartitionuuidforroothere with the partition id for your root partition. I got mine by looking at the default archinstall generated one.

Feel free to mark this as solved smile

Offline

#12 2024-02-09 07:36:51

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,034

Re: Booting Arch Without X11/Wayland On Startup Launch Option

Mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

And for posteriority and future readers:
Blindly writing random kernel commandlines is a stupid idea in any case and if your root FS isn't ext4, the above will crossfuck you badly.

Offline

Board footer

Powered by FluxBB