Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DietPi-Config | RPi | OpenGL/VC4 causes soundcard selection to be invalid #2173

Closed
ezekini opened this issue Oct 24, 2018 · 9 comments
Closed
Assignees
Labels
Bug 🐞 Raspberry Pi Workaround available 🆗 Workaround is available/has been implemented, but a definite solution should be found when possible.
Milestone

Comments

@ezekini
Copy link

ezekini commented Oct 24, 2018

Creating a bug report/issue:

Required Information:

  • DietPi version: 6.17.9
  • Distro version: 9.4
  • Kernel version: Linux DietPi 4.14.71-v7+ Native PC - Home Assistant installation fails #1145 SMP Fri Sep 21 15:38:35 BST 2018 armv7l GNU/Linux
  • SBC device: RPi 3 Model B+ (armv7l)
  • Power supply used: 5V@2A
  • SDcard used: SanDisk ultra

Additional Information (if applicable):

  • Software title: Shairport, Raspotify, Roon bridge.
  • Was the software title installed freshly or updated/migrated? Yes
  • Can this issue be replicated on a fresh installation of DietPi? I guess

Steps to reproduce:

  1. Install raspotify, Roon bridge, shairport.

Expected behaviour:

  • Sound should output from rPI Allo Boss Dac.

Actual behaviour:

I can only get an output using Roon.

Extra details:

I have selected Allo Boss Dac in dietpi-config. What is strange is that if I enter alsamixer, I have to manually select the soundcard, which, to my memory, wasn't neccesary in the past.

@Fourdee
Copy link
Collaborator

Fourdee commented Oct 24, 2018

@ezekini

Thanks for the report, lets check a few things, please paste results:

cat /etc/asound.conf
aplay -l

@Fourdee Fourdee added Waiting for user reply ⏳ Beta 🧪 Issues specific to the Beta branch testing labels Oct 24, 2018
@ezekini
Copy link
Author

ezekini commented Oct 24, 2018

Here are results @Fourdee :

root@DietPi:~# cat /etc/asound.conf
pcm.!default {
    type hw
    card 0
    device 0
}
ctl.!default {
    type hw
    card 0
}
root@DietPi:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: vc4hdmi [vc4-hdmi], device 0: MAI PCM vc4-hdmi-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: BossDAC [BossDAC], device 0: Boss DAC HiFi [Master] pcm512x-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
root@DietPi:~#

@Fourdee
Copy link
Collaborator

Fourdee commented Oct 25, 2018

@ezekini

Thanks for the info, yep issue is with vc4hdmi, unexpected, throwing the asound.conf out. Only appears when openGL is enabled.

Solution is copy and paste all:

dietpi-services stop
cat << _EOF_ > /etc/asound.conf
pcm.!default {
    type hw
    card 1
    device 0
}
ctl.!default {
    type hw
    card 1
}
_EOF_
dietpi-services start

I'll need to rewrite our soundcard system, most likely use a 2 stage method to apply, reboot, then use detection based for selection.

@Fourdee Fourdee self-assigned this Oct 25, 2018
@Fourdee Fourdee added this to the v6.18 milestone Oct 25, 2018
@Fourdee Fourdee changed the title No sound output except in Roon. DietPi-Config | RPi | OpenGL/VC4 causes soundcard selection to be invalid Oct 25, 2018
@MichaIng
Copy link
Owner

@Fourdee
Is reboot needed to (re)load a kernel module? Perhaps it is possible to use modprobe for this?

@Fourdee
Copy link
Collaborator

Fourdee commented Oct 25, 2018

@MichaIng

Is reboot needed to (re)load a kernel module? Perhaps it is possible to use modprobe for this?

Issue is with dt overlay, which needs to be loaded during boot time via kernel. Can't be done on the fly as far as i'am aware ☹️
https://www.raspberrypi.org/forums/viewtopic.php?t=99401

@MichaIng
Copy link
Owner

MichaIng commented Oct 25, 2018

@Fourdee
https://www.raspberrypi.org/documentation/configuration/device-tree.md

Very interesting in general, according to changing dtoverlays on runtime level: 3.5.1 THE DTOVERLAY COMMAND

Worth to try to keep configuration handy.

Interesting:
enable_uart=1 implies core_freq=250 (unless force_turbo=1)

@Fourdee Fourdee mentioned this issue Oct 25, 2018
Fourdee referenced this issue Oct 25, 2018
**v6.17**
(25/10/18)

**Changes / Improvements / Optimisations:**
 - General | NanoPC T4: Image updated to include lastest kernel (4.4.154). Many thanks to @carlosedp for providing this kernel! https://github.com/Fourdee/DietPi/issues/1829#issuecomment-429324437
 - General | DietPi now has 3 branches (master=stable, beta=public testing, dev=dev). By default, all users are on master/stable branch: https://github.com/Fourdee/DietPi/issues/2083#issuecomment-426842537
 - General | Improved detection of permissions support during user data transfers: https://github.com/Fourdee/DietPi/issues/2096
 - General | IPv6: Due to the requirements of various software titles available in dietpi-software (eg: nginx, redis-server), and that IPv6 is slowly becoming more common place, IPv6 is now disabled via sysctl on interface level, while it stays enabled on kernel level: https://github.com/Fourdee/DietPi/issues/2027
 - DietPi-Autostart | Chromium: You will now be prompted to enter a homepage URL, which will be loaded when the application starts: https://github.com/Fourdee/DietPi/issues/2169#issuecomment-432297343
 - DietPi-Config | RPi: Added support for LCD panel "Elecrow ESP01215E 7 inch HDMI IPS with touch input" (basically a cheaper RPi touchscreen): https://www.amazon.co.uk/gp/product/B07H79XMLT/ref=oh_aui_detailpage_o01_s00?ie=UTF8&psc=1
 - DietPi-Config | Added ability to benchmark network LAN transfer rates using 2 DietPi systems.
 - DietPi-Config | RPi: Changing the display resolution, will also apply to Chromium under kiosk/autostart mode: https://github.com/Fourdee/DietPi/issues/2158
 - DietPi-Config | Added an option to toggle preferring IPv4 connections with APT and wget, if IPv6 is enabled. This enhances compatibility and performance in some cases.
 - DietPi-Config | Online Benchmarks Database! Now available. Simply run the benchmark from the tools menu, to upload your scores and compare against others: https://dietpi.com/survey
 - DietPi-Automation | Added settings to dietpi.txt to toggle IPv6 and IPv4 preference on first boot.
 - DietPi-Update | You now have the option to view the changelog, prior to updating: https://github.com/Fourdee/DietPi/issues/2081
 - DietPi-Software | Sabnzbd: Updated to 2.3.5 for new installations only. Now runs under its own limited user account, and, umask of 0775 for downloads: https://github.com/Fourdee/DietPi/issues/2172
 - DietPi-Software | Card/CalDAV request redirection was added to new Baikal, ownCloud and Nextcloud installs. Now only the servers domain/IP need to be entered on Card/CalDAV clients, without any further path to the DAV endpoints: https://github.com/Fourdee/DietPi/issues/2057
 - DietPi-Software | Plex Media Server and Transmission services run now as group "dietpi", to allow cross access with download managers and media software: https://github.com/Fourdee/DietPi/issues/2067#issuecomment-427579779
 - DietPi-Set_Hardware | Odroid C2: When selecting USB DAC, smp affinity will be applied for USB IRQ's to improve stability: https://github.com/Fourdee/DietPi/issues/2101
 - DietPi-Drive_Manager | Formatting: Now has the option to format the whole drive, or patition only, for drives with existing partitions.
 - DietPi-Drive_Manager | Mounting NTFS drives now enabled native linux permissions support (eg: you can use this as your userdata location). Many thanks to @Random90 for making this possible! https://github.com/Fourdee/DietPi/issues/2096#issuecomment-425553333
 - DietPi-Drive_Manager | Improved detection and formatting for NVMe based drives: https://github.com/Fourdee/DietPi/issues/2102
 - DietPi-Drive_Manager | Removed /proc from fstab. No longer required as this created at kernel/systemd level: https://github.com/Fourdee/DietPi/issues/2154

**Bug Fixes:**
 - General | G_THREAD_START: Resolved issue where this was running in blocking mode. Now uses exit code to indentify finished tasks instead of PID.
 - DietPi-Cloudshell | Resolved various issues with inability to run service via SSH on another screen, and, G_DIETPI-NOTIFY errors. Many thanks to @potter-91 for reporting this issue! https://github.com/Fourdee/DietPi/issues/2104
 - DietPi-Config | WiFi-Monitor: Resolved an issue with syntax, and, incorrectly pinging the default gateway, instead of whats assigned to the wlan interface: https://github.com/Fourdee/DietPi/issues/2103
 - DietPi-Config | dietpi-wifi.db code has been optimized, and, also resolves an issue where '/var/lib/dietpi/dietpi-wifi.db' was not generated automatically: https://github.com/Fourdee/DietPi/issues/2087#issuecomment-423836528
 - DietPi-Config | Waveshare32b: Resolved inverted inputs under X11/Xorg: https://github.com/Fourdee/DietPi/issues/803
 - DietPi-Config | PineA64: HDMI sound is now correctly enabled when selected. 3.5mm support is still under investigation: https://github.com/Fourdee/DietPi/issues/2153
 - DietPi-Drive_Manager | Resolved an issue where swapfile would register as enabled when set to 0 size: https://github.com/Fourdee/DietPi/issues/2127
 - DietPi-Survey | Resolved an issue where dietpi-survey under mode 1 would not generate the survey file.
 - DietPi-Software | MPD: Now runs under the group 'dietpi' and user 'root', allowing access to music directories when contained on samba networked drives: https://github.com/Fourdee/DietPi/issues/2092
 - DietPi-Software | Fixed an issue where software uninstalls could have failed due to dependant packages. Thanks to @dynobot for reporting this issue: https://github.com/Fourdee/DietPi/issues/2091
 - DietPi-Software | Webservers/PHP: Fixed an issue, where PHP was not installed when a webserver was installed directly via "dietpi-software install 8X".
 - DietPi-Software | Nextcloud: On Jessie systems, no newer version than latest NC13 will be installed, because PHP5 support was dropped with NC14: https://github.com/Fourdee/DietPi/issues/1778#issuecomment-419918372
 - DietPi-Software | MyMPD: Resolved an issue where the service would fail to run: https://github.com/Fourdee/DietPi/issues/2088
 - DietPi-Software | MyMPD: Resolved an issue where the installation would fail, due to a recent MyMPD update with new pre-reqs: https://github.com/Fourdee/DietPi/issues/2088#issuecomment-423852124
 - DietPi-Software | SiCKRAGE: Resolved failing install due to changed capitalization of SiCKRAGE GitHub repo, and, various additional pre-reqs due to new install method required by SiCKRAGE. Thanks to @mdoary for reporting this issue: https://github.com/Fourdee/DietPi/issues/2126
 - DietPi-Software | VNC Server: Resolved an issue where VNC server would fail to start under shared desktop mode, many thanks to @LieDanG for reporting this issue: https://github.com/Fourdee/DietPi/issues/2142#issuecomment-430492281
 - DietPi-Process_tool | Resolved an issue where applying process settings on Plex Media Server failed, thanks to @symbios24 for reporting this issue: https://github.com/Fourdee/DietPi/issues/2089
 - General | Sparky SBC: Resolved an issue where 'sparky_eth_controller.sh' could incorrectly reboot the device after 20 seconds.
 - General | Resolved an issue with Rock64 being unable to run xserver. Please note this device still runs under limited software rendering due to lack of available working drivers/installation method for Debian systems: https://github.com/Fourdee/DietPi/issues/2086
 - General | Resolved an issue with Jessie failing to start networking with preboot script: https://github.com/Fourdee/DietPi/issues/2075

**Allo GUI v11:**
- Minor update to add GUI support for new DietPi version codes.

As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here.

**Known/Outstanding Core Issues:**
- O!MPD and MyMPD fail to update libaries. YMPD is fine: https://github.com/Fourdee/DietPi/issues/2156
- Kodi shutdown options missing: https://github.com/Fourdee/DietPi/issues/2155
- DietPi-Config | RPi | OpenGL/VC4 causes soundcard selection to be invalid: https://github.com/Fourdee/DietPi/issues/2173
- PineA64: No sound over 3.5mm jack: https://github.com/Fourdee/DietPi/issues/2153
- For all additional issues that may appear after release, please see the following link and select the 'Next Version Milestone' to see active tickets: https://github.com/Fourdee/DietPi/milestones
@Fourdee Fourdee modified the milestones: v6.18, v6.19 Nov 25, 2018
@Fourdee Fourdee modified the milestones: v6.19, v6.20 Dec 4, 2018
@MichaIng
Copy link
Owner

MichaIng commented Jan 5, 2019

@Fourdee
Yep, basically this should work:

# Check if desired overlay is available
dtoverlay -a | grep 'target_overlay'
# Load desired overlay to running system
dtoverlay 'target_overlay'
# Remove old overlay
dtoverlay -r 'old_overlay'

Source: https://www.raspberrypi.org/documentation/configuration/device-tree.md#part3.5.1

@Fourdee
Copy link
Collaborator

Fourdee commented Jun 27, 2019

@MichaIng

Applied a simple workaround for now, if vc4, sound card target index++.

Only downside, user will need to re-select sound card after changing vc4 on/off. msg?

EDIT: done a message. Ideally this all needs a complete rewrite and improved detection. But its a big job, not something I can take on now.

@MichaIng MichaIng added the Workaround available 🆗 Workaround is available/has been implemented, but a definite solution should be found when possible. label Jun 27, 2019
@MichaIng
Copy link
Owner

MichaIng commented Jun 27, 2019

@Fourdee
Is good for now. I planned to rewrite our sound card selection menu that way:
Main menu:

  1. enable/disable audio capability: When disable, purge alsa-utils, hide all below items, else install alsa-utils to allow auto-detection.
  2. Allow to select additional dtoverlay/kernel module to load (only shown on HW models that support/require this, e.g. RPi) ToDo then: Check if modprobe+dtoverlay commands allow to skip reboot, for sound cards to be shown by aplay -l.
  3. Select sound card+device based on aplay -l auto detection.
  4. DietPi-Justboom as it was
  5. Optionally, see if we can come up with a reliable option: Select microphone (capture device) based on arecord -l.

Btw. regarding mails some days ago: I found a solution for the Mycroft + microphone issue with default (non equaliser) asound.conf: There is an option to switch capture sample rate within mycroft.conf, that is by default 16000 (does not work) but works well with 48000. This was the case on all my x86 devices (all VMs with different sound cards) and different notebook. So it seems the "plug" module allows this sample rate conversion or something but that totally breaks sound quality.
With equaliser enabled things are broken by error message I wrote you, about pa_lib_alsa (or similar). Looks like in that case Mycroft looks for ("pa" = ?) PulseAudio which is not available, thus fails? However this is all about Mycroft and not about our sound settings, so nothing to change in this direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐞 Raspberry Pi Workaround available 🆗 Workaround is available/has been implemented, but a definite solution should be found when possible.
Projects
None yet
Development

No branches or pull requests

3 participants