-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[MU4 Issue] No sound on linux #11220
Comments
I tried to look a bit into this; I cloned the project [c97f070] and dove into the code. I found this by modifying this file: --- a/src/framework/audio/internal/platform/lin/linuxaudiodriver.cpp
+++ b/src/framework/audio/internal/platform/lin/linuxaudiodriver.cpp
@@ -60,14 +60,17 @@ static void* alsaThread(void* aParam)
return nullptr;
}
+ unsigned limit=10; // nb of times I want to log snd-pcm_writei
while (!data->audioProcessingDone)
{
uint8_t* stream = (uint8_t*)data->buffer;
int len = data->samples * data->channels * sizeof(float);
data->callback(data->userdata, stream, len);
-
+ if (limit) fprintf(stderr,"#### calling snd-pcm_writei with 3rd arg = %u...",data->samples);
snd_pcm_sframes_t pcm = snd_pcm_writei(data->alsaDeviceHandle, data->buffer, data->samples);
+ if (limit) fprintf(stderr,"done!; return value =%ld\n",pcm);
+ if (limit) limit--;
if (pcm != -EPIPE) {
} else {
snd_pcm_prepare(data->alsaDeviceHandle); Then, when I launch musescore, my logs usually start with
Notice that the second call to snd_pcm_writei never returned! Of course, there is no sound. I said usually because I saw it working a small number of times. The bug is not deterministic, there must be some race error somewhere. In fact, it seems that I can make it more likely to work if I strace musescore; then I have something like:
... and sound is working. I don't know how to debug this further, as I don't know anything about alsa. What could make By the way, Musescore 3 was a native pulseaudio application, while Musescore 4 only use the Alsa layer, which is a bit outdated. Is there any reason for that? |
@EB2000 thanks for logging Sorry, such problems are solved only by collecting information. |
I also have this issue. If it helps in terms of audio server, I'm running Pipewire (with Pulse compatibility). In terms of changing audio device, the only thing I could find was this, in the I/O menu, which only had the selected options (of course it's possible I just totally blanked a menu option 😅). |
For reference, the relevant packages:
I tried to play with the sound configuration as suggested, but it did not help. I tried to see if there were environment variables, or configuration files relevant to sound, but I didn't find any. The problem is either in musescore or in the alsa layer above pulseaudio. Sound works perfectly well with other applications, and it sometimes work with musescore 4 (when I strace the process...) |
On my end the relevant packages are:
Sound works perfectly for all other applications here too. |
Ok, I have a lead. I didn't realize it, but fedora dropped recently the PulseAusio sound server, and installed instead pipewire, with the pipewire-pulseaudio package ensuring compatibility. I have deinstalled pipewire-pulseaudio and installed pulseaudio instead. After restarting the daemons, MuseScore 4 now seems to be working. @MurdoMaclachlan, could you check? Is your sound server pulseaudio, or pipewire-pulseaudio? In the latter case, does switching to pulseaudio fix the problems? I have made a bug-report with pipewire; for reference: |
No, I spoke too fast. I must have been lucky, it worked three times in a row with pulseaudio. But when I tried later on, I couldn't start it again with sound. Since, I have reinstalled pipewire and, after trying about ten times, I got it to work once. So, it is just that, from time to time, it randomly works. Probably nothing to do with pulseaudio/pipewire. |
Can you check to see if #11324 fixes this? |
I had the same problem, try running
For me on arch linux it didn't work until uninstalling pulseaudio-alsa which removes |
Hmm, indeed I currently have in the output of the
The file
... and sound is working with Musescore 4! Still, the Another question is why does musescore 4 talks to the antiquated alsa interface, while musescore 3 was able to talk directly to pulseaudio/jack/etc. ? Thanks anyway for the work-around! Now I'd like to try to have some VST running in linux... |
On my system there is a |
Finally got this workaround working. It turns out on my system, there was an On adding those links, I definitely agree with this:
And would like to add that, even on a distribution that didn't have I don't think it's at all reasonable that the program requires that much messing around to get the sound working, especially when MuseScore 3 worked out of the box. |
Is this problem persisting in the latest nightly? |
I am having this issue running the release version AppImage. If I go straight into There is no separate options under any of these menus apart from And clicking on However, clicking on any of these options crashes the program. Click here for logs after program crash
Any steps you would like me to take for more information, please just ask. |
For me removing |
If it helps anyone, I found I had to set a default ALSA card according to this: https://wiki.archlinux.org/title/Advanced_Linux_Sound_Architecture#Setting_the_default_sound_card_via_defaults_node Before setting the default, |
some observations from trying to fix the openSUSE package:
|
The same problem here, no sound on Ubuntu 22.04.1 LTS, with Pipewire 0.3.48. This is the flatpack version of Musescore. |
I had the same issue, running Ubuntu 22.04.1 LTS with Pipewire 0.3.48. The issue was linked to having the The solution is disabling the PulseAudio sink entirely, by following the instructions here:
NOTE that you must also inspect (It would be neat if MS4 could actually let you choose the ALSA device it's using, in order to fix issues like these.) |
In my case, I had to create the
there. Just like in your case, |
Updated Pipewire (PulseAudio (on PipeWire 0.3.66)) and reinstalled everything related to sound, and it now works for me. |
As with others, setting default card in Having done that, as soon as another application uses the sound system, it stops working and I have to do:
To get it working again. Note that this is not a MuseScore issue per se - it's an ALSA issue as I get the same problem with other ALSA tools (e.g. |
I got this working by installing Before that, |
I have encountered the same issue on Linux Mint 21 (with an xfce4 desktop, to be specific, but that shouldn't matter). Here's how I solved the problem:
By removing
and the following lines of output:
Before I removed |
For midi support on linux, this PR could use some love on the testing side: #19246 To use it, download the artifact and replace musescore binary, and connect midi using jack. |
Did this list the
I assume you are on PipeWire too. If not, what IS listed as the current "default" on your system?
Do you have any MIDI devices to connect? Otherwise "No Device" is just fine. However it should NOT crash and it does not crash with my Ubuntu 22.04, since I removed the remains of Pulse from ALSA, as this is handled by PW on my system now. Before id DID crash too. You might watch the System-Log for hints about WHAT in particular crashed. |
for me, uninstalling the pulseaudio package did the trick! (I'm using pulse through pipewire) |
I tried everything here and nothing worked, however the instructions here: https://musescore.org/en/node/340363 got audio working using the official Appimage. Basically just run qjackctl first and then the appimage and sound will work. No idea how or why, but posting to help others resolve the problem. |
For a friend on Arch using PipeWire, apparently all what was needed was to install This issue and thread in the last comment was kind of hard to find though, with only the symptoms of a stuck playback cursor staying just in place and no playback (yes I just dropped a few keywords to hopefully make this more searchable). |
i use pipewire and it doesnt work for me |
Install the midi sound fonts... Did you try both midi and MuseHub Sounds? I got the clue when I just heard the Muse Sounds. |
i dont install proprietary software sorry (muse hub is not foss btw it's musescore's eventual avenue of making a monetisable marketplace) if it's really needed i can set a virtual machine up |
Ah. Yeah it's where I found out the not the sound per se was Not working. There's a -midi pkg in the aur. Try that... |
where in the aur? |
It might depend on the pipewire version. Only the latest one have the JACK emulation turned on by default. Olderr versions require to call the pw-jack wrapper to call the target program: pw-jack {program} parameters |
I did try these, and for MIDI it doesn't help. Never had a audio output issue. |
untitledd.mp4is this related? the playhead will not move on my system when i press space or when i press the arrow and plays no sounds when i input notes or move over them. linux mint LTS cinnamon flatpak |
Flatpak is a third-party build out of the MuseScore team's control. Does it work if you use the official build - the AppImage you download directly from musescore.org? Also, which audio system are you using? |
nope, ive tried that too!
i use pipewire |
Did you try all the suggestions from earlier in the thread, and other threads dealing with specific issues with specifically Linux audio configurations? Generally, better to ask for help on the support forum at musescore.org in trying to resolve system configuration issues. Much more Linux expertise there. And then if it turns out there is a specific actual MuseScore bug discovered in the process - with precise sterps for others to reproduce - then it makes sense to turn to GitHub to report it. |
is there anyways to produce a musescore log report? |
Just run the AppImage from the command line and a log is printed to the console. |
|
doesnt work on appimage either, hope that log is sufficient |
another poster provided this which i confirm https://www.youtube.com/watch?v=mdU1vpQPCfw |
also mark this as off-topic but are muse sounds open source / able to use in other programs? |
I am trying MuseScore 4 on an uptodate Fedora 35 x86_64 linux machine. I have no sound at all:
Furthermore, when a score is played, the notes being played are supposed to be highlighted, and the highlighting is supposed to be moving through the score. With MuseScore 4, there is no sound, the first note is highlighted, and the highlighting isn't moving: it remains on the first note that should have been played.
This behaviour occurs with the pre-alpha built, and the latest nightly:
Playback works correctly with MuseScore 3, both the version packaged with fedora, and the latest nightly
In the rest of this bug report, I copy the log of the pre-alpha built while commenting what I do.
** I start with a clean state:
** % rm -rf ~/.config/MuseScore/MuseScore4.ini ~/.local/share/MuseScore/MuseScore4
** And launch Musescore:
** % ./MuseScore-4.0.0.2059995262-x86_64.AppImage
/usr/lib64/pipewire-0.3/jack/libjack.so.0
/lib64/libnss3.so
QEventLoop: Cannot be used without QApplication
QEventLoop: Cannot be used without QApplication
12:09:01.317 | INFO | main_thread | GlobalModule | onInit: log path: /home/eric/.local/share/MuseScore/MuseScore4/logs/MuseScore_220417_120901.log
12:09:01.317 | INFO | main_thread | GlobalModule | onInit: === Started MuseScore 4.0.0, build number 2059995262 ===
12:09:01.409 | INFO | main_thread | DiagnosticsModule | onInit: success start crash handler
12:09:01.580 | WARN | main_thread | Qt | QIODevice::read (QFile, "/home/eric/.local/share/MuseScore/MuseScore4/shortcuts.xml"): device not open
12:09:01.580 | WARN | main_thread | Qt | QIODevice::read (QFile, "/home/eric/.local/share/MuseScore/MuseScore4/midi_mappings.xml"): device not open
12:09:02.163 | ERROR | main_thread | WorkspaceManager | findWorkspaceFiles: [401] The file does not exist
12:09:02.163 | WARN | main_thread | WorkspaceManager | setupDefaultWorkspace: not found default workspace, will be created new
12:09:02.164 | ERROR | main_thread | PluginsConfiguration | updatePluginsConfiguration: [401] The file does not exist
12:09:02.293 | WARN | main_thread | IpcSocket | connect: failed connect to server
12:09:02.293 | WARN | main_thread | IpcSocket | connect: failed connect to server
12:09:02.294 | ERROR | main_thread | IpcServer | listen: failed listen: "QLocalServer::listen: Address in use"
12:09:02.294 | WARN | main_thread | IpcSocket | connect: failed connect to server
12:09:03.754 | ERROR | main_thread | AppShellConfiguration | sessionProjectsPaths: [401] The file does not exist
12:09:04.927 | ERROR | 139816989603392 | LanguagesConfiguration | languages: [401] The file does not exist
12:09:04.930 | WARN | 139816989603392 | Qt | QObject::connect: Cannot queue arguments of type 'QLocalSocket::LocalSocketError'
(Make sure 'QLocalSocket::LocalSocketError' is registered using qRegisterMetaType().)
12:09:04.931 | WARN | 139816989603392 | IpcSocket | connect: failed connect to server
12:09:04.931 | WARN | 139816989603392 | IpcSocket | connect: failed connect to server
12:09:04.931 | ERROR | 139816989603392 | IpcServer | listen: failed listen: "QLocalServer::listen: Address in use"
12:09:04.931 | WARN | 139816989603392 | IpcSocket | connect: failed connect to server
12:09:04.931 | WARN | 139816989603392 | Qt | QIODevice::write (QLocalSocket): device not open
12:09:04.931 | WARN | 139816989603392 | Qt | QAbstractSocket::waitForBytesWritten() is not allowed in UnconnectedState
12:09:04.932 | ERROR | 139816989603392 | ipc | writeToSocket: failed write to socket, err: "QLocalSocket::connectToServer: Socket access error"
**
** At this points, there are two open windows: the greyed-out main musescore window, and a small
** "Getting started", "Welcome to Musescore 4" window. Furthermore, in the audio volume applet, I see
** an audio playing app registered as "ALSA-plug-in [mscore-portable]". (Side note: fedora uses
** pulseaudio, but this is supposed to be compatible with ALSA.)
** I checked, of course, that this is not muted and that volume is at 100%.
**
** I now click on "Next" in the "Getting started" windows to select the "light" theme. The "Getting started"
** windows asks me about playback. There is a large "Placeholder" image, and it suggests me to download
** the" Muse symphony Orchestra library". However, the download button does nothing at all (no effect, no new
** log line). Is this a bug? Is it supposed to work yet? I don't know and I click on "Next".
**
** The last part of getting started informs me of video tutorial. I click on "Finish". New log lines;
**
12:17:24.546 | WARN | main_thread | IpcSocket | connect: failed connect to server
12:17:24.546 | WARN | main_thread | IpcSocket | connect: failed connect to server
12:17:24.547 | ERROR | main_thread | IpcServer | listen: failed listen: "QLocalServer::listen: Address in use"
12:17:24.547 | WARN | main_thread | IpcSocket | connect: failed connect to server
12:17:24.547 | WARN | main_thread | Qt | QIODevice::write (QLocalSocket): device not open
12:17:24.547 | WARN | main_thread | Qt | QAbstractSocket::waitForBytesWritten() is not allowed in UnconnectedState
12:17:24.547 | ERROR | main_thread | ipc | writeToSocket: failed write to socket, err: "QLocalSocket::connectToServer: Socket access error"
12:17:24.547 | WARN | main_thread | IpcSocket | connect: failed connect to server
12:17:24.548 | WARN | main_thread | IpcSocket | connect: failed connect to server
12:17:24.548 | ERROR | main_thread | IpcServer | listen: failed listen: "QLocalServer::listen: Address in use"
12:17:24.548 | WARN | main_thread | IpcSocket | connect: failed connect to server
12:17:24.548 | WARN | main_thread | Qt | QIODevice::write (QLocalSocket): device not open
12:17:24.548 | WARN | main_thread | Qt | QAbstractSocket::waitForBytesWritten() is not allowed in UnconnectedState
12:17:24.548 | ERROR | main_thread | ipc | writeToSocket: failed write to socket, err: "QLocalSocket::connectToServer: Socket access error"
12:17:24.549 | WARN | main_thread | IpcSocket | connect: failed connect to server
12:17:24.549 | WARN | main_thread | IpcSocket | connect: failed connect to server
12:17:24.549 | ERROR | main_thread | IpcServer | listen: failed listen: "QLocalServer::listen: Address in use"
12:17:24.549 | WARN | main_thread | IpcSocket | connect: failed connect to server
12:17:24.549 | WARN | main_thread | Qt | QIODevice::write (QLocalSocket): device not open
12:17:24.550 | WARN | main_thread | Qt | QAbstractSocket::waitForBytesWritten() is not allowed in UnconnectedState
12:17:24.550 | ERROR | main_thread | ipc | writeToSocket: failed write to socket, err: "QLocalSocket::connectToServer: Socket access error"
** In the main musescore window, I click "Scores", then "New". The "New Score" window appears and:
12:18:29.492 | INFO | main_thread | ActionsDispatcher | dispatch: try call action: file-new
12:18:29.619 | ERROR | main_thread | AppShell | run: error: qrc:/qml/MuseScore/Project/internal/KeySignatureSettings.qml:118:13: QML KeySignatureListView: Binding loop detected for property "rows"
12:18:29.620 | WARN | main_thread | Qt | qrc:/qml/MuseScore/Project/internal/KeySignatureSettings.qml:118:13: QML KeySignatureListView: Binding loop detected for property "rows"
** I choose to put a Violin (I have tried other instruments in other sessions), and click "Done". The main window is
** active with the new score.
12:20:29.314 | ERROR | main_thread | AppShellConfiguration | sessionProjectsPaths: [401] The file does not exist
12:20:29.315 | WARN | main_thread | IpcSocket | connect: failed connect to server
12:20:29.315 | WARN | main_thread | IpcSocket | connect: failed connect to server
12:20:29.315 | ERROR | main_thread | IpcServer | listen: failed listen: "QLocalServer::listen: Address in use"
12:20:29.315 | WARN | main_thread | IpcSocket | connect: failed connect to server
12:20:29.315 | WARN | main_thread | Qt | QIODevice::write (QLocalSocket): device not open
12:20:29.316 | WARN | main_thread | Qt | QAbstractSocket::waitForBytesWritten() is not allowed in UnconnectedState
12:20:29.316 | ERROR | main_thread | ipc | writeToSocket: failed write to socket, err: "QLocalSocket::connectToServer: Socket access error"
12:20:29.379 | WARN | main_thread | IpcSocket | connect: failed connect to server
12:20:29.380 | WARN | main_thread | IpcSocket | connect: failed connect to server
12:20:29.380 | ERROR | main_thread | IpcServer | listen: failed listen: "QLocalServer::listen: Address in use"
12:20:29.380 | WARN | main_thread | IpcSocket | connect: failed connect to server
12:20:29.380 | WARN | main_thread | Qt | QIODevice::write (QLocalSocket): device not open
12:20:29.380 | WARN | main_thread | Qt | QAbstractSocket::waitForBytesWritten() is not allowed in UnconnectedState
12:20:29.380 | ERROR | main_thread | ipc | writeToSocket: failed write to socket, err: "QLocalSocket::connectToServer: Socket access error"
12:20:29.662 | ERROR | 139818259252800 | SynthResolver | resolveSynth: invalid audio source params for trackId: 0
12:20:29.798 | INFO | 139818259252800 | FluidSynth | addSoundFonts: success load soundfont: /tmp/.mount_MuseScKeTjRu/share/mscore-portable-4.0/sound/MuseScore_General.sf3
12:20:35.901 | ERROR | 139818259252800 | SynthResolver | resolveSynth: invalid audio source params for trackId: 1
12:20:36.016 | INFO | 139818259252800 | FluidSynth | addSoundFonts: success load soundfont: /tmp/.mount_MuseScKeTjRu/share/mscore-portable-4.0/sound/MuseScore_General.sf3
** I click the little pencil to enter new notes
12:21:31.090 | INFO | main_thread | ActionsDispatcher | dispatch: try call action: note-input-steptime
** and enter four notes. I have a line of log for each note. No sound at all.
12:22:11.216 | INFO | main_thread | ActionsDispatcher | dispatch: try call action: put-note
12:22:12.653 | INFO | main_thread | ActionsDispatcher | dispatch: try call action: put-note
12:22:14.654 | INFO | main_thread | ActionsDispatcher | dispatch: try call action: put-note
12:22:16.170 | INFO | main_thread | ActionsDispatcher | dispatch: try call action: put-note
** I click The Play button (small triangle) in the toolbar. The last note gets highlighted, no sound, and:
12:23:39.756 | INFO | main_thread | ActionsDispatcher | dispatch: try call action: play
** I click the pause button
12:23:44.153 | INFO | main_thread | ActionsDispatcher | dispatch: try call action: play
** I click the "Rewind" button
12:24:44.901 | INFO | main_thread | ActionsDispatcher | dispatch: try call action: rewind
** and the play button again. The first note gets highlighted, there is no sound, the highlighting does not move and again the same line in the log.
12:25:15.816 | INFO | main_thread | ActionsDispatcher | dispatch: try call action: play
** etc...
The text was updated successfully, but these errors were encountered: