# Enable realtime kernel

**URL:** <https://community.blokas.io/t/enable-realtime-kernel/4612>\
**Category:** Patchbox OS\
**Created:** [July 31, 2023, 4:58pm UTC](https://community.blokas.io/t/enable-realtime-kernel/4612 "2023-07-31T16:58:56Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![nmn](https://community.blokas.io/user_avatar/community.blokas.io/nmn/32/2035_2.png) [@nmn](https://community.blokas.io/u/nmn)\
**Post date:** [July 31, 2023, 4:58pm UTC](https://community.blokas.io/t/enable-realtime-kernel/4612/1 "2023-07-31T16:58:56Z")

</div>

Hi,

I am trying to enable the realtime kernel but it returns error and I can not switch (not at the rpi atm and I forgot the error message). Is it know to work?  
I had one fail when trying to switch kernel and the downloading timed out. After that my usb sound card went silent. After restarting jack and the rpi and such I got it to work again but it was not selectable/visible in the task bar icon. After more restarting of jack and the os it is now back and visible again.  
Should I be in a specific boot mode when switching? I have been trying while using puredata module desktop environment.

I am not experienced with kernels so I am not sure where to start to look for the cause of error. As may be obvious. 😕

Thankful for help.

I am using an RPI3 B+

---

<div class="post-metadata">

**Author:** ![Giedrius](https://community.blokas.io/letter_avatar_proxy/v4/letter/g/6a8cbe/32.png) [@Giedrius](https://community.blokas.io/u/Giedrius)\
**Post date:** [August 1, 2023, 6:58am UTC](https://community.blokas.io/t/enable-realtime-kernel/4612/2 "2023-08-01T06:58:19Z")

</div>

What are the things/commands you are doing exactly? Patchbox OS comes with realtime kernel enabled already.

---

<div class="post-metadata">

**Author:** ![nmn](https://community.blokas.io/user_avatar/community.blokas.io/nmn/32/2035_2.png) [@nmn](https://community.blokas.io/u/nmn)\
**Post date:** [August 1, 2023, 10:59am UTC](https://community.blokas.io/t/enable-realtime-kernel/4612/3 "2023-08-01T10:59:52Z")

</div>

Terminal:

patchbox / kernel

Then it says:

You are using a normal kernel. Do you want to use the realtime one? Y/n

---

<div class="post-metadata">

**Author:** ![Giedrius](https://community.blokas.io/letter_avatar_proxy/v4/letter/g/6a8cbe/32.png) [@Giedrius](https://community.blokas.io/u/Giedrius)\
**Post date:** [August 1, 2023, 11:15am UTC](https://community.blokas.io/t/enable-realtime-kernel/4612/4 "2023-08-01T11:15:37Z")

</div>

What version is displayed? I see this:

 ![image](https://community.blokas.io/uploads/default/original/2X/b/b24d9b5a3441611c8bcaeed87197b3067efbf7cb.png)

What is the output of:

```bash
apt list --installed | grep kernel

```

---

<div class="post-metadata">

**Author:** ![nmn](https://community.blokas.io/user_avatar/community.blokas.io/nmn/32/2035_2.png) [@nmn](https://community.blokas.io/u/nmn)\
**Post date:** [August 1, 2023, 11:59am UTC](https://community.blokas.io/t/enable-realtime-kernel/4612/5 "2023-08-01T11:59:03Z")

</div>

![16908910902468842998418549868066](https://community.blokas.io/uploads/default/original/2X/1/1742f6afd318034cf3db9367068786f8756b54ed.jpeg)

---

<div class="post-metadata">

**Author:** ![nmn](https://community.blokas.io/user_avatar/community.blokas.io/nmn/32/2035_2.png) [@nmn](https://community.blokas.io/u/nmn)\
**Post date:** [August 1, 2023, 12:02pm UTC](https://community.blokas.io/t/enable-realtime-kernel/4612/6 "2023-08-01T12:02:42Z")

</div>

patch@patchbox:~ $ apt list --installed | grep kernel

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

raspberrypi-kernel-rt/rpi,now 1:2.20220510-1 armhf [installed]  
patch@patchbox:~ $

---

<div class="post-metadata">

**Author:** ![Giedrius](https://community.blokas.io/letter_avatar_proxy/v4/letter/g/6a8cbe/32.png) [@Giedrius](https://community.blokas.io/u/Giedrius)\
**Post date:** [August 1, 2023, 12:16pm UTC](https://community.blokas.io/t/enable-realtime-kernel/4612/7 "2023-08-01T12:16:51Z")

</div>

You may have installed your current kernel through some non-apt method. Try doing this:

```auto
sudo apt install --reinstall raspberrypi-kernel-rt

```

---

<div class="post-metadata">

**Author:** ![nmn](https://community.blokas.io/user_avatar/community.blokas.io/nmn/32/2035_2.png) [@nmn](https://community.blokas.io/u/nmn)\
**Post date:** [August 1, 2023, 12:54pm UTC](https://community.blokas.io/t/enable-realtime-kernel/4612/8 "2023-08-01T12:54:06Z")

</div>

it returns this (excerpt):

```auto
/.../

Adding 'diversion of /boot/overlays/wm8960-soundcard.dtbo to /usr/share/rpikerne
lhack/overlays/wm8960-soundcard.dtbo by rpikernelhack'
Unpacking raspberrypi-kernel-rt (1:2.20220510-1) over (1:2.20220510-1) ...
dpkg: error processing archive /var/cache/apt/archives/raspberrypi-kernel-rt_1%3
a2.20220510-1_armhf.deb (--unpack):
 unable to make backup link of './boot/kernel8.img' before installing new versio
n: Operation not permitted
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 5.15.36-rt41+ /boot/ke
rnel.img
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 5.15.36-rt41-v7+ /boot
/kernel7.img
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 5.15.36-rt41-v7l+ /boo
t/kernel7l.img
Removing 'diversion of /boot/kernel.img to /usr/share/rpikernelhack/kernel.img b
y rpikernelhack'

/.../

run-parts: executing /etc/kernel/postinst.d/initramfs-tools 5.15.36-rt41-v7l+ /b
oot/kernel7l.img
Errors were encountered while processing:
 /var/cache/apt/archives/raspberrypi-kernel-rt_1%3a2.20220510-1_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
patch@patchbox:~ $

```

---

<div class="post-metadata">

**Author:** ![Giedrius](https://community.blokas.io/letter_avatar_proxy/v4/letter/g/6a8cbe/32.png) [@Giedrius](https://community.blokas.io/u/Giedrius)\
**Post date:** [August 1, 2023, 1:25pm UTC](https://community.blokas.io/t/enable-realtime-kernel/4612/9 "2023-08-01T13:25:01Z")

</div>

What is the output of:

```auto
ls -la /boot

```

And:

```auto
df -h

```

---

<div class="post-metadata">

**Author:** ![nmn](https://community.blokas.io/user_avatar/community.blokas.io/nmn/32/2035_2.png) [@nmn](https://community.blokas.io/u/nmn)\
**Post date:** [August 1, 2023, 2:03pm UTC](https://community.blokas.io/t/enable-realtime-kernel/4612/10 "2023-08-01T14:03:31Z")

</div>

```auto
patch@patchbox:~ $ ls -la /boot
total 50798
drwxr-xr-x 7 root root 6144 Jan 1 1970 .
drwxr-xr-x 22 root root 4096 May 31 13:35 ..
drwxr-xr-x 3 root root 3584 Jul 28 22:02 backup
-rwxr-xr-x 1 root root 28912 Aug 1 13:37 bcm2708-rpi-b.dtb
-rwxr-xr-x 1 root root 29231 Aug 1 13:37 bcm2708-rpi-b-plus.dtb
-rwxr-xr-x 1 root root 28579 Aug 1 13:37 bcm2708-rpi-b-rev1.dtb
-rwxr-xr-x 1 root root 28655 Aug 1 13:37 bcm2708-rpi-cm.dtb
-rwxr-xr-x 1 root root 28537 Aug 1 13:37 bcm2708-rpi-zero.dtb
-rwxr-xr-x 1 root root 30408 Aug 1 13:37 bcm2708-rpi-zero-w.dtb
-rwxr-xr-x 1 root root 30879 Aug 1 13:37 bcm2709-rpi-2-b.dtb
-rwxr-xr-x 1 root root 30786 May 31 13:37 bcm2709-rpi-cm2.dtb
-rwxr-xr-x 1 root root 31028 Aug 1 13:37 bcm2710-rpi-2-b.dtb
-rwxr-xr-x 1 root root 33224 Aug 1 13:37 bcm2710-rpi-3-b.dtb
-rwxr-xr-x 1 root root 33851 Aug 1 13:37 bcm2710-rpi-3-b-plus.dtb
-rwxr-xr-x 1 root root 30923 Aug 1 13:37 bcm2710-rpi-cm3.dtb
-rwxr-xr-x 1 root root 32416 Aug 1 13:37 bcm2710-rpi-zero-2.dtb
-rwxr-xr-x 1 root root 32416 Aug 1 13:37 bcm2710-rpi-zero-2-w.dtb
-rwxr-xr-x 1 root root 54477 Aug 1 13:37 bcm2711-rpi-400.dtb
-rwxr-xr-x 1 root root 54388 Aug 1 13:37 bcm2711-rpi-4-b.dtb
-rwxr-xr-x 1 root root 54997 Aug 1 13:37 bcm2711-rpi-cm4.dtb
-rwxr-xr-x 1 root root 38182 May 31 13:37 bcm2711-rpi-cm4-io.dtb
-rwxr-xr-x 1 root root 51839 Aug 1 13:37 bcm2711-rpi-cm4s.dtb
-rwxr-xr-x 1 root root 18506 Aug 1 13:37 bcm2835-rpi-a.dtb
-rwxr-xr-x 1 root root 18630 Aug 1 13:37 bcm2835-rpi-a-plus.dtb
-rwxr-xr-x 1 root root 18652 Aug 1 13:37 bcm2835-rpi-b.dtb
-rwxr-xr-x 1 root root 18917 Aug 1 13:37 bcm2835-rpi-b-plus.dtb
-rwxr-xr-x 1 root root 18785 Aug 1 13:37 bcm2835-rpi-b-rev2.dtb
-rwxr-xr-x 1 root root 18767 Aug 1 13:37 bcm2835-rpi-cm1-io1.dtb
-rwxr-xr-x 1 root root 18578 Aug 1 13:37 bcm2835-rpi-zero.dtb
-rwxr-xr-x 1 root root 19021 Aug 1 13:37 bcm2835-rpi-zero-w.dtb
-rwxr-xr-x 1 root root 19909 Aug 1 13:37 bcm2836-rpi-2-b.dtb
-rwxr-xr-x 1 root root 20912 Aug 1 13:37 bcm2837-rpi-3-a-plus.dtb
-rwxr-xr-x 1 root root 21313 Aug 1 13:37 bcm2837-rpi-3-b.dtb
-rwxr-xr-x 1 root root 21781 Aug 1 13:37 bcm2837-rpi-3-b-plus.dtb
-rwxr-xr-x 1 root root 20636 Aug 1 13:37 bcm2837-rpi-cm3-io3.dtb
-rwxr-xr-x 1 root root 52476 May 31 13:37 bootcode.bin
-rwxr-xr-x 1 root root 103 Jan 1 1980 cmdline.txt
-rwxr-xr-x 1 root root 2073 May 31 13:30 config.txt
-rwxr-xr-x 1 root root 18693 Aug 1 13:37 COPYING.linux
-rwxr-xr-x 1 root root 41 May 31 13:39 .firmware_revision
-rwxr-xr-x 1 root root 3171 May 31 13:37 fixup4cd.dat
-rwxr-xr-x 1 root root 5397 May 31 13:37 fixup4.dat
-rwxr-xr-x 1 root root 8381 May 31 13:37 fixup4db.dat
-rwxr-xr-x 1 root root 8385 May 31 13:37 fixup4x.dat
-rwxr-xr-x 1 root root 3171 May 31 13:37 fixup_cd.dat
-rwxr-xr-x 1 root root 7266 May 31 13:37 fixup.dat
-rwxr-xr-x 1 root root 10230 May 31 13:37 fixup_db.dat
-rwxr-xr-x 1 root root 10228 May 31 13:37 fixup_x.dat
drwxr-xr-x 2 root root 512 Jul 31 17:34 .fseventsd
-rwxr-xr-x 1 root root 145 May 17 2022 issue.txt
-rwxr-xr-x 1 root root 6818136 Aug 1 13:37 kernel7.img
-rwxr-xr-x 1 root root 7231096 Aug 1 13:37 kernel7l.img
-rwxr-xr-x 1 root root 8226488 May 31 13:37 kernel8.img
-rwxr-xr-x 1 root root 6471272 Aug 1 13:37 kernel.img
-rwxr-xr-x 1 root root 1594 May 31 13:14 LICENCE.broadcom
drwxr-xr-x 2 root root 25088 Aug 1 13:38 overlays
drwxr-xr-x 4 root root 512 May 30 23:47 .Spotlight-V100
-rwxr-xr-x 1 root root 806492 May 31 13:37 start4cd.elf
-rwxr-xr-x 1 root root 3749544 May 31 13:37 start4db.elf
-rwxr-xr-x 1 root root 2253088 May 31 13:37 start4.elf
-rwxr-xr-x 1 root root 3000552 May 31 13:37 start4x.elf
-rwxr-xr-x 1 root root 806492 May 31 13:37 start_cd.elf
-rwxr-xr-x 1 root root 4821448 May 31 13:37 start_db.elf
-rwxr-xr-x 1 root root 2977280 May 31 13:37 start.elf
-rwxr-xr-x 1 root root 3724200 May 31 13:37 start_x.elf
-rwxr-xr-x 1 root root 4096 May 30 23:47 ._.Trashes
drwxr-xr-x 2 root root 512 May 30 23:47 .Trashes
patch@patchbox:~ $

```

```auto
 patch@patchbox:~ $ df -h
df: /run/user/1000/doc: Operation not permitted
Filesystem Size Used Avail Use% Mounted on
/dev/root 29G 6.4G 22G 23% /
devtmpfs 333M 0 333M 0% /dev
tmpfs 461M 119M 342M 26% /dev/shm
tmpfs 185M 948K 184M 1% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
/dev/mmcblk0p1 253M 81M 172M 33% /boot
tmpfs 93M 32K 93M 1% /run/user/1000
patch@patchbox:~ $

```

---

<div class="post-metadata">

**Author:** ![Giedrius](https://community.blokas.io/letter_avatar_proxy/v4/letter/g/6a8cbe/32.png) [@Giedrius](https://community.blokas.io/u/Giedrius)\
**Post date:** [August 1, 2023, 2:10pm UTC](https://community.blokas.io/t/enable-realtime-kernel/4612/11 "2023-08-01T14:10:02Z")

</div>

Try renaming kernel8.img:

```auto
sudo mv /boot/kernel8.img /boot/kernel8.img.bak

```

And then try reinstalling again:

```auto
sudo apt install --reinstall raspberrypi-kernel-rt

```

---

<div class="post-metadata">

**Author:** ![nmn](https://community.blokas.io/user_avatar/community.blokas.io/nmn/32/2035_2.png) [@nmn](https://community.blokas.io/u/nmn)\
**Post date:** [August 1, 2023, 3:38pm UTC](https://community.blokas.io/t/enable-realtime-kernel/4612/12 "2023-08-01T15:38:23Z")

</div>

It worked, now it says real-time kernel. Thanks!
