WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Persistent keyboard configuration on Xorg not working  (Read 12194 times)

Offline DanielH

  • Newbie
  • *
  • Posts: 36
Re: Persistent keyboard configuration on Xorg not working
« Reply #15 on: March 20, 2021, 09:02:33 PM »
Knock knock!!!
Anybody here?

I've tryed and tryed, but issue (persistent keyboard configuration on Xorg not working) insists on staying...
I've followed Juanito's suggestions and tips, nothing works.
I quit :(

Now I've deleted Xorg-7.7.tcz from /mnt/sdxn/tce/onboot.lst, restored kmaps.tcz on it, and added kmap=qwerty/la-latin1 code to my APPEND line in extlinux.conf.

My keyboard works well again, but I've have NOT Xorg at the graphical desktop, nor its automatic resolutions to my (various) displays :'(

I have an issue using some free windozers programs under wine (phisical keyboard isn't recognized), but I will post this and a partial solution using virtual keyboard xvkbd.

I will be waiting for new tips or recommendations on this problem using Xorg, but in the meantime I will try to use my own (and precarious) solution.

Kind regards,
DanielH

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Persistent keyboard configuration on Xorg not working
« Reply #16 on: March 21, 2021, 04:45:54 AM »
Are you missing the line "MatchIsKeyboard "on"" from your xorg.conf snippet?

i.e.
Code: [Select]
Section "InputDevice"
    Identifier "Keyboard0"
    MatchIsKeyboard "on"
    Driver "kbd"
    Option "XkbLayout" "latam,es,us"
...

You could also try:
Code: [Select]
$ setxkbmap [-model xkb_model] [-layout xkb_layout] [-variant xkb_variant] [-option xkb_options]

Offline DanielH

  • Newbie
  • *
  • Posts: 36
Re: Persistent keyboard configuration on Xorg not working
« Reply #17 on: March 21, 2021, 10:45:00 PM »
@Juanito:

Quote
Are you missing the line "MatchIsKeyboard "on"" from your xorg.conf snippet?

Yes, I've missed that code.
So, I've added  "MatchIsKeyboard "on"" and I've ended on a high resolution console with a warning:
Code: [Select]
failed in waitforX
startx in this console brings
Code: [Select]
failed in waitforX , again...

/var/log/Xorg.0.log complains: ""MatchIsKeyboard" is not a valid keyword in this section."
See attached Xorg.0.log.txt

But IIRC "MatchIsKeyboard" is a valid code for keyboard configuration...
As confirmation: see https://wiki.archlinux.org/index.php/Xorg/Keyboard_configuration (I use Arch Linux as my main distro).

So what?
I've deleted this offending code and reboot: Xorg works well again and now I'm posting from Firefox in TCL... but keyboard layout is en_US, and it's impossible to change this layout to latam or es using both Shifts simultaneously.

The issue has come back...
 >:(

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Persistent keyboard configuration on Xorg not working
« Reply #18 on: March 22, 2021, 01:16:21 AM »
Did you try the setxkbmap command?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11702
Re: Persistent keyboard configuration on Xorg not working
« Reply #19 on: March 22, 2021, 07:51:46 AM »
Hi DanielH
What happens if you replace:
Code: [Select]
Driver "kbd"with:
Code: [Select]
MatchIsKeyboard "on"
This line:
Code: [Select]
Option "XkbVariant" "deadtilde,deadtilde,"appears to have an extra  comma  after  deadtilde.

Make sure there is a carriage return after this line:
Code: [Select]
EndSection

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11702
Re: Persistent keyboard configuration on Xorg not working
« Reply #20 on: March 22, 2021, 08:12:53 AM »
Hi DanielH
One more thing. Based on what I read here:
http://forum.tinycorelinux.net/index.php/topic,24864.msg158216.html#msg158216

It's possible this line:
Code: [Select]
Section "InputDevice"
Should look like this:
Code: [Select]
Section "InputClass"
That might explain this error:
... /var/log/Xorg.0.log complains: ""MatchIsKeyboard" is not a valid keyword in this section." ...

Offline DanielH

  • Newbie
  • *
  • Posts: 36
Re: Persistent keyboard configuration on Xorg not working
« Reply #21 on: March 22, 2021, 11:14:32 AM »
@Juanito:
Quote
Did you try the setxkbmap command?

Yes, and it works!
setxkbmap -model pc105 -layout latam -variant deadtilde
All is alright!

@Rich:

Today, I will try your suggestions and inform about results.

Quote
This line:
Code: [Select]
Option "XkbVariant" "deadtilde,deadtilde,"
appears to have an extra  comma  after  deadtilde.

I've defined three layouts in this order: latam, es, en.
latam and es layouts has deadtilde variants, en has not. So, I set this extra comma to expicitly confiure variants for each layout... I suposse that a null string after comma correspond to en layout.

BTW: I've discovered that correct layout for english US is us, NOT en.
I will modify my /usr/local/share/X11/xorg.conf.d/01-xorg.conf before try your tips.

Thanks you, TCL developers and maintainers, for your kindly support!



Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11702
Re: Persistent keyboard configuration on Xorg not working
« Reply #22 on: March 22, 2021, 11:40:31 AM »
Hi DanielH
According to the man page:

https://www.systutorials.com/docs/linux/man/5-xorg.conf/#lbAI
MatchIsKeyboard  is not listed as an option for  InputDevice.

https://www.systutorials.com/docs/linux/man/5-xorg.conf/#lbAK
MatchIsKeyboard  is listed as an option for  InputClass.

That's why you got this error:
... /var/log/Xorg.0.log complains: ""MatchIsKeyboard" is not a valid keyword in this section." ...

Offline DanielH

  • Newbie
  • *
  • Posts: 36
Re: Persistent keyboard configuration on Xorg not working
« Reply #23 on: March 23, 2021, 09:44:21 AM »
@Rich:

You're right!
Section "InputClass" is the clue for partially solve this issue.
Attached in 01-xorg.cong.txt file, my new and working /usr/local/share/X11/xorg.conf.d/01-xorg.conf :

BTW:
Option "XkbOptions" "grp:shifts_toggle" doesn't works at all :-( , I don't know why...
Any idea?

@Juanito:

Code: [Select]
setxkbmap -model pc105 -layout latam -variant deadtilde

Code: [Select]
setxkbmap -model pc105 -layout es -variant deadtilde

Code: [Select]
setxkbmap -model pc105 -layout us

All these codes works well.

Thanks very much to juanito, Rich and all tinycorers that helped me to solve the initial issue!!!
Best regrads,
DanielH

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11702
Re: Persistent keyboard configuration on Xorg not working
« Reply #24 on: March 23, 2021, 10:28:21 AM »
Hi DanielH
I don't see  XkbOptions  even showing up in the  xorg.conf  man page I linked to:
https://www.systutorials.com/docs/linux/man/5-xorg.conf

I did come across this:
https://medium.com/@damko/a-simple-humble-but-comprehensive-guide-to-xkb-for-linux-6f1ad5e13450

He states (emphasis mine):
Quote
There is no xorg.conf and no trace, in the whole X11 directory, of any XKB option. This is because most of the recent distributions don't use it anymore.

He suggests some alternatives to using xorg.conf. It might be worth a read. Be aware, you may have to adjust some
paths, such as  /usr/local/share/  instead of  /usr/share/.

Offline DanielH

  • Newbie
  • *
  • Posts: 36
Re: Persistent keyboard configuration on Xorg not working
« Reply #25 on: March 23, 2021, 12:27:46 PM »
@Rich
Quote
I did come across this:
https://medium.com/@damko/a-simple-humble-but-comprehensive-guide-to-xkb-for-linux-6f1ad5e13450

He states (emphasis mine):
Quote
There is no xorg.conf and no trace, in the whole X11 directory, of any XKB option. This is because most of the recent distributions don't use it anymore.

He suggests some alternatives to using xorg.conf. It might be worth a read. Be aware, you may have to adjust some
paths, such as  /usr/local/share/  instead of  /usr/share/.

Well, I think that article is not completely correct.

My keyboard configuration in Arch Linux:
Code: [Select]
[daniel@hardwork ~]$ setxkbmap -print -verbose 10
Setting verbose level to 10
locale is C
Trying to load rules file ./rules/evdev...
Trying to load rules file /usr/share/X11/xkb/rules/evdev...
Success.
Applied rules from evdev:
rules:      evdev
model:      pc105
layout:     latam,us
variant:    deadtilde,
options:    grp:alts_toggle,grp:ctrls_toggle
Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwerty)
types:      complete
compat:     complete
symbols:    pc+latam(deadtilde)+us:2+inet(evdev)+level3(ralt_switch_for_alts_toggle):1+level3(ralt_switch_for_alts_toggle):2+group(ctrls_toggle)+group(alts_toggle)
geometry:   pc(pc105)
xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(qwerty)" };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+latam(deadtilde)+us:2+inet(evdev)+level3(ralt_switch_for_alts_toggle):1+level3(ralt_switch_for_alts_toggle):2+group(ctrls_toggle)+group(alts_toggle)"      };
        xkb_geometry  { include "pc(pc105)"     };
};

As can you see, it has options:    grp:alts_toggle,grp:ctrls_toggle
alts_toggle doesn't work in my system (perhaps because latam and es keyboards uses Alt right as Alt graphics, allowing input extra characters).
"ctrls_toggle" option works well.

I will try with "grp:ctrls_toggle" in my 01-xorg.conf, replacing "grp:shifts_toggle", and report my results.

Thanks you, again...
« Last Edit: March 23, 2021, 12:30:26 PM by DanielH »

Offline DanielH

  • Newbie
  • *
  • Posts: 36
Re: Persistent keyboard configuration on Xorg not working
« Reply #26 on: March 25, 2021, 08:58:19 PM »
@Rich and @Juanito:

"grp:ctrls_toggle" in my 01-xorg.conf, replacing "grp:shifts_toggle" neither allows change keyboard layout :-(

Offline rullolex

  • Full Member
  • ***
  • Posts: 134
    • Rullolex
Re: Persistent keyboard configuration on Xorg not working
« Reply #27 on: April 13, 2021, 01:31:33 PM »
Hi Daniel,

have you solved? I have the same problem  :(

Offline rullolex

  • Full Member
  • ***
  • Posts: 134
    • Rullolex
Re: Persistent keyboard configuration on Xorg not working
« Reply #28 on: May 01, 2021, 03:11:59 AM »
solved

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11702
Re: Persistent keyboard configuration on Xorg not working
« Reply #29 on: May 01, 2021, 09:16:06 AM »
Hi rullolex
Maybe you could share how you solved it in case someone else has the same problem?