Re: [gentoo-user] Can I suppress the bleep when shutting down?

2015-10-22 Thread João Miguel
> 'modprobe -r pcspkr' should remove the offending beep.
>> No, no, no!  I don't want to disable my loudspeaker!  For example, I get
>> beeps through my ssh connection with my ISP telling me that new mail has
>> arrived.
He just wants to disable it _on shutdown_, not always.

João Miguel



Re: [gentoo-user] Can I suppress the bleep when shutting down?

2015-10-21 Thread Neil Bothwick
On Wed, 21 Oct 2015 10:23:46 +, Alan Mackenzie wrote:

> "Modern" UEFI firmware not reporting such errors, if such be the case,
> would be one of the reasons for me to depise UEFI as I do.

I can't see that being true.

>  Why do I
> need UEFI?  A traditional BIOS can boot my machine just fine, and the
> sole purpose of UEFI seems to be to prevent OS's which aren't Microsoft
> Windows from booting, and to brick certain Samsung laptops.

You seem to be confusing UEFI with Secure Boot.

For me, the greatest benefit of UEFI is that I no longer have to deal
with GRUB.


-- 
Neil Bothwick

"Two things are infinite: the universe and human stupidity;
 and I'm not sure about the the universe."
 (Albert Einstein)


pgpRKlElJMzfk.pgp
Description: OpenPGP digital signature


Re: [gentoo-user] Can I suppress the bleep when shutting down?

2015-10-21 Thread Mick
On Wednesday 21 Oct 2015 14:29:24 Neil Bothwick wrote:
> On Wed, 21 Oct 2015 10:23:46 +, Alan Mackenzie wrote:
> > "Modern" UEFI firmware not reporting such errors, if such be the case,
> > would be one of the reasons for me to depise UEFI as I do.
> 
> I can't see that being true.
> 
> >  Why do I
> > 
> > need UEFI?  A traditional BIOS can boot my machine just fine, and the
> > sole purpose of UEFI seems to be to prevent OS's which aren't Microsoft
> > Windows from booting, and to brick certain Samsung laptops.
> 
> You seem to be confusing UEFI with Secure Boot.
> 
> For me, the greatest benefit of UEFI is that I no longer have to deal
> with GRUB.

Or MBR's limitation of not being able to boot from disks >2TB.

PS. A bit [O/T] but has anyone used Coreboot and how did it compare to UEFI?

-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Can I suppress the bleep when shutting down?

2015-10-21 Thread Mick
On Wednesday 21 Oct 2015 11:23:46 Alan Mackenzie wrote:

> Indeed, on The Register the other day, in a comments sections, somebody
> described how he had a dual boot GNU/Linux Windows setup, and after a
> Windows update, the GNU/Linux wouldn't boot at all.  He suspected that
> the Windows update had tampered with the UEFI CMOS settings somehow.

I wouldn't think that MSWindows would interfere in the UEFI settings and 
enable Secure Boot, but it may have messed up the boot loader settings - esp. 
if the poster had set up the MSWindows boot manager to chainload their Linux 
OS.


> Do modern motherboards still allow you the option of running under the
> traditional BIOS?  I've not seen this mentioned in any of the motherboard
> descriptions recently.

From what I have seen there is a conventional BIOS compatibility setting, to 
allow booting vanilla MBR disks.

-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Can I suppress the bleep when shutting down?

2015-10-21 Thread Lee
'modprobe -r pcspkr' should remove the offending beep.
On Oct 20, 2015 9:10 AM, "Alan Mackenzie"  wrote:

> Hello, Gentoo.
>
> Every time I shut down my gentoo system with "shutdown -h now", it beeps
> at me.  This is becoming steadily more irritating as the months go by.
> Just what is this beep supposed to be telling me?  I _know_ I'm shutting
> the machine down.
>
> Can anybody here tell me how to disable this ing annoyance?
>
> Many thanks in advance!
>
> --
> Alan Mackenzie (Nuremberg, Germany).
>
>


Re: [gentoo-user] Can I suppress the bleep when shutting down?

