Re: Low timer resolution (but it shouldn't be!)

Ted Felix <ted-Ll1PANez7xxWk0Htik3J/[email protected]> Thu, 30 Jan 2025 21:24:46 -0500
Newsgroups gmane.comp.audio.rosegarden.user
Message-ID <[email protected]>
   First, make sure "Sequencer timing source" is set to "(auto)" in the 
preferences (MIDI > General).  That's the most reliable.

   If that doesn't clear it up, have a look at my Linux MIDI guide.  The 
first section "Installing a Low Latency Kernel" covers the steps to 
confirm you have a 1000Hz clock configured in your kernel:

http://www.tedfelix.com/linux/linux-midi.html

   If those steps reveal a 1000Hz clock, then perhaps Rosegarden isn't 
checking the right thing.

Ted.

On 1/28/25 6:46 PM, Jeronimo Pellegrini via Rosegarden-user wrote:
> Hello,
> 
> I have been seeing the warning about low timer frequency every time I 
> start Rosegarden. I have tried this:
> 
> - I'm using an RT kernel (6.12.11-rt-amd64 from Debian)
> - Added myself to the audio group
> - The clocksource is hpet (because /sys/devices/system/clocksource/ 
> clocksource0/current_clocksource contains "hpet")
> - I have measured the clock frequency, and it seems much better than 
> 250HZ [1] [2]
> 
> But still, Rosegarden says the frequency is 250Hz.
> 
> What am I missing?
> 
> Thanks!
> J.
> 
> [1] First method:
> #include <stdio.h>
> #include <time.h>
> 
> int main() {
>      struct timespec res;
> 
>      // Get the resolution of the CLOCK_MONOTONIC clock
>      if (clock_getres(CLOCK_MONOTONIC, &res) == -1) {
>          perror("clock_getres");
>          return 1;
>      }
> 
>      // Calculate total resolution in seconds
>      long double total_resolution_seconds = res.tv_sec + (res.tv_nsec / 
> 1e9);
> 
>      // Calculate frequency in Hertz
>      long double frequency_hz = 1.0 / total_resolution_seconds;
> 
>      // Print the resolution and frequency
>      printf("Timer resolution:\n");
>      printf("Seconds: %ld\n", res.tv_sec);
>      printf("Nanoseconds: %ld\n", res.tv_nsec);
>      printf("Frequency: %.2Lf Hz\n", frequency_hz);
> 
>      return 0;
> }
> 
> [2] Second method:
> https://advenage.com/topics/linux-timer-interrupt-frequency
> 
> 
> _______________________________________________
> Rosegarden-user mailing list
> [email protected] - use the link below to unsubscribe
> https://lists.sourceforge.net/lists/listinfo/rosegarden-user



_______________________________________________
Rosegarden-user mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-user