You are not logged in.

#1 2022-11-19 23:09:47

demoknight-tf2
Member
Registered: 2022-11-19
Posts: 2

[SOLVED] Xorg config doesn't work if I don't use the NVIDIA driver

I'm trying to do GPU passthrough so I want to load the VFIO driver for my nvidia card. When I do this, my xorg config is no longer being read. I have a GeForce GTX 1050 3 GB Max-Q on an ASUS FX505DD.

Here's my config, I believe it has no errors because it works as expected when `nvidia` is the driver used.

Section "InputClass"
	Identifier "libinput mouse"
	MatchIsPointer "on"
	Driver "libinput"
	Option "AccelProfile" "flat"
	Option "TransformationMatrix" "0.30 0.0 0.0 0.0 0.30 0.0 0.0 0.0 1.0"
EndSection

Section "InputClass"
	Identifier "libinput touchpad"
	MatchIsTouchpad "on"
	Driver "libinput"
	Option "Tapping" "on"
	Option "NaturalScrolling" "on"
EndSection

I change the driver by putting this in `/etc/modprobe.d/vfio.conf`:

options vfio-pci ids=10de:1c91,10de:0fb9

and this in `/etc/mkinitcpio.conf`:

# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES=(piix ide_disk reiserfs)
# MODULES=()
MODULES=(vfio vfio_iommu_type1 vfio_pci vfio_virqfd)

...

and then running `mkinitcpio`

So that when I run `lspci -nnk` I get

01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP107M [GeForce GTX 1050 3 GB Max-Q] [10de:1c91] (rev a1)
	Subsystem: ASUSTeK Computer Inc. Device [1043:18f1]
	Kernel driver in use: vfio-pci
	Kernel modules: nouveau, nvidia_drm, nvidia

But if I do that, my xorg config is no longer being read. Here's the part of my xorg log that I think is relevant (full log: https://pastebin.com/BBBQ12QG )

[   198.366] (II) config/udev: Adding input device ELAN1200:00 04F3:30BA Touchpad (/dev/input/event8)
[   198.367] (**) ELAN1200:00 04F3:30BA Touchpad: Applying InputClass "libinput touchpad catchall"
[   198.367] (II) Using input driver 'libinput' for 'ELAN1200:00 04F3:30BA Touchpad'
[   198.367] (II) systemd-logind: got fd for /dev/input/event8 13:72 fd 35 paused 0
[   198.367] (**) ELAN1200:00 04F3:30BA Touchpad: always reports core events
[   198.367] (**) Option "Device" "/dev/input/event8"
[   198.369] (II) event8  - ELAN1200:00 04F3:30BA Touchpad: is tagged by udev as: Touchpad
[   198.371] (II) event8  - ELAN1200:00 04F3:30BA Touchpad: device is a touchpad
[   198.371] (II) event8  - ELAN1200:00 04F3:30BA Touchpad: device removed
[   198.372] (**) Option "config_info" "udev:/sys/devices/platform/AMDI0010:01/i2c-0/i2c-ELAN1200:00/0018:04F3:30BA.0001/input/input12/event8"
[   198.372] (II) XINPUT: Adding extended input device "ELAN1200:00 04F3:30BA Touchpad" (type: TOUCHPAD, id 13)
[   198.374] (**) Option "AccelerationScheme" "none"
[   198.374] (**) ELAN1200:00 04F3:30BA Touchpad: (accel) selected scheme none/0
[   198.374] (**) ELAN1200:00 04F3:30BA Touchpad: (accel) acceleration factor: 2.000
[   198.374] (**) ELAN1200:00 04F3:30BA Touchpad: (accel) acceleration threshold: 4
[   198.376] (II) event8  - ELAN1200:00 04F3:30BA Touchpad: is tagged by udev as: Touchpad
[   198.379] (II) event8  - ELAN1200:00 04F3:30BA Touchpad: device is a touchpad
[   198.381] (II) config/udev: Adding input device ELAN1200:00 04F3:30BA Touchpad (/dev/input/mouse1)
[   198.381] (II) No input driver specified, ignoring this device.
[   198.381] (II) This device may have been added with another device file.

If I don't do this (`nvidia` is the driver being used)

$ lspci -nnk

...

01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP107M [GeForce GTX 1050 3 GB Max-Q] [10de:1c91] (rev a1)
	Subsystem: ASUSTeK Computer Inc. Device [1043:18f1]
	Kernel driver in use: nvidia
	Kernel modules: nouveau, nvidia_drm, nvidia

...

And the config is loaded (my touchpad supports tapping). For some reason the xorg log shows some error while loading the touchpad driver even though it works as expected: (full log: https://pastebin.com/bCTvKgcT )

[   183.034] (II) config/udev: Adding input device ELAN1200:00 04F3:30BA Touchpad (/dev/input/event8)
[   183.034] (**) ELAN1200:00 04F3:30BA Touchpad: Applying InputClass "libinput touchpad catchall"
[   183.034] (**) ELAN1200:00 04F3:30BA Touchpad: Applying InputClass "libinput touchpad"
[   183.034] (II) Using input driver 'libinput' for 'ELAN1200:00 04F3:30BA Touchpad'
[   183.035] (II) systemd-logind: got fd for /dev/input/event8 13:72 fd 55 paused 0
[   183.035] (**) ELAN1200:00 04F3:30BA Touchpad: always reports core events
[   183.035] (**) Option "Device" "/dev/input/event8"
[   183.036] (II) event8  - ELAN1200:00 04F3:30BA Touchpad: is tagged by udev as: Touchpad
[   183.037] (II) event8  - ELAN1200:00 04F3:30BA Touchpad: device is a touchpad
[   183.037] (II) event8  - ELAN1200:00 04F3:30BA Touchpad: device removed
[   183.037] (**) Option "Tapping" "on"
[   183.038] (**) Option "NaturalScrolling" "on"
[   183.038] (**) Option "config_info" "udev:/sys/devices/platform/AMDI0010:01/i2c-0/i2c-ELAN1200:00/0018:04F3:30BA.0001/input/input16/event8"
[   183.038] (II) XINPUT: Adding extended input device "ELAN1200:00 04F3:30BA Touchpad" (type: TOUCHPAD, id 13)
[   183.039] (**) Option "AccelerationScheme" "none"
[   183.039] (**) ELAN1200:00 04F3:30BA Touchpad: (accel) selected scheme none/0
[   183.039] (**) ELAN1200:00 04F3:30BA Touchpad: (accel) acceleration factor: 2.000
[   183.039] (**) ELAN1200:00 04F3:30BA Touchpad: (accel) acceleration threshold: 4
[   183.040] (II) event8  - ELAN1200:00 04F3:30BA Touchpad: is tagged by udev as: Touchpad
[   183.041] (II) event8  - ELAN1200:00 04F3:30BA Touchpad: device is a touchpad
[   183.042] (II) config/udev: Adding input device ELAN1200:00 04F3:30BA Touchpad (/dev/input/mouse1)
[   183.042] (**) ELAN1200:00 04F3:30BA Touchpad: Applying InputClass "libinput touchpad"
[   183.042] (II) Using input driver 'libinput' for 'ELAN1200:00 04F3:30BA Touchpad'
[   183.042] (**) ELAN1200:00 04F3:30BA Touchpad: always reports core events
[   183.042] (**) Option "Device" "/dev/input/mouse1"
[   183.093] (II) mouse1  - not using input device '/dev/input/mouse1'.
[   183.094] (EE) libinput: ELAN1200:00 04F3:30BA Touchpad: Failed to create a device for /dev/input/mouse1
[   183.094] (EE) PreInit returned 2 for "ELAN1200:00 04F3:30BA Touchpad"
[   183.094] (II) UnloadModule: "libinput"

Last edited by demoknight-tf2 (2022-11-20 08:00:51)

Offline

#2 2022-11-20 02:14:17

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: [SOLVED] Xorg config doesn't work if I don't use the NVIDIA driver

Not an answer to your main question, but both your configuration sections match your touchpad. Try adding

MatchIsTouchpad "off"

to the first one so X doesn't try to apply your mouse settings to your touchpad, too.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#3 2022-11-20 07:59:54

demoknight-tf2
Member
Registered: 2022-11-19
Posts: 2

Re: [SOLVED] Xorg config doesn't work if I don't use the NVIDIA driver

I figured it out -- apparently xorg runs privileged when I have NVIDIA enabled, and unprivileged when I don't.

So it was able to read the config file when I had NVIDIA enabled, and it wasn't when I didn't.

I fixed this by `chmod +r`-ing the `.conf` file, and this has fixed it.

Offline

Board footer

Powered by FluxBB