Solved Mouse not working in Xorg (Hyper-V)

Hello,

I have migrated a Gen1 (BIOS/MBR) freebsd 14 VM on Hyper-V to Gen2 (UEFI/GPT).
From what I understand the mouse is supposed to be working (merged in 13.3.3 - https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221074 / https://reviews.freebsd.org/rG21f4e817fde79d5de79bfbdf180d358ca5f48bf9), but it does not.

Xorg seems to detect it though:

1713192796941.png


Any idea on what might be going wrong and how to fix it?
 
As I can understand you are showing just a part of the log file, could you show all of it? Output of dmesg would be useful too.
 
Yes. Same for the rest of this log. No error. But the mouse pointer is stuck in the center of the screen and does not move.

I will check dmesg to see if anything's wrong there.

Also I did set kerv.evdev.rcpt_mask=6 in /etc/sysctl.conf.
 
Here's the dmesg:
Code:
---<<BOOT>>---
Copyright (c) 1992-2023 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 14.0-STABLE #0 stable/14-n267195-d4d5aed66a3f-dirty: Sat Apr 13 15:35:45 CEST 2024
    root@inferno:/usr/obj/usr/src/amd64.amd64/sys/HVFB amd64
FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)
SRAT: Ignoring memory at addr 0x108000000
SRAT: Ignoring memory at addr 0x1000000000
SRAT: Ignoring memory at addr 0x10000000000
SRAT: Ignoring memory at addr 0x20000000000
SRAT: Ignoring memory at addr 0x40000000000
SRAT: Ignoring memory at addr 0x80000000000
SRAT: Ignoring memory at addr 0x100000000000
SRAT: Ignoring memory at addr 0x200000000000
SRAT: Ignoring memory at addr 0x400000000000
SRAT: Ignoring memory at addr 0x800000000000
SRAT: Ignoring memory at addr 0x1000000000000
SRAT: Ignoring memory at addr 0x2000000000000
SRAT: Ignoring memory at addr 0x4000000000000
SRAT: Ignoring memory at addr 0x8000000000000
VT(efifb): resolution 1024x768
Hyper-V Version: 10.0.22621 [SP3]
  Features=0xae7f<VPRUNTIME,TMREFCNT,SYNIC,SYNTM,APIC,HYPERCALL,VPINDEX,REFTSC,IDLE,TMFREQ>
  PM Features=0x20 [C2]
  Features3=0xe0bed7b2<DEBUG,XMMHC,IDLE,NUMA,TMFREQ,SYNCMC,CRASH,NPIEP>
Timecounter "Hyper-V" frequency 10000000 Hz quality 2000
CPU: AMD Ryzen 7 PRO 7840U w/ Radeon 780M Graphics   (3293.60-MHz K8-class CPU)
  Origin="AuthenticAMD"  Id=0xa70f41  Family=0x19  Model=0x74  Stepping=1
  Features=0x1783fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE,SSE2,HTT>
  Features2=0xfed83203<SSE3,PCLMULQDQ,SSSE3,FMA,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND,HV>
  AMD Features=0x2e500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM>
  AMD Features2=0x4003f3<LAHF,CMP,CR8,ABM,SSE4A,MAS,Prefetch,OSVW,Topology>
  Structured Extended Features=0xf1bf07a9<FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,AVX512F,AVX512DQ,RDSEED,ADX,SMAP,AVX512IFMA,CLFLUSHOPT,CLWB,AVX512CD,SHA,AVX512BW,AVX512VL>
  Structured Extended Features2=0x405fc6<AVX512VBMI,UMIP,AVX512VBMI2,GFNI,VAES,VPCLMULQDQ,AVX512VNNI,AVX512BITALG,AVX512VPOPCNTDQ,RDPID>
  XSAVE Features=0xf<XSAVEOPT,XSAVEC,XINUSE,XSAVES>
  AMD Extended Feature Extensions ID EBX=0x3100d015<CLZERO,XSaveErPtr,RDPRU,IBPB,IBRS,STIBP,SSBD>
