Skip to contentSkip to conversation

commit a29ccf6f823a84d89e1c7aaaf221cf7282022024 break console on slackware 12.1

PATCH In review Marco Berizzi 7 participants 14 messages Jul 29, 2008 – Jul 31, 2008 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

Hi Folks,

reverting commit a29ccf6f823a84d89e1c7aaaf221cf7282022024 fix a problem with the text console on slackware 12.1

With 2.6.27-rc1/slackware 12.1, applications like mc or 'make menuconfig' are broken on text console (they are fine running inside an xterm).

Just for record: 2.6.26 is fine

a29ccf6f823a84d89e1c7aaaf221cf7282022024 is first bad commit commit a29ccf6f823a84d89e1c7aaaf221cf7282022024

Author: David Woodhouse <[email protected]>
Date:   Tue Jun 3 14:59:40 2008 +0100

Make console charset translation optional

By turning off the new CONSOLE_TRANSLATIONS option and dropping the associated code and tables from the kernel, we can save about 7KiB.

Taken from linux-tiny project by Tim Bird and mangled further by
dwmw2.

:040000 040000 4f86ab06f5af3f70d3b78c80ef60c38896c9bc1d
019444ec49f3251609c6e0b6046f2fb447f065e2 M drivers
:040000 040000 e7149976d981052a6787c6e8207b6205ade0f1f1
591a26addee0ba619d7d878967664dfba86b4f65 M include

#1 lore raw
Quoted 10 lines · On Tuesday 29 July 2008 16:42:54 Marco Berizzi wrote:

Hi Folks,

reverting commit a29ccf6f823a84d89e1c7aaaf221cf7282022024 fix a problem with the text console on slackware 12.1

With 2.6.27-rc1/slackware 12.1, applications like mc or 'make menuconfig' are broken on text console (they are fine running inside an xterm).

Just for record: 2.6.26 is fine

You don't actually say whether you had CONFIG_CONSOLE_TRANSLATIONS=y or not?

(Added some relevant people to CC.)

Signature · 2 lines
Cheers,
Alistair.
#3 lore raw
Quoted 6 lines · Marco Berizzi
Quoted 1 line · [email protected] wrote:

You don't actually say whether you had CONFIG_CONSOLE_TRANSLATIONS=y or not?

yes console_translation is set to yes. It cannot be changed if embedded is not set.

If console_translation is set to yes, the behavior should be unchanged from 2.6.26. Can you please send me your .config?

Also, can you please describe what breakage you are seeing?

Thanks,
-- Tim

=============================
Tim Bird
Architecture Group Chair, CE Linux Forum Senior Staff Engineer, Sony Corporation of America
=============================

#4 lore raw
Quoted 5 lines · Tim Bird
Quoted 4 lines · Marco Berizzi
Quoted 1 line · [email protected] wrote:

You don't actually say whether you had CONFIG_CONSOLE_TRANSLATIONS=y or not?

Quoted 7 lines
Quoted 2 lines

yes console_translation is set to yes. It cannot be changed if embedded is not set.

If console_translation is set to yes, the behavior should be unchanged from 2.6.26. Can you please send me your .config?

Also, can you please describe what breakage you are seeing?

I have the same issue, the line drawing characters are displayed as an odd looking C with a tail. Slackware-12.1 and Slamd64-12.1.

.configs:
http://bugsplatter.mine.nu/test/boxen/pooh/config-2.6.27-rc1a.gz
http://bugsplatter.mine.nu/test/boxen/pooh64/config-2.6.27-rc1a.gz

CONFIG_CONSOLE_TRANSLATIONS=y ?? yes it's on

Grant.

#5 lore raw
Quoted 8 lines · Grant Coady

I have the same issue, the line drawing characters are displayed as an odd looking C with a tail. Slackware-12.1 and Slamd64-12.1.

.configs:
http://bugsplatter.mine.nu/test/boxen/pooh/config-2.6.27-rc1a.gz
http://bugsplatter.mine.nu/test/boxen/pooh64/config-2.6.27-rc1a.gz

CONFIG_CONSOLE_TRANSLATIONS=y ?? yes it's on

This looks like an operator precedence bug introduced by the patch.

Normally I would test this myself before sending it out, but I can't test 2.6.27-rc1 right now on my hardware due to another bug in the 2.6.27-rc1 tree.

Can you please try the following patch and let me know if that fixes the problem?

Thanks,
-- Tim

include/linux/vt_kern.h +1 -1
index 14c0e91..8c8119f 100644
@@ -74,7 +74,7 @@ void con_protect_unimap(struct vc_data *vc, int rdonly);
 int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc);
 
 #define vc_translate(vc, c) ((vc)->vc_translate[(c) |			\
-					(vc)->vc_toggle_meta ? 0x80 : 0])
+					((vc)->vc_toggle_meta ? 0x80 : 0)])
 #else
 #define con_set_trans_old(arg) (0)
 #define con_get_trans_old(arg) (-EINVAL)
#6 lore raw
Quoted 13 lines · Tim Bird
Quoted 8 lines · Grant Coady

I have the same issue, the line drawing characters are displayed as an odd looking C with a tail. Slackware-12.1 and Slamd64-12.1.

.configs:
http://bugsplatter.mine.nu/test/boxen/pooh/config-2.6.27-rc1a.gz
http://bugsplatter.mine.nu/test/boxen/pooh64/config-2.6.27-rc1a.gz

CONFIG_CONSOLE_TRANSLATIONS=y ?? yes it's on

This looks like an operator precedence bug introduced by the patch.

Quoted 6 lines

Normally I would test this myself before sending it out, but I can't test 2.6.27-rc1 right now on my hardware due to another bug in the 2.6.27-rc1 tree.

Can you please try the following patch and let me know if that fixes the problem?

Hi Tim,
Yep, this patch fixes the issue. Tested on slackware-12.1 with the default lilo option '#append=" vt.default_utf8=0"' commented out.

Grant.

Quoted 19 lines

Thanks,
-- Tim

include/linux/vt_kern.h +1 -1
index 14c0e91..8c8119f 100644
@@ -74,7 +74,7 @@ void con_protect_unimap(struct vc_data *vc, int rdonly);
 int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc);
 
 #define vc_translate(vc, c) ((vc)->vc_translate[(c) |			\
-					(vc)->vc_toggle_meta ? 0x80 : 0])
+					((vc)->vc_toggle_meta ? 0x80 : 0)])
 #else
 #define con_set_trans_old(arg) (0)
 #define con_get_trans_old(arg) (-EINVAL)
#7 lore raw
In reply to Tim Bird

include/linux/vt_kern.h void con_protect_unimap(struct vc_data *vc, int

Quoted 5 lines · Tim Bird
include/linux/vt_kern.h +0 -0
index 14c0e91..8c8119f 100644
@@ -74,7 +74,7 @@ void con_protect_unimap(struct vc_data *vc, int

rdonly);

include/linux/vt_kern.h void con_protect_unimap(struct vc_data *vc, int rdonly); · line 80

Quoted 8 lines
include/linux/vt_kern.h +1 -1
 int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc);
 
 #define vc_translate(vc, c) ((vc)->vc_translate[(c) | \
- (vc)->vc_toggle_meta ? 0x80 : 0])
+ ((vc)->vc_toggle_meta ? 0x80 : 0)])
 #else
 #define con_set_trans_old(arg) (0)
 #define con_get_trans_old(arg) (-EINVAL)

indeed this patch fix the problem.
Thanks a lot.

#8 lore raw
In reply to Grant Coady
Quoted 13 lines · Grant Coady
Quoted 10 lines · Tim Bird
Quoted 5 lines · Marco Berizzi
Quoted 1 line · [email protected] wrote:

You don't actually say whether you had CONFIG_CONSOLE_TRANSLATIONS=y or not?

yes console_translation is set to yes. It cannot be changed if embedded is not set.

If console_translation is set to yes, the behavior should be unchanged from 2.6.26. Can you please send me your .config?

Also, can you please describe what breakage you are seeing?

Quoted 7 lines

I have the same issue, the line drawing characters are displayed as an odd looking C with a tail. Slackware-12.1 and Slamd64-12.1.

.configs:
http://bugsplatter.mine.nu/test/boxen/pooh/config-2.6.27-rc1a.gz
http://bugsplatter.mine.nu/test/boxen/pooh64/config-2.6.27-rc1a.gz

CONFIG_CONSOLE_TRANSLATIONS=y ?? yes it's on

Sorry, didn't read the thread so just hoping to say something useful:

slackware 12.1 installes by default with "vt.default_utf8=0" as a kernel param which may be involved here. I saw that picture that someone posted and to me that was nothing new -- my console has always looked that way if I set my locale to a UTF8 locale but do not change the console font.

"LANG=C menuconfig" works for me when I can't, won't or just don't start X with it's terminals with UTF8 fonts...

Please just ignore if not a useful reply.

Rene.

#9 lore raw
Quoted 21 lines · Rene Herman
Quoted 20 lines · Grant Coady
Quoted 10 lines · Tim Bird
Quoted 5 lines · Marco Berizzi
Quoted 1 line · [email protected] wrote:

You don't actually say whether you had CONFIG_CONSOLE_TRANSLATIONS=y or not?

yes console_translation is set to yes. It cannot be changed if embedded is not set.

If console_translation is set to yes, the behavior should be unchanged from 2.6.26. Can you please send me your .config?

Also, can you please describe what breakage you are seeing?

I have the same issue, the line drawing characters are displayed as an odd looking C with a tail. Slackware-12.1 and Slamd64-12.1.

.configs:
http://bugsplatter.mine.nu/test/boxen/pooh/config-2.6.27-rc1a.gz
http://bugsplatter.mine.nu/test/boxen/pooh64/config-2.6.27-rc1a.gz

Quoted 8 lines
Quoted 1 line

CONFIG_CONSOLE_TRANSLATIONS=y ?? yes it's on

Sorry, didn't read the thread so just hoping to say something useful:

slackware 12.1 installes by default with "vt.default_utf8=0" as a kernel param which may be involved here. I saw that picture that someone posted and to me that was nothing new -- my console has always looked that way if I set my locale to a UTF8 locale but do not change the console font.

I tried booting with that var set or commented out, the problem stayed.

Quoted 3 lines

"LANG=C menuconfig" works for me when I can't, won't or just don't start X with it's terminals with UTF8 fonts...

I don't normally use console as I run linux boxes headless most of the time via PuTTY terminals, and they're fine.

Grant.

#10 lore raw
In reply to Tim Bird
Quoted 5 lines · Tim Bird
Quoted 4 lines · Marco Berizzi
Quoted 1 line · [email protected] wrote:

You don't actually say whether you had CONFIG_CONSOLE_TRANSLATIONS=y or not?

Quoted 7 lines
Quoted 2 lines

yes console_translation is set to yes. It cannot be changed if embedded is not set.

If console_translation is set to yes, the behavior should be unchanged from 2.6.26. Can you please send me your .config?

Also, can you please describe what breakage you are seeing?

.config
http://bugsplatter.mine.nu/test/boxen/vmware/config-2.6.27-rc1a.gz
picture:
http://bugsplatter.mine.nu/test/boxen/vmware/linux-2.6.27-rc1-console.jpg

Slackware-12.1 VM on WinXP vmware server 1.0.6.

Grant.

#12 lore raw

PATCH 1/1 fix text console corruptions

In reply to Tim Bird
Quoted 11 lines · Tim Bird
Quoted 6 lines · Marco Berizzi
Quoted 1 line · [email protected] wrote:

You don't actually say whether you had CONFIG_CONSOLE_TRANSLATIONS=y or not?

yes console_translation is set to yes. It cannot be changed if embedded is not set.

If console_translation is set to yes, the behavior should be unchanged from 2.6.26.
...

Your commit contains a change that breaks due to | having a higher precedence than ?: in C.

Untested patch below, can anyone who ran into this bug confirm that it fixes it?

Quoted 2 lines

Thanks,
-- Tim

cu
Adrian

<-- snip -->

This patch fixes text console corruptions caused by commit a29ccf6f823a84d89e1c7aaaf221cf7282022024 (Make console charset translation optional).

---
cab22ec7afdc4c08a10ef9730b0ae2848754532c

include/linux/vt_kern.h +1 -1
index 14c0e91..8c8119f 100644
@@ -74,7 +74,7 @@ void con_protect_unimap(struct vc_data *vc, int rdonly);
 int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc);
 
 #define vc_translate(vc, c) ((vc)->vc_translate[(c) |			\
-					(vc)->vc_toggle_meta ? 0x80 : 0])
+					((vc)->vc_toggle_meta ? 0x80 : 0)])
 #else
 #define con_set_trans_old(arg) (0)
 #define con_get_trans_old(arg) (-EINVAL)
#13 lore raw

Re: [RFT: 2.6 patch] fix text console corruptions

Quoted 9 lines · Adrian Bunk
Quoted 8 lines · Tim Bird
Quoted 6 lines · Marco Berizzi
Quoted 1 line · [email protected] wrote:

You don't actually say whether you had CONFIG_CONSOLE_TRANSLATIONS=y or not?

yes console_translation is set to yes. It cannot be changed if embedded is not set.

Quoted 6 lines
Quoted 3 lines

If console_translation is set to yes, the behavior should be unchanged from 2.6.26.
...

Your commit contains a change that breaks due to | having a higher precedence than ?: in C.

Oh, I think that's probably my fault then; sorry.

Signature · 1 line
dwmw2