Bug 19868

Summary: cannot load mouse and keyboard module with autoadddevice=false
Product: Mageia Reporter: Chris Denice <eatdirt>
Component: RPM PackagesAssignee: Thierry Vignaud <thierry.vignaud>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: Normal CC: cae, marja11
Version: CauldronKeywords: IN_RELEASENOTES6
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Source RPM: x11-server-1.19.0-7.mga6.src.rpm CVE:
Status comment:
Attachments: /etc/X11/xorg.conf.d/00-keyboard.conf written by keyboarddrake

Description Chris Denice 2016-11-29 19:55:56 CET
Using:

Option "AutoAddDevices" "False"

in serverflags in /etc/X11/xorg.conf currently breaks loading inputs.

These guys used to work fine on the previous xorg version:

Section "InputDevice"
    Identifier "Keyboard1"
    Driver "kbd"
    Option "XkbModel" "pc105"
    Option "XkbLayout" "us"
    Option "XkbOptions" "compose:rwin"
EndSection

Section "InputDevice"
    Identifier "Mouse1"
    Driver "mouse"
    Option "Protocol" "ExplorerPS/2"
    Option "Device" "/dev/input/mice"
EndSection

which used to be provided by:

x11-driver-input-keyboard
x11-driver-input-mouse

I guess we would like these guys back, if possible!

Cheers.
Comment 1 Charles Edwards 2016-11-29 21:27:00 CET
I saw the same issue using button mapping for my mouse with x11-server-1.19.0

Section "InputDevice"
    Identifier "Mouse1"
    Driver "mouse"
    Option "Protocol" "IMPS/2"
    Option "Device" "/dev/input/mice"
    Option "ZAxisMapping" "4 5"
    Option "Buttonmapping" "1 2 3 6 7"

Section "ServerFlags"
    Option "AutoAddDevices" "false"
    Option "AllowEmptyInput" "false"    
    # allows the server to start up even if the mouse does not work
    #DontZoom # disable <Ctrl><Alt><KP_+>/<KP_-> (resolution switching)
    Option "DontZap" "False" # disable <Ctrl><Alt><BS> (server abort)
    Option "DontZap" "false"
    Option "allowmouseopenfail"
EndSection

X wpuld not even start

From Xorg.0.log:
[    76.424] (II) LoadModule: "kbd"
[    76.425] (WW) Warning, couldn't open module kbd
[    76.425] (II) UnloadModule: "kbd"
[    76.425] (II) Unloading kbd
[    76.425] (EE) Failed to load module "kbd" (module does not exist, 0)
[    76.425] (II) LoadModule: "mouse"
[    76.425] (WW) Warning, couldn't open module mouse
[    76.425] (II) UnloadModule: "mouse"
[    76.425] (II) Unloading mouse
[    76.425] (EE) Failed to load module "mouse" (module does not exist, 0)
[    76.425] (II) v4l driver for Video4Linux overlay mode (V4L2)
[    76.425] (II) NVIDIA dlloader X Driver  375.20  Tue Nov 15 16:15:23 PST 2016
[    76.425] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[    76.426] (WW) Falling back to old probe method for v4l
[    76.426] (II) v4l: Initiating device probe
[    76.426] (WW) Falling back to old probe method for v4l
[    76.426] (II) v4l: Initiating device probe
[    76.426] (EE) No devices detected.
[    76.426] (EE) 
Fatal server error:
[    76.426] (EE) no screens found(EE) [    76.424] (II) LoadModule: "kbd"
[    76.425] (WW) Warning, couldn't open module kbd
[    76.425] (II) UnloadModule: "kbd"
[    76.425] (II) Unloading kbd
[    76.425] (EE) Failed to load module "kbd" (module does not exist, 0)
[    76.425] (II) LoadModule: "mouse"
[    76.425] (WW) Warning, couldn't open module mouse
[    76.425] (II) UnloadModule: "mouse"
[    76.425] (II) Unloading mouse
[    76.425] (EE) Failed to load module "mouse" (module does not exist, 0)
[    76.425] (II) v4l driver for Video4Linux overlay mode (V4L2)
[    76.425] (II) NVIDIA dlloader X Driver  375.20  Tue Nov 15 16:15:23 PST 2016
[    76.425] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[    76.426] (WW) Falling back to old probe method for v4l
[    76.426] (II) v4l: Initiating device probe
[    76.426] (WW) Falling back to old probe method for v4l
[    76.426] (II) v4l: Initiating device probe
[    76.426] (EE) No devices detected.
[    76.426] (EE) 
Fatal server error:
[    76.426] (EE) no screens found(EE) 


In my case I was able to work-around this issue by removing AutoAddDevices and
AllowEmptyInput from xorg.conf and X would start.

That still was no help with button mapping but those I could set to my liking with xinput.

CC: (none) => cae

Marja Van Waes 2016-11-30 13:26:19 CET

CC: (none) => marja11
Assignee: bugsquad => thierry.vignaud

Comment 2 Thierry Vignaud 2016-11-30 19:35:02 CET
keyboard & mouse drivers were long ago obsoleted by the evdev driver which is now itself being obsoleted by the libinput drivers.

So, while I did fix mouse+kbd drivers for xserver 1.19 in SVN, I've made evdev obsoletes keyboard+mouse as we don't need 3 sets of drivers, each one being obsoleted by the next one

Please adjust your config to use evdev or better libinput
You can just remove the keyboard & mouse section of your config.
XFdrake don't generate those for quite some time (eg: we don't write keyboard section since 2009...)

Status: NEW => RESOLVED
Resolution: (none) => WONTFIX

Comment 3 Samuel Verschelde 2016-11-30 19:50:21 CET
Worth a word in the release notes. Adding FOR_RELEASENOTES6, to be replaced with IN_RELEASENOTES6 once written there. An example of a newer configuration would be ideal.

Keywords: (none) => FOR_RELEASENOTES6

Comment 4 Thierry Vignaud 2016-12-01 09:16:17 CET
Done yesterday.

Keywords: FOR_RELEASENOTES6 => IN_RELEASENOTES6

Comment 5 Thierry Vignaud 2016-12-01 09:29:19 CET
About an example of a newer configuration:
there's nothing new, eg we don't generate a a keyboard section since 2009 !!!!
Aka prior to any Mageia release....
Comment 6 Samuel Verschelde 2016-12-01 11:40:35 CET
(In reply to Thierry Vignaud from comment #5)
> About an example of a newer configuration:
> there's nothing new, eg we don't generate a a keyboard section since 2009
> !!!!
> Aka prior to any Mageia release....

I probably expressed myself badly. I don't know much about XOrg configuration so was wondering if some of the things that could be done in the past to configure keyboard and mouse there could now be done in a different way in another configuration file. And if it's all magically autodetected, well, let's just mention it in the release notes for those like me who don't know :)
Comment 7 Chris Denice 2016-12-01 13:58:48 CET
Thanks for the answer Thierry.

I'll investigate how to use the new drivers. The point being, yes I and Charges at least were still using the keyboard and mouse sections to set custom settings.
Myself was quite trivial for getting the "accents" the way I like, but Charles had some button mappings.

So, an example along these lines would be nice indeed. I'll try to provide it. 
If 2 users of Cauldron hit the question, I guess, a few percent of all users will also have the same pb once mga6 release.

Cheers.
Comment 8 Thierry Vignaud 2016-12-01 14:06:21 CET
Well, as for using those drivers, those are automatically loaded by X server if installed (which we do).
So you've nothing to do besides removing those sections.

Now, if you need something specific, note that keyboardrake writes /etc/X11/xorg.conf.d/00-keyboard.conf

You can alter it if you need (but beware that if you rerun keyboarddrake, you might loose your changes)

But I don't think you need anything, see eg: the example config file I'm attaching
Comment 9 Thierry Vignaud 2016-12-01 14:07:49 CET
Created attachment 8712 [details]
/etc/X11/xorg.conf.d/00-keyboard.conf written by keyboarddrake

As you can see, keyboarddrake is written exactly what you want, without forcing a driver.
Comment 10 Thierry Vignaud 2016-12-01 14:14:37 CET
Just FYI, evdev & libinput are automatically loaded if installed by:
/usr/share/X11/xorg.conf.d/40-libinput.conf
/usr/share/X11/xorg.conf.d/10-evdev.conf
Comment 11 Chris Denice 2016-12-01 14:15:36 CET
Wow, great!
Thanks for the info!
Comment 12 Charles Edwards 2016-12-01 14:41:08 CET
(In reply to Chris Denice from comment #7)
> Thanks for the answer Thierry.
> 
> I'll investigate how to use the new drivers. The point being, yes I and
> Charges at least were still using the keyboard and mouse sections to set
> custom settings.
> Myself was quite trivial for getting the "accents" the way I like, but
> Charles had some button mappings.
> 
> So, an example along these lines would be nice indeed. I'll try to provide
> it. 
> If 2 users of Cauldron hit the question, I guess, a few percent of all users
> will also have the same pb once mga6 release.

Here's what I ended up using to get the button mapping for my mouse the way I wanted.

$ xinput list  (list all input devices)
$ xinput get-button-map <device> (list button as currently mapped)
$ xinput set-button-map <device> (set desired mapping)

for me that was
$ xinput set-button-map 8 1 2 3 4 5 6 7 2 1 10 11 12 13 14 15 16 17 18 19 20