You are not logged in.

#1 2011-07-29 08:32:00

tasty_minerals
Member
Registered: 2011-03-30
Posts: 191

SMAPI (device or resource busy) bug?

I'm running archlinux(on Lenovo Thinkpad EDGE 13') with tlp module installed along with tp_smapi, hdaps. All configured and running without trouble. But recently I noticed that "tlp" config stopped working out of a sudden. I didn't install anything nor did I modify any config files that could somehow influence the initial setup. But now when I try "tlp start" I get in the output:

tlp start
cat: /sys/devices/platform/smapi/BAT0/installed: Device or resource busy
cat: /sys/devices/platform/smapi/BAT1/installed: Device or resource busy
tlp started in ac mode.

My tlp config

# Battery charge thresholds (ThinkPad only, tp-smapi kernel module required)
# Charging starts when the remaining capacity falls below the START_CHARGE_TRESH
# value and stops when exceeding the STOP_CHARGE_TRESH value.
# Main battery (values in %)
START_CHARGE_THRESH_BAT0=75
STOP_CHARGE_THRESH_BAT0=80

So thresholds do not work, and the adaptor keeps charging disregarding tlp setup.
But what is more interesting this issue was fixed right after I installed thinkpad power driver manager on my dual boot windows 7 system!
My linux tlp setup started to work properly! Only today, for some reason I bump into the same old trouble. So I need a competent opinion. This definitely is a bug, somebody report if you have anything similar.

full /etc/defaults/tlp

# tlp - Parameters for power save
 
# Hint: some features are disabled by default, remove the leading # to enable them
 
# Set to 0 to disable/1 to enable TLP
TLP_ENABLE=1
 
# Seconds laptop mode has to to wait after the disk goes idle before doing a sync.
# Non-zero value enables, zero disables laptop mode.
DISK_IDLE_SECS_ON_AC=0
DISK_IDLE_SECS_ON_BAT=2
 
# Dirty page values (timeouts in secs).
MAX_LOST_WORK_SECS_ON_AC=15
MAX_LOST_WORK_SECS_ON_BAT=60

# Minimize number of used cpus/cores under light load conditions
SCHED_POWERSAVE_ON_AC=0
SCHED_POWERSAVE_ON_BAT=1
        
# Change CPU voltages aka "undervolting" - Kernel with PHC patch required
# Freq:voltage pairs are written to /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
# CAUTION: only use this, if you thoroughly understand what you are doing!
#PHC_CONTROLS="F:V F:V F:V F:V"
 
# Hard disk devices, separate multiple devices with spaces (default: sda).
# Devices can be specified by disk id too (lookup with: tlp diskid).
DISK_DEVICES="sda sdb"

# Hard disk advanced power management level: 1(max saving)..254(off)
# Levels 1..127 spin down the disk.
# Separate values for multiple devices with spaces.
DISK_APM_LEVEL_ON_AC="254 254"
DISK_APM_LEVEL_ON_BAT="220 220"

# Hard disk spin down timeout:
# 0:        spin down disabled
# 1..240:   timeouts from 5s to 20min (in units of 5s)
# 241..251: timeouts from 30min to 5.5 hours (in units of 30min)
# (see 'man hdparm' for details)
#DISK_SPINDOWN_TIMEOUT_ON_AC="0 0"
#DISK_SPINDOWN_TIMEOUT_ON_BAT="0 0"

# Select i/o scheduler for the disk devices - possible values are 
#   noop anticipatory deadline cfq (Default: cfq) 
# Separate values for multiple devices with spaces.
#DISK_IOSCHED="deadline cfq"
 
# SATA aggressive link power management (ALPM):
# min_power/medium_power/max_performance
SATA_LINKPWR_ON_AC=max_performance
SATA_LINKPWR_ON_BAT=min_power

# PCI Express Active State Power Management (PCIe ASPM):
# default/performance/powersave
PCIE_ASPM_ON_AC=performance
PCIE_ASPM_ON_BAT=powersave

# Radeon graphics clock speed (profile method): low/mid/high/auto/default
# auto = mid on BAT, high on AC; default = use hardware defaults
# (Kernel >= 2.6.35 only, not with fglrx driver!)
RADEON_POWER_PROFILE_ON_AC=high
RADEON_POWER_PROFILE_ON_BAT=low
 
# WiFi power saving mode: 1=disable/5=enable
# (Kernel >= 2.6.32, some adapters only!)
WIFI_PWR_ON_AC=1
WIFI_PWR_ON_BAT=5
 
# Disable wake on lan: Y/N
WOL_DISABLE=Y
 
# Enable audio power saving for Intel HDA, AC97 devices (timeout in secs).
# A value of 0 disables / >=1 enables power save.
SOUND_POWER_SAVE=1
# Disable controller too (HDA only): Y/N
SOUND_POWER_SAVE_CONTROLLER=Y
 
# Set to 1 to power off optical drive in UltraBay (ThinkPads only) 
# when running on battery. A value of 0 disables this Feature (Default).
# Drive can be powered on again by releasing (and reinserting) the
# eject lever or by pressing the disc eject button on newer models.
# Note: an UltraBay hard disk is never powered off.
BAY_POWEROFF_ON_BAT=0
# Optical drive device to power off (default sr0)
BAY_DEVICE="sr0"
 
# Runtime Power Management for pci/spi/i2c bus devices 
# (Kernel >= 2.6.35 only): on=disable/auto=enable
RUNTIME_PM_ON_AC=on
RUNTIME_PM_ON_BAT=on

# Set to 0 to disable/1 to enable usb autosuspend feature
USB_AUTOSUSPEND=1
 
# Devices from the following list are excluded from usb autosuspend
# (separate with spaces). Use lsusb to get the id's.
# Note: input devices (usbhid) are excluded automatically
#USB_BLACKLIST="1111:2222 3333:4444"
 
# Devices to disable on startup: bluetooth wifi wwan
DEVICES_TO_DISABLE_ON_STARTUP="bluetooth wifi wwan"
 
# Devices to disable on shutdown: bluetooth wifi wwan
# (workaround for devices that are blocking shutdown)
#DEVICES_TO_DISABLE_ON_SHUTDOWN="bluetooth wifi wwan"
 
# Battery charge thresholds (ThinkPad only, tp-smapi kernel module required)
# Charging starts when the remaining capacity falls below the START_CHARGE_TRESH
# value and stops when exceeding the STOP_CHARGE_TRESH value.
# Main battery (values in %)
START_CHARGE_THRESH_BAT0=75
STOP_CHARGE_THRESH_BAT0=80
# Ultrabay battery (values in %)
#START_CHARGE_THRESH_BAT1=75
#STOP_CHARGE_THRESH_BAT1=80

Last edited by tasty_minerals (2011-07-29 08:33:53)


lenovo thinkpad EDGE 13'

Offline

#2 2011-07-29 13:16:30

nixpunk
Member
Registered: 2009-11-23
Posts: 271

Re: SMAPI (device or resource busy) bug?

tasty_minerals wrote:

So I need a competent opinion. This definitely is a bug, somebody report if you have anything similar.

Did you already file a bug report for it?  If so, what is the ID number.  If not, why not?

Offline

#3 2011-07-29 13:57:16

tasty_minerals
Member
Registered: 2011-03-30
Posts: 191

Re: SMAPI (device or resource busy) bug?

nixpunk wrote:
tasty_minerals wrote:

So I need a competent opinion. This definitely is a bug, somebody report if you have anything similar.

Did you already file a bug report for it?  If so, what is the ID number.  If not, why not?

I am just trying to collect information, moreover I'm somewhat confused how should I put it down. Maybe it is fixable at this stage.


lenovo thinkpad EDGE 13'

Offline

Board footer

Powered by FluxBB