Brltty causing hanging on shutdown resolution

So, been having an issue for a while where my Endeavour systems have been hanging on shutdown due to brltty, which was pulled in because I need MOST of the qemu packages to run my VM’s so install the qemu-full metapackage to get it all in one quick shot. Even if I uninstalled brltty, it would still hang. Finalliy figured it out how to fix it today. I have absolutely no idea how much use this will be, but if there’s anyone else beating their head about this issue, might be useful to them.

Anyway, since qemu-full package pulls in brltty, after installing

pacman -Rc brltty

If you hate the .pacsave files lying around, you can do a pacman -Rcn brltty instead, but I don’t believe any of the files actually will leave a pacsave file.

That’ll get rid of the offending package, the packages that specifically depend on it, and the qemu-full metapackage, but importantly, will LEAVE the rest of the qemu packages installed so you can still run VM’s. However, the system will sting hang on shutdown. I came to figure out eventually it’s because when you INSTALL brltty it kicks off an automatic rebuilding of the initramfs to include that module. But when you UNINSTALL, it doesn’t rebuild the initramfs to remove the module. So you have to do that manually.

dracut --hostonly --no-hostonly-cmdline /boot/initramfs-linux.img --force

Once you do that, you can kill the brltty process that’s currently running, and upon rebooting it will no longer be running and it won’t hang anymore.

6 Likes
2 Likes

Why in all my searching of the forums and the web had I never found that? Would have saved me SOOOOOOOOOOOOOOOO much time.

1 Like

Forum search:

brltty

honka_animated-128px-33

P.S. Also i’m always lurking :clown_face:, so i just remember stuff… :rofl:

Yeah, I had searched for brltty, and for whatever reason it hadn’t been found when I did it.

1 Like

Maybe you have pressed search in this topic, instead of search all forum button when search asked for it? :thinking:

image

Happens to the best of us, i’m telling you :clown_face:

1 Like

oh, a fellow bat clubber… :clown_face:

1 Like

OH, no doubt I’m sure I did do something like that. Irritating to find out you’ve spent a month beating your skull against an issue and the answer was there but for a messed up search. OH well, I learned a lot in diagnosing it at any rate. And I would rather completely uninstall brltty than just exclude it, I don’t need it nor will I ever use it. So just wrote a little script that goes through after doing it and marks all the qemu packages as explicity installed so that they won’t get removed by my script that removes orphaned packages.

1 Like

Do you remember where I left my car keys? Please say yes.

Pudge

2 Likes

Okay, since this thread is the one that still opens for this issue, I had to post here. I literally have the same issue, also have the “ghost process” like in this thread : Remove ghost brltty PID from memory? qemu-full dependecies break my shutdown time
I’ve done all the steps stated that could fix this ;

  • completely removing brltty package
  • adding conf files with omit_dracutmodules+=" brltty " to /etc/dracut.conf.d/
  • doing dracut-rebuild and rebooting like a dozen times

However for some unholy reason brltty process still start upon every boot. It seems the fix that’s working for everybody else didn’t work on my system. I don’t know if this is relevant but I do have my home partition encrypted.

My guess is you can try to reinstall qemu-full reboot and muanually remove brltty if it install again but I also think alternative maybe leave installed but configured do “disabled status” from systemd disable hook. I don’t know if brltty ship a configuration file under /etc allow you to “disable” braile device scanning on system.

I did leave it installed, but there’s no entry for systemd service that I can disable. The weirdest thing is, just like the thread I mentioned above, I have no freaking idea what is triggering the process, even when there’s no binary or configuration files left on my system.

I guess I could use a script that automatically ran on boot to kill the brltty process, however I think that’s just a bandaid solution, not addressing the real problem

1 Like

My question is why do users have this installed? I don’t on my EOS install.

If you install qemu-full to be able to run VM’s, it’s installed as a dependency of that package.

2 Likes

As @tlmiller76 said. For some reason Arch feels like including that package as dependency instead of marking it as optional for qemu.

On another note,

The process still exist and resides in memory upon booting even after removal. How is this even possible?

I’m not exactly familiar with dracut, how can I check/make sure that the module is actually omitted?

That is odd! Are you certain the package has been uninstalled?

pacman -Qs brltty

That looks correct. Just checking: your conf file is named with .conf at the end of the file name, right?

There is a config file at /etc/eos-dracut.conf if you use Grub, or /etc/kernel-install-for-dracut.conf if you use systemd-boot which has some options like this:

