Hello again, Peter. On Wed, Dec 14, 2022 at 10:53:07 +0000, Alan Mackenzie wrote: > On Tue, Dec 13, 2022 at 03:44:49 +0000, Peter Humphrey wrote: > > On Monday, 12 December 2022 18:23:28 GMT Alan Mackenzie wrote: > > > Here is the latest version of my soft scrolling patch for the gentoo > > > kernel version 5.15.80. It will surely work on any reasonably recent > > > kernel version, and also on future versions. The new version doesn't > > > add any new functionality, it just patches the kernel giving rise to > > > fewer messages from the patch utility. > > You've done it again! What a fine effort. It's saved me much wailing and > > gnashing of teeth. > Thanks for that! > > Is there any chance of enabling gpm to work with it? That would save > > yet more generations of tooth enamel. :) > Yes, that's been annoying me for some time, too - when the screen is > scrolled, and one tries to mark a portion of text with GPM, it gets the > text that was on the screen before the scroll, and corrupts the display > of the text. > I had a look at it last night, and the problem is that the kernel > doesn't currently store the 32-bit unicode characters which have been > scrolled off the screen - just the 8-bit character glyph codes together > with the 8-bit colour information. So it would triple the amount of > information stored for each character position. That surely shouldn't > be a problem on today's machines, though - even with > FRAMEBUFFER_CONSOLE_SOFT_SCROLLBACK_SIZE set to 512 kB, that would only > be 1.5 MB per console. > So yes, this should be doable. It's definitely more than a day's work, > almost certainly less than a month's. I'll see what I can manage. > > Seriously, though, it's just wonderful as it is, and we all owe you a > > debt. > Thanks again! I've got a first version of a patch which attempts to handle GPM in conjunction with scrolling. It's imperfect - for example, I can't get it to select anything the first 66 lines of the console's displayed boot-up messages. Nevertheless it may be useful. In particular, moving the mouse over an already scrolled area no longer corrupts that area. Also, one can select text from a scrolled area. To use it, please apply the supplied patch ON TOP OF the patch I posted here on 12th December. Proceed as documented in that post, up until configuring the kernel - in Device drivers/Graphic support/Console display driver support, there's an extra item "Enable a working GPM for scrolled back scrollback buffer in System RAM" which should be enabled by default. Check this is set up properly. Then build and install the kernel. Then reboot into it and try it out. Note that it uses ~twice as much memory as the previous scrolling buffers, giving a total of ~three times as much memory used. This shouldn't really be a problem on a modern machine with 16GB or 32GB of RAM. Please let me know of any problems you encounter with this new facility, so that I can try to fix them. Thanks! > > -- > > Regards, > > Peter. -- Alan Mackenzie (Nuremberg, Germany).