Dummy Soundcard for Amazon linux server - linux

I need to use an application which needs a soundcard in an amazon ec2 instance with the default ubuntu 16.04 installed on it. Problem is that there's no soundcard available. I've tried everything on google on how to create a dummy soundcard so the program runs with no problem, but nothing helped because it was outdated. This is what lspcireturns:
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 01)
00:02.0 VGA compatible controller: Cirrus Logic GD 5446
00:03.0 Unassigned class [ff80]: XenSource, Inc. Xen Platform Device (rev 01)
lsmod | grep snd does not return ANYTHING which makes me think that I might me missing all modules, and not just snd-dummy.
I've been trying to setup a dummy by using the command sudo modprobe snd-dummy which returns the following error:
modprobe: FATAL: Module snd-dummy not found in directory /lib/modules/4.4.0-1013-aws
Any clues?

If anyone still has the same issue:
You are probably using an AMI that comes with a kernel compiled without the snd-dummy module. The ALSA wiki suggests building this module from source (alsa-driver) but this is out of date.
I was able to run an application that needs a soundcard on EC2 by installing pulseaudio
sudo apt install pulseaudio
pulseaudio --start
After which I get:
$ aplay test.wav
Playing WAVE 'test.wav' : Unsigned 8 bit, Rate 22257 Hz, Mono
And the soundcard-needing application runs normally. If this is not enough for you, you might need to enable the default sink:
pactl load-module module-null-sink sink_name=auto_null
pactl set-default-sink auto_null
More details here Linux application fails with "Invalid CTL" and "Unknown PCM"

Related

Audio device: Nvidia corporation usage

I am using Ubuntu 18.04. Whenever I execute:
lspci -v | grep -i audio
It returns:
37:00.1 Audio device: NVIDIA Corporation Device 10f8 (rev a1)
In my sound settings,instead of showing any speakers or builtin speakers information, I noticed a Dummy Output as sound output device. Can anyone help me out that how to use the NVIDIA Corporation Driver audio device?
Kind Regards,

Pulse audio doesn't start on boot unless i run some commands

as the title says, pulse audio doesn't start when booting. I need to run
rm -rf /tmp/pulse* ~/.pulse* ~/.config/pulse
pulseaudio -k
pulseaudio --start
in order for it to start. I have even put these commands on an .sh and made this script to run on boot but it doesn's work unless i execute this file manually, sometimes i even have to run it twice.
OS: Manjaro Linux with i3
Pulseaudio: pulseaudio 13.0-dirty
Audio Devices: 00:03.0 Audio device: Intel Corporation Broadwell-U Audio Controller (rev 09) 00:1b.0 Audio device: Intel Corporation Wildcat Point-LP High Definition Audio Controller (rev 03)
[+] Discord and Godot Engine can find any input or output devices!
Have you set up pulseaudio daemon in startup?
If not you can set up using following (depending on your linux version)
systemctl enable pulseaudio and systemctl start pulseaudio
I had the same issue with pulseaudio on my Manjaro with i3. The problem was with .i3/config, I just commented line:
exec --no-startup-id pulseaudio
Also, you can try to restart pulseaudio after boot by adding this line to .i3/config:
exec --no-startup-id systemctl --user restart pulseadio

HID Smart Card Reader Linux Raspberry Pi

I am using raspberry Pi . I have installed libusb then PSCD lite after that i have installed drivers for HID Smart Card Reader 5021 CL i am getting this error. Any idea i think that error is due to the reason of some permissions as i am using the user pi and owners of these directory is root . I am new to linux and the directory and file is there on the path shown below
pi#raspberrypi ~/pcsc-tools $ sudo pcscd -f
00000000 dyn_unix.c:60:DYN_LoadLibrary() /usr/local/lib/pcsc/drivers/ifdokccid_linux_i686-v4.1.8.bundle/Contents/Linux/ifdokccid.so: /usr/local/lib/pcsc/drivers/ifdokccid_linux_i686-v4.1.8.bundle/Contents/Linux/ifdokccid.so: cannot open shared object file: No such file or directory
00001913 readerfactory.c:1019:RFInitializeReader() RFLoadReader failed: 0x80100014
00000172 readerfactory.c:335:RFAddReader() OMNIKEY CardMan (076B:5340) 5021 CL (OKCM0030812141011235703916649119) init failed.
Your drivers are for PC (architecture i686) you need drivers for ARM (probably armhf architecture).
AFAIK drivers for ARM are not available from HID.

Can`t find ttyUSB[id]

I have just started with my Raspberry Pi and I have a project where I want to read data from the USB port. I have installed Java JDK8 and written the program that compiles and run. But I get the message that /dev/ttyUSB1 does not exist.
I just have a cable from the USB port on the Arduino going to the USB port on the RPi and I am using Raspbian Debian Wheezy
When I go to DIR /dev/ and use $ ls, I can only find tty0 up to tty63. I have searched on the internet and some say that you can use ttyAMA0, but this does not work. I have also searched for the same problem, but have not found a answer to my problem.
I have used $ lsusb which gave me 4 devices (001-004) on Bus 001. I can see that, for example, my USB keyboard is listed as Bus 001 Device 004: ID 1532:010b Razer USA, Ltd.
and if I run $ dmesg | grep Manufacturer I get that:
[xxxxxxxxx] usb 1-1.2: Manufacturer: Razer
So my question is why does my usb devices not get listed as ttyUSB[id]? Do I have to manually attach it?
I am a bit noob when it comes to Linux.
Hope someone can help me!
I have some bad news for you. The reason you have no /dev/ttyUSB[n] devices on the RPi (when you connect your Arduino) is because you need the Arduino drivers (FTDI drivers in particular). The unfortunate thing is that these drivers don't yet exist for the Arm platform (which includes the RPi). This is according to the FTDI web page showing support. Note the lack of Linux driver support for Arm.
Apparently on Arm running Linux the only way to program the Arduino is via the serial port interface directly via the GPIO pins. Information on doing this can be found here . You will also have to do something similar on the Arduino side see this information.
Once you have the two devices connected via straight serial then your going to probably run into another SNAFU. By default apparently on the RPi Linux will use the serial port for sending debug/console output. In order to use the serial interface for something that behavior has to be modified. This article discusses that. In particular disabling the kernel from using the serial port for terminal use this would seem to apply:
The following steps (based on a clean 2012-07-15-wheezy-raspbian install
Open a terminal on the Raspberry, or connect to Raspberry Pi through SSH.
Make a backup of the /boot/cmdline.txt file.
sudo cp /boot/cmdline.txt /boot/cmdline_backup.txt
Edit /boot/cmdline.txt file:
sudo vi /boot/cmdline.txt
This file contains:
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 $
Remove the parameters that reference the UART serial port (ttyAMA0):
dwc_otg.lpm_enable=0 console=tty1 $
Comment next line in /etc/inittab:
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
Reboot Raspberry Pi
sudo reboot
If you use a different Linux distro than Debian it would be different but the basics would still apply (modifying the kernel command line)

HyperV Network Adapter not shown by lspci

I'm currently trying to set up a debian virtual machine on HyperV (the final goal is running this machine in azure, which uses a HyperV virtualization under the hood), but I can't get the network up.
The Machine was originally created in VirtualBox and exported as a VHD image, and then re-imported in a hyperV Server. Any VirtualBox guest additions have been removed and the hyperV linux integration tools have been installed.
The server is configured to provide an external virtual network for one of the network adapters of the host, and I've added a natwork adapter for this virtual network to my VM.
However, when I run lspci on the guest, I see:
root#debian:-# lspci
00:00.0 Host bridge: Intel Corporation 44013X/2X/DX - 824438X/2X/DX Host bridge ( AGP disabled) (rev 03)
00:07.0 ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 01)
00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 02)
00:08.0 VGA compatible controller: Microsoft Corporation Hyper-V virtual VGA
I've read here that the emulated network device sits on 1011:0009, but lspci -d 1011:0009 shows nothing.
I don't really know where to go from here, any help will be appreciated :)
-Andy
While adding the Network Adapter you must use a Legacy Network Adapter and then set it to connect.
There is a tutorial about HyperV and Debian at Running Debian in Windows Server's Hyper-V
There is no line shown for the (non-legacy) network adapter.
Just load the kernel module (hv_netvsc) and use ifconfig -a to see, if the interface is there...
To build this kernel module take a look at http://dietrichschroff.blogspot.de/2013/03/hyper-v-compile-linux-kernel-with.html
I've been able to use the Hyper-V network adapter (non-legacy) by defining the mac address both in /etc/sysconfig/network-scripts/ifcfg-eth0 and in the vm hardware configuration in Virtual Machine Manager 2012.
It seems you are already using some of the Hyper-v modules (Microsoft Corporation Hyper-V virtual VGA), you can lsmod | grep hv and see the Hyper-V modules loaded (hv_vmbus, hv_netvsc, hv_blkvsc, hv_storvsc)
Also you can see the actual interfaces by running ip link show.
I suggest instead of compiling a new kernel just do a distro upgrade:
If you are running Debian 6 (Squeeze), you can upgrade to 7 (Wheezy), it’s so simple: just answer Y every time.
apt-get update
apt-get upgrade
nano /etc/apt/sources.list replace every squeeze with wheezy, ctrl+x, Y,enter.
apt-get update
apt-get upgrade
apt-get dist-upgrade
reboot
Your new kernel will be selected, login, then you can lsmod | grep hv and see the Hyper-V modules loaded (hv_vmbus, hv_netvsc, hv_blkvsc, hv_storvsc), connect your non-legacy network adapter and do ip link show then you’ll see it (you can be sure by checking the MAC).
But why stay there? Now you can go to Debian 8.2 (jessie) by following the same instructions but this time use “jessie” on your sourcelist.
I wasn’t able to go directly from 6 to 8.
If you have trouble with “public key is not available” then follow instructions from here.
Enjoy.

Resources