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 206 15-Mar-2024, 09:14 PM
Last Post: uglymusic
  RT Ubuntu kernel Kjell 1 513 18-Feb-2023, 10:32 AM
Last Post: agent_kith
  Latency from Cyclic Test in NUC hkphantomgtr 18 2,962 09-Jun-2022, 10:34 AM
Last Post: Snoopy8
  Upgrade Ubuntu or not (strictly from the sound quality perspective)? koko6969koki 10 2,295 29-Oct-2021, 05:23 AM
Last Post: Bromf
  System upgrade SandroN 3 2,390 01-Jul-2019, 07:44 AM
Last Post: agent_kith



Users browsing this thread:
1 Guest(s)

[-]
Our Sponsors

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

Username/Email:


Password:





[-]
Latest Threads
Can snakeoil os be installed on Ubuntu 2...
Last Post: hkphantomgtr
Today 06:42 PM
» Replies: 1
» Views: 9
Something seriously wrong with Squeezeli...
Last Post: Coacharnold
21-Apr-2024 08:28 PM
» Replies: 1
» Views: 32
MP3 Not Playing
Last Post: davem
21-Apr-2024 10:41 AM
» Replies: 4
» Views: 91
Announcing Snakeoil Measurements 1.3.0
Last Post: kees1000
13-Apr-2024 11:54 PM
» Replies: 95
» Views: 4900
LMS rebranded to Lyrion Media Server
Last Post: Bromf
07-Apr-2024 01:59 PM
» Replies: 4
» Views: 109
ZimaBoard 2x NIC, 2x SATA, 2x USB, 1x PC...
Last Post: agent_kith
26-Mar-2024 12:04 PM
» Replies: 13
» Views: 707
LMS Upgrade ?
Last Post: uglymusic
15-Mar-2024 09:14 PM
» Replies: 7
» Views: 206
Squeezebox shutdown
Last Post: TripleX
13-Mar-2024 07:34 AM
» Replies: 4
» Views: 104
Fail to install myMPD
Last Post: hkphantomgtr
03-Mar-2024 08:45 PM
» Replies: 9
» Views: 244
Intel HFI Driver Can "Save Tons Of CPU C...
Last Post: hkphantomgtr
28-Feb-2024 09:15 PM
» Replies: 0
» Views: 67

[-]
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.