Re: Soft scrolling on framebuffer consoles - with GPM Handling - revised for kernel 6.18.28 (etc.)
Vitaly Zdanevich <[email protected]> Wed, 13 May 2026 00:24:57 +0400
| Newsgroups | gmane.linux.gentoo.user |
|---|---|
| Message-ID | <[email protected]> |
Thanks. Can it be integrated into gentoo-sources? Or with USE flag? ---------------- To: [email protected] ([email protected]); Subject: [gentoo-user] Soft scrolling on framebuffer consoles - with GPM Handling - revised for kernel 6.18.28 (etc.); 11.05.2026, 18:01, "Alan Mackenzie" <[email protected]>: Hello, Gentoo. Now for the latest kernel, 6.18.28! On Tue, Mar 17, 2026 at 21:07:38 +0000, Alan Mackenzie wrote: On Sun, Feb 22, 2026 at 21:31:48 +0000, Alan Mackenzie wrote: > The topic of this post is my kernel patch which enables soft scrolling > on Linux tty's with <shift><PgUp> and <shift><PgDn>, and also enables > the GPM mouse utility on those scrolled regions. Attached is a patch which enables this facility in kernel 6.18.28 (and likely future 6.18.n versions, too). This latest version now copes with the new(ish) escape codes <ESC>[?1049h and <ESC>[?1049l which select a subsidiary screen, then return to the main screen respectively. This facility was added to the kernel only this year. The enclosed patch has been tested on 6.18.28 with the built in graphics on an AMD Ryzen processor, and works with this setup. Use the same way as the previous patch: > To use the patch: > (i) cd /usr/src/linux-6.12.28-gentoo, or similar. > (ii) patch -p1 < 6.12.28-GPM.20260511.diff. > (iii) Configure the kernel as normal. Additionally, under Device > drivers/Graphic Support/Console display driver support, enable > CONFIG_FRAMEBUFFER_CONSOLE_SOFT_SCROLLBACK, set the buffer size to taste > (it's default is 128 kB but I use 512 kB, personally) and accept the > default enablement of CONFIG_FRAMEBUFFER_CONSOLE_SOFT_SCROLLBACK_GPM. > (iv) Build the kernel and install it into your boot manager. > (v) Reboot and enjoy! You can now use GPM in scrolled consoles. > The usual disclaimers apply, here. If this patch breaks anything for > you, please let me know, so that I can try to fix the bug. My only > promise is that there's nothing malicious in the patch. There's some doubt as whether the patch in its current state works with the nvidia-drivers package, in particular version 580.xx. Dale has been having problems here, as has somebody who contacted me via private mail. If anybody else with an nVidia graphics card tries the patch out with nvidia-drivers (as contrasted with the nouveau driver), I'd be grateful to hear from them whether or not the virtual terminals work. Thanks! Again, I still have doubts about whether the patch works on nvidia graphics boards with the nvidia-drivers package. If anybody has such a setup and tries the patch, please let me know whether and how well it works. Thanks! > If anybody still needs them, I've still got the patches for some earlier > kernel versions too. Have fun! -- Alan Mackenzie (Nuremberg, Germany).