[xkb-data] missing geometry for Dell Latitude D620 keyboard

Bug #138131 reported by Bogdan Butnaru
2
Affects Status Importance Assigned to Milestone
xkeyboard-config
Invalid
Medium
xkeyboard-config (Ubuntu)
Invalid
Wishlist
Unassigned

Bug Description

Binary package hint: xkb-data

Hello! I'm using a Dell Latitude D620 laptop, with a French keyboard (I'm not sure if the others are the same), and I noticed there's no geometry file for this model in Ubuntu.

If you open the Keyboard Preferences applet, the Layouts tab, and try to pick a keyboard model, you'll notice a "Dell Latitude series laptop" model. Unfortunately this is quite different from what the keyboard looks like on my machine. I've spent a lot of time today trying to create another geometry file (ie, something appropriate to append to /usr/share/X11/xkb/geometry/pc) with only moderate success.

The main problem is that I couldn't find a decent tool to actually check my resulting layout. What I did was dump the current X config to an .xkb file (call it layout.xkb) using xkbcomp, edited it, then I used
      $xkbcomp layout.xkb && xkbprint -color -label none -level2 layout.xkm && ps2pdf layout.ps && xpdf layout.pdf
to take a look at it. This baroque system was needed because:
(a) I can't figure out how to get a "clean" xkb file, and I don't know how to look at a "geometry" description by itself;
(b) for some reason xkbprint often generates ps output that either is broken, or is understandable by neither ps2pdf nor evince;
(c) also xkbprint fails with strange errors if I tell it to display the labels on the keys. This happens on the file compiled by xkbcomp, so I don't think it's an error in my layout.
(d) even if it does work, for some reason evince sometimes can't read the resulting pdf. Weird, I know. I might even file a bug report next time this happens. Anyway, only (a)--(c) are really relevant.

That being said, I have been able to create a layout that _looks_ like the keyboard I have. I can compile it, and xkbprint generates a graphic if I set it to not display labels (as above). But it doesn't show the keysims, so I doubt they're set completely right. There are some weird keys on the laptop and I'm not sure how to deal with them, or if it's even necessary (they all work with the default keyboard "model" which doesn't show most of them). I'm guessing they're mostly cosmetic.

Anyway, I tried to hack the resulting geometry section into the /usr/share/X11/xkb/geometry/pc file and rebooted. The new layout is shown in the Keyboard Preferences applet list, but if I try to pick it I get an error. It's not very descriptive, it just says something was wrong and to contact the Xorg guys with the output of two commands. I checked (see below), they only display the current settings at the time, which isn't very helpful because I know them.

$ xprop -root|grep XKB
_XKB_RULES_NAMES_BACKUP(STRING) = "xorg", "pc104", "us", "dvorak", ""
_XKB_RULES_NAMES(STRING) = "xorg", "latitude", "us,fr", "dvorak,", "ctrl:swapcaps,altwin:super_win,grp:alts_toggle"
$ gconftool-2 -R /desktop/gnome/peripherals/keyboard/kbd
 layouts = [us dvorak,fr]
 model = latituded620
 options = [ctrl ctrl:swapcaps,altwin altwin:super_win,grp grp:alts_toggle]
 overrideSettings = true

So, what I'd need is for someone to coach me into finding out what's wrong with the geometry, debugging it, and generally getting it to a state where it can be accepted into Ubuntu (and pushed upstream). I'll attach the xkb file right away.

Revision history for this message
Bogdan Butnaru (bogdanb) wrote :

This is what I have until now. Thanks in advance for helping.

Revision history for this message
Daniel T Chen (crimsun) wrote :

Is this symptom still reproducible in 8.10 beta or later? (It should already be resolved.)

Changed in xkeyboard-config:
status: New → Incomplete
Revision history for this message
Bogdan Butnaru (bogdanb) wrote :

Depends on what symptom you mean. The generic "Dell Latitude series" keyboard geometry in the standard list is still different from the one on my laptop, so in effect there is none that works for me.

If you're referring to the bug I used to get with my custom geometry, I haven't checked if that still happens. If you think it'll get accepted into Ubuntu, I'll spend some more time with it, but if nobody cares about it I see no reason to continue...

Changed in xkeyboard-config:
status: Incomplete → New
Revision history for this message
Bryce Harrington (bryce) wrote :

Hi Bogdan,

Ideally, the changes need to be adopted upstream. If you polish up your patch to a level you're happy with, we can forward it upstream.

Changed in xkeyboard-config:
importance: Undecided → Wishlist
status: New → Incomplete
Revision history for this message
In , Bryce Harrington (bryce) wrote :
Download full text (3.5 KiB)

Created an attachment (id=22257)
dell latitude d620.xkb

Forwarding this bug from a Ubuntu reporter:
https://bugs.edge.launchpad.net/ubuntu/+source/xkeyboard-config/+bug/138131

[Problem]
There is no geometry file for the Dell Latitude D620 laptop with french keyboard. User has come up with a partly-working geometry but gets an error trying to use it.

[Original Report]
Hello! I'm using a Dell Latitude D620 laptop, with a French keyboard (I'm not sure if the others are the same), and I noticed there's no geometry file for this model in Ubuntu.

If you open the Keyboard Preferences applet, the Layouts tab, and try to pick a keyboard model, you'll notice a "Dell Latitude series laptop" model. Unfortunately this is quite different from what the keyboard looks like on my machine. I've spent a lot of time today trying to create another geometry file (ie, something appropriate to append to /usr/share/X11/xkb/geometry/pc) with only moderate success.

The main problem is that I couldn't find a decent tool to actually check my resulting layout. What I did was dump the current X config to an .xkb file (call it layout.xkb) using xkbcomp, edited it, then I used
      $xkbcomp layout.xkb && xkbprint -color -label none -level2 layout.xkm && ps2pdf layout.ps && xpdf layout.pdf
to take a look at it. This baroque system was needed because:
(a) I can't figure out how to get a "clean" xkb file, and I don't know how to look at a "geometry" description by itself;
(b) for some reason xkbprint often generates ps output that either is broken, or is understandable by neither ps2pdf nor evince;
(c) also xkbprint fails with strange errors if I tell it to display the labels on the keys. This happens on the file compiled by xkbcomp, so I don't think it's an error in my layout.
(d) even if it does work, for some reason evince sometimes can't read the resulting pdf. Weird, I know. I might even file a bug report next time this happens. Anyway, only (a)--(c) are really relevant.

That being said, I have been able to create a layout that _looks_ like the keyboard I have. I can compile it, and xkbprint generates a graphic if I set it to not display labels (as above). But it doesn't show the keysims, so I doubt they're set completely right. There are some weird keys on the laptop and I'm not sure how to deal with them, or if it's even necessary (they all work with the default keyboard "model" which doesn't show most of them). I'm guessing they're mostly cosmetic.

Anyway, I tried to hack the resulting geometry section into the /usr/share/X11/xkb/geometry/pc file and rebooted. The new layout is shown in the Keyboard Preferences applet list, but if I try to pick it I get an error. It's not very descriptive, it just says something was wrong and to contact the Xorg guys with the output of two commands. I checked (see below), they only display the current settings at the time, which isn't very helpful because I know them.

$ xprop -root|grep XKB
_XKB_RULES_NAMES_BACKUP(STRING) = "xorg", "pc104", "us", "dvorak", ""
_XKB_RULES_NAMES(STRING) = "xorg", "latitude", "us,fr", "dvorak,", "ctrl:swapcaps,altwin:super_win,grp:alts_toggle"
$ gconftool-2 -R /desktop/gnome/peripherals/keyboard/k...

Read more...

Revision history for this message
In , Sergey V. Udaltsov (svu) wrote :

Since we are in freeze (tomorrow is release), I will postpone this one. But it will be one of the first commits.

Revision history for this message
Bryce Harrington (bryce) wrote :

Hi Bogdan,

I've gone ahead and forwarded the bug and your partial fix upstream to https://bugs.freedesktop.org/show_bug.cgi?id=19750 in hopes they can use your work to come up with a good fix for this issue. Please subscribe to that bug in case upstream needs additional information or wish you to test something. Thanks ahead of time!

Changed in xkeyboard-config:
status: Incomplete → Triaged
Changed in xkeyboard-config:
status: Unknown → In Progress
Revision history for this message
In , Sergey V. Udaltsov (svu) wrote :

Created an attachment (id=22328)
Preview of the geometry

There is something wrong with the geometry. See attached.

I have committed it as dell(latitude) geometry, since there is no specific D620 model.

I must admit - I am impressed with the complexity of the picture. Well done!

Revision history for this message
In , Sergey V. Udaltsov (svu) wrote :

Anyway, it is committed to git, so you're welcome to try (and fix these minor issues).

Revision history for this message
In , Bogdanb+bugs-freedesktop-org (bogdanb+bugs-freedesktop-org) wrote :

Hello Sergey!

I'm the guy who originally made this and placed it in Ubuntu's bugtracker, but it languished there for a year or so.

By the way, this particular keyboard is based on the French version of http://www.dell.com/content/products/productdetails.aspx/latit_d620?c=us&cs=28&l=en&s=dfb (I'm not quite sure I understand your comment about the model).

I'd like to fix the bugs, and I have another keyboard I'd like to add. Can you tell me what you used to create that picture, and if there are any tools I can use to validate a geometry file? I remember I was working half-blind when I did this one. The only help I had was gnome's keyboard applet, and it wasn't very helpful when something went wrong.

Also, I'm not sure about your 'git' comment; where is the repository? Is there some wiki page saying how I should make modifications/send patches?

Revision history for this message
In , Bogdanb+bugs-freedesktop-org (bogdanb+bugs-freedesktop-org) wrote :

Oh, and while we're at it I have another question: what is the preferred way of installing a custom geometry file? Do I really have to mess with /usr/share/X11/xkb, or is there some support for user files?

Revision history for this message
In , Sergey V. Udaltsov (svu) wrote :

Yes I am using gnome utilities. The indicator applet has "Keyboard preview" feature. You can also use xkbprint. Or, if you build libgnomekbd (used by the gnome applet), there is a test utility you can run to show the keyboard preview. You choose;)

The repository is in git. http://freedesktop.org/wiki/Software/XKeyboardConfig/Development

You do not have to mess with /usr/share/X11, there is -I option for both xkbcomp and setxkbmap (even though some people have issues with it).

Revision history for this message
Bryce Harrington (bryce) wrote :

Hi Bogdan, just wanted to follow up and see how this is coming along?

Revision history for this message
Bogdan Butnaru (bogdanb) wrote :

Hi Bryce, thanks for wondering. I've re-started work on the layout to fix some problems with it, and I'll be posting it on the upstream bug report you opened when I'm done with it. I'll post a note here when I'm done, too.

Revision history for this message
Bryce Harrington (bryce) wrote :

Great, thanks for the update.

Revision history for this message
In , Sergey V. Udaltsov (svu) wrote :

What a pity. The patch that is "almost there" - but not quite. And no reply for a year.

Please reopen if you have fixed version of the geometry.

Revision history for this message
In , Bogdanb+bugs-freedesktop-org (bogdanb+bugs-freedesktop-org) wrote :

Sorry Sergey. The documentation for creating these files is ridiculously lacking, each time I tried to work on it again I hit some obscure & inexplicable behavior and got annoyed.

(And since I’m not using that computer anymore I’m even less motivated.)

Anyway, the files are left here, if anyone cares more than I do or knows more about these files they can try fixing them. Maybe I will, eventually. Do you mind if I email you directly, if I pick this up again and have questions?

Revision history for this message
In , Sergey V. Udaltsov (svu) wrote :

Well, I do not mind general questions in personal email. I just prefer to keep in bugzilla all discussions related to particular topic. So, choose wisely what way of communication to use;)

Changed in xkeyboard-config:
importance: Unknown → Medium
status: In Progress → Invalid
Changed in xkeyboard-config:
importance: Medium → Unknown
Revision history for this message
Bryce Harrington (bryce) wrote :

Following suit to upstream and closing out the bug as per recent comments

Changed in xkeyboard-config (Ubuntu):
status: Triaged → Invalid
Changed in xkeyboard-config:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.