help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Suggestion for grub beep notification


From: Glenn Washburn
Subject: Re: Suggestion for grub beep notification
Date: Sun, 18 Sep 2022 01:32:04 -0500

On Sat, 17 Sep 2022 21:23:06 +1000
Nick F <nfieraru@gmail.com> wrote:

> Thank you Glenn,
> 
> I initially posted this question on an opensuse forum and I was told that
> this is a development issue - that's why I sent the email to the
> development mailing list.

Hmm, I see now that it could be a development issue. For exactly what
you want there isn't a way to configure GRUB to accomplish it. I
suspect that getting a beep right after the menu is displayed would be
a big hack and not something that developers would want to do. The path
of least resistance might be my suggestion below.

> I found the grub.cfg file and I appended the play command on the last file.
> I first got the sound sequence which I initially added, then I got the
> sound from the last line.
> However, there was still this delay of a few seconds between the audio
> warning and displaying the menu (even if the menu is further up in the
> configuration file).

I suspect this is because GRUB doesn't display the menu until after the
last line of the config is parsed and executed. Another option that
might work is to have a default menu item with a 0 second timeout that
plays the beep. You could have the menu item as the last item and named
unobtrusively.

Glenn

> I'll just live with it, since it's not a big deal.
> 
> Nicolae
> 
> On Sat, Sep 17, 2022 at 4:00 PM Glenn Washburn <development@efficientek.com>
> wrote:
> 
> > Hi Nick,
> >
> > I really shouldn't have responded to your original email on the
> > grub-devel list because that list is for GRUB development. I've now
> > moved this to the help-grub list, which is where these kinds of
> > questions belong.
> >
> > On Sat, 17 Sep 2022 12:27:15 +1000
> > Nick F <nfieraru@gmail.com> wrote:
> >
> > > Hi Glenn, thanks for your answer. I edited /etc/default/grub and appended
> > > to the last line the command
> > > play 60 440 4
> > > When I do update-bootloader, it tells me
> > > + /usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
> > > /etc/default/grub: line 50: play: command not found
> >
> > Yes, in my previous email, I said to put it at the end of the grub.cfg,
> > which will be located usually at /boot.grub.grub.cfg. It will get
> > over-written everytime you do update-bootloader though. I don't know
> > what OS you're using as I'm unfamiliar with the "update-bootloader"
> > command. However, on Debian or Ubuntu you can create a file at
> > /etc/grub.d/99_menu-beep with the contents "play 60 440 4", which
> > will get inserted into the grub.cfg when the OS bootloader update
> > scripts are run. You may want to look into this functionality for your
> > system.
> >
> > Putting it in /etc/default/grub will definitely not work as that is a
> > shell script file and not anything that it run by GRUB.
> >
> > > I tried next to use the command: play "60 440 4" but I got the same
> > error.
> >
> > I also do not know what architecture you're running. The play command
> > is only available on x86 targets. If you are using an x86 target, then
> > the command is likely not available because you need to load the play
> > module via the GRUB command "insmod play".
> >
> > > I also tried moving the command GRUB_INIT_TUNE="480 440 1" to the last
> > line
> > > of the grub script, but the beep comes up about 6 seconds before the menu
> > > is displayed.
> >
> > It doesn't matter where you put the GRUB_INIT_TUNE line in
> > /etc/default/grub, it will always create a tune before the menu. It
> > gets inserted into the grub.cfg via 00_header, which goes at the start
> > of the grub.cfg.
> >
> > Glenn
> >
> > >
> > > Nicolae
> > >
> > > On Sat, Sep 17, 2022 at 7:07 AM Glenn Washburn <
> > development@efficientek.com>
> > > wrote:
> > >
> > > > On Sat, 10 Sep 2022 16:41:21 +1000
> > > > Nick F <nfieraru@gmail.com> wrote:
> > > >
> > > > > Hi guys,
> > > > >
> > > > > I am using grub to book a dual OS computer. When I start/restart the
> > > > > computer, I want to be notified by a beep, so I can make the OS
> > > > selection.
> > > > > I enabled the beep by uncommenting the line GRUB_INIT_TUNE in
> > > > > /etc/default/grub but the beep comes up a few seconds before the grub
> > > > menu
> > > > > is displayed. While this is not a big issue, is it possible to change
> > > > some
> > > > > configuration so that the beep happens after the start menu is
> > displayed?
> > > > > It doesn't make much sense to me to have a beep then look at the
> > black
> > > > > screen for five seconds or more before I can make a selection.
> > > > >  I use OpenSuse Leap 15.4 in case it matters.
> > > >
> > > > I've not tried this, but what might get you what you want it to use the
> > > > "play" command to create a tone. I think if you put it at the end of
> > > > the grub.cfg it'll happen after the menu is displayed.
> > > >
> > > > Glenn
> > > >
> >



reply via email to

[Prev in Thread] Current Thread [Next in Thread]