LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-04-2018, 09:12 PM   #16
GazL
Senior Member
 
Registered: May 2008
Posts: 4,772
Blog Entries: 14

Rep: Reputation: Disabled

It also makes a bit of a mess of the mutt mailbox index list.

I started to look into how to report it to the kernel devs, but the process is just too complex. Seems they expect you to be able to identify the subsystem at fault and it's maintainer. I've no idea whether this fault is in the tty layer, the framebuffer console, virtual console drivers or somewhere else, and even if I could figure that out, identifying the maintainer isn't that easy as not all of them are mentioned in the MAINTAINERS file. Posting to lkml is an option, but it's high traffic and any post would likely just get lost in the noise, so I gave up.

I think I'll just stick to xterms for now and ignore the console.
 
Old 11-04-2018, 09:15 PM   #17
GazL
Senior Member
 
Registered: May 2008
Posts: 4,772
Blog Entries: 14

Rep: Reputation: Disabled
Quote:
Originally Posted by igadoter View Post
I noticed that artifact disappears for large in width windows. On my console '150' in width is critical. With this width artifact is just small black strip on the left.
Not here. even at 170 width it still shows.
 
Old 11-04-2018, 09:30 PM   #18
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 1,132
Blog Entries: 1

Original Poster
Rep: Reputation: Disabled
This very helpful. I was wondering that I can't reproduce this with another application than dialog. Also I somehow lost gpm pointer. Yet process still exists.

Run xwmconfig and notice cursor position. Instead of top of list it is in the middle.

Last edited by igadoter; 11-04-2018 at 11:17 PM.
 
Old 11-04-2018, 11:22 PM   #19
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 1,132
Blog Entries: 1

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by GazL View Post
Not here. even at 170 width it still shows.
Try to set width so window will fill all monitor. On my screen this value is 160 and above. Now try to set width little below this value (for you monitor).
 
Old 11-07-2018, 01:19 AM   #20
jakedp
Member
 
Registered: Oct 2016
Location: Canada
Distribution: Slackware64
Posts: 176

Rep: Reputation: Disabled
I installed Salcware64-current, November 02 ISO yesterday. During the install I had the same black box on the left. So I just ran pkgtool to see and it was fine.

Ryzen - xfce4-terminal.

Console same black box on the left.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2018-11-07_02-17-19.png
Views:	28
Size:	21.3 KB
ID:	28925  

Last edited by jakedp; 11-07-2018 at 01:21 AM. Reason: postscript
 
1 members found this post helpful.
Old 11-08-2018, 08:51 AM   #21
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 5,031

Rep: Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762
I am going with a kernel regression on this.
From drivers/tty/vt/vt.c in the 4.4.153 source
Code:
static void csi_K(struct vc_data *vc, int vpar)
{
        unsigned int count;
        unsigned short * start;

        switch (vpar) {
                case 0: /* erase from cursor to end of line */
                        count = vc->vc_cols - vc->vc_x;
                        start = (unsigned short *)vc->vc_pos;
                        break;
                case 1: /* erase from start of line to cursor */
                        start = (unsigned short *)(vc->vc_pos - (vc->vc_x << 1));
                        count = vc->vc_x + 1;
                        break;
                case 2: /* erase whole line */
                        start = (unsigned short *)(vc->vc_pos - (vc->vc_x << 1));
                        count = vc->vc_cols;
                        break;
                default:
                        return;
        }
        scr_memsetw(start, vc->vc_video_erase_char, 2 * count);
        vc->vc_need_wrap = 0;
        if (DO_UPDATE(vc))
                do_update_region(vc, (unsigned long) start, count);
}
From drivers/tty/vt/vt.c in the 4.19.1 source
Code:
static void csi_K(struct vc_data *vc, int vpar)
{
	unsigned int count;
	unsigned short *start = (unsigned short *)vc->vc_pos;
	int offset;

	switch (vpar) {
		case 0:	/* erase from cursor to end of line */
			offset = 0;
			count = vc->vc_cols - vc->vc_x;
			break;
		case 1:	/* erase from start of line to cursor */
			offset = -vc->vc_x;
			count = vc->vc_x + 1;
			break;
		case 2: /* erase whole line */
			offset = -vc->vc_x;
			count = vc->vc_cols;
			break;
		default:
			return;
	}
	vc_uniscr_clear_line(vc, vc->vc_x + offset, count);
	scr_memsetw(start + offset, vc->vc_video_erase_char, 2 * count);
	vc->vc_need_wrap = 0;
	if (con_should_update(vc))
		do_update_region(vc, (unsigned long) start, count);
}
I am not a good C coder, but the 4.19.1 stuff is clearly wrong.

Last edited by allend; 11-08-2018 at 08:54 AM.
 
1 members found this post helpful.
Old 11-08-2018, 01:38 PM   #22
jakedp
Member
 
Registered: Oct 2016
Location: Canada
Distribution: Slackware64
Posts: 176

Rep: Reputation: Disabled
It is the new offset code.

Press F5 to refresh and
Code:
(con_should_update(vc))
shall trigger removing the offset black box. Worked for me at least.

Thanks, would have never guessed without seeing it.

Last edited by jakedp; 11-08-2018 at 01:39 PM. Reason: expansion of thought
 
Old 11-08-2018, 02:20 PM   #23
jakedp
Member
 
Registered: Oct 2016
Location: Canada
Distribution: Slackware64
Posts: 176