Hypervisor: Origin = "Microsoft Hv"
real memory  = 4294967296 (4096 MB)
avail memory = 4129509376 (3938 MB)
Event timer "LAPIC" quality 100
ACPI APIC Table: <VRTUAL MICROSFT>
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
FreeBSD/SMP: 1 package(s) x 4 core(s) x 2 hardware threads
random: registering fast source Intel Secure Key RNG
random: fast provider: "Intel Secure Key RNG"
random: unblocking device.
ioapic0 <Version 1.1> irqs 0-23
Launching APs: 3 1 2 5 4 6 7
random: entropy device external interface
Timecounter "Hyper-V-TSC" frequency 10000000 Hz quality 3000
...skipping...
Launching APs: 3 1 2 5 4 6 7
random: entropy device external interface
Timecounter "Hyper-V-TSC" frequency 10000000 Hz quality 3000
kbd0 at kbdmux0
efirtc0: <EFI Realtime Clock>
efirtc0: registered as a time-of-day clock, resolution 1.000000s
smbios0: <System Management BIOS> at iomem 0xf7fd8000-0xf7fd801e
smbios0: Version: 3.1, BCD Revision: 3.1
aesni0: <AES-CBC,AES-CCM,AES-GCM,AES-ICM,AES-XTS,SHA1,SHA256>
acpi0: <VRTUAL MICROSFT>
atrtc0: <AT realtime clock> port 0x70-0x71 irq 8 on acpi0
atrtc0: registered as a time-of-day clock, resolution 1.000000s
Event timer "RTC" frequency 32768 Hz quality 0
Timecounter "ACPI-fast" frequency 3579545 Hz quality 900
acpi_timer0: <32-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0
cpu0: <ACPI CPU> on acpi0
acpi_syscontainer0: <System Container> on acpi0
vmbus0: <Hyper-V Vmbus> on acpi_syscontainer0
vmgenc0: <VM Generation Counter> on acpi0
vmbus_res0: <Hyper-V Vmbus Resource> irq 5 on acpi0
battery0: <ACPI Control Method Battery> on acpi0
acpi_acad0: <AC Adapter> on acpi0
Timecounters tick every 10.000 msec
usb_needs_explore_all: no devclass
vmbus0: version 4.0
hvet0: <Hyper-V event timer> on vmbus0
Event timer "Hyper-V" frequency 10000000 Hz quality 1000
hvhid0: <Hyper-V HID device> on vmbus0
hvkbd0: <Hyper-V KBD> on vmbus0
kbd1 at hvkbd0
hvfb0: <Hyper-V framebuffer device> on vmbus0
hvfb0: version 3.5
hvfb0: supported resolutions:
hvfb0:   (* 0) 1920x1080
VT: Replacing driver "efifb" with new "fb".
hvheartbeat0: <Hyper-V Heartbeat> on vmbus0
hvkvp0: <Hyper-V KVP> on vmbus0
hvshutdown0: <Hyper-V Shutdown> on vmbus0
hvtimesync0: <Hyper-V Timesync> on vmbus0
hvtimesync0: RTT
hvvss0: <Hyper-V VSS> on vmbus0
storvsc0: <Hyper-V SCSI> on vmbus0
hn0: <Hyper-V Network Interface> on vmbus0
hn0: Ethernet address: 00:15:5d:00:16:09
hn0: link state changed to UP
cd0 at storvsc0 bus 0 scbus0 target 0 lun 1
cd0: <Msft Virtual DVD-ROM 1.0> Removable CD-ROM SPC-3 SCSI device
cd0: 300.000MB/s transfers
cd0: Attempt to query device size failed: NOT READY, Medium not present - tray closed
da0 at storvsc0 bus 0 scbus0 target 0 lun 0
da0: <Msft Virtual Disk 1.0> Fixed Direct Access SPC-3 SCSI device
da0: 300.000MB/s transfers
da0: Command Queueing enabled
da0: 40960MB (83886080 512 byte sectors)
Trying to mount root from ufs:/dev/da0p3 [rw]...
lo0: link state changed to UP
and /var/log/Xorg.0.log
Code:
$ less /var/log/Xorg.0.log
[   108.564]
X.Org X Server 1.21.1.11
X Protocol Version 11, Revision 0
[   108.564] Current Operating System: FreeBSD inferno 14.0-STABLE FreeBSD 14.0-STABLE #0 stable/14-n267195-d4d5aed66a3f-dirty: Sat Apr 13 15:35:45 CEST 2024     root@inferno:/usr/obj/usr/src/amd64.amd64/sys/HVFB amd64
[   108.564]
[   108.564] Current version of pixman: 0.42.2
[   108.564]    Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[   108.564] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   108.564] (==) Log file: "/var/log/Xorg.0.log", Time: Mon Apr 15 16:40:09 2024
[   108.564] (==) Using config file: "/usr/local/etc/X11/xorg.conf"
[   108.564] (==) Using config directory: "/usr/local/etc/X11/xorg.conf.d"
[   108.564] (==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
[   108.564] (==) ServerLayout "X.org Configured"
[   108.564] (**) |-->Screen "Screen0" (0)
[   108.564] (**) |   |-->Monitor "<default monitor>"
[   108.564] (**) |   |-->Device "Card0"
[   108.564] (==) No monitor specified for screen "Screen0".
        Using a default monitor configuration.
[   108.564] (**) |-->Input Device "Mouse0"
[   108.564] (**) |-->Input Device "Keyboard0"
[   108.564] (**) Option "DontZap" "false"
[   108.564] (==) Automatically adding devices
[   108.564] (==) Automatically enabling devices
[   108.564] (==) Automatically adding GPU devices
[   108.564] (==) Automatically binding GPU devices
[   108.564] (==) Max clients allowed: 256, resource mask: 0x1fffff
[   108.564] (**) FontPath set to:
        /usr/local/share/fonts/misc/,
        /usr/local/share/fonts/TTF/,
        /usr/local/share/fonts/OTF/,
        /usr/local/share/fonts/Type1/,
        /usr/local/share/fonts/100dpi/,
        /usr/local/share/fonts/75dpi/,
        catalogue:/usr/local/etc/X11/fontpath.d,
        /usr/local/share/fonts/misc/,
        /usr/local/share/fonts/TTF/,
        /usr/local/share/fonts/OTF/,
        /usr/local/share/fonts/Type1/,
        /usr/local/share/fonts/100dpi/,
        /usr/local/share/fonts/75dpi/,
        catalogue:/usr/local/etc/X11/fontpath.d
[   108.564] (**) ModulePath set to "/usr/local/lib/xorg/modules"
[   108.564] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
[   108.564] (WW) Disabling Mouse0
[   108.564] (WW) Disabling Keyboard0
[   108.564] (II) Module ABI versions:
[   108.564]    X.Org ANSI C Emulation: 0.4
[   108.564]    X.Org Video Driver: 25.2
[   108.564]    X.Org XInput driver : 24.4
[   108.564]    X.Org Server Extension : 10.0
...skipping...
id 6)
[   108.734] (**) Option "xkb_rules" "evdev"
[   108.734] (**) Option "xkb_options" "terminate:ctrl_alt_bksp"
[   108.774] (II) event0  - System keyboard multiplexer: is tagged by udev as: Keyboard
[   108.774] (II) event0  - System keyboard multiplexer: device is a keyboard
[   108.774] (II) config/udev: Adding input device System mouse (/dev/input/event1)
[   108.774] (**) System mouse: Applying InputClass "libinput pointer catchall"
[   108.774] (II) Using input driver 'libinput' for 'System mouse'
[   108.774] (**) System mouse: always reports core events
[   108.774] (**) Option "Device" "/dev/input/event1"
[   108.784] (II) event1  - System mouse: is tagged by udev as: Mouse
[   108.784] (II) event1  - System mouse: device is a pointer
[   108.784] (II) event1  - System mouse: device removed
[   108.784] (II) libinput: System mouse: Step value 0 was provided, libinput Fallback acceleration function is used.
[   108.784] (II) libinput: System mouse: Step value 0 was provided, libinput Fallback acceleration function is used.
[   108.784] (II) libinput: System mouse: Step value 0 was provided, libinput Fallback acceleration function is used.
[   108.784] (**) Option "config_info" "udev:/dev/input/event1"
[   108.784] (II) XINPUT: Adding extended input device "System mouse" (type: MOUSE, id 7)
[   108.784] (**) Option "AccelerationScheme" "none"
[   108.784] (**) System mouse: (accel) selected scheme none/0
[   108.784] (**) System mouse: (accel) acceleration factor: 2.000
[   108.784] (**) System mouse: (accel) acceleration threshold: 4
[   108.784] (II) event1  - System mouse: is tagged by udev as: Mouse
[   108.784] (II) event1  - System mouse: device is a pointer
[   108.794] (II) config/udev: Adding input device Hyper-V keyboard (/dev/input/event2)
[   108.794] (**) Hyper-V keyboard: Applying InputClass "Evdev keyboard"
[   108.794] (**) Hyper-V keyboard: Applying InputClass "libinput keyboard catchall"
[   108.794] (**) Hyper-V keyboard: Applying InputClass "Keyboard Defaults"
[   108.794] (II) Using input driver 'libinput' for 'Hyper-V keyboard'
[   108.794] (**) Hyper-V keyboard: always reports core events
[   108.794] (**) Option "Device" "/dev/input/event2"
[   108.794] (II) event2  - Hyper-V keyboard: is tagged by udev as: Keyboard
[   108.794] (II) event2  - Hyper-V keyboard: device is a keyboard
[   108.794] (II) event2  - Hyper-V keyboard: device removed
[   108.794] (**) Option "config_info" "udev:/dev/input/event2"
[   108.794] (II) XINPUT: Adding extended input device "Hyper-V keyboard" (type: KEYBOARD, id 8)
[   108.794] (**) Option "xkb_rules" "evdev"
[   108.794] (**) Option "xkb_options" "terminate:ctrl_alt_bksp"
[   108.794] (II) event2  - Hyper-V keyboard: is tagged by udev as: Keyboard
[   108.794] (II) event2  - Hyper-V keyboard: device is a keyboard
[   108.804] scfb: SaveScreen 0
[   108.804] scfb: SaveScreen done
[   187.734] (II) event0  - System keyboard multiplexer: device removed
[   187.734] (II) event1  - System mouse: device removed
[   187.734] (II) event2  - Hyper-V keyboard: device removed
[   187.734] (II) UnloadModule: "libinput"
[   187.734] (II) UnloadModule: "libinput"
[   187.734] (II) UnloadModule: "libinput"
[   187.734] scfb: ScfbCloseScreen 0
[   187.734] scfb: ScfbRestore 0
[   187.734] scfb: ScfbRestore done
[   187.734] scfb: ScfbCloseScreen done
[   187.744] (II) Server terminated successfully (0). Closing log file.

Here is the the output of libinput list-devices:
Code:
Device:           System keyboard multiplexer
Kernel:           /dev/input/event0
Group:            1
Seat:             seat0, default
Capabilities:     keyboard
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   n/a
Rotation:         0.0

Device:           System mouse
Kernel:           /dev/input/event1
Group:            2
Seat:             seat0, default
Capabilities:     pointer
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      disabled
Nat.scrolling:    disabled
Middle emulation: disabled
Calibration:      n/a
Scroll methods:   button
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   flat *adaptive custom
Rotation:         0.0

Device:           Hyper-V keyboard
Kernel:           /dev/input/event2
Group:            3
Seat:             seat0, default
Capabilities:     keyboard
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   n/a
Rotation:         0.0
 
Everything looks ok... Maybe you can try adjust Hyper-V setting for the mouse/input. The only thing I noticed from Xorg log is that you have custom xkb_options terminate:ctrl_alt_bcksp, can you try with the default xorg.conf with no modifications?
 
Try to install port "utouch-kmod". It is needed to fix the mouse movements. I got the information to add the kernel module to /boot/loader.conf by installing the port. I didn't get any information when I have installed the package.
 
Back
Top