ventoy / Ventoy

A new bootable USB solution.
https://www.ventoy.net
GNU General Public License v3.0
62.77k stars 4.09k forks source link

[RFE]: make a sound when the menu is displayed #2527

Open vojtapolasek opened 1 year ago

vojtapolasek commented 1 year ago

Official FAQ

Ventoy Version

1.0.94

What about latest release

Yes. I have tried the latest release, but the bug still exist.

Try alternative boot mode

No. I didn't try these alternative boot modes.

BIOS Mode

Legacy BIOS Mode

Partition Style

GPT

Disk Capacity

64 Gb

Disk Manufacturer

Sandisk

Image file checksum (if applicable)

None

Image file download link (if applicable)

No response

What happened?

I think it would be cool if Ventoy could beep or make a different sound when the menu selection appears. I am blind and I use Ventoy. I have to check the laptop screen with my phone (take picture, perform OCR) so that I know that the Ventoy menu appeared. It would make my (and I think not only my) life easier if it could do a sound. Something like Grub can do. Could you please consider this? Thank you.

catherinedoyel commented 1 year ago

I would suggest keep pushing f6 on your keyboard which can load an external grub menu with a sound effect like you expect. https://www.ventoy.net/en/plugin_grubmenu.html then once the sound plays push escape to go back to image list. A helpful feature may be creating a config file with image files in a specific order. https://www.ventoy.net/en/plugin_imagelist.html

marblewraith commented 3 months ago

I've been attempting to DIY my own version of a "medicat USB" and in the process of wanting to rice things, have been researching this very topic.

Current Solution

As stated in the docs ventoy is based off GRUB2, which is why GRUB themes can be used to customize the look of the bootloader (may not be apparent to someone blind). This being the case, it seemed reasonable all the other methods available to tweaking GRUB should be available.

And so after a brief search i found what i was looking for in this link. Someone created a Zelda themed bootloader with sound (triggering a quest) when the menu opens:

"For the grub_init_tune, you have to put it at the beginning of grub.cfg on the VTOYEFI partition."

This gist link is full of number sequences that can be used with the grub_init_tune config parameter.

Possible Future Solution

Disclaimer: For devs only / ignore everything past this point if not interested.

Playing synth tones out of PC SPEAKER is a cool retro effect, but very limited. I and others (who am i kidding most linux users) want something more advanced.

For example not just sounds when ventoy menu opens, but sounds for switching menu items, perhaps even custom sounds per menu item (eg. ubuntu image sound, windows image sound, memtest image sound, et cetera), and a sound when that menu item is selected (hell, make it sound like jarvis from iron man or whatever 😁).

Originally my line of thought was : To get higher fidelity sounds i need to get sound drivers (AC'97 / Intel HD) + an audio codec or 2 working with UEFI / GRUB. I looked into it and there have been some efforts, it's not a trivial task, even more so for me since i wouldn't qualify myself as a C developer at all.

Then a colleague of mine suggested i look into UKI's (Unified Kernel Images) which seems to be a recent Redhat initiative. I've gone through some of the literature:

If i understand this correctly, it's a way to skip a bootloader entirely and boot directly with a kernel by bootstrapping it with an EFISTUB. And of course being a complete kernel, audio drivers, codecs, file system access, and everything else required can be integrated.

So in a live USB ventoy scenario how would this work? Not sure yet. See the NBML (UEFI case) flow diagram in the wordpress article.

Essentially a kernel is bootstrapped with an EFISTUB, which the system boots into. Then a program called grub-emu (menu emulator) is run and an entirely different kernel (and userspace) can be selected / switched to via kexec.

This is a major undertaking that would require re-architecting ventoy, no doubt... but

It should be way more flexible / powerful, and probably easier to maintain since +90% of it will probably be dependency updates.

It's also still experimental, and there's many things to solve / answer, for example:

Kexec is about switching kernels, whereas ventoy can switch entire environments (via ISO's). From that:

  1. is grub-emu ISO compatible? Different menu program required?

  2. Assuming each linux ISO has an EFISTUB, how do you ensure a disk with multiple ones boots to the "default kernel"? Do we use a partition scheme similar to ventoy now or... ?

  3. How about space saving? For example lets say you have multiple distro's with the same kernel. Is it possible to make it so the DE's are split for the kernels, one of each being a required selection to boot/switch?

So many questions 😅

Anyways i hope i've provided some answers and food for thought.