I am trying to set setschedparam for thread priority and getting:
setschedparam failure (1)
setschedparam failure (22)
etc…
I used to get this error until I added the --SYS_NICE flag
into my run command for my docker container, giving it permissions. This was on Torizon 5.7.
Now, on Torizon 6.8, when I use wayland to run my executable, I am getting these setchedparam failures again.
This ONLY OCCURS when I run my executable from the wayland terminal.
When I run the executable from terminal with
docker exec -it container-name bash
Then go to the executable and execute it, I get NO failures and it is able to set the thread prio just fine.
Why is it that wayland backend now in Torizon 6.8 is not able to set thread priority, while I can when I’m directly in the docker container?
.
This is the entrypoint for my container:
/usr/bin/entry.sh --developer --tty=/dev/tty7 (entry.sh is unmodified from toradex container)
.
In both the wayland and the container directly, $ capsh --print
provides this output (which shows that the cap_sys_nice flag exists) :
Bounding set =cap_chown,cap_dac_override,cap_dac_read_search,cap_fowner,cap_fsetid,cap_kill,cap_setgid,cap_setuid,cap_setpcap,cap_linux_immutable,cap_net_bind_service,cap_net_broadcast,cap_net_admin,cap_net_raw,cap_ipc_lock,cap_ipc_owner,cap_sys_module,cap_sys_rawio,cap_sys_chroot,cap_sys_ptrace,cap_sys_pacct,cap_sys_admin,cap_sys_boot,cap_sys_nice,cap_sys_resource,cap_sys_time,cap_sys_tty_config,cap_mknod,cap_lease,cap_audit_write,cap_audit_control,cap_setfcap,cap_mac_override,cap_mac_admin,cap_syslog,cap_wake_alarm,cap_block_suspend,cap_audit_read
.
.
Relevant system info:
torizon@INAV99111:~$ sudo tdx-info
Password:
Software summary
------------------------------------------------------------
Bootloader: U-Boot
Kernel version: 5.15.148-rt74-6.8.0-devel+git.284966e8d6ee #1-TorizonCore SMP PREEMPT_RT Tue Aug 9 12:56:10 UTC 2022
Kernel command line: root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3 ostree=/ostree/boot.1/torizon/82e8b66a4282ea53d2fa6604f7eb1e17b368a15db0f22928c18c474453c697f9/0
Distro name: NAME="TorizonCore with PREEMPT_RT"
Distro version: VERSION_ID=6.8.0-devel-202408-build.25
Distro variant: VARIANT="Docker"
Hostname: INAV99111
------------------------------------------------------------
Hardware info
------------------------------------------------------------
HW model: Toradex Verdin iMX8M Plus on Verdin Development Board
Toradex version: 0063 V1.1B
Serial number: 15336335
Processor arch: aarch64
------------------------------------------------------------