2015-10-21 Thread Mick
On Wednesday 21 Oct 2015 10:03:42 Peter Humphrey wrote:
> On Tuesday 20 October 2015 19:22:12 Alan McKinnon wrote:
> > Where is the beep coming from?
> > 
> > Real speakers (like where music comes out) - check Alerts &
> > Notifications or similar in your DE.
> > 
> > That silly monotone speaker that can only make bing noises and has been
> > in pc's since the first one?
> 
> Am I unusual in not having such a speaker in either of my boxes?

No, modern PCs don't always have an internal speaker fitted, although the 
MoBos have terminals to connect a piezoelectric speaker to.  They are/were 
useful for BIOS error messages, but I am not sure if modern UEFI firmware 
produces error code beeps when things go wrong - I haven't fitted a speaker to 
mine.

-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Can I suppress the bleep when shutting down?

2015-10-21 Thread Alan Mackenzie
Hello, Mick.

On Wed, Oct 21, 2015 at 10:55:29AM +0100, Mick wrote:
> On Wednesday 21 Oct 2015 10:03:42 Peter Humphrey wrote:
> > On Tuesday 20 October 2015 19:22:12 Alan McKinnon wrote:
> > > Where is the beep coming from?

> > > Real speakers (like where music comes out) - check Alerts &
> > > Notifications or similar in your DE.

> > > That silly monotone speaker that can only make bing noises and has been
> > > in pc's since the first one?

> > Am I unusual in not having such a speaker in either of my boxes?

> No, modern PCs don't always have an internal speaker fitted, although the 
> MoBos have terminals to connect a piezoelectric speaker to.  They are/were 
> useful for BIOS error messages, but I am not sure if modern UEFI firmware 
> produces error code beeps when things go wrong - I haven't fitted a speaker 
> to 
> mine.

My 6 year old motherboard, according to its documentation (I've never
tried it out), produces a code of beeps when it detects errors such as no
keyboard being found at boot up.  I think no monitor being found also
produces a beep code.  A loudspeaker in the box is the _only_ way a
motherboard has of reporting such errors.

"Modern" UEFI firmware not reporting such errors, if such be the case,
would be one of the reasons for me to depise UEFI as I do.  Why do I need
UEFI?  A traditional BIOS can boot my machine just fine, and the sole
purpose of UEFI seems to be to prevent OS's which aren't Microsoft
Windows from booting, and to brick certain Samsung laptops.

Indeed, on The Register the other day, in a comments sections, somebody
described how he had a dual boot GNU/Linux Windows setup, and after a
Windows update, the GNU/Linux wouldn't boot at all.  He suspected that
the Windows update had tampered with the UEFI CMOS settings somehow.

Do modern motherboards still allow you the option of running under the
traditional BIOS?  I've not seen this mentioned in any of the motherboard
descriptions recently.

> -- 
> Regards,
> Mick

-- 
Alan Mackenzie (Nuremberg, Germany).



Re: [gentoo-user] Can I suppress the bleep when shutting down?

2015-10-21 Thread Peter Humphrey
On Tuesday 20 October 2015 19:22:12 Alan McKinnon wrote:

> Where is the beep coming from?
> 
> Real speakers (like where music comes out) - check Alerts &
> Notifications or similar in your DE.
> 
> That silly monotone speaker that can only make bing noises and has been
> in pc's since the first one?

Am I unusual in not having such a speaker in either of my boxes?

-- 
Rgds
Peter




Re: [gentoo-user] Can I suppress the bleep when shutting down?

2015-10-20 Thread Alan McKinnon
On 20/10/2015 19:57, Marc Joliet wrote:
> On Tuesday 20 October 2015 19:22:48 Matthias Gerstner wrote:
>> Hi Alan,
>>
>>> I simply want to disable that one particular beeping at shutdown time.
>>
>> well this topic made me curious where the beep is coming from.
>>
>> It does originate from the shutdown command itself which is part of the
>> sys-apps/sysvinit package. In this package's source you find can a file
>> "src/dowall.c", where you will in turn find a function "wall(...)".
>>
>> This is the function where the warning messages will be produced that
>> show up in the terminal and the message is produced like this:
>>
>> snprintf(line, sizeof(line),
>>  "\007\r\nBroadcast message from %s@%s %s(%s):\r\n\r\n",
>>  user, hostname, tty, date);
>>
>> The "\007" is the beep you're getting. It's a bell character that you
>> can produce manually by doing this, too:
>>
>> echo -e "\007"
>>
>> Unfortunately the bell character is hard coded into the warning message.
>> Also there seems to be no way to suppress the warning message.
> [...]
> 
> If it's caused by the call to wall(), then maybe the --no-wall option to 
> shutdown will help?


I don't have that option in my ~arch shutdown


-- 
Alan McKinnon
alan.mckin...@gmail.com




Re: [gentoo-user] Can I suppress the bleep when shutting down?

2015-10-20 Thread Marc Joliet
On Tuesday 20 October 2015 19:22:48 Matthias Gerstner wrote:
>Hi Alan,
>
>> I simply want to disable that one particular beeping at shutdown time.
>
>well this topic made me curious where the beep is coming from.
>
>It does originate from the shutdown command itself which is part of the
>sys-apps/sysvinit package. In this package's source you find can a file
>"src/dowall.c", where you will in turn find a function "wall(...)".
>
>This is the function where the warning messages will be produced that
>show up in the terminal and the message is produced like this:
>
>snprintf(line, sizeof(line),
>   "\007\r\nBroadcast message from %s@%s %s(%s):\r\n\r\n",
>   user, hostname, tty, date);
>
>The "\007" is the beep you're getting. It's a bell character that you
>can produce manually by doing this, too:
>
>echo -e "\007"
>
>Unfortunately the bell character is hard coded into the warning message.
>Also there seems to be no way to suppress the warning message.
[...]

If it's caused by the call to wall(), then maybe the --no-wall option to 
shutdown will help?

>Regards
>
>Matthias

HTH
-- 
Marc Joliet
--
"People who think they know everything really annoy those of us who know we
don't" - Bjarne Stroustrup


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Can I suppress the bleep when shutting down?

2015-10-20 Thread Alan Mackenzie
Hello, Alan.

On Tue, Oct 20, 2015 at 07:22:12PM +0200, Alan McKinnon wrote:
> On 20/10/2015 18:10, Alan Mackenzie wrote:
> > Hello, Gentoo.

> > Every time I shut down my gentoo system with "shutdown -h now", it beeps
> > at me.  This is becoming steadily more irritating as the months go by.
> > Just what is this beep supposed to be telling me?  I _know_ I'm shutting
> > the machine down.

> > Can anybody here tell me how to disable this ing annoyance?

> > Many thanks in advance!



> Where is the beep coming from?

The beep speaker in my PC case.

> Real speakers (like where music comes out) - check Alerts &
> Notifications or similar in your DE.

I use XFCE.  I get a similar beep on exiting XFCE, and I've sent a
similar request to an XFCE list asking how I can disable that beep.

> That silly monotone speaker that can only make bing noises and has been
> in pc's since the first one?

Yes, that one!  After spending all the time I did trying to get my
kernel to drive it, I now want to suppress it (sometimes).

> Is this happening inside a DE session, or from a virtual console?

>From a virtual console.  Matthias has tracked it down for me, and it is
hard coded in one of the C files building shutdown itself.  I think I'm
going to edit the source and rebuild it without the bleep.

> -- 
> Alan McKinnon
> alan.mckin...@gmail.com

-- 
Alan Mackenzie (Nuremberg, Germany).



Re: [gentoo-user] Can I suppress the bleep when shutting down?

2015-10-20 Thread Alan Mackenzie
Hello, Matthias.

On Tue, Oct 20, 2015 at 07:22:48PM +0200, Matthias Gerstner wrote:
> Hi Alan,

> > I simply want to disable that one particular beeping at shutdown time.

> well this topic made me curious where the beep is coming from.

> It does originate from the shutdown command itself which is part of the
> sys-apps/sysvinit package. In this package's source you find can a file
> "src/dowall.c", where you will in turn find a function "wall(...)".

> This is the function where the warning messages will be produced that
> show up in the terminal and the message is produced like this:

> snprintf(line, sizeof(line),
>   "\007\r\nBroadcast message from %s@%s %s(%s):\r\n\r\n",
>   user, hostname, tty, date);

> The "\007" is the beep you're getting. It's a bell character that you
> can produce manually by doing this, too:

> echo -e "\007"

> Unfortunately the bell character is hard coded into the warning message.
> Also there seems to be no way to suppress the warning message.

> But you could still try is to disable the interpretation of the bell
> character by your terminal. Then you could make an alias or wrapper
> around the original shutdown command that does this.

> According to Arch Linux docs here:

> https://wiki.archlinux.org/index.php/Disable_PC_speaker_beep

> You can locally disable the bell in the terminal by calling "setterm
> -blength 0". But this doesn't work with my terminals. Says it's
> unsupported.

> Then you can put this in your ~/.inputrc: "set bell-style none". This
> works for me. Then, however, all terminals stop beeping. The pcspkr is
> still loaded though and can be used.

> As you only want to stop the beep only during shutdown you might also be
> able to call "xset -b", disabling the bell on the X-server (globally?).
> This is not persistent across reboots and you won't have any beeps until
> the machine shuts down.

Hey, that's brilliant!  Thank you very much indeed!  That is an answer
much more complete than I could have expected.

Probably the most satisfactory way for me to make it work the way I want
is to build my own version of shutdown, removing the offending \007 from
that sprintf format string. and then to watch out for new versions
of sys-apps/sysvinit.  The package appears to be relatively stable.

> Regards

> Matthias

-- 
Alan Mackenzie (Nuremberg, Germany).



Re: [gentoo-user] Can I suppress the bleep when shutting down?

2015-10-20 Thread Alan Mackenzie
Hello, Wabe.

On Tue, Oct 20, 2015 at 06:27:04PM +0200, waben...@gmail.com wrote:
> Alan Mackenzie  wrote:

> > Every time I shut down my gentoo system with "shutdown -h now", it
> > beeps at me.  This is becoming steadily more irritating as the months
> > go by. Just what is this beep supposed to be telling me?  I _know_
> > I'm shutting the machine down.

> > Can anybody here tell me how to disable this ing annoyance?

> > Many thanks in advance!


> IIRC you must disable CONFIG_INPUT_PCSPKR in the Kernel config.

No, no, no!  I don't want to disable my loudspeaker!  For example, I get
beeps through my ssh connection with my ISP telling me that new mail has
arrived.

