Dapper Flight4: detected HW component string erroneosly used

Bug #34536 reported by Erik de Bruijn
8
Affects Status Importance Assigned to Milestone
acpi-support (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

when I add a "set -x" to sleep.sh, I find that dmidecode finds my system to be an acer system, but it uses a string with a lot of spaces in a command after detection:

Manually running the problematic command here gives me the following:
# echo foo--`sudo dmidecode --string system-manufacturer`--bar
foo--Acer --bar
(the foo--*--bar is to show spaces, there is once space after Acer)

It will not match with either of the related config files in /usr/share/acpi-support/Acer\,\ inc..config:
Acer.config
Acer, inc..config

I'm not sure wether it would match '/usr/share/acpi-support/Acer .config' or '/usr/share/acpi-support/Acer .config'

Here is the full output of sleep.sh:

erik@acerik:~$ sudo /etc/acpi/sleep.sh
+ . /etc/default/acpi-support
++ ACPI_HIBERNATE=true
++ ACPI_SLEEP_MODE=mem
++ MODULES=
++ MODULES_WHITELIST=
++ SAVE_VBE_STATE=true
++ VBESTATE=/var/lib/acpi-support/vbestate
++ POST_VIDEO=true
++ USE_DPMS=true
++ HIBERNATE_MODE=shutdown
++ LOCK_SCREEN=true
++ STOP_SERVICES='mysql '
++ RESTART_IRDA=false
++ ENABLE_LAPTOP_MODE=true
+ . /usr/share/acpi-support/power-funcs
++ umask 022
++ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin:/usr/bin/X11
++ POWERSTATE=/var/lib/acpi-support/powerstate
++ LAPTOP_MODE=/usr/sbin/laptop_mode
++ HDPARM='/sbin/hdparm -q'
++ LIDSTATE=/var/lib/acpi-support/lidstate
+ . /usr/share/acpi-support/device-funcs
+ . /usr/share/acpi-support/policy-funcs
+ DeviceConfig
++ dmidecode --string system-manufacturer
+ manufacturer='Acer '
++ dmidecode --string system-product-name
+ model='TravelMate 4650 '
++ dmidecode --string system-version
+ version=' '
+ '[' -f '/usr/share/acpi-support/Acer .config' ']'
+ '[' x '!=' xtrue ']'
+ '[' x '!=' xforce ']'
+ exit
EOF

My suggestion is to 'trim' spaces from the detected strings.

Please tell me if I can report bugs more effectively. I haven't done it often (enough)...

Revision history for this message
Paul Sladen (sladen) wrote :

Hello Erik,

Could you test the following package and see if that fixes things for you:
  http://www.paul.sladen.org/ubuntu/upload/acpi-support_0.59trailingspaces1_i386.deb

this adds:

  sed -e 's/ *$//'

after each of the 'dmidecode' fetches.

Changed in acpi-support:
status: Unconfirmed → In Progress
Matthew Garrett (mjg59)
Changed in acpi-support:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.