Rep: Reputation: Disabled
Jumped the gun. Navigating through pkgtool refresh only works on the main screen and not in the sub dialogs. I do not know enough of how ncurses draws to the screen, but I suspect the kernel offset code causes a skewed position and the black box is background not being drawn because that is offscreen and it is being shown onscreen. Although, why is sub dialogs not being refreshed?
 
Old 11-08-2018, 03:12 PM   #24
GazL
Senior Member
 
Registered: May 2008
Posts: 4,772
Blog Entries: 14

Rep: Reputation: Disabled
I haven't looked at the code myself, but just looking at what was posted above one thing jumps out at me:

In the first example the 'start' variable is adjusted by both cases 1 and 2 and that adjusted value is then passed to both src_memsetw() and do_region_update().

In the later version of the code, 'start' is left unchanged and 'offset' appears to be being used to apply a delta to start in the function parameters, but the adjusted value is only being passed to src_memsetw() and not do_region_update().

The later version does have an additional vc_uniscr_clear_line() that isn't in the first version so perhaps there's more than meets the eye to this, but on first viewing this does look suspect.

update:
For the sake of curiosity I just tried adding '+ offset' to the call to do_region_update() but it didn't help, so it's not quite as obvious as I first thought.

Last edited by GazL; 11-08-2018 at 04:27 PM.
 
Old 11-08-2018, 04:44 PM   #25
jakedp
Member
 
Registered: Oct 2016
Location: Canada
Distribution: Slackware64
Posts: 176

Rep: Reputation: Disabled
Look at case 0 too. Will have to see what these functions do in the first place and find where they are defined. Been a long, long time since looked at this stuff.

I now remember having a similar problem years ago when we had to edit X files by hand and used the console more. Was a long standing bug with ncurses if correct. This could have triggered a regression. No point in conjecturing without evidence. Mr.Volkerdi showed that terminfo is effected or is a culprit.

The present screen program used by Ubuntu has all kinds of text corruption, missing ls colours, when connecting to a KMS VPS running Slackware 14.2, if that helps.
 
Old 11-08-2018, 05:12 PM   #26
GazL
Senior Member
 
Registered: May 2008
Posts: 4,772
Blog Entries: 14

Rep: Reputation: Disabled
I forgot about the unsigned short. so offset needs to be multiplied by 2 (in the original they accomplished that by left shifting).

This seems to fix it, though its a bit fugly.

Code:
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index 5f1183b0b89d..5d608abc9487 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -1551,7 +1551,7 @@ static void csi_K(struct vc_data *vc, int vpar)
        scr_memsetw(start + offset, vc->vc_video_erase_char, 2 * count);
        vc->vc_need_wrap = 0;
        if (con_should_update(vc))
-               do_update_region(vc, (unsigned long) start, count);
+               do_update_region(vc, (unsigned long) start + offset * 2, count);
 }
 
 static void csi_X(struct vc_data *vc, int vpar) /* erase the following vpar positions */

Might possibly be better as a "sizeof *start" rather than a hard coded 2, but "* 2" is what was used in the src_memsetw() so I just followed suit.


p.s. Anyone who wants to test this, don't forget to set TERM=linux-bce ortherwise Pat's terminfo workaround (see today's changelog) will get in the way.

Last edited by GazL; 11-08-2018 at 05:50 PM.
 
2 members found this post helpful.
Old 11-09-2018, 01:07 AM   #27
Pixxt
Member
 
Registered: May 2008
Distribution: Slackware, Debian,
Posts: 161

Rep: Reputation: 61
There is a fix that should be in the next 4.19.x release

https://lkml.org/lkml/2018/10/23/535
 
3 members found this post helpful.
Old 11-09-2018, 03:55 AM   #28
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 1,132
Blog Entries: 1

Original Poster
Rep: Reputation: Disabled
Just updated ncurses and terminfo. No artifact but still cursor position is wrong. It is clearly to see for xwmconfig - cursor at the start is in the middle of the list. Supposedly it should be on top. But I will be really grateful for sharing the recent fix. I was playing with tack utility. Only thing I found was that xmc magic cookie is -1.
 
Old 11-09-2018, 04:13 AM   #29
GazL
Senior Member
 
Registered: May 2008
Posts: 4,772
Blog Entries: 14

Rep: Reputation: Disabled
Quote:
Originally Posted by Pixxt View Post
There is a fix that should be in the next 4.19.x release

https://lkml.org/lkml/2018/10/23/535
Thanks Pixxt. Oh well, it wasn't wasted effort. I learned a little in the process.

It's pretty much the same as mine, but they get the result from doing pointer arithmetic on the unsigned short * before casting it, which admittedly is a much nicer way of doing it. My C skills are only really at intermediate level, some of the finer nuances still escape me.
 
1 members found this post helpful.
Old 11-09-2018, 06:38 AM   #30
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 5,031

Rep: Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762Reputation: 1762
+1
 
  


Reply

Tags
dialog


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Running Slackware -current with /usr put in a read-only squashfs? LuckyCyborg Slackware 8 08-04-2018 12:41 PM
[SOLVED] Success: slackware -current installed and running beaaautifuuulllll textillis Slackware - Installation 7 07-05-2013 12:29 AM
[SOLVED] GRUB2 build errors running slackware64-current (slackware 14) squid890 Slackware 10 07-03-2013 12:23 AM
Running slackware 14 current can not upgrade kernel. zrdc28 Slackware 4 01-10-2013 06:28 PM
Have you been running slackware-current for the first time for x86_64? If so . . . foodown Slackware 19 08-20-2009 01:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration