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



Users browsing this thread:
2 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: clark8888
17-Jul-2024 12:42 PM
» Replies: 21
» Views: 837
Openssh vulnerability is fixed in Mantic
Last Post: patricia1066
17-Jul-2024 02:56 AM
» Replies: 0
» Views: 19
install Snakeoil on Audio Alchemy DMP-1 ...
Last Post: Snoopy8
13-Jul-2024 09:13 PM
» Replies: 1
» Views: 34
Installation problem
Last Post: Snoopy8
09-Jul-2024 12:21 PM
» Replies: 25
» Views: 5896
Something seriously wrong with Squeezeli...
Last Post: Snoopy8
01-Jul-2024 09:22 AM
» Replies: 11
» Views: 486
[split] Real Time Kernels discussion
Last Post: Snoopy8
01-Jul-2024 06:46 AM
» Replies: 42
» Views: 5800
Portable Snakeoil :-) First test.
Last Post: Snoopy8
30-Jun-2024 06:26 PM
» Replies: 26
» Views: 3816
Snakeoil virtualized (PROXMOX), USB+PCI ...
Last Post: agent_kith
25-Jun-2024 02:38 PM
» Replies: 3
» Views: 148
Announcing Snakeoil Measurements 1.3.0
Last Post: Snoopy8
22-Jun-2024 07:22 AM
» Replies: 98
» Views: 7475
CamillaDSP for Room Correction
Last Post: Snoopy8
17-Jun-2024 08:35 PM
» Replies: 26
» Views: 7113

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