Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

systemd-boot: support beep #17508

Closed
sthibaul opened this issue Nov 2, 2020 · 10 comments · Fixed by #22122
Closed

systemd-boot: support beep #17508

sthibaul opened this issue Nov 2, 2020 · 10 comments · Fixed by #22122
Labels
RFE 🎁 Request for Enhancement, i.e. a feature request sd-boot/sd-stub/bootctl

Comments

@sthibaul
Copy link
Contributor

sthibaul commented Nov 2, 2020

Is your feature request related to a problem? Please describe.
Blind users cannot know when the boot menu (of e.g. an ISO installation CD) is showing up, and thus they don't know when to press a shortcut to enable speech-driven installation

Describe the solution you'd like
We would need a way to make systemd-boot emit a beep when the boot menu comes up. For instance, syslinux implements this by letting people put control-G \007 in the menu text, grub implements this by providing a play command that can be called from the menu entry.

@webczat
Copy link

webczat commented Nov 2, 2020

would certainly be useful. actually you can do without a beep, but it is a bit more hit and miss experience at least when doing it for first time, and the beep makes it clear you just successfully booted from cd, instead of say, accidentally booting from disk, and you are good to go.

@poettering poettering added sd-boot/sd-stub/bootctl RFE 🎁 Request for Enhancement, i.e. a feature request labels Nov 2, 2020
@poettering
Copy link
Member

poettering commented Nov 2, 2020

I am not sure UEFI even has apis for a system beep generator. And if it has, I am not sure how many PCs still have a pc beeper hw around?

Anyway, if this can be implemented, happy to merge a patch for this!

@sthibaul
Copy link
Contributor Author

sthibaul commented Nov 2, 2020

grub simply uses the PIT to emit beeps

@sthibaul
Copy link
Contributor Author

sthibaul commented Nov 2, 2020

(see include/grub/speaker.h)

@poettering
Copy link
Member

we don't do direct hw access in sd-boot. We use UEFI APIs only. Talking to the PIT directly interfering with UEFI is not OK really in sd-boot.

Also, how many PCs actually still have a speaker connected to a PIT? I doubt many have...

@alex19EP
Copy link

alex19EP commented Nov 2, 2020

hello.

we don't do direct hw access in sd-boot. We use UEFI APIs only. Talking to the PIT directly interfering with UEFI is not OK really in sd-boot.

i found this
as i understand u don't want to do exactly that?

Also, how many PCs actually still have a speaker connected to a PIT? I doubt many have...

i think it's not important hear. example: I am a blind systemd user and i use systemd-boot on some of my machines. i can control loader via bootctl. but for bootable isos where i need to select boot option beep would be much convenient.

I think it's understandable that I will make sure when assembling or purchasing that the computer has a pc-speaker.

@webczat
Copy link

webczat commented Nov 2, 2020

to be honest, although no laptop has a pc speaker, I believe many (all?) of them have this somehow wired to the soundcard. :) so that actually works, for example here.

@poettering
Copy link
Member

hmm, so that source you linked is frickin ugly, given it bypasses EFI's own driver logic, and is arch dependent. But given how short it is, maybe as opt-in it would be OK. consider sending a patch, that makes this configurable, and is properly ifdeffed to being x86/x86-64 only.

@medhefgo
Copy link
Contributor

medhefgo commented Jan 14, 2022

I am an avid hater of PC speakers and scream whenever a computer dares to beep on me, but I do see the value for accessibility's sake (opt-in). Please give that PR a try.

bluca pushed a commit that referenced this issue Jan 16, 2022
@retpolanne
Copy link

@medhefgo thanks for the patch! And sorry for reopening this. I use my Linux machine mostly headless and a some point during boot I need to blindly know when my FIDO2 device is going to blink asking for presence to unlock the disk.

The beep allows me to know whether systemd-boot has booted successfully and when to touch the Yubikey. I'll try to add a target post LUKS decryption to signal me that the decryption has been successful so that I can already SSH to my machine.

Is it doable to have my custom boot beep btw? I can try to extend this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFE 🎁 Request for Enhancement, i.e. a feature request sd-boot/sd-stub/bootctl
Development

Successfully merging a pull request may close this issue.

6 participants