I simply want to disable that one particular beeping at shutdown time.
(OK, I want to disable the beeping when I click to exit XFCE too, but
I've sent that question to an XFCE list.)

> --
> Regards
> wabe

-- 
Alan Mackenzie (Nuremberg, Germany).



Re: [gentoo-user] Can I suppress the bleep when shutting down?

2015-10-20 Thread Matthias Gerstner
Hi Alan,

> I simply want to disable that one particular beeping at shutdown time.

well this topic made me curious where the beep is coming from.

It does originate from the shutdown command itself which is part of the
sys-apps/sysvinit package. In this package's source you find can a file
"src/dowall.c", where you will in turn find a function "wall(...)".

This is the function where the warning messages will be produced that
show up in the terminal and the message is produced like this:

snprintf(line, sizeof(line),
"\007\r\nBroadcast message from %s@%s %s(%s):\r\n\r\n",
user, hostname, tty, date);

The "\007" is the beep you're getting. It's a bell character that you
can produce manually by doing this, too:

echo -e "\007"

Unfortunately the bell character is hard coded into the warning message.
Also there seems to be no way to suppress the warning message.

But you could still try is to disable the interpretation of the bell
character by your terminal. Then you could make an alias or wrapper
around the original shutdown command that does this.

According to Arch Linux docs here:

https://wiki.archlinux.org/index.php/Disable_PC_speaker_beep

You can locally disable the bell in the terminal by calling "setterm
-blength 0". But this doesn't work with my terminals. Says it's
unsupported.

Then you can put this in your ~/.inputrc: "set bell-style none". This
works for me. Then, however, all terminals stop beeping. The pcspkr is
still loaded though and can be used.

As you only want to stop the beep only during shutdown you might also be
able to call "xset -b", disabling the bell on the X-server (globally?).
This is not persistent across reboots and you won't have any beeps until
the machine shuts down.

Regards

Matthias


signature.asc
Description: Digital signature


Re: [gentoo-user] Can I suppress the bleep when shutting down?

2015-10-20 Thread Alan McKinnon
On 20/10/2015 18:10, Alan Mackenzie wrote:
> Hello, Gentoo.
> 
> Every time I shut down my gentoo system with "shutdown -h now", it beeps
> at me.  This is becoming steadily more irritating as the months go by.
> Just what is this beep supposed to be telling me?  I _know_ I'm shutting
> the machine down.
> 
> Can anybody here tell me how to disable this ing annoyance?
> 
> Many thanks in advance!
> 


Where is the beep coming from?

Real speakers (like where music comes out) - check Alerts &
Notifications or similar in your DE.

That silly monotone speaker that can only make bing noises and has been
in pc's since the first one?

Is this happening inside a DE session, or from a virtual console?

-- 
Alan McKinnon
alan.mckin...@gmail.com




Re: [gentoo-user] Can I suppress the bleep when shutting down?

2015-10-20 Thread Alec Ten Harmsel



On 2015-10-20 12:10, Alan Mackenzie wrote:

Hello, Gentoo.

Every time I shut down my gentoo system with "shutdown -h now", it beeps
at me.  This is becoming steadily more irritating as the months go by.
Just what is this beep supposed to be telling me?  I _know_ I'm shutting
the machine down.


Eh, you may not know. What if someone is SSH'd in and shuts it down? 
Anyways, disabling this is always the first thing I do when I boot 
ArchLinux.




Can anybody here tell me how to disable this ing annoyance?


I am unfortunately on a Windows box and do not have access to Linux at 
the moment, but there is a kernel module - pcspkr - that causes this. 
You can remove this from your kernel config to prevent it from ever 
happening again. It is also possible to blacklist it, but I'm not sure 
how to do that since I only build in modules for my kernels that I may 
need/are useful.


To test right now, you can 'rmmod pcspkr' and try shutting down.

Alec



Re: [gentoo-user] Can I suppress the bleep when shutting down?

2015-10-20 Thread wabenbau
Alan Mackenzie  wrote:

> Hello, Gentoo.
> 
> Every time I shut down my gentoo system with "shutdown -h now", it
> beeps at me.  This is becoming steadily more irritating as the months
> go by. Just what is this beep supposed to be telling me?  I _know_
> I'm shutting the machine down.
> 
> Can anybody here tell me how to disable this ing annoyance?
> 
> Many thanks in advance!
> 

IIRC you must disable CONFIG_INPUT_PCSPKR in the Kernel config.

--
Regards
wabe



Re: [gentoo-user] Can I suppress the bleep when shutting down?

2015-10-20 Thread Marc Joliet
On Tuesday 20 October 2015 20:48:22 Alan McKinnon wrote:
>On 20/10/2015 19:57, Marc Joliet wrote:
>> On Tuesday 20 October 2015 19:22:48 Matthias Gerstner wrote:
>>> Hi Alan,
>>> 
 I simply want to disable that one particular beeping at shutdown time.
>>> 
>>> well this topic made me curious where the beep is coming from.
>>> 
>>> It does originate from the shutdown command itself which is part of the
>>> sys-apps/sysvinit package. In this package's source you find can a file
>>> "src/dowall.c", where you will in turn find a function "wall(...)".
>>> 
>>> This is the function where the warning messages will be produced that
>>> show up in the terminal and the message is produced like this:
>>> 
>>> snprintf(line, sizeof(line),
>>> 
>>> "\007\r\nBroadcast message from %s@%s %s(%s):\r\n\r\n",
>>> user, hostname, tty, date);
>>> 
>>> The "\007" is the beep you're getting. It's a bell character that you
>>> can produce manually by doing this, too:
>>> 
>>> echo -e "\007"
>>> 
>>> Unfortunately the bell character is hard coded into the warning message.
>>> Also there seems to be no way to suppress the warning message.
>> 
>> [...]
>> 
>> If it's caused by the call to wall(), then maybe the --no-wall option to
>> shutdown will help?
>
>I don't have that option in my ~arch shutdown

*Sigh* then it's probably unique to systemd[sysv-utils].  Sorry for not 
thinking about that.

-- 
Marc Joliet
--
"People who think they know everything really annoy those of us who know we
don't" - Bjarne Stroustrup


signature.asc
Description: This is a digitally signed message part.