Search code examples
ubuntuaudioamazon-ec2kernelkernel-module

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?


Solution

  • 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.