File: /etc/eos-dracut.conf
# This config file controls the automation provided by eos-dracut

# When DRACUT_QUIET is set to true, dracut will operate with quiet flag set suppressing most output
DRACUT_QUIET="true"

# When NO_FALLBACK is set to true, no fallback initrd will be generated
#NO_DRACUT_FALLBACK="false"

If you comment out DRACUT_QUIET="true" or set it to false, you should get the full verbosity of dracut when it rebuilds the image. It’s a lot of output (it tells you about every module it is adding or not adding), but should give you a straight answer as to whether it is adding the brltty module or not.

Yeah it was uninstalled, with similar command to the first post. Also checked no related files left on /etc/. (remind me if I missed any other related files in other directories)

Thanks. On the output, I don’t see anywhere that mention brltty modules being added. This is definitely the strangest bug/issue I’ve encountered so far.

On the btop screenshot above, the process tree was listed under systemd. There’s no brltty systemd service being started, so I guess it’s being called by another service?

I installed it to take a peek and it looks like it set up a couple groups, and a daemon user:

sudo pacman -S brltty
[sudo] password for jeremy:
resolving dependencies...
looking for conflicting packages...

Packages (3) liblouis-3.24.0-1  libspeechd-0.11.4-1  brltty-6.5-3

Total Download Size:    4.13 MiB
Total Installed Size:  21.77 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 libspeechd-0.11.4-1-x86_64           20.2 KiB   141 KiB/s 00:00 [------------------------------------] 100%
 brltty-6.5-3-x86_64                1816.7 KiB  6.64 MiB/s 00:00 [------------------------------------] 100%
 liblouis-3.24.0-1-x86_64              2.3 MiB  2.02 MiB/s 00:01 [------------------------------------] 100%
 Total (3/3)                           4.1 MiB  3.48 MiB/s 00:01 [------------------------------------] 100%
(3/3) checking keys in keyring                                   [------------------------------------] 100%
(3/3) checking package integrity                                 [------------------------------------] 100%
(3/3) loading package files                                      [------------------------------------] 100%
(3/3) checking for file conflicts                                [------------------------------------] 100%
(3/3) checking available disk space                              [------------------------------------] 100%
:: Running pre-transaction hooks...
(1/1) Performing snapper pre snapshots for the following configurations...
==> root: 75
:: Processing package changes...
(1/3) installing liblouis                                        [------------------------------------] 100%
(2/3) installing libspeechd                                      [------------------------------------] 100%
(3/3) installing brltty                                          [------------------------------------] 100%
brltty-genkey: key generated
Please add your user to the brlapi group.
Optional dependencies for brltty
    at-spi2-core: X11/GNOME Apps accessibility [installed]
    atk: ATK bridge for X11/GNOME accessibility [installed]
    brltty-udev-generic: for initializing brltty with generic USB devices
    espeak-ng: espeak-ng driver [installed]
    java-runtime: Java support
    libxaw: X11 support
    libxt: X11 support [installed]
    libx11: for xbrlapi [installed]
    libxfixes: for xbrlapi [installed]
    libxtst: for xbrlapi [installed]
    ocaml: OCaml support
    python: Python support [installed]
    speech-dispatcher: speech-dispatcher driver
    tcl: tcl support [installed]
:: Running post-transaction hooks...
( 1/12) Creating system user accounts...
Creating group 'brlapi' with GID 958.
Creating group 'brltty' with GID 957.
Creating user 'brltty' (Braille Device Daemon) with UID 957 and GID 957.
( 2/12) Reloading system manager configuration...
( 3/12) Creating temporary files...
( 4/12) Reloading device manager configuration...
( 5/12) Arming ConditionNeedsUpdate...
( 6/12) Updating initramfs...
:: Building initramfs for linux-zen (6.1.11-zen1-1-zen)
:: Building fallback initramfs for linux-zen (6.1.11-zen1-1-zen)

Probably Pacman does not take those down when you uninstall it. I wonder if that has something to do with the lingering “ghost” process?

Here you can understand how brltty is loaded on early boot stage
https://brltty.app/guidelines.html

As well an extract from this page:

If BRLTTY can safely be started before any other system initialization is performed, then it can be started by inserting the following lines into /etc/inittab.

Start the braille display. brl::sysinit:/bin/brltty

So look in your etc/inittab if found brltty spam lol

lol is right, I guess we’ll have to travel back in time to 2012 when Arch was still using SysVinit and take a peek. :laughing:

1 Like