Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sound driver - snd-aloop kernel module setup issue with AWS EC2 ubuntu 16.04 instance

Unable to use snd-aloop audio driver in AWS EC2 ubuntu 16.04 instance

On running modprobe on snd-aloop

$modprobe snd-aloop
modprobe: FATAL: Module snd-aloop not found in directory /lib/modules/4.4.0-1052-aws

Kernels in AWS matchine are -

/lib/modules/4.4.0-1049-aws  
/lib/modules/4.4.0-1052-aws  
/lib/modules/4.4.0-116-generic

Current kernel loaded

$uname -r
4.4.0-1052-aws
  1. After searching a lot it was confirmed that snd-aloop comes pre-installed in ubuntu 16.04.(https://askubuntu.com/questions/891445/alsa-snd-aloop-kernel-module-for-16-04-or-14-04-server)
  2. So i verified and found that the module was present at

"/lib/modules/4.4.0-116-generic" kernel. location - /lib/modules/4.4.0-116-generic/kernel/sound/drivers/snd-aloop.ko

  1. After giving much thought one possible way to use snd-aloop audio driver was to use 4.4.0.116-generic kernel.
    • So to do the same i modified /boot/grub/menu.lst and edited the kernel list.(commented out all other kernels other then 4.4.0.116-generic) and then did update-grub but nothing happened, kernel loaded was /lib/modules/4.4.0-1052-aws.
    • Then i modified the /etc/default/grub file and changed GRUB_DEFAULT=0 to kernel title as GRUB_DEFAULT="gnulinux-4.4.0-116-generic-advanced-b6adc449-5e3d-4331-ba6b-6e99a75fa48e>gnulinux-4.4.0-116-generic-recovery-b6adc449-5e3d-4331-ba6b-6e99a75fa48e" and again did an grub update but again nothing happened.

I have already gone through the following doc's

1.https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html - Aws doc guide to change kernels.

I can't recall the other links but i have searched a lot.

Please point me in the right direction. How can i use audio driver sdn-aloop in AWS EC2 Ubuntu 16.04 instance?

like image 284
rahul Avatar asked Dec 03 '22 20:12

rahul


2 Answers

Steps to update default kernel boot item (without modification of /boot/grub/menu.lst):

  1. Find needed menu and sub-menu item in grub.cfg: cat /boot/grub/grub.cfg

    For example you can have menu structure like this (default for AWS Ubuntu 16.04):

    • (0) Ubuntu
    • (1) Advanced options for Ubuntu
      • (0) Ubuntu, with Linux 4.4.0-1052-aws
      • (1) Ubuntu, with Linux 4.4.0-1052-aws (recovery mode)
      • (2) Ubuntu, with Linux 4.4.0-116-generic
      • (3) Ubuntu, with Linux 4.4.0-116-generic (recovery mode)

    In this case if you need to load "Ubuntu, with Linux 4.4.0-116-generic" your default boot setting would be "1>2"

  2. Edit default grub file:

    vim /etc/default/grub and set

    GRUB_DEFAULT=“1>2”

  3. Run update-grub

  4. And then reboot now to take this in effect
  5. After reboot you can test it with uname -a which should give 4.4.0-116-generic

After this modprobe snd-aloop should work fine.

like image 139
websquared Avatar answered Dec 06 '22 11:12

websquared


Jibri on AWS and getting the below issue.

org.jitsi.jibri.capture.ffmpeg.FfmpegCapturer.onFfmpegProcessUpdate() Ffmpeg quit abruptly. Last output line: plug:bsnoop: Input/output error

Solution: changing and updating the kernel boot settings from Linux 4.4.0-xxxx-aws to Linux 4.4.0-xxxx-generic and restarting the instance.

I have fixed by the following steps:

$ grep -A200 submenu /boot/grub/grub.cfg |grep menuentry

Output:

submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnulinux-advanced-e6dc6474-8016-46c6-8ab0-0a871bae4cd1' {
    menuentry 'Ubuntu, with Linux 4.4.0-1107-aws' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-1107-aws-advanced-e6dc6474-8016-46c6-8ab0-0a871bae4cd1' {
    menuentry 'Ubuntu, with Linux 4.4.0-1107-aws (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-1107-aws-recovery-e6dc6474-8016-46c6-8ab0-0a871bae4cd1' {
    menuentry 'Ubuntu, with Linux 4.4.0-1106-aws' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-1106-aws-advanced-e6dc6474-8016-46c6-8ab0-0a871bae4cd1' {
    menuentry 'Ubuntu, with Linux 4.4.0-1106-aws (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-1106-aws-recovery-e6dc6474-8016-46c6-8ab0-0a871bae4cd1' {
    menuentry 'Ubuntu, with Linux 4.4.0-1105-aws' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-1105-aws-advanced-e6dc6474-8016-46c6-8ab0-0a871bae4cd1' {
    menuentry 'Ubuntu, with Linux 4.4.0-1105-aws (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-1105-aws-recovery-e6dc6474-8016-46c6-8ab0-0a871bae4cd1' {
    menuentry 'Ubuntu, with Linux 4.4.0-179-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-179-generic-advanced-e6dc6474-8016-46c6-8ab0-0a871bae4cd1' {
    menuentry 'Ubuntu, with Linux 4.4.0-179-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-179-generic-recovery-e6dc6474-8016-46c6-8ab0-0a871bae4cd1' {

menu entry id for Advanced options for Ubuntu is gnulinux-advanced-e6dc6474-8016-46c6-8ab0-0a871bae4cd1 menu entry for Ubuntu, with Linux 4.4.0-179-generic is gnulinux-4.4.0-179-generic-advanced-e6dc6474-8016-46c6-8ab0-0a871bae4cd1

Edit Grub and replace GRUB_DEFAULT with above value

$ nano /etc/default/grub

GRUB_DEFAULT="gnulinux-advanced-e6dc6474-8016-46c6-8ab0-0a871bae4cd1>gnulinux-4.4.0-179-generic-advanced-e6dc6474-8016-46c6-8ab0-0a871bae4cd1"
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="console=tty1 console=ttyS0"
GRUB_CMDLINE_LINUX=""

Update and Reboot

$ sudo update-grub $ sudo reboot

After reboot you can test it with uname -a which should give 4.4.0-179-generic

$ uname -a

Linux 4.4.0-179-generic

After this modprobe snd-aloop should work fine.

like image 42
Kavirajan ST Avatar answered Dec 06 '22 09:12

Kavirajan ST