1. 04 May, 2021 1 commit
  2. 30 Apr, 2021 2 commits
    • Jonas Ådahl's avatar
      backend/native: Add udev rule to ignore vkms devices · 8989c42d
      Jonas Ådahl authored
      Virtual Kernel Mode Setting (vkms) is a virtual /dev/dri/card* device
      not backed by any actual hardware. It's intended for testing purposes,
      e.g. to run tests suites with a reproducable setup, or in continuous
      integration pipelines.
      Currently mutter don't have any tests that can run on top of vkms, but
      will eventually get that. To prepare for the ability to do that, and
      having said kernel module loaded without causing wierd issues with any
      active session, add an udev rule that tells mutter to ignore any vkms
      Otherwise, when vkms is loaded, mutter would detect it, assume it's a
      regular monitor, configure it as such, thus add a region of the stage
      that ends up nowhere, which isn't very helpful. It might also conflict
      with running actual tests that need to interact with vkms if the active
      session has taken control of it.
      Part-of: <!1740>
    • Jonas Ådahl's avatar
      udev: Move device tag detection into helper · 4af0f056
      Jonas Ådahl authored
      Part-of: <!1740>
  3. 29 Apr, 2021 1 commit
  4. 14 Apr, 2021 1 commit
    • Jonas Ådahl's avatar
      backend/native: Only disable KMS modifiers for i915 · da3baba9
      Jonas Ådahl authored
      The intel DRM driver is known for not being able to handle multi head
      setups when KMS modifiers are enabled, due to the implicitly selected
      modifiers, while being more suitable for single head setups, cause
      bandwidth issues when a certain number of monitor times resolution and
      refresh rate is configured.
      We don't yet support automatically finding a combination of modifiers
      that work, and have because of this disabled KMS modifiers unless the
      driver actually needs it.
      Lets flip this configuration the other way around, changing the current
      udev rule to decide wen to *disable* KMS modifier support, as it so that
      only the Intel driver has this problem, while on the other hand, there
      several drivers that requires modifiers to function at all.
      Part-of: <!1792>
  5. 23 Feb, 2021 2 commits
    • Jonas Ådahl's avatar
      virtual-input-device/native: Emit added/removed events · 671bda25
      Jonas Ådahl authored
      Without these devices, things that depend on the existance of input
      device classes won't know about the existance of e.g. pointer devices,
      if the only pointer device is from a virtual one.
      This requires handling situations where e.g. a device doesn't have a
      device node thus can't be matched against a udev device.
      Part-of: <!1688>
    • Jonas Ådahl's avatar
      seat-impl: Dispatch source also when there are already queued events · e6b70f1a
      Jonas Ådahl authored
      Libinput will queue a few initial events when a seat is assigned to the
      udev backend; a result of it probing udev adding detected devices. For
      us to see these events, we need to dispatch libinput before going idle,
      as nothing will show up on the libinput file descriptor until something
      else (e.g. keyboard event or mouse movement) wakes us up.
      Do this by adding a prepare() function to the libinput GSource, that
      checks whether there are any events in the queue already, and return
      TRUE if so is the case, causing us to dispatch before going fully idle.
      Part-of: <!1688>
  6. 28 Jan, 2021 2 commits
  7. 16 Dec, 2020 1 commit
  8. 16 Nov, 2020 1 commit
    • Jonas Ådahl's avatar
      renderer/native: Add udev rule to select primary GPU · d6229604
      Jonas Ådahl authored
      Sometimes the automatically selected primary GPU isn't suitable with no
      way to make an well educated guess to do it better. To make it possible
      for the user to override the automatically calculated default, make it
      possible to override it using a udev rule.
      E.g. to select /dev/dri/card1 as the primary GPU, add a file e.g.
      /usr/lib/udev/rules.d/61-mutter-primary-gpu.rules (path my vary
      depending on distribution) containing the fellowing line:
      ENV{DEVNAME}=="/dev/dri/card1", TAG+="mutter-device-preferred-primary"
      Reboot or manual triggering of udev rules to make it take effect may be
      Related: !1057
      Part-of: <!1562>
  9. 28 Sep, 2020 1 commit
  10. 15 Mar, 2020 1 commit
  11. 26 Feb, 2020 1 commit
    • Carlos Garnacho's avatar
      backends/native: Shuffle udev client initialization in MetaSeatNative · 88bb24f6
      Carlos Garnacho authored
      This may be used indirectly before creation as we dispatch libinput events
      right after creation (to let input devices be known), so those device
      additions would trigger the touch-mode checks.
      Creating it in advance results in checks being correctly performed, although
      Spotted by Bastien Nocera.
      Closes: #1067
  12. 15 Aug, 2019 3 commits
    • Hans de Goede's avatar
      kms: Deal with GPUs being unplugged · f3660dc6
      Hans de Goede authored
      Add meta-kms and meta-monitor-manager-kms listener for the udev
      device-removed signal and on this signal update the device state /
      re-enumerate the monitors, so that the monitors properly get updated
      to disconnected state on GPU removal.
      We really should also have meta-backend-native remove the GPU itself
      from our list of GPU objects. But that is more involved, see:
      This commit at least gets us to a point where we properly update the
      list of monitors when a GPU gets unplugged; and where we no longer
      crash the first time the user changes the monitor configuration after
      a GPU was unplugged.
      Specifically before this commit we would hit the first g_error () in
      meta_renderer_native_create_view () as soon as some monitor
      (re)configuration is done after a GPU was unplugged.
    • Hans de Goede's avatar
      udev: Add device-removed signal · 6792903c
      Hans de Goede authored
      Add a device-removed signal which gets emitted when a GPU is removed.
    • Hans de Goede's avatar
      udev: Fix wrong closure function usage for the "device-added" signal · 17c21784
      Hans de Goede authored
      The "device-added" signal should use g_cclosure_marshal_VOID__OBJECT not
      Instead of fixing this manually, simply replace the closure function for
      both signals with NULL, glib will then automatically set the correct
  13. 20 Jun, 2019 4 commits
  14. 25 Mar, 2019 2 commits
    • Carlos Garnacho's avatar
      clutter: Drop no longer necessary API · 47663c7e
      Carlos Garnacho authored
      clutter_input_device_get_physical_size was just used for device mapping
      heuristics in MetaInputMapper. It now started using the info from udev
      on for both backends, so this means this clutter API is no longer
    • Carlos Garnacho's avatar
      backends: Use udev to determine absolute input devices' size · 9843e21f
      Carlos Garnacho authored
      Use the ID_INPUT_WIDTH_MM/ID_INPUT_HEIGHT_MM udev properties to figure out
      absolute input devices' physical size. This works across both backends, and
      requires less moving pieces to have it get the right results.
      Concretely, fixes size detection on X11/libinput, which makes touchscreen
      mapping go wrong.
  15. 22 Jan, 2019 1 commit
  16. 29 Nov, 2018 1 commit
    • Jonas Ådahl's avatar
      backend/x11/nested: Always claim the lid is open · c8db8bbe
      Jonas Ådahl authored
      The nested backend used the value from udev, meaning that one couldn't
      configure the fake monitor if the laptop panel of the host was closed.
      Avoid this annoyance by always having the nested backend claiming the
      lid is open.
  17. 06 Nov, 2018 2 commits
    • Georges Basile Stavracas Neto's avatar
      gudev: Require 232 · d3dc7d6f
      Georges Basile Stavracas Neto authored
      gudev and libudev might have different versions, and
      since 361bf847 we require gudev >= 232 to be able to
      use g_autoptr with gudev types.
      Since the previous commit, however, the meson build
      was using the same version for libudev and gudev.
      Fix that by requiring different versions for gudev
      (>= 232) and libudev (>= 228).
    • Georges Basile Stavracas Neto's avatar
      build: Make minimum udev version as 228 · b607d35a
      Georges Basile Stavracas Neto authored
      Continuous' latest udev version is 228, and that is
      not going to change too soon. Since we do not depend
      on udev 232 specific features or bugfixes, just lower
      the minimum version and make Continouos happy.
  18. 19 Sep, 2018 1 commit
    • Tony Novak's avatar
      input-settings: detect trackball using udev ID_INPUT_TRACKBALL · 8685de96
      Tony Novak authored
      Previously, trackballs were detected based on the presence of the
      substring "trackball" in the device name. This had the downside of
      missing devices, such as the Kensington Expert Mouse, which don't have
      "trackball" in their names.
      Rather than depending on the device name, use the ID_INPUT_TRACKBALL
      property from udev to determine whether or not to treat a device as a
      This adds a new function, `is_trackball_device`, to MetaInputEvents, and
      eliminates the `meta_input_device_is_trackball` function.
      Fixes: #258
  19. 01 Sep, 2017 1 commit
  20. 19 Oct, 2016 2 commits
  21. 28 Jul, 2016 1 commit
    • Jonas Ådahl's avatar
      settings: Support mouse and trackball accel profile · 23c4ac6c
      Jonas Ådahl authored
      Support changing the mouse and trackball acceleration profile. This
      makes it possible to for example disable pointer acceleration by
      choosing the 'flat' profile.
      This adds an optional dependency on gudev. Gudev is used by the X11
      backend to detect whether a device is a mouse or not. Without gudev
      support, the accel profile settings has have effect for mouse devices.
      Trackball still uses the "strstr" approach, since udev doesn't support
      tagging devices as trackball devices yet.
  22. 02 Mar, 2015 1 commit
  23. 14 Oct, 2014 1 commit
  24. 12 Apr, 2011 1 commit
  25. 30 Nov, 2010 4 commits
    • Damien Lespiau's avatar
      evdev: Close the device gracefully in case of a read() error · 7cd6ba28
      Damien Lespiau authored
      Even with udev, the read fails before udev has a chance to signal the
      change. Hence (and to handle errors gracefully anyway), let's remove the
      device from the device manager in case of a read() error.
    • Damien Lespiau's avatar
      evdev: Merge clutter-event-evdev.[ch] into the device manager · afd279dd
      Damien Lespiau authored
      The device manager now fully owns the GSources corresponding to the
      devices it manages. This will allow not only to remove the source when
      udev signals a device removal but also handle read() errors gracefully
      by removing the faulty device from the manager.
    • Damien Lespiau's avatar
      evdev: Support hotplug (addition/removal) of evdev devices · afee3b00
      Damien Lespiau authored
      Just connect to the GUdevClient "uevent" signal and deals with
      "add"/"remove" commands. This drives the installation/removal of
      GSource to listen to the device.
    • Damien Lespiau's avatar
      evdev: First stab at an evdev backend · c6493885
      Damien Lespiau authored
      This backend is a event backend that can be enabled for EGL (for now).
      It uses udev (gudev) to query input devices on a linux system, listens to
      keyboard events from input devices and xkbcommon to translate raw key
      codes into key keysyms.
      This commit only supports key events, more to follow.