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