Package Details: ddcci-driver-linux-dkms 0.4.4-2

Git Clone URL: https://aur.archlinux.org/ddcci-driver-linux-dkms.git (read-only, click to copy)
Package Base: ddcci-driver-linux-dkms
Description: A pair of Linux kernel drivers for DDC/CI monitors (DKMS)
Upstream URL: https://gitlab.com/ddcci-driver-linux/ddcci-driver-linux/
Keywords: backlight hdmi monitor
Licenses: GPL2
Conflicts: ddcci-driver-linux
Submitter: irtimmer
Maintainer: ewout (Porous3247)
Last Packager: Porous3247
Votes: 39
Popularity: 1.66
First Submitted: 2017-04-15 18:51 (UTC)
Last Updated: 2023-09-03 13:11 (UTC)

Latest Comments

1 2 3 4 5 Next › Last »

LarryDave commented on 2024-03-26 19:16 (UTC)

@vighbox You could use ddcutil to set the brightness manualy, maybe bind the commands to a key.

https://wiki.archlinux.org/title/Backlight#External_monitors

LarryDave commented on 2024-03-26 19:14 (UTC)

I don't consider this important enough to downgrade. Just have to use the physical monitor buttons like plebs in the meantime. Updates on this package are very slow, we might wait for a very long time or it may never get fixed too.

vighbox commented on 2024-03-24 03:43 (UTC) (edited on 2024-03-24 03:58 (UTC) by vighbox)

@LarryDave I came here looking for a solution. I'm glad I found your post so I know it wasn't me.

(I tried to rebuild the dkms but failed)

So what do you think the best course of action? Downgrade Linux to the previous version?

EDIT: It looks like they are working on a solution https://gitlab.com/ddcci-driver-linux/ddcci-driver-linux/-/issues/39

LarryDave commented on 2024-03-21 15:20 (UTC)

Does not work anymore with kernel 6.8 as some stuff related to it was removed from the kernel. mkinitcpio also fails with this installed and I had to remove it.

GPereira commented on 2023-10-09 19:20 (UTC)

I am loading the ddcci module in mkinitcpio and the slider doesn't show up on GNOME. What do I need to do?

Andrei_Korshikov commented on 2023-06-10 10:26 (UTC)

@dxwil I upgraded the kernel to 6.3.6 and got the same behavior as you. My solution is to modprobe ddcci_backlight in 3 seconds after starting SDDM service (After=sddm.service and additional ExecStart=/usr/bin/sleep 3 before ExecStart=/usr/bin/modprobe ddcci_backlight).

Porous3247 commented on 2023-05-06 16:07 (UTC) (edited on 2023-05-07 00:34 (UTC) by Porous3247)

@UmarJ

Thanks for letting me know, I applied your changes.

Note that the patch does not work on kernel versions before 6.3. Sorry to anyone who can't get it working for kernels older than 6.3--I don't know how to make it work for everyone.

Edit: I updated to patch to use the LINUX_VERSION_CODE macro so that building now works on any kernel version

UmarJ commented on 2023-05-06 13:49 (UTC)

Apply this patch for compatibility with Linux 6.3 and above.

Source

diff --git a/ddcci/ddcci.c b/ddcci/ddcci.c
index ea76352..946574a 100644
--- a/ddcci/ddcci.c
+++ b/ddcci/ddcci.c
@@ -43,6 +43,7 @@ static DEFINE_SEMAPHORE(core_lock);

 struct bus_type ddcci_bus_type;
 EXPORT_SYMBOL_GPL(ddcci_bus_type);
+static bool ddcci_bus_registered;

 /* Assert neccessary string array sizes  */
 #ifndef sizeof_field
@@ -931,7 +932,7 @@ ATTRIBUTE_GROUPS(ddcci_char_device);

 /* DDC/CI bus */

-static int ddcci_device_uevent(struct device *dev, struct kobj_uevent_env *env)
+static int ddcci_device_uevent(const struct device *dev, struct kobj_uevent_env *env)
 {
    struct ddcci_device *device = to_ddcci_device(dev);
    char model[ARRAY_SIZE(device->model)];
@@ -1011,7 +1012,7 @@ static void ddcci_device_release(struct device *dev)
    kfree(device);
 }

-static char *ddcci_devnode(struct device *dev,
+static char *ddcci_devnode(const struct device *dev,
             umode_t *mode, kuid_t *uid, kgid_t *gid)
 {
    struct ddcci_device *device;
@@ -1021,7 +1022,7 @@ static char *ddcci_devnode(struct device *dev,
             device->i2c_client->adapter->nr);
 }

-static char *ddcci_dependent_devnode(struct device *dev,
+static char *ddcci_dependent_devnode(const struct device *dev,
             umode_t *mode, kuid_t *uid, kgid_t *gid)
 {
    struct ddcci_device *device;
@@ -1100,7 +1101,7 @@ int ddcci_register_driver(struct module *owner, struct ddcci_driver *driver)
    int ret;

    /* Can't register until after driver model init */
-   if (unlikely(WARN_ON(!ddcci_bus_type.p)))
+   if (unlikely(WARN_ON(!ddcci_bus_registered)))
        return -EAGAIN;

    pr_debug("registering driver [%s]\n", driver->driver.name);
@@ -1672,8 +1673,9 @@ static int ddcci_detect(struct i2c_client *client, struct i2c_board_info *info)
 }

 /* I2C probe function */
-static int ddcci_probe(struct i2c_client *client, const struct i2c_device_id *id)
+static int ddcci_probe(struct i2c_client *client)
 {
+   const struct i2c_device_id *id = i2c_client_get_device_id(client);
    int i, ret = -ENODEV, tmp;
    unsigned char main_addr, addr;
    struct ddcci_bus_drv_data *drv_data;
@@ -1849,6 +1851,7 @@ static int __init ddcci_module_init(void)
        pr_err("failed to register bus 'ddcci'\n");
        goto err_busreg;
    }
+   ddcci_bus_registered = true;

    /* Register I2C driver */
    ret = i2c_add_driver(&ddcci_driver);
diff --git a/PKGBUILD b/PKGBUILD
index 9297d2b..e544baa 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -13,8 +13,15 @@ depends=('dkms')
 conflicts=("ddcci-driver-linux")
 source=(
   "https://gitlab.com/ddcci-driver-linux/ddcci-driver-linux/-/archive/v${pkgver}/ddcci-driver-linux-v${pkgver}.tar.gz"
+  "linux-6.3-rc2.patch"
 )
-b2sums=('71f855b8d7e4b9a1b5d38a73d4a6df7453e72600596121f68c6782f180211bd935ab30cf0cf94cc0528e8d5f732449d35b24cd9584d17083318d819b81a0b259')
+b2sums=('71f855b8d7e4b9a1b5d38a73d4a6df7453e72600596121f68c6782f180211bd935ab30cf0cf94cc0528e8d5f732449d35b24cd9584d17083318d819b81a0b259'
+        '77a9e85879d988bbc411c9238e59daa45d88c44330cfe1fc79897e1b6251881ade01f2d54951080dce9ba2c6e9371322e73ee8fc5da8bea8f5bf6e818f428a5f')
+
+prepare() {
+  cd "${srcdir}/ddcci-driver-linux-v${pkgver}"
+  patch --strip=1 --input="${srcdir}/linux-6.3-rc2.patch"
+}

 package() {
   local destdir="${pkgdir}/usr/src/ddcci-${pkgver}"

joshtau commented on 2023-04-02 11:12 (UTC) (edited on 2023-04-02 11:12 (UTC) by joshtau)

Yeah, I have to modprobe when my desktop env starts.

I have a super hacky script I whipped up in 30s, which is (note 6 is my monitor ID):

if [[ $(brightnessctl -d ddcci6) == "Device 'ddcci6' not found" ]]; then
    sudo modprobe ddcci
    sudo modprobe dcci_backlight
    echo 'ddcci 0x37' | sudo tee /sys/bus/i2c/devices/i2c-6/new_device
elif [ ! -d "/dev/bus/ddcci/6" ]; then
    sudo modprobe ddcci
    sudo modprobe dcci_backlight
    echo 'ddcci 0x37' | sudo tee /sys/bus/i2c/devices/i2c-6/new_device
else
    echo "Monitor brightness is already loaded."
    sudo dmesg | rg ddcci
fi

I have this in my labwc autostart file. If I wasn't lazy, or was using sway, I would have a systemd service which would listen for when the DE started.

dxwil commented on 2023-04-01 10:29 (UTC)

@Andrei_Korshikov I tried using your systemd file but it still did not work, dmesg returned this:

[ 26.153345] ddcci 4-0037: core device [6e] probe failed: -19 [ 26.153362] i2c i2c-4: new_device: Instantiated device ddcci at 0x37

Only modprobing ddcci when the desktop is loaded works for me so far