How to upgrade to low latency kernel on Pi OS(Debian bookworm)?
#1
Question 
How to upgrade to low latency kernel on Pi OS(Debian bookworm) for snake oil?
Reply

#2
There is no low latency kernel.  There may be a real time kernel coming in the next release.  

If you cannot wait, you can build one yourself following my process
https://www.snakeoil-os.net/forums/Threa...98#pid6998
Reply

#3
(21-Jan-2024, 12:45 PM)clark8888 Wrote: How to upgrade to low latency kernel on Pi OS(Debian bookworm) for snake oil?

Even replaced with lowlatency or even real time kernel, the clock on Pi's motherboard (oscillator) is too lousy.  And there is not hpet in Pi.  Apart from the convenience, I'm afraid that Pi can't produce very good music quality.
Reply

#4
(21-Jan-2024, 06:25 PM)hkphantomgtr Wrote:
(21-Jan-2024, 12:45 PM)clark8888 Wrote: How to upgrade to low latency kernel on Pi OS(Debian bookworm) for snake oil?

Even replaced with lowlatency or even real time kernel, the clock on Pi's motherboard (oscillator) is too lousy.  And there is not hpet in Pi.  Apart from the convenience, I'm afraid that Pi can't produce very good music quality.

asynchronous usb can use DAC's deluxe oscillator instead of Pi's poor one, don't worry

(21-Jan-2024, 03:57 PM)Snoopy8 Wrote: There is no low latency kernel.  There may be a real time kernel coming in the next release.  

If you cannot wait, you can build one yourself following my process
https://www.snakeoil-os.net/forums/Threa...98#pid6998

Thanks! If installing Ubuntu server on Pi, can "sudo apt install linux-lowlatency" work?
Reply

#5
(22-Jan-2024, 07:51 AM)clark8888 Wrote:
(21-Jan-2024, 06:25 PM)hkphantomgtr Wrote:
(21-Jan-2024, 12:45 PM)clark8888 Wrote: How to upgrade to low latency kernel on Pi OS(Debian bookworm) for snake oil?

Even replaced with lowlatency or even real time kernel, the clock on Pi's motherboard (oscillator) is too lousy.  And there is not hpet in Pi.  Apart from the convenience, I'm afraid that Pi can't produce very good music quality.

asynchronous usb can use DAC's deluxe oscillator instead of Pi's poor one, don't worry

(21-Jan-2024, 03:57 PM)Snoopy8 Wrote: There is no low latency kernel.  There may be a real time kernel coming in the next release.  

If you cannot wait, you can build one yourself following my process
https://www.snakeoil-os.net/forums/Threa...98#pid6998

Thanks! If installing Ubuntu server on Pi, can "sudo apt install linux-lowlatency" work?

Maybe you need some more time and tests to see what I mean.  Moreover, there is no hpet, not even TSC clocksource in pi.  That also significantly affects the sound quality.  Unless you've already brought the Pi, just don't buy it for cas.

Btw, you can install lowlaterncy kernel, and even real time kernel in Ubuntu server.  But after reboot, only the stock kernel is used by pi.   If you've digged a bit more in recent post (Last December), you'll find another webmate found a way to get Pi to boot with these kernels by renaming them, yet I can't make it.  And in another web it provides a ready made real-time kernel Ubuntu Server 22.04LTS.  I've used it and mentioned in the same thread, too.
Reply

#6
(21-Jan-2024, 06:25 PM)hkphantomgtr Wrote: Apart from the convenience, I'm afraid that Pi can't produce very good music quality.

That is a very bold claim!

It is not easy to tell the difference between my Pi4 (Mercury V2 Streamer) with a real time time kernel and my NUC with the Ubuntu real time kernel. Maybe the NUC is slightly ahead.  Both are using the same linear power supply, CPUset and convolution DSP.  

In my setup, the Pi 4 CAN produce very good music quality!
Reply

#7
(22-Jan-2024, 12:55 PM)Snoopy8 Wrote: That is a very bold claim!

It is not easy to tell the difference between my Pi4 (Mercury V2 Streamer) with a real time time kernel and my NUC with the Ubuntu real time kernel. Maybe the NUC is slightly ahead.  Both are using the same linear power supply, CPUset and convolution DSP.  

In my setup, the Pi 4 CAN produce very good music quality!
I think your Mercury V2 is CM4 based? CM4 (and hopefully future CM5) based boards are slightly different. I'm thinking/hoping this player of yours has a crystal (usually encased in a metal can) on a board somewhere. Some even have 2..

You kind of need that to generate a regular tick so that the Pi can be slaved to it (Master clock). Without that, the tick will be generated by some chip or via software (there's also a tickless mode) I actually forgot which is better now. :/ Problem with using software to keep time is the time can "drift" when the CPU is busy. That drift back and forth is considered jitter and may "smear" audio, in the sense you seem to lose a tiny bit of that pin point precision (Just a guess as I can't really confirm this).

Pi on it's own do not have a crystal. But I'm almost certain you can provide a different (hopefully better) clocksource for the Pi (via one of the GPIO).. However I'm no longer in the DIY scene so havn't really keep myself up to that. It's just easier with CM4 as you plug the CM4 daughterboard onto some main board, which should have all the components required for a good audio system.

Pi unit on it's own will not be a high end player. But if using it for ambient background music for work, etc? it'll still be good.. It's like using BT wireless headphones, all those AptX and so on, they all sound terrible. But we still use wireless because it's convenient. Tongue
Snakeoil Operating System - Music, your way!
[-] The following 2 users Like agent_kith's post:
  • Snoopy8, hkphantomgtr
Reply

#8
(26-Jan-2024, 10:25 AM)agent_kith Wrote:
(22-Jan-2024, 12:55 PM)Snoopy8 Wrote: That is a very bold claim!

It is not easy to tell the difference between my Pi4 (Mercury V2 Streamer) with a real time time kernel and my NUC with the Ubuntu real time kernel. Maybe the NUC is slightly ahead.  Both are using the same linear power supply, CPUset and convolution DSP.  

In my setup, the Pi 4 CAN produce very good music quality!
I think your Mercury V2 is CM4 based? CM4 (and hopefully future CM5) based boards are slightly different. I'm thinking/hoping this player of yours has a crystal (usually encased in a metal can) on a board somewhere. Some even have 2..

You kind of need that to generate a regular tick so that the Pi can be slaved to it (Master clock). Without that, the tick will be generated by some chip or via software (there's also a tickless mode) I actually forgot which is better now. :/ Problem with using software to keep time is the time can "drift" when the CPU is busy. That drift back and forth is considered jitter and may "smear" audio, in the sense you seem to lose a tiny bit of that pin point precision (Just a guess as I can't really confirm this).

Pi on it's own do not have a crystal. But I'm almost certain you can provide a different (hopefully better) clocksource for the Pi (via one of the GPIO).. However I'm no longer in the DIY scene so havn't really keep myself up to that. It's just easier with CM4 as you plug the CM4 daughterboard onto some main board, which should have all the components required for a good audio system.

Pi unit on it's own will not be a high end player. But if using it for ambient background music for work, etc? it'll still be good.. It's like using BT wireless headphones, all those AptX and so on, they all sound terrible. But we still use wireless because it's convenient. Tongue

I'm sure it's not the only board for the RPi that has this, but my Allo Digione Signature has its own clock, so it doesn't rely on the RPi's.
Reply

#9
Plenty of add-on devices that slave the Pi to their clock..Allo, HiFiBerry et al.
Pi 4 and above have more than enough resources for good audio.
Though somehow a modest X86/amd64 device (NUC, Thin-client etc) have the better resolution for me.
Reply

#10
I found this in web for more reference clocksource « Remi Bergsma's blog.  Of course that's totally out of my knowledge.
[-] The following 1 user Likes hkphantomgtr's post:
  • uglymusic
Reply



Bookmarks

Possibly Related Threads…
Thread Author Replies Views Last Post
  LMS Upgrade ? Coacharnold 7 521 15-Mar-2024, 09:14 PM
Last Post: uglymusic
  RT Ubuntu kernel Kjell 1 764 18-Feb-2023, 10:32 AM
Last Post: agent_kith
  Latency from Cyclic Test in NUC hkphantomgtr 18 4,362 09-Jun-2022, 10:34 AM
Last Post: Snoopy8
  Upgrade Ubuntu or not (strictly from the sound quality perspective)? koko6969koki 10 3,481 29-Oct-2021, 05:23 AM
Last Post: Bromf
  System upgrade SandroN 3 2,899 01-Jul-2019, 07:44 AM
Last Post: agent_kith



Users browsing this thread:
6 Guest(s)

[-]
Our Sponsors

[-]
Welcome
You have to register before you can post on our site.

Username/Email:


Password:





[-]
Latest Threads
Howto setup resampling in Logitech Media...
Last Post: Coacharnold
18-Nov-2024 12:06 AM
» Replies: 7
» Views: 5800
Dropping Measurements, Hello High-End.
Last Post: agent_kith
26-Oct-2024 09:02 AM
» Replies: 12
» Views: 445
Very happy to have Sankeoil......! mpd w...
Last Post: run51
24-Oct-2024 05:35 AM
» Replies: 9
» Views: 1678
SO no soundcard detected - RPI Pi4 snake...
Last Post: run51
21-Oct-2024 10:55 PM
» Replies: 4
» Views: 105
download
Last Post: Snoopy8
19-Oct-2024 05:52 AM
» Replies: 1
» Views: 105
Full proces to instal snakeiol 100% work...
Last Post: audioluthier
11-Oct-2024 02:32 AM
» Replies: 9
» Views: 336
A network protocol designed for CAS
Last Post: hkphantomgtr
10-Oct-2024 09:48 PM
» Replies: 0
» Views: 85
CAS with "Single Core"
Last Post: hkphantomgtr
06-Oct-2024 08:32 AM
» Replies: 2
» Views: 116
MPD player not working
Last Post: Snoopy8
27-Sep-2024 11:54 AM
» Replies: 7
» Views: 218
LMS playing DFF files sampling rate
Last Post: Snoopy8
16-Sep-2024 07:45 PM
» Replies: 5
» Views: 155

[-]
SnakeoilOS Mission Statement

Our mission is to create a free to use computer OS that is easy to install, intuitive to operate and play music that will connect and engage with you emotionally.

SnakeoilOS gives you the freedom to spend more time on listening, enjoying and exploring music. Wasting time on computers is now a thing of the past! Everything is constantly evolving/improving. Please check back often for updates.

If you like this project, do show your support with a small token donation. All donations collected will be used to run this website, and for purchasing new equipment for the project.


Powered By MyBB, © 2002-2024. Theme © Melroy van den Berg.