Menu

#1537 Playback cursor doesn't move with kernels 4.8.x

None
closed
nobody
None
1
2017-12-24
2016-10-22
No

When we try to play any file on Rosegarden using linux kernels from the series 4.8.x the cursor doesn't move and we get no playback (except a note or chord where the cursor is stopped). We can hear the notes when we type them but we cannot play the file.
It has something to do with <Edit -=""> Preferences -> MIDI -> General -> Sequencer Timing Source>. Changing this option to PCM... makes the cursor move again. But to some users, like me, it brings another issue. The cursor moves during playback but we get no sound at output.
We're discussing this on mailing lists and all users who have tried the newer kernels confirmed the bug. It seems that something was changed in system timer in kernels 4.8.x and we still don't know exactly what it is. By now most users, me too, are sticking to older kernels who do the job, but when 4.8.x kernels spread and become default for most distros probably many more users will be affected by this incompatibility.

Discussion

1 2 > >> (Page 1 of 2)
  • Ted Felix

    Ted Felix - 2016-10-23

    Does aplaymidi work?

     
  • Fernando A. Martin

    There's no aplaymidi in pclinuxos repos. There's pmidi, but I don't know if it's the same you want.
    Here we have an user that lists all the players he tested: http://www.pclinuxos.com/forum/index.php/topic,139435.0.html But I don't know if it helps.
    If pmidi is the same as aplaymidi I can test it. If no, I can't. Or if someone else does the test I'll be thankful too.

     

    Last edit: Fernando A. Martin 2016-10-23
  • Ted Felix

    Ted Felix - 2016-10-23

    aplaymidi is usually in a package called "alsa-utils". pmidi would be good to try too. However, it sounds like many MIDI sequencers are unaffected by this kernel change. Feels like this might be a legit rg issue.

     
    • D. Michael McIntyre

      On 10/22/2016 11:33 PM, Ted Felix wrote:

      aplaymidi is usually in a package called "alsa-utils". pmidi would be
      good to try too. However, it sounds like many MIDI sequencers are
      unaffected by this kernel change. Feels like this might be a legit rg issue.

      We have always been affected by timing issues that didn't seem to bother
      anyone else. I vaguely remember a very detailed message from Chris
      explaining what was what why, but there's no telling if I could dig that up.

      --
      D. Michael McIntyre

       
  • Yves Guillemot

    Yves Guillemot - 2016-10-23

    aplaymidi works with kernel 4.8.3.

     
  • Fernando A. Martin

    Here are the results of my tests: pclinuxos, kernel 4.8.3.
    system timer - only the first notes where the cursor is stopped play. The cursor doesn't move.
    pcm playback 0-0-0, pcm capture 0-0-1, pcm playback 0-1-0 and pcm capture 0-2-1 - only the first notes where the cursor starts to move are played. The cursor keeps moving but with no further sound.
    So, for my system, there was no way to make rosegarden playback work with kernel 4.8.3.
    Pmidi works perfectly.

     
  • Yves Guillemot

    Yves Guillemot - 2016-10-23

    Inside RG code, the method AlsaDriver::getAlsaTime() is calling Alsa functions snd_seq_get_queue_status() and snd_seq_queue_status_get_real_time() to get the time of the Alsa sequencer.
    This time is split in two parts : seconds et nanoseconds.

    With kernel 4.8.3, when using system timer, the sec part is always 0 while the nsec parts is growing to some values always far lower than 999999999 before going back to 0.
    The resulting time is moving up and down but never reaches 1 s.
    When pcm playback x-y-z is used, the sec and nsec parts have apparently normal values and the resulting time seems correct.

    That's probably why the cursor is not moving with system timer.
    That looks like a kernel bug as snd_seq_get_queue_status(), in asoundlib, if getting the time from the alsa kernel module with an ioctl call.

    I still have no idea why there is no sound when using pcm playback x-y-z.

     
  • Fernando A. Martin

    Your description of kernel timer behavior really looks like a bug. There seems to be something very inconsistent.
    Are you able to contact kernel developers? Do they use to accept bug reports and correct them?

     
  • Ted Felix

    Ted Felix - 2016-10-24

    Unexpected ALSA time behavior confirmed in 4.8.3 with the attached small program.

     
  • Yves Guillemot

    Yves Guillemot - 2016-10-24

    Thanks Ted,
    Before contacting ALSA developpers I was looking for a small example showing the problem. Your attached program is just perfect.

    I'm now going to report the issue on the ALSA-user mailing list.

     
  • Ted Felix

    Ted Felix - 2016-10-25

    Yves's post to the ALSA-user mailing list: https://sourceforge.net/p/alsa/mailman/message/35448536/

    I've tested the following kernel versions in the interest of starting a bisect on the kernel:

    • 4.8: FAIL
    • 4.7.10: PASS

    So, it looks like the problem is between the 4.7 and 4.8 kernels and not in either of the point release branches.

     
  • Yves Guillemot

    Yves Guillemot - 2016-10-25

    Here is the Takashi Iwai's answer: https://sourceforge.net/p/alsa/mailman/message/35449929/

    I tried the patch with the 4.8.4 kernel and it fixes the cursor moving and no sound problems when the system timer is used.

    There is still some problems which need more investigations:
    The HR timer works fine with 4.4.26 but freezes the 8.8.x
    The pcm timers show unreproducible results:
    With 4.8.4: only the first note is played
    With 4.4.26: Sometimes there is no sound at all, sometimes only the first note is played and, although I can't reproduce it now, I seem to remember one time that all notes was played.

    When only the first note is played, it sounds as if the note off is never emitted.

     
  • Ted Felix

    Ted Felix - 2016-10-25
     
  • Fernando A. Martin

    I followed the links and discussions above. In pclinuxos they're quick to release new kernels. 4.8.4 is already on the repos. I installed 4.8.4 but the bug persists exactly the way it was in all the 4.8.x series.
    Are the kernel developpers working to correct it? Will the patches they created be implemented in future kernel versions?

     
    • Ted Felix

      Ted Felix - 2016-10-28

      I installed 4.8.4 but the bug persists exactly the way it was in all the 4.8.x series.

      The fix hasn't made it in yet.

      Are the kernel developpers working to correct it?

      The patch is available and it is in the queue for inclusion in the kernel. We might see it as early as 4.8.5 if we're lucky.

      Will the patches they created be implemented in future kernel versions?

      Yes.

       
  • Fernando A. Martin

    Thank you for the answers. I'll be waiting and testing new kernels.

     
  • Yves Guillemot

    Yves Guillemot - 2016-10-28

    Kernel 4.8.5 just came out today, but without the patch.
    We'll have to wait until at least the next one.

     
  • Fernando A. Martin

    May have they forget about it? Or may it just be a matter of time?

     
  • Yves Guillemot

    Yves Guillemot - 2016-10-28

    They can't forget it now. It's only a matter of time.

     
  • Fernando A. Martin

    I just have tried kernel 4.8.6 and the regressions is still there.
    If you google about this kernel you'll find that it's labelled stable, corrects arm issues etc. But the alsa patch was not implemented yet.
    I worry that the more kernels are released with this regression, more chances are that distros adopt them and people that use those distros become unable to use rosegarden.
    (Please, don't let rosegarden become a legacy software in the near future.)

     
  • Yves Guillemot

    Yves Guillemot - 2016-11-01

    I don't know when the alsa patch will be implemented in a 4.8.x kernel.
    They are currently releasing a new kernel each 4 or 5 days and the patches added to the 4.8.6 were committed from june 1 to october 7 (most of them are from august and september).
    I presume we have to wait until the patches committed near the end of october will be inserted.
    Nevertheless this alsa patch is not lost and will be at least in the future 4.9.x kernels because it already is in the 4.9-rc3 mainline.

     
  • Fernando A. Martin

    You got the point I was thinking of. It has been said that 4.9 will be LTS. Probably many distros will adopt it. If we enter at an lts series with that bug, for many rosegarden would become a legacy.
    I hope you're right and at least they implement the patch from 4.9 on.

     

    Last edit: Fernando A. Martin 2016-11-02
  • Yves Guillemot

    Yves Guillemot - 2016-11-10

    It's done: the patch is inside the 4.8.7 stable kernel.

     
  • Fernando A. Martin

    Thank you for telling us.
    You said that 4.8.7 is working. I tried kernel 4.8.8 today and Rosegarden playback is working.
    So it seems that the kernel regressions have been corrected.
    Thanks for all of you who helped with patches, test files, bug reports and so on. :)

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.