Friday, June 12, 2015

Volume is Muted on (Re)Boot

If you're having problems with the sound being muted on boot or reboot AND you are using Alsa with PulseAudio, here is a simple fix to the problem. On Arch linux locate the PulseAudio Sound Server Startup Script. In Arch, it is typically found in /etc/pulse/. Edit this script directly to affect all users, OR copy it to your user's home directory to only affect your user. To copy to your home directory for editing:

cp /etc/pulse/default.pa ~/.config/pulse/
Now edit the file

nano ~/.config/pulse/default.pa
Locate the following entries....

load-module module-device-restore
load-module module-stream-restore
...and change them to look like this:

load-module module-device-restore restore_muted=false
load-module module-stream-restore restore_muted=false
These added options tell PulseAudio to not restore the muted state of a device or stream. I hope this helps someone

Wednesday, May 13, 2015

How to fix ssh disconnects/drops

So I disabled ipv6 on my eth0 and tun0 devices on cubox-i4pro by using the following method:
sudo nano /etc/sysctl.d/40-ipv6.conf
# Disable IPv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.eth0.disable_ipv6 = 1
net.ipv6.conf.tun0.disable_ipv6 = 1
I then rebooted for the changes to take effect:
sudo nano /etc/sysctl.d/40-ipv6.conf
sudo systemctl reboot
After the system came back online I ssh'd in and continued on configuring my Arch Linux installation. However, I was repeatedly interrupted because my ssh connection kept disconnecting. I started to research and found that ssh was still attempting to listen on ipv6. Here's how I found it:

sudo journalctl -u sshd
And the output of concern....

May 10 16:16:10 cuboxi4 sshd[1705]: debug3: sock_set_v6only: set socket 4 IPV6_V6ONLY
May 10 16:16:10 cuboxi4 sshd[1705]: debug1: Bind to port 23000 on ::.
May 10 16:16:10 cuboxi4 sshd[1705]: Server listening on :: port 23000.
To fix it, I modified the ssh daemon configuration file like so:

sudo nano /etc/ssh/sshd_config
Change this...

#AddressFamily any
To this...

AddressFamily inet
Of course you then must either reboot or restart sshd for the changes to take effect. I opt for restarting sshd:

sudo systemctl restart sshd
What this does is change sshd from using both IPv4 AND IPv6 to just IPv4. I hope this helps someone!

Tuesday, March 31, 2015

Android Studio Emulator Freezes

I've been working with Android Studio 1.1.0 installed in Arch Linux. I ran into a problem where if I tried to launch my Android Virtual Device (AVD) in the emulator, it would freeze up the entire pc after a short while. I searched the logs via journalctl but to no avail. There was no indication as to what was taking place that would cause a pc lock up. I googled for a resolution and found indications that it might be related to a sound problem. I then found this info from google regarding AVD options that can be used. In the end adding hw.audioOutput=yes to config.ini located in ~/.android/avd/my.avd/ did the trick! No more pc freezes or lockups! I hope this helps someone else!