WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

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

Offline DanielH

  • Newbie
  • *
  • Posts: 36
Persistent keyboard configuration on Xorg not working
« on: March 10, 2021, 09:30:24 PM »
Dear "TinyCorers":

I'm "coming back to the future", the last TCL I've used was 4.0.7 (IIRC).
I habitually use Arch Linux + LXQt in my two laptops (i7-2620 8GB RAM for work, Core 2 Duo 2 GB RAM connected to my 42" LCD TV for fun)...

Now, I have installed TCL 12 in a 8 GB pendrive, with persistent tce, opt and home.
I will use this pendrive as a "portable system" to run some free software for Windows under wine (LDmicro, Tiny Multi Bootloader+, Kmap Minimizer, QElectrotech) in other computers.
Of course, I've installed some FLTK apps: fluff, flaxpdf, flviewer, flburn, flit; and a lot of non FLTK apps: Firefox (latest), LibreOffice, VLC, Xarchiver, Transmission, RecordMyDesktop, Pulseaudio, VLC, etc.

 I live in Argentina, the most common keyboards are es (desktops) and latam (laptops), but I need us configuration, too (LDmicro has hardware fixed shortcuts).
Thus, I've installed Xorg7.7 and its dependencies as OnBoot apps, and following TCL wiki I've created /etc/X11/xorg.conf and added it to .filetool, to properly configure my laptop keyboard (86 keys, non numeric keys).

Code: [Select]
tc@box:~$ less /etc/X11/xorg.conf
Section "InputDevice"
    Identifier "Keyboard0"
    Driver "kbd"
    Option "XkbLayout" "latam,es,us"
    Option "XkbModel" "pc86"
    Option "XkbVariant" "deadtilde,deadtilde,"
    Option "XkbOptions" "grp:shifts_toggle"
EndSection

But TCL refuses to load this configuration file at startup, and finally I have a partially not working keyboard: my cursor keys (up, down, left, right) an other auxiliary keys (Delete, Home, Page Up, Page Down, End) doesn't work.

TCL "running" keyboard:
Code: [Select]
tc@box:~$ setxkbmap -print -verbose 10
Setting verbose level to 10
locale is C
Trying to load rules file ./rules/xorg...
Trying to load rules file /usr/local/share/X11/xkb/rules/xorg...
Success.
Applied rules from xorg:
rules:      xorg
model:      -layout
layout:     latam,es,us
options:    grp:shifts_toggle
Trying to build keymap using the following components:
keycodes:   xfree86+aliases(qwerty)
types:      complete
compat:     complete
symbols:    pc+latam+es:2+us:3+group(shifts_toggle)
geometry:   pc(pc104)
xkb_keymap {
        xkb_keycodes  { include "xfree86+aliases(qwerty)"       };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+latam+es:2+us:3+group(shifts_toggle)"};
        xkb_geometry  { include "pc(pc104)"     };
};

I've tryed using Option "XkbModel" "pc105" in my xorg.conf, without success. BTW: this options works very well under Arch Linux in my two laptops.
I've tryed using Option "XkbModel" "pc104" as setxkmap reports: xkb_geometry  { include "pc(pc104)"     }; no success, again...

I would appreciate your suggestions and thoughts on how to configure my keyboard in TCL.

Best regards,
DanielH

    [EDIT]: Added code tags.  Rich
« Last Edit: March 11, 2021, 04:57:03 AM by Rich »

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Persistent keyboard configuration on Xorg not working
« Reply #1 on: March 10, 2021, 09:39:54 PM »
I've created /etc/X11/xorg.conf and added it to .filetool, to properly configure my laptop keyboard (86 keys, non numeric keys).

Do things work if you put an xorg config snippet in /usr/local/share/X11/xorg.conf.d?

Have you used the getlocale extension to create mylocale and set an appropriate boot code?

Offline DanielH

  • Newbie
  • *
  • Posts: 36
Re: Persistent keyboard configuration on Xorg not working
« Reply #2 on: March 10, 2021, 10:20:06 PM »
@Juanito:

Thanks you for your quickly reply!

I've not used getlocale extension nor generated mylocale. I need to learn about this.

My extlinux.conf:

Code: [Select]
DEFAULT core
LABEL core
KERNEL /boot/vmlinuz
INITRD /boot/core.gz
APPEND waitusb=5 tce=UUID=a5757f2c-b960-4804-8200-7a7d77232d16 opt=UUID=a5757f2c-b960-4804-8200-7a7d77232d16 restore=UUID=a5757f2c-b960-4804-8200-7a7d77232d16 home=UUID=a5757f2c-b960-4804-8200-7a7d77232d16 multivt showapps settime tz=GMT+3

Tomorrow I'll try to put a xorg config snippet in /usr/local/share/X11/xorg.conf.d, as you suggest, and will report if it works.
Here is too late (3:15 A.M.), I need to sleep...

Best regards,
DanielH

    [EDIT]: Added code tags.  Rich
« Last Edit: March 11, 2021, 04:59:04 AM by Rich »

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Persistent keyboard configuration on Xorg not working
« Reply #3 on: March 10, 2021, 10:39:41 PM »
You could also look at the kmaps extension and kmap boot code

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Persistent keyboard configuration on Xorg not working
« Reply #4 on: March 10, 2021, 11:14:40 PM »
kmaps only affects the console and Xvesa, not Xorg.
The only barriers that can stop you are the ones you create yourself.

Offline DanielH

  • Newbie
  • *
  • Posts: 36
Re: Persistent keyboard configuration on Xorg not working
« Reply #5 on: March 11, 2021, 05:05:41 AM »
@Juanito, @curaga:

I agree with curaga, kmap=la-latin1 boot code has no effect on my Xorg OnBoot system.

I've installed kmaps extension and included this boot code in the past, when I configure TCL to boot with Xvesa; it worked fine, all keys in my latam keyboard was full functional.

But now I prefer to boot with Xorg, to allow better screen resolution, size and color configuration, and "automagically" adapt TCL to run in various desktops and laptops. At last, wine (the main program that I will use) has Xorg as dependency. So configuring Xorg as OnBoot has big advantages for me.

The pendrive that I'm trying to use with TCL and the apps I've previously listed will be cloned (or perhaps remastered, but I have to learn about remastering procedures). Them will be used in short courses "Introduction to Automation with micro PLC" that I will dictate in person in a near future, when Covid-19 vaccine has a more spread in my country.

Today I will try to implement Juanito's suggestion: to put a xorg config snippet in /usr/local/share/X11/xorg.conf.d

Thanks for your kindly support!
Best regards,
DanielH

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: Persistent keyboard configuration on Xorg not working
« Reply #6 on: March 11, 2021, 05:06:18 AM »
Hi DanielH
Please use  Code Tags  when posting commands and responses seen in a terminal. To use  Code Tags  click on the  #  icon
above the reply box and paste your text between the  Code Tags  as shown in this example:

Quote
[code][   36.176529] pcm512x 1-004d: Failed to get supply 'AVDD': -517
[   36.176536] pcm512x 1-004d: Failed to get supplies: -517
[   36.191753] pcm512x 1-004d: Failed to get supply 'AVDD': -517[/code]

It will appear like this in your post:
Code: [Select]
[   36.176529] pcm512x 1-004d: Failed to get supply 'AVDD': -517
[   36.176536] pcm512x 1-004d: Failed to get supplies: -517
[   36.191753] pcm512x 1-004d: Failed to get supply 'AVDD': -517

Code Tags  serve as visual markers between what you are trying to say and the information you are posting. They also preserve
spacing so column aligned data displays properly. Code tags also automatically add horizontal and or vertical scrollbars
to accommodate long lines and listings.

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: Persistent keyboard configuration on Xorg not working
« Reply #7 on: March 11, 2021, 05:10:57 AM »
Hi DanielH
Just a heads up. You do not need this in your  extlinux.conf  file:
Code: [Select]
restore=UUID=a5757f2c-b960-4804-8200-7a7d77232d16It is the same location as your  tce  directory which is the default location for your backup anyway.

Offline DanielH

  • Newbie
  • *
  • Posts: 36
Re: Persistent keyboard configuration on Xorg not working
« Reply #8 on: March 11, 2021, 05:34:29 AM »
@Rich:

1.
Quote
Please use  Code Tags  when posting commands and responses seen in a terminal.
OK, I will do.
I've not visited TCL Forums for a long time...
My apologies: I have forgotten to use the formatting options that are available in the forum interface.  :P

2.
Quote
Just a heads up. You do not need this in your  extlinux.conf  file:
Thanks very much! I did not understand that tce is the default directory to save the backup...

I coming back to TCL after seven or more years, I forgotten how it works, functionalities, configs.
Please, consider me as a "re-newbie" for a while.

In the past, I used TCL for demos and friendly distro wars in certain editions of FLISoL (Latin American Linux Installation Festival).

My Linux way: Kubuntu > Debian stable with XFCE > Debian testing with XFCE > LMDE  with XFCE > ArchBan with OpenBox > Arch Linux with LXQt = stop).

3.
I'm argentinian and only speak spanish, I apologize if my english is not good enough.

Best regards,
DanielH

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: Persistent keyboard configuration on Xorg not working
« Reply #9 on: March 11, 2021, 05:53:30 AM »
Hi DanielH
No worries, it's all good. :)

Offline DanielH

  • Newbie
  • *
  • Posts: 36
Re: Persistent keyboard configuration on Xorg not working
« Reply #10 on: March 12, 2021, 06:30:39 PM »
@Juanito:

1.
Quote
Do things work if you put an xorg config snippet in /usr/local/share/X11/xorg.conf.d?

No, thigs doesn't work.
My /usr/local/share/X11/xorg.conf.d/01-xorg.conf, listed for backup in /opt/.filetool.lst:
Code: [Select]
Section "InputDevice"
    Identifier "Keyboard0"
    Driver "kbd"
    Option "XkbLayout" "latam,es,us"
    Option "XkbModel" "pc86"
    Option "XkbVariant" "deadtilde,deadtilde,"
    Option "XkbOptions" "grp:shifts_toggle"
EndSection

I've tryed with Option "XkbModel" "pc104" and Option "XkbModel" "pc105", nothing works.
Of course, I've previously deleted /etc/X11/xorg.conf and its entry in /opt/.filetool.lst.

Other keys or combinations that doesn't work:
Alt Gr (right Alt) + Q key, latam = at symbol.
Alt Gr (right Alt) + 2 key, es = at symbol.
Alt Gr alone produces a carriage return and new line in Editor, Firefox, but isn't recognized in Terminal (of course, right alt is not a valid character for vt).

Worst:
a. sometimes Option "XkbOptions" "grp:shifts_toggle" (both Shifts keys together) works, sometimes not (not at this moment, when I'm posting from Firefox in TCL).
b. sometimes cursor and Home, End, Page Up and Page Down keys  works, sometimes not (yes at this moment, when I'm posting from Firefox in TCL).
My keyboard is now freezed at en-US layout...

2.
Quote
Have you used the getlocale extension to create mylocale and set an appropriate boot code?

I've tryed, but mylocale.tcz and extlinux.conf code lang=es_AR.UTF-8 has no effect.
So I've deleted both...

3.
As a collateral issue: sometimes Wallpaper with a background image works, sometimes not.

 :(

Any idea?
Best regards,
DanielH



Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Persistent keyboard configuration on Xorg not working
« Reply #11 on: March 12, 2021, 09:44:03 PM »
If you add your /usr/local/share/X11/xorg.conf.d/01-xorg.conf, exit to the console prompt and "startx", do you see any messages about loading the keyboard in /var/log/Xorg.0.log?

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Persistent keyboard configuration on Xorg not working
« Reply #12 on: March 12, 2021, 09:47:52 PM »
I've tryed, but mylocale.tcz and extlinux.conf code lang=es_AR.UTF-8 has no effect.
So I've deleted both...

After reboot (with mylocale set "onboot" and lang=es_AR.UTF-8), what does the command "locale" give?

Offline DanielH

  • Newbie
  • *
  • Posts: 36
Re: Persistent keyboard configuration on Xorg not working
« Reply #13 on: March 18, 2021, 11:38:13 AM »
@Juanito:

I apologize for my delayed reply, I was very busy these last days...


Offline DanielH

  • Newbie
  • *
  • Posts: 36
Re: Persistent keyboard configuration on Xorg not working
« Reply #14 on: March 18, 2021, 11:43:39 AM »
@Juanito:

Quote
If you add your /usr/local/share/X11/xorg.conf.d/01-xorg.conf, exit to the console prompt and "startx", do you see any messages about loading the keyboard in /var/log/Xorg.0.log?

I send my /var/log/Xorg.0.log in an .txt attached file, I can't post it directly in forum (500 Internal Server Error when I try to post or preview).

I don't see any code about keyboard layout configuration...