Problem of jemalloc system page size

I tried the telegram-desktop. It worked on pi4, but after switching to pi5, it fail to start up, and throws an error at me:

<jemalloc>: Unsupported system page size
<jemalloc>: Unsupported system page size
<jemalloc>: Unsupported system page size

And here is my system info:

System:
  Kernel: 6.12.19-1-MANJARO-RPI5 arch: aarch64 bits: 64 compiler: gcc v: 14.2.1
    clocksource: arch_sys_counter parameters: reboot=w coherent_pool=1M
    8250.nr_uarts=1 pci=pcie_bus_safe cgroup_disable=memory
    numa_policy=interleave numa=fake=8 system_heap.max_order=0
    smsc95xx.macaddr=2C:CF:67:A8:6C:44 vc_mem.mem_base=0x3fc00000
    vc_mem.mem_size=0x40000000 root=PARTUUID=c7717192-02 rw rootwait
    console=ttyAMA10,115200 console=tty3 selinux=0 quiet splash
    plymouth.ignore-serial-consoles smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0
    kgdboc=ttyAMA10,115200 usbhid.mousepoll=8 audit=0
  Desktop: KDE Plasma v: 6.3.3 tk: Qt v: N/A info: frameworks v: 6.11.0
    wm: kwin_wayland vt: 1 dm: SDDM Distro: Manjaro ARM base: Arch Linux
Machine:
  Type: ARM System: Raspberry Pi 5 Model B Rev 1.1 details: N/A rev: d04171
    serial: <filter>
Battery:
  Device-1: hidpp_battery_0 model: Logitech G304 Lightspeed Wireless Gaming
    Mouse serial: <filter> charge: 100% (should be ignored) rechargeable: yes
    status: discharging
Memory:
  System RAM: total: N/A available: 7.86 GiB used: 3.79 GiB (48.2%) igpu: 8 MiB
  RAM Report: message: No RAM data found using udevadm.
PCI Slots:
  Message: No ARM data found for this feature.
CPU:
  Info: model: N/A variant: cortex-a76 bits: 64 type: MCP arch: ARMv8 family: 8
    model-id: 4 stepping: 1
  Topology: cpus: 1x clusters: 1 cores: 4 smt: <unsupported> cache:
    L1: 512 KiB desc: d-4x64 KiB; i-4x64 KiB L2: 2 MiB desc: 4x512 KiB L3: 2 MiB
    desc: 1x2 MiB
  Speed (MHz): avg: 1700 min/max: 1500/2400 scaling: driver: cpufreq-dt
    governor: ondemand cores: 1: 1700 2: 1700 3: 1700 4: 1700 bogomips: 432
  Features: aes asimd asimddp asimdhp asimdrdm atomics cpuid crc32 dcpop
    evtstrm fp fphp lrcpc pmull sha1 sha2
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed status: Not affected
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: __user pointer sanitization
  Type: spectre_v2 mitigation: CSV2, BHB
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: bcm2712-hdmi0 driver: vc4_hdmi v: N/A bus-ID: N/A
    chip-ID: brcm:107c701400 class-ID: hdmi
  Device-2: bcm2712-hdmi1 driver: vc4_hdmi v: N/A bus-ID: N/A
    chip-ID: brcm:107c706400 class-ID: hdmi
  Display: wayland server: X.org v: 1.21.1.16 with: Xwayland v: 24.1.6
    compositor: kwin_wayland driver: X: loaded: modesetting alternate: fbdev
    dri: vc4
    gpu: vc4-drm,vc4_crtc,vc4_dpi,vc4_dsi,vc4_firmware_kms,vc4_hdmi,vc4_hvs,vc4_txp,vc4_v3d,vc4_vec
    display-ID: 0
  Monitor-1: HDMI-A-1 model: FKS-C215J serial: <filter> built: 2022 res:
    mode: 1920x1080 hz: 75 scale: 100% (1) dpi: 102 gamma: 1.2 chroma: red:
    x: 0.647 y: 0.345 green: x: 0.322 y: 0.631 blue: x: 0.153 y: 0.059 white:
    x: 0.314 y: 0.329 size: 476x268mm (18.74x10.55") diag: 546mm (21.5")
    ratio: 16:9 modes: 1920x1080, 1920x1080i, 1680x1050, 1280x1024, 1440x900,
    1280x960, 1280x800, 1152x864, 1280x720, 1440x576, 1024x768, 1440x480,
    832x624, 800x600, 720x576, 720x576i, 720x480, 720x480i, 640x480, 720x400
  API: EGL v: 1.5 hw: drv: broadcom v3d platforms: device: 0 drv: v3d
    device: 1 drv: swrast gbm: drv: v3d surfaceless: drv: v3d wayland: drv: v3d
    x11: drv: v3d
  API: OpenGL v: 4.5 compat-v: 3.1 vendor: broadcom mesa v: 25.0.1-arch1.2
    glx-v: 1.4 direct-render: yes renderer: V3D 7.1.10.2 device-ID: 14e4:ffffffff
    memory: 7.68 GiB unified: yes display-ID: :1.0
  API: Vulkan Message: No Vulkan data available.
  Info: Tools: api: clinfo, eglinfo, glxinfo, vulkaninfo
    de: kscreen-console,kscreen-doctor wl: wayland-info x11: xdpyinfo,xprop
Audio:
  Device-1: bcm2712-hdmi0 driver: vc4_hdmi bus-ID: N/A chip-ID: brcm:107c701400
    class-ID: hdmi
  Device-2: bcm2712-hdmi1 driver: vc4_hdmi bus-ID: N/A
    chip-ID: brcm:107c706400 class-ID: hdmi
  API: ALSA v: k6.12.19-1-MANJARO-RPI5 status: kernel-api
    tools: alsactl,alsamixer,amixer
  Server-1: PipeWire v: 1.4.0 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Raspberry Pi RP1 PCIe 2.0 South Bridge driver: rp1 v: kernel
    port: N/A bus-ID: 0001:01:00.0 chip-ID: 1de4:0001 class-ID: 0200
  IF: wlan0 state: up mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: link
  IF-ID-1: end0 state: down mac: <filter>
  Info: services: NetworkManager, sshd, systemd-networkd, systemd-timesyncd,
    wpa_supplicant
  WAN IP: <filter>
Bluetooth:
  Device-1: bcm7271-uart driver: bcm7271_uart bus-ID: N/A
    chip-ID: brcm:107d50c000 class-ID: serial
  Report: rfkill ID: hci0 rfk-id: 0 state: up address: see --recommends
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 583.8 GiB used: 113.23 GiB (19.4%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/mmcblk0 maj-min: 179:0 vendor: SanDisk model: SD64G
    size: 59.45 GiB block-size: physical: 512 B logical: 512 B type: Removable
    tech: SSD serial: <filter> scheme: MBR
  ID-2: /dev/nvme0n1 maj-min: 259:0 vendor: Fanxiang model: S530Q 500GB
    size: 465.76 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
    lanes: 4 tech: SSD serial: <filter> fw-rev: SN12380 temp: 34.9 C
    scheme: MBR
  ID-3: /dev/sda maj-min: 8:0 vendor: Lenovo model: 64GB thinkplus
    size: 58.59 GiB block-size: physical: 512 B logical: 512 B type: USB rev: 3.1
    spd: 5 Gb/s lanes: 1 mode: 3.2 gen-1x1 tech: N/A serial: <filter>
    fw-rev: 3.00 scheme: MBR
  Message: No optical or floppy data found.
Partition:
  ID-1: / raw-size: 465.28 GiB size: 456.91 GiB (98.20%)
    used: 113.11 GiB (24.8%) fs: ext4 dev: /dev/nvme0n1p2 maj-min: 259:2
    label: ROOT_MNJRO uuid: 12e07176-8dda-4674-8532-4ade95134720
  ID-2: /boot raw-size: 457.8 MiB size: 457.5 MiB (99.94%)
    used: 67.5 MiB (14.8%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
    label: BOOT_MNJRO uuid: 4525-5221
  ID-3: /run/media/caul/android raw-size: 58.59 GiB size: 58.59 GiB (99.99%)
    used: 49.1 MiB (0.1%) fs: exfat dev: /dev/sda1 maj-min: 8:1 label: android
    uuid: 6FFA-ABC9
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 80 (default 100) zswap: no
  ID-1: swap-1 type: zram size: 11.79 GiB used: 0 KiB (0.0%) priority: 100
    comp: zstd avail: lzo-rle,lzo,lz4 max-streams: 4 dev: /dev/zram0
Unmounted:
  ID-1: /dev/mmcblk0p1 maj-min: 179:1 size: 512 MiB fs: vfat label: bootfs
    uuid: 5DC7-F115
  ID-2: /dev/mmcblk0p2 maj-min: 179:2 size: 58.94 GiB fs: ext4 label: rootfs
    uuid: a36be96c-66be-4487-a7a6-0481bca99d89
USB:
  Hub-1: 1-0:1 info: hi-speed hub with single TT ports: 2 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 chip-ID: 1d6b:0002
    class-ID: 0900
  Device-1: 1-2:2 info: VXE V87 type: keyboard driver: hid-generic,usbhid
    interfaces: 2 rev: 1.1 speed: 12 Mb/s (1.4 MiB/s) lanes: 1 mode: 1.1
    power: 400mA chip-ID: 320f:5055 class-ID: 0301 serial: <filter>
  Hub-2: 2-0:1 info: super-speed hub ports: 1 rev: 3.0
    speed: 5 Gb/s (596.0 MiB/s) lanes: 1 mode: 3.2 gen-1x1 chip-ID: 1d6b:0003
    class-ID: 0900
  Device-1: 2-1:4 info: Lenovo 64GB thinkplus type: mass storage
    driver: usb-storage interfaces: 1 rev: 3.1 speed: 5 Gb/s (596.0 MiB/s)
    lanes: 1 mode: 3.2 gen-1x1 power: 144mA chip-ID: 346d:5678 class-ID: 0806
    serial: <filter>
  Hub-3: 3-0:1 info: hi-speed hub with single TT ports: 2 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 chip-ID: 1d6b:0002
    class-ID: 0900
  Device-1: 3-2:2 info: Logitech USB Receiver type: keyboard,mouse,HID
    driver: logitech-djreceiver,usbhid interfaces: 3 rev: 2.0
    speed: 12 Mb/s (1.4 MiB/s) lanes: 1 mode: 1.1 power: 98mA
    chip-ID: 046d:c53f class-ID: 0300
  Hub-4: 4-0:1 info: super-speed hub ports: 1 rev: 3.0
    speed: 5 Gb/s (596.0 MiB/s) lanes: 1 mode: 3.2 gen-1x1 chip-ID: 1d6b:0003
    class-ID: 0900
Sensors:
  System Temperatures: cpu: 57.2 C mobo: N/A
  Fan Speeds (rpm): cpu: 2621
Repos:
  Packages: pm: pacman pkgs: 919 libs: 249 tools: pamac,yay
  Active pacman repo servers in: /etc/pacman.d/mirrorlist
    1: https://mirrors.jlu.edu.cn/manjaro/arm-unstable/$repo/$arch
    2: https://mirrors.pku.edu.cn/manjaro/arm-unstable/$repo/$arch
    3: https://mirrors.ustc.edu.cn/manjaro/arm-unstable/$repo/$arch
    4: http://ftp.riken.jp/Linux/manjaro/arm-unstable/$repo/$arch
    5: https://mirrors.tuna.tsinghua.edu.cn/manjaro/arm-unstable/$repo/$arch
    6: http://ftp.tsukuba.wide.ad.jp/Linux/manjaro/arm-unstable/$repo/$arch
    7: https://mirror.archlinux.tw/Manjaro/arm-unstable/$repo/$arch
    8: https://mirror.phoepsilonix.love/manjaro/arm-unstable/$repo/$arch
    9: https://mirror.freedif.org/Manjaro/arm-unstable/$repo/$arch
    10: https://mirrors.cicku.me/manjaro/arm-unstable/$repo/$arch
    11: https://mirror.koddos.net/manjaro/arm-unstable/$repo/$arch
    12: https://mirrors2.manjaro.org/arm-unstable/$repo/$arch
    13: https://mirrors.manjaro.org/repo/arm-unstable/$repo/$arch
    14: http://ftp.tu-chemnitz.de/pub/linux/manjaro/arm-unstable/$repo/$arch
    15: https://mirrors.eric.ovh/manjaro/arm-unstable/$repo/$arch
    16: http://ftp.uni-kl.de/pub/linux/manjaro/arm-unstable/$repo/$arch
    17: http://manjaro.mirrors.uk2.net/arm-unstable/$repo/$arch
    18: https://mirror.vinehost.net/manjaro/arm-unstable/$repo/$arch
    19: https://mirror.hostiko.network/manjaro/arm-unstable/$repo/$arch
    20: https://mirrors.sonic.net/manjaro/arm-unstable/$repo/$arch
    21: https://www.mirrorservice.org/sites/repo.manjaro.org/repos/arm-unstable/$repo/$arch
    22: https://repo.ialab.dsu.edu/manjaro/arm-unstable/$repo/$arch
    23: https://manjaro.mirrors.lavatech.top/arm-unstable/$repo/$arch
    24: https://manjaro.ynh.ovh/arm-unstable/$repo/$arch
    25: https://mirror.csclub.uwaterloo.ca/manjaro/arm-unstable/$repo/$arch
    26: https://mirrors.ocf.berkeley.edu/manjaro/arm-unstable/$repo/$arch
    27: https://mirror.raiolanetworks.com/manjaro/arm-unstable/$repo/$arch
    28: http://ossmirror.mycloud.services/os/linux/manjaro/arm-unstable/$repo/$arch
    29: https://ftp.halifax.rwth-aachen.de/manjaro/arm-unstable/$repo/$arch
    30: https://mirrors.gigenet.com/manjaro/arm-unstable/$repo/$arch
    31: https://mirror.truenetwork.ru/manjaro/arm-unstable/$repo/$arch
    32: https://mirror.23m.com/manjaro/arm-unstable/$repo/$arch
    33: https://muug.ca/mirror/manjaro/arm-unstable/$repo/$arch
    34: https://manjaro.mirror.wearetriple.com/arm-unstable/$repo/$arch
    35: https://mirror.2degrees.nz/manjaro/arm-unstable/$repo/$arch
    36: http://manjaro.grena.ge/arm-unstable/$repo/$arch
    37: https://mirrors.nic.cz/manjaro/arm-unstable/$repo/$arch
    38: https://manjaro.kurdy.org/arm-unstable/$repo/$arch
    39: http://ftp.free.org/mirrors/repo.manjaro.org/repos/arm-unstable/$repo/$arch
    40: https://mirror.telepoint.bg/manjaro/arm-unstable/$repo/$arch
    41: http://ftp.snt.utwente.nl/pub/linux/manjaro/arm-unstable/$repo/$arch
    42: https://mirror.dc.uz/manjaro/arm-unstable/$repo/$arch
    43: https://ftp.lysator.liu.se/pub/manjaro/arm-unstable/$repo/$arch
    44: https://mirrors.dotsrc.org/manjaro/arm-unstable/$repo/$arch
    45: https://mirror.init7.net/manjaro/arm-unstable/$repo/$arch
    46: https://ba.mirror.garr.it/mirrors/manjaro/arm-unstable/$repo/$arch
    47: https://mirrors.atlas.net.co/manjaro/arm-unstable/$repo/$arch
    48: https://mirror.xenyth.net/manjaro/arm-unstable/$repo/$arch
    49: https://mirror.futureweb.be/manjaro/arm-unstable/$repo/$arch
    50: https://mirror.leitecastro.com/manjaro/arm-unstable/$repo/$arch
    51: https://linorg.usp.br/manjaro/arm-unstable/$repo/$arch
    52: https://mirror.dkm.cz/manjaro/arm-unstable/$repo/$arch
    53: https://ct.mirror.garr.it/mirrors/manjaro/arm-unstable/$repo/$arch
    54: https://manjaro.c3sl.ufpr.br/arm-unstable/$repo/$arch
    55: http://kartolo.sby.datautama.net.id/manjaro/arm-unstable/$repo/$arch
    56: https://manjarolinux-mirror.cloud.mu/arm-unstable/$repo/$arch
    57: https://mirror.aarnet.edu.au/pub/manjaro/arm-unstable/$repo/$arch
    58: https://mirror.zetup.net/manjaro/arm-unstable/$repo/$arch
    59: http://mirror.is.co.za/mirrors/manjaro.org/arm-unstable/$repo/$arch
    60: https://repo.iut.ac.ir/repo/manjaro/arm-unstable/$repo/$arch
    61: https://manjaro.mirror.liquidtelecom.com/arm-unstable/$repo/$arch
    62: https://mirror.ufro.cl/manjaro/arm-unstable/$repo/$arch
    63: https://ftp.gwdg.de/pub/linux/manjaro/arm-unstable/$repo/$arch
    64: https://ftp.caliu.cat/pub/distribucions/manjaro/arm-unstable/$repo/$arch
    65: https://mirror.easyname.at/manjaro/arm-unstable/$repo/$arch
    66: https://mirror.math.princeton.edu/pub/manjaro/arm-unstable/$repo/$arch
    67: https://manjaro.ipacct.com/manjaro/arm-unstable/$repo/$arch
    68: https://mirror.netcologne.de/manjaro/arm-unstable/$repo/$arch
    69: https://mirrors.up.pt/pub/manjaro/arm-unstable/$repo/$arch
    70: https://manjaro.mirror.garr.it/manjaro/arm-unstable/$repo/$arch
    71: https://manjaro.repo.cure.edu.uy/arm-unstable/$repo/$arch
    72: https://mirror.kamtv.ru/manjaro/arm-unstable/$repo/$arch
    73: https://fosszone.csd.auth.gr/manjaro/arm-unstable/$repo/$arch
    74: http://mirror.xeonbd.com/manjaro/arm-unstable/$repo/$arch
    75: https://mirror.bouwhuis.network/manjaro/arm-unstable/$repo/$arch
    76: https://mirror.yandex.ru/mirrors/manjaro/arm-unstable/$repo/$arch
    77: http://ftp.belnet.be/mirrors/manjaro/repos/arm-unstable/$repo/$arch
    78: https://bd.mirror.vanehost.com/Manjaro/arm-unstable/$repo/$arch
    79: https://ftpmirror1.infania.net/mirror/manjaro/arm-unstable/$repo/$arch
Processes:
  CPU top: 5 of 237
  1: cpu: 12.6% command: firefox pid: 16930 mem: 611.4 MiB (7.5%)
  2: cpu: 7.7% command: firefox pid: 17162 mem: 276.3 MiB (3.4%)
  3: cpu: 1.9% command: kwin_wayland pid: 1021 mem: 230.5 MiB (2.8%)
  4: cpu: 1.1% command: firefox pid: 17167 mem: 164.8 MiB (2.0%)
  5: cpu: 0.5% command: plasmashell pid: 1189 mem: 479.5 MiB (5.9%)
  Memory top: 5 of 237
  1: mem: 611.4 MiB (7.5%) command: firefox pid: 16930 cpu: 12.6%
  2: mem: 479.5 MiB (5.9%) command: plasmashell pid: 1189 cpu: 0.5%
  3: mem: 276.3 MiB (3.4%) command: firefox pid: 17162 cpu: 7.7%
  4: mem: 230.5 MiB (2.8%) command: kwin_wayland pid: 1021 cpu: 1.9%
  5: mem: 164.8 MiB (2.0%) command: firefox pid: 17167 cpu: 1.1%
Info:
  Processes: 237 Power: uptime: 4h 46m suspend: services: org_kde_powerdevil,
    power-profiles-daemon, upowerd Init: systemd v: 257 default: graphical
    tool: systemctl
  Compilers: gcc: 14.2.1 Shell: Bash v: 5.2.37 running-in: konsole
    inxi: 3.3.37

I found some problem similar in a post on Arch forum but it is kind old, and people says it was fixed. But I still encounter this problem.
Help me plz :smiling_face_with_tear::smiling_face_with_tear::smiling_face_with_tear:

When I last ran it a year ago it worked fine with the pi5 16k pages. There must have been a regression as it will not now. I booted into the linux-rpi4 4k kernel today on my pi5 and it works ok.

Install the linux-rpi4 and linux-rpi4-headers packages if not already installed
Add this to your /boot/config.txt at the top and reboot:

kernel=kernel8.img

I don’t use the program but it’s easy to find the cause. Jemalloc is to be build with 16k what the alarm arm package does.

CONFIG="--with-lg-page=14"

The problem is that when importing telegram-desktop from arch x64, for whatever reason, they didn’t put ‘jemalloc’ in depends and make depends

depends=('hunspell' 'ffmpeg' 'hicolor-icon-theme' 'lz4' 'minizip' 'openal' 'jemalloc'
         'qt6-imageformats' 'qt6-svg' 'qt6-wayland' 'xxhash' 'ada'
         'rnnoise' 'pipewire' 'libxtst' 'libxrandr' 'libxcomposite' 'libxdamage' 'abseil-cpp' 'libdispatch'
         'openssl' 'protobuf' 'glib2' 'libsigc++-3.0' 'kcoreaddons' 'openh264')
makedepends=('cmake' 'git' 'ninja' 'python' 'range-v3' 'tl-expected' 'microsoft-gsl' 'meson'
             'extra-cmake-modules' 'wayland-protocols' 'plasma-wayland-protocols' 'libtg_owt'
             'gobject-introspection' 'boost' 'fmt' 'mm-common' 'perl-xml-parser' 'python-packaging'
             'glib2-devel' 'jemalloc')

To test : 2 packages to install first protobuf
telegram-desktop 5.12.3-2

protobuf-30.0-3

Thank you! That works! That helps me a lot, thank you!! :kissing_heart::kissing_heart::kissing_heart:

I didn’t get it :face_with_spiral_eyes::face_with_spiral_eyes::face_with_spiral_eyes:, what does this config means? And how did you get the program ahead of official release? I get 5.12.3-1 from the pacman.

Personal compilation and arch repository coming soon to manjaro.
Does this package work well on 16k? (uncomment #kernel=kernel8.img and reboot)
The problem is that you have to ask on the arch arm forum to modify their pkgbuild in the arch arm repository (alarm) so that it is rebased on 16k-compatible jemalloc and no longer import the arch x64 package. Otherwise, you’ll have to live with a 4k kernel or learn to compile this package, or have it imported into the manjaro arm repository.

1 Like

jemalloc was not in the PKGBUILD as a depend so when the package gets built in a clean chroot jemalloc is not detected and telegram-desktop builds it’s own static version that does not have 16k compatibility. I have told them on the arch-arm forums. Until then I have compiled telegram-desktop here against the system jemalloc.

Download and install telegram-desktop-5.12.3-5-aarch64.pkg.tar.zst with sudo pacman -U

Comment out this line in config.txt if iit exists so it will boot back in to linuxrpi5 kernel like this:

#kernel=kernel8.img

Then reboot the pi5

1 Like

Alright, thank you for helping!!! :kissing_heart:

Thank you!! I will try these package out!! :kissing_heart::kissing_heart::kissing_heart: