uart_try_toggle_sysrq(9)
π« uart_try_toggle_sysrq(9) π«
okay so bestie, we're in the Kernel API Manual today and the function we're stanning is uart_try_toggle_sysrq β a little icon that literally turns on SysRq from the serial line. yes, from the serial line. the way that serial consoles keep serving looks β¨
πΈ NAME πΈ
uart_try_toggle_sysrq β enables SysRq from serial line. that's it, that's the whole vibe. π
π¦ SYNOPSIS π¦
bool uart_try_toggle_sysrq (struct uart_port *port , u8 ch );
look at her. so clean. so composed. π
π ARGUMENTS π
portβ theuart_portstructure where the char(s) after BREAK were met. like, this is the port that just witnessed the BREAK moment, and we're checking what came next, iykyk. π₯chβ the new character in the sequence after the received BREAK. main character energy fr fr, because this one char decides whether we toggle or not. π
π§ DESCRIPTION π§
so here's the tea π«: this function enables magic SysRq when the required sequence is met on port. the required sequence in question is defined by CONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE β she's in the config, go look, it's giving prerequisites. β
basically you send a BREAK, then a sequence of chars, and if everything slays in the right order, boom, SysRq gets toggled. no cap. π
π RETURN π
- returns
falseifchis out of the enabling sequence β meaning nope, not it, this char should be handled some other way, don't @ her. - returns
trueifchwas consumed. ate it right up, no crumbs. π₯
π SEE ALSO π
kernel file ./drivers/tty/serial/serial_core.c β that's the home turf bestie, go visit her π β plus the whole friend group:
uart_write_wakeup(9)uart_update_timeout(9)uart_get_baud_rate(9)uart_get_divisor(9)uart_get_lsr_info(9)uart_console_write(9)uart_parse_earlycon(9)uart_parse_options(9)uart_set_options(9)uart_change_pm(9)uart_register_driver(9)uart_unregister_driver(9)serial_core_add_one_port(9)serial_core_remove_one_port(9)uart_match_port(9)uart_handle_dcd_change(9)uart_handle_cts_change(9)uart_insert_char(9)uart_get_rs485_mode(9)
like, the entire serial_core squad showed up to the group chat. obsessed. ππ«Ά
warning bestie: the whole magic-SysRq-over-serial thing depends on that CONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE config being set up the way you want. check your config before you go toggling things, mwah π
okay that's the page!! sourced straight from ./drivers/tty/serial, dropped in October 2026, signed uart_try_toggle_sysrq(9) β mwah, ily, go read your kernel docs πΈππ¦
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms