Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load libinput xorg config correctly #31995

Merged
merged 2 commits into from Nov 25, 2017
Merged

Conversation

jtojnar
Copy link
Contributor

@jtojnar jtojnar commented Nov 24, 2017

Motivation for this change

evdev is broken in GNOME (#31670) so we need to use libinput. GNOME enables libinput but the NixOS module did not load the Xorg configuration resulting in libinput not being used.

I also had switch the base xkb rules to evdev. Not sure what the difference is (asked here) but the latter does not seem to produce a mangled keyboard layout.

Things done

Tried with GNOME 3.24 and 3.26.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

environment.etc = [
(let cfgPath = "/X11/xorg.conf.d/40-libinput.conf"; in {
source = pkgs.xorg.xf86inputlibinput.out + "/share" + cfgPath;
target = cfgPath;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works, but target is not expected to start with /.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, fixed.

In order for libinput to be used with Xorg, its configuration file
needs to be added to environment similarly to how evdev one’s is.

Closes: NixOS#31670
Copy link
Contributor

@orivej orivej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've confirmed that this change has no negatively effects on KDE.

40-libinput.conf installed here successfully overrides 10-evdev.conf installed in services/x11/xserver.nix so the latter does not have to be disabled, even though it's redundant.

With libinput used for keyboard, base rules produce incorrect keyboard
layouts. We are removing the option as recommended in the XKB configuration
guide [1] to let X server choose the ruleset. It looks like it chooses
evdev rules which seem to work for some reason

[1]: https://www.x.org/releases/X11R7.6/doc/xorg-docs/input/XKB-Config.html#id2521360
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: GNOME GNOME desktop environment and its underlying platform 10.rebuild-darwin: 0 10.rebuild-linux: 0
Projects
GNOME
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants