Code review comment for lp:~jgonzalezdr/cairo-dock-plug-ins/suspend-workaround-applet

Jesús González (jgonzalezdr) wrote :

Maybe the applet could be modified to an always activated applet (non-stoppable, I think that this can be easily done by just not declaring a stop function, isn't it?) that checks on initialization whether the graphics card is affected, and just does nothing if not needed.

This way, the applet would remain out of the core, and could be excluded from compilation.

Detecting an nvidia card could be done in many ways:
  * Querying the X server if the NV-CONTROL extension is present by using XQueryExtension() /
    XNVCTRLQueryExtension()
  * Checking if /sys/module/nvidia/ exists (the actual driver version could be also checked)
  * Checking if /proc/modules reports the nvidia kernel module being used (but that output's format
    depends on the kernel version, so it's not a very good idea)
  * A combination of the above methods.

Anyway, checking the reports about this bug, it seems that not all nvidia cards are affected (using propietary drivers, that is), and that there might be other cards affected too (maybe some Intels?), therefore an option to force the workaround activation could be useful.

I'll try to modify the applet to do this in the next days.

« Back to merge proposal