Re: Patches for better detecting i915 driver

2009-05-27 Thread Martin Pitt
Hello Martin,

Martin Bammer [2009-03-08 13:26 +0100]:
> I'm running easypeasy 1.0 with kernel 2.6.27.18. Some hal-scripts for
> suspend/hibernate do not detect correctly the i915, because module entry
> is missing in /sys. The patches make the scripts more robust. They
> additionally use /proc for detection.

This patch does not apply to current hal, the functionality moved to
pm-utils (/usr/lib/pm-utils/sleep.d/98smart-kernel-video). Can you
please file a bug against pm-utils upstream?

  https://bugs.freedesktop.org/buglist.cgi?quicksearch=pm-utils

Thanks,

Martin
-- 
Martin Pitt| http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Patches for better detecting i915 driver

2009-03-13 Thread Martin Bammer
I'm running easypeasy 1.0 with kernel 2.6.27.18. Some hal-scripts for
suspend/hibernate do not detect correctly the i915, because module entry
is missing in /sys. The patches make the scripts more robust. They
additionally use /proc for detection.

--- a/usr/lib/hal/scripts/linux/hal-system-power-hibernate-linux	2009-03-08 13:19:25.088879950 +0100
+++ b/usr/lib/hal/scripts/linux/hal-system-power-hibernate-linux	2009-03-08 13:18:14.0 +0100
@@ -9,7 +9,7 @@ unsupported() {
 # on some video drivers we must ignore video quirks, since they break
 # on them; this particularly affects Intel >= 915G and the proprietary
 # nvidia and fglrx drivers.
-if [ -d /sys/module/i915 ]; then
+if [ -d /sys/module/i915 ] || [ "x`cat /proc/dri/0/name | grep i915`" != "x" ]; then
 # the i915 kmod also drives the i830/i845/i855/i865 chips nowadays, but
 # they still need quirks on at least Linux 2.6.24.
 PRODID=`hal-get-property --udi $HAL_PROP_INFO_UDI --key system.hardware.primary_video.product`
--- a/usr/lib/hal/scripts/linux/hal-system-power-suspend-hybrid-linux	2009-03-08 13:19:35.683849842 +0100
+++ b/usr/lib/hal/scripts/linux/hal-system-power-suspend-hybrid-linux	2009-03-08 13:17:51.0 +0100
@@ -17,7 +17,7 @@ read seconds_to_sleep
 # on some video drivers we must ignore video quirks, since they break
 # on them; this particularly affects Intel >= 915G and the proprietary
 # nvidia and fglrx drivers.
-if [ -d /sys/module/i915 ]; then
+if [ -d /sys/module/i915 ] || [ "x`cat /proc/dri/0/name | grep i915`" != "x" ]; then
 # the i915 kmod also drives the i830 and i855 chips nowadays, but they
 # still need quirks on at least Linux 2.6.24.
 PRODID=`hal-get-property --udi $HAL_PROP_INFO_UDI --key system.hardware.primary_video.product`
--- a/usr/lib/hal/scripts/linux/hal-system-power-suspend-linux	2009-03-06 09:23:53.0 +0100
+++ b/usr/lib/hal/scripts/linux/hal-system-power-suspend-linux	2009-03-06 09:22:59.0 +0100
@@ -17,7 +17,7 @@ read seconds_to_sleep
 # on some video drivers we must ignore video quirks, since they break
 # on them; this particularly affects Intel >= 915G and the proprietary
 # nvidia and fglrx drivers.
-if [ -d /sys/module/i915 ]; then
+if [ -d /sys/module/i915 ] || [ "x`cat /proc/dri/0/name | grep i915`" != "x" ]; then
 # the i915 kmod also drives the i830 and i855 chips nowadays, but they
 # still need quirks on at least Linux 2.6.24.
 PRODID=`hal-get-property --udi $HAL_PROP_INFO_UDI --key system.hardware.primary_video.product`
-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss