You are not logged in.

#1 2013-04-28 15:01:36

toni
Member
Registered: 2011-10-15
Posts: 437

[SOLVED] Remove pcspkr.ko from kernel

I would like to remove pcspkr.ko from kernel but I have not find it, only pcspkr.ko.gz.
As far as I know, arch uses gzip compressed modules, right? so if I remove pcspkr.ko.gz from the appropriate folder:

/lib/modules/`uname -r`/kernel/drivers/input/misc/

and then I perform the following:

depmod -a

and finally, reboot the system, is it enough, right?

Thanks!

Last edited by toni (2013-04-28 19:18:51)

Offline

#2 2013-04-28 15:06:00

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: [SOLVED] Remove pcspkr.ko from kernel

Well, even if it works (I think so, but I'm not sure), the module will reappear after every update of linux. So it's better to forbid it to be loaded in the first place. For this, create the file /etc/modprobe.d/blacklist.conf and put

blacklist pcspkr

in it.

Offline

#3 2013-04-28 15:44:03

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,592
Website

Re: [SOLVED] Remove pcspkr.ko from kernel


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#4 2013-04-28 15:54:11

toni
Member
Registered: 2011-10-15
Posts: 437

Re: [SOLVED] Remove pcspkr.ko from kernel

Blacklisting in this way is not correct as pcspkr could be loaded by another non-blacklisted module depends on it. So be careful using this way when blacklisting modules.

Better adding below line to /etc/modprobe.d/blacklist.conf

...
install module_name /bin/false
...

See below link:
https://wiki.archlinux.org/index.php/Ke … obe.d.2F_2

Offline

#5 2013-04-28 15:55:40

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] Remove pcspkr.ko from kernel

toni wrote:

Blacklisting in this way is not correct as pcspkr could be loaded by another non-blacklisted module depends on it. So be careful using this way when blacklisting modules.

Better adding below line to /etc/modprobe.d/blacklist.conf

...
install module_name /bin/false
...

See below link:
https://wiki.archlinux.org/index.php/Ke … obe.d.2F_2

This is a hack which leads to broken modules. Nothing depends on pcspkr. Blacklist it.

Offline

#6 2013-04-28 16:44:01

toni
Member
Registered: 2011-10-15
Posts: 437

Re: [SOLVED] Remove pcspkr.ko from kernel

falconindy wrote:
toni wrote:

Blacklisting in this way is not correct as pcspkr could be loaded by another non-blacklisted module depends on it. So be careful using this way when blacklisting modules.

Better adding below line to /etc/modprobe.d/blacklist.conf

...
install module_name /bin/false
...

See below link:
https://wiki.archlinux.org/index.php/Ke … obe.d.2F_2

This is a hack which leads to broken modules. Nothing depends on pcspkr. Blacklist it.

ok, thanks for the info as in that link it is not said that it leads to broken modules. Anyway,  I think it would be good to indicate it in the link I have provided (The person in charge of maintaining it should provide this useful info).

Anyway, I would like to know if I am correct about that arch uses compressed gzip modules (*.ko.gz) instead of (*.ko). Could you confim it? and could you confirm me if what I have said in the first post is correct? So I can close this thread as solved. It was a doubt that I had.

Only one thing, about blacklisting despite it corresponds to another thread I opened some days aro: as you say, nothing depends on pcskpr, so why blacklisting it, it is loaded anyway and pc speaker emits a beep?
I remember to blacklisting it in the way you say, even doing what I have said, and systemd for some reason was loading it. I checked some days ago by doing:

 lsmod | grep pcspkr

also, could you confirme that these two methods are effective for blacklisting? I am not sure at all. It would be good that someone could confirm it as well.

Offline

#7 2013-04-28 17:32:09

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,422
Website

Re: [SOLVED] Remove pcspkr.ko from kernel

toni, I can't speak for anyone else, but your last post is not clear to me at all.

Blacklisting pcspkr as suggested by Army is the right way to go.  This has now been confirmed by Graysky, Falconindy, and now me.  This works / should work.  Are you saying you have created the blacklist.conf file with that line, rebooted, yet you still have pcspkr loaded?  If so, what is the full output from `lsmod | grep pcspkr`?  Does pcspkr show as a dependency for another module (it shouldn't).

The .ko.gz files are normal.

What is it you want confirmed that has not already been confirmed?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#8 2013-04-28 18:10:48

toni
Member
Registered: 2011-10-15
Posts: 437

Re: [SOLVED] Remove pcspkr.ko from kernel

Trilby wrote:

toni, I can't speak for anyone else, but your last post is not clear to me at all.

Blacklisting pcspkr as suggested by Army is the right way to go.  This has now been confirmed by Graysky, Falconindy, and now me.  This works / should work.  Are you saying you have created the blacklist.conf file with that line, rebooted, yet you still have pcspkr loaded?  If so, what is the full output from `lsmod | grep pcspkr`?  Does pcspkr show as a dependency for another module (it shouldn't).

The .ko.gz files are normal.

What is it you want confirmed that has not already been confirmed?

I remember some days ago to blacklisting pcspkr using the two ways stated in the previous posts and lsmod was returning pcspkr (loaded) but I do not remember if it was being used by another module. Anyway, if all of you are saying this is the correct way to do it, I trust on you.

Regarding to kernel modules, what is the difference between compressed gzip modules (*.ko.gz) and not compressed (*.ko)? When is used ko.gz and when *.ko? In my case I wanted to delete pcspkr.ko but only existed pcspkr.ko.gz.

Thanks!

Offline

#9 2013-04-28 18:16:01

AndrzejL
Member
Registered: 2012-12-07
Posts: 160

Re: [SOLVED] Remove pcspkr.ko from kernel

Do not remove it from kernel. Someone may need it.

+1 to blacklisting.

Cheers.

Andrzej


The worst thing about censorship is ██████ ██ ████ ████████████ and ██████ ███████ ███ ███████████.

Offline

#10 2013-04-28 18:19:10

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [SOLVED] Remove pcspkr.ko from kernel

toni wrote:

what is the difference between compressed gzip modules (*.ko.gz) and not compressed (*.ko)? When is used ko.gz and when *.ko?

Well... one is compressed... and the other isn't.

I honestly can't think of a better answer to your question.

Arch has chosen to compress its modules, so we never use *.ko. The module management tools in the kmod package deal with this transparently.

Offline

#11 2013-04-28 19:20:51

toni
Member
Registered: 2011-10-15
Posts: 437

Re: [SOLVED] Remove pcspkr.ko from kernel

AndrzejL wrote:

Do not remove it from kernel. Someone may need it.

+1 to blacklisting.

Cheers.

Andrzej

OK, I will take it into account. Thanks!

Offline

#12 2013-04-28 19:23:16

toni
Member
Registered: 2011-10-15
Posts: 437

Re: [SOLVED] Remove pcspkr.ko from kernel

tomk wrote:
toni wrote:

what is the difference between compressed gzip modules (*.ko.gz) and not compressed (*.ko)? When is used ko.gz and when *.ko?

Well... one is compressed... and the other isn't.

I honestly can't think of a better answer to your question.

Arch has chosen to compress its modules, so we never use *.ko. The module management tools in the kmod package deal with this transparently.

Maybe the compressed option to save disk usage?

Thanks a lot.

Offline

#13 2013-05-01 02:37:29

ackalker
Member
Registered: 2012-11-27
Posts: 201

Re: [SOLVED] Remove pcspkr.ko from kernel

People, could you please stop powerquoting (i.e. quoting the entire discussion) and powerposting (this isn't Google+!)?
My mouse wheel has enough mileage already. Thank you.

Last edited by ackalker (2013-05-01 02:40:00)

Offline

Board footer

Powered by FluxBB