Score:0

How to stop and disable CUPS service in Ubuntu 22.04

ve flag

I have noticed with top that the cups-browsed process is taking all of my RAM and CPU. This is apparently an open issue as of today. I want to disable it to make my computer usable again.

Previous answers suggest using systemd stop. But cups is not listed when running systemd, and calling systemd stop on it returns something along the lines of: non existing service.

According to top, the command used to launch it is:

cups-browsed -c /var/snap/cups/common/etc/cups/cups-browsed.conf
guiverc avatar
cn flag
What exactly do you mean by an *open issue* ? If it's a bug, please provide the BUG ID so we can explore what you're referring to.
24601 avatar
in flag
I think you misunderstand how ram is utilised in Linux. If all your ram is being used, it's a good thing, no? You've not paid for something you're not using.
darmual avatar
ve flag
@24601, yes but still a single background process which normally uses less than 1% of my memory suddenly using 8GB, is concerning. I understand the OS hogs unused memory, but a normal process doesn't randomly allocate 8 GB
24601 avatar
in flag
No unfortunately, you still haven't got it. Unused RAM is wasted RAM. In simple terms, even though various utils will report that you are using all your RAM, when you launch a new program, the kernel will absolutely provide memory to that application. Same applies with CPU usage.
darmual avatar
ve flag
@24601 Yes but: (1) it's not the same thing all the RAM being used in the machine (which is great), than all the RAM being used by a specific single userland process that shouldn't be using it. (2) AFAIK ~100% CPU usage (as reported by top) is not normal for a Unix computer on idle (normal for me is ~1% and it went back to that as soon as I killed cups).
24601 avatar
in flag
comments is not the place to discuss this. I still think you're misunderstanding how Linux works under the hood but if you still have a question about RAM usage then ask a separate question
Score:2
ve flag

Use:

sudo snap stop cups
sudo snap disable cups

Explanation:

It seems you are running the snap version of the service. That cannot be managed by systemd. You can see the services running under snap by using:

snap services

After running the aforementioned commands it should yeld:

Service            Startup   Current   Notes
cups.cups-browsed  disabled  inactive  -
cups.cupsd         disabled  inactive  -
lxd.activate       enabled   inactive  -
lxd.daemon         enabled   inactive  socket-activated

Showing that you have stoped (inactive) and prevented from autostarting on boot (disabled) cups.cups-browsed and cups.cupsd

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.