Bug 42946
Summary: | Toshiba Portege M901(Series M900) fan can't start properly | ||
---|---|---|---|
Product: | ACPI | Reporter: | Peiding CHEN (mcadoo.chen) |
Component: | Power-Fan | Assignee: | Zhang Rui (rui.zhang) |
Status: | CLOSED OBSOLETE | ||
Severity: | normal | CC: | aaron.lu, lenb, rui.zhang |
Priority: | P1 | ||
Hardware: | x86-64 | ||
OS: | Linux | ||
Kernel Version: | x86_64 3.2.1-gentoo-r2 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: |
acpidump output
dmesg output detailed device information loaded modules information about respiratory "/sys/class/thermal" kernel config info in /proc/acpi/ dsdt.aml dsdt.dat dsdt.dsl dsdt.hex output of "iasl -tc dsdt.dsl" output of "acpitool -e" output of "acpitool -F 1" grep_thermal customized DSDT Customized DSDT in aml format |
Description
Peiding CHEN
2012-03-17 01:07:45 UTC
Created attachment 72617 [details]
acpidump output
Created attachment 72618 [details]
dmesg output
Created attachment 72619 [details]
detailed device information
Created attachment 72620 [details]
loaded modules
Created attachment 72621 [details]
information about respiratory "/sys/class/thermal"
Created attachment 72622 [details]
kernel config
Created attachment 72623 [details]
info in /proc/acpi/
Created attachment 72624 [details]
dsdt.aml
Created attachment 72625 [details]
dsdt.dat
Created attachment 72626 [details]
dsdt.dsl
Created attachment 72627 [details]
dsdt.hex
Created attachment 72628 [details]
output of "iasl -tc dsdt.dsl"
Created attachment 72630 [details]
output of "acpitool -e"
Created attachment 72631 [details]
output of "acpitool -F 1"
Sorry, I'm not sure if it occurs at "pci0000:00: ACPI _OSC request failed (AE_NOT_FOUND), returned control mask: 0x1d". What I am sure is that it occurs at "failed to execute '/lib/udev/pci-db' 'pci-db /devices/pci0000:00/0000: 00:" when the system is booting (In reply to comment #5) > Created an attachment (id=72621) [details] > information about respiratory "/sys/class/thermal" please attach the output of "grep . /sys/class/thermal/*/*" instead. According to the acpidump, there are five ACPI controlled fans in your laptop. cooling_device0 ~ cooling_device5 So we need to make clear if these ACPI fans work properly or not first. So would you please turn on/off these fans manually and see if they work as expected or not? You can run "echo 1 > /sys/class/thermal/cooling_device0/cur_state" to turn on the fan and "echo 0 > /sys/class/thermal/cooling_device0/cur_state" to turn off it. Created attachment 72651 [details]
grep_thermal
info before running "echo 1 > /sys/class/thermal/cooling_device0/cur_state"
(In reply to comment #16) > (In reply to comment #5) > > Created an attachment (id=72621) [details] [details] > > information about respiratory "/sys/class/thermal" > > please attach the output of "grep . /sys/class/thermal/*/*" instead. already uploaded, please check it. (In reply to comment #17) > According to the acpidump, there are five ACPI controlled fans in your > laptop. > cooling_device0 ~ cooling_device5 > So we need to make clear if these ACPI fans work properly or not first. > So would you please turn on/off these fans manually and see if they work as > expected or not? > You can run "echo 1 > /sys/class/thermal/cooling_device0/cur_state" to turn > on > the fan and "echo 0 > /sys/class/thermal/cooling_device0/cur_state" to turn > off > it. I run linux in my laptop, there should be only 1 fan. I've no idea what the 5 fans are standing for. "echo 1 > /sys/class/thermal/cooling_device0/cur_state" did turn the fan on, but "echo 0 > /sys/class/thermal/cooling_device0/cur_state" didn't work. by the way, after "echo 1 > /sys/class/thermal/cooling_device0/cur_state" the speed of fan couldn't be controlled any more. It work at only one speed level. On the contrary, if it starts working by itself when the condition mentioned above is satisfied, the fan works perfectly for that moment. Sorry, forgot to mention that I am running the 64bit system typically 5 fans really are just a way to represent 5 speeds of a single fan. So they typically must be enabled and disabled in sequence to be effective. (In reply to comment #17) > According to the acpidump, there are five ACPI controlled fans in your > laptop. > cooling_device0 ~ cooling_device5 > So we need to make clear if these ACPI fans work properly or not first. > So would you please turn on/off these fans manually and see if they work as > expected or not? > You can run "echo 1 > /sys/class/thermal/cooling_device0/cur_state" to turn > on > the fan and "echo 0 > /sys/class/thermal/cooling_device0/cur_state" to turn > off > it. after several test, I confirm that "echo 1 > ..." and "echo 0 > ..." work to turn on or off the fan, but the the cooling device number should be correctly chosen. But the value of the file "cur_state" is always 1. In addition, automatic control is still impossible when I start the fan manually. Recovering from suspending renders the same effect. Or, the automaic control starts with luck...(I've only observed this one time). Do you find something that may fix this problem? Thanks Regards Another weird thing is, when I just finished booting the system, "echo 1" doesn't work for any of the 6 cooling_devices. So to start them, "echo 0" should run firtly. Then, if I put "echo 0" to all cooling_device's cur_state, it will restart again at full speed when I turn them off one by one and run again "grep . /sys/class/thermal/*/*" and it seems that all cooling_device start. I found another record from "messages" when the fan starts automatically "PD nobody: ACPI event unhandled: thermal_zone TZ0 00000081 00000000" hope that it's useful well, problem seems to be solved. I recompile the kernel, all the options regarding to the acpi are compiled as built-in except for the fan which is compiled as module. After that, the fan stops at the beginning of system boot and restarts aftering the fan module is loaded(I guess). I'm not sure if it's really solved permanently. At least, it works for the moment. I believe that for the acpi options in kernel, neither all built-in nor all modules compiled will make the fan start working just after boot. That' it. I'll be back if I found something else weird. I replace status by "resolved". I don't know which sort of "Resolved "should I choose. Thank you all the same Problem is there. The thing is: The fan can start working if I do what I mentioned before, but the fan works only at one speed and can't be modulated automatically. Could you propose some idea? Thanks a lot After system booting, the fan will generally work only at one speed level like resuming from suspended status and the speed will never change. The automatic control is still impossible just after booting. It is only activated when the cpu temperature drops and passes the trip point (doesn't start while temperature increase). So my temporary solution is to start the fan manually in high speed when I run some heavy applications for getting a high cpu temperature(more than 70°C). Then when the temperature drops and passes the trip point, the automatic control is activated. The fan could be modulated according to the cpu temperature as what it should be. The way to activate the fan manually is what is mentioned by Rui Zhang in one reply grep . /sys/class/thermal/*/* echo 0 > /sys/class/thermal/cooling_device4/cur_state echo 0 > /sys/class/thermal/cooling_device5/cur_state I think it's weird to start the fan by "echo 0" since it commonly means stopping the fan. I should do "echo 0" first to make the fan work at certain speed(running "echo 1 > " at first doesn't work). Then all commands seem to work correctly as "echo 0" for stopping and "echo 1" for start. So my fan could work. I only need to start it manually so that automatic control could be started by itself in the certain condition. But it's not pleasant. Why does the fan could be modulated after being activated by what I did? What do you think should I do to make fan be modulated properly itself just after booting? Do you have some ideas? Created attachment 87511 [details]
customized DSDT
Please apply the custom DSDT and see if everything works fine.
PowerResource (PF1, 0x00, 0x0000)
{
Method (_STA, 0, NotSerialized)
{
If (LOr (FSTA, 0x02))
{
Return (One)
}
Else
{
Return (Zero)
}
}
Method (_ON, 0, NotSerialized)
{
Store (" ---- FAN1 _ON ----", Debug)
Or (FSTA, 0x02, FSTA)
If (LGreaterEqual (WAFF, 0x08))
{
FCTL ()
}
}
Method (_OFF, 0, NotSerialized)
{
If (LLessEqual (WAFF, 0x08))
{
Add (WAFF, 0x01, WAFF)
}
Store (" ---- FAN1 _OFF ----", Debug)
And (FSTA, Not (0x02), FSTA)
FCTL ()
}
}
in _STA, we should use LAnd instead of LOr to check the status of a power resource, or else it always return One.
ping... (In reply to comment #30) > ping... I am sorry that I missed the last response. I will try later since I don't have my laptop, I am travelling right now. I will let you know if it works. any update? (In reply to comment #32) > any update? failed to recompile the kernel with your new hex file, because I can't set the config correctly with the new kernel (I am always updating the kernel hoping the problem be solved in new version), so I gave up. I am running some commands to start fan automatically after booting. I cleaned my laptop so it doesn't bother me too much now. (In reply to comment #33) > (In reply to comment #32) > > any update? > > failed to recompile the kernel with your new hex file, because I can't set > the > config correctly with the new kernel (I am always updating the kernel hoping > the problem be solved in new version), so I gave up. I am running some > commands > to start fan automatically after booting. I cleaned my laptop so it doesn't > bother me too much now. I will close this bug if you do not want to continue debugging it. of course you can re-open it again once the problem bothers you again, with the latest Linux upstream kernel. does this sound okay to you? (In reply to comment #34) > (In reply to comment #33) > > (In reply to comment #32) > > > any update? > > > > failed to recompile the kernel with your new hex file, because I can't set > the > > config correctly with the new kernel (I am always updating the kernel > hoping > > the problem be solved in new version), so I gave up. I am running some > commands > > to start fan automatically after booting. I cleaned my laptop so it doesn't > > bother me too much now. > > I will close this bug if you do not want to continue debugging it. > of course you can re-open it again once the problem bothers you again, with > the > latest Linux upstream kernel. does this sound okay to you? No problem. Thank you soooooo much for your help. I jst(In reply to comment #34) > (In reply to comment #33) > > (In reply to comment #32) > > > any update? > > > > failed to recompile the kernel with your new hex file, because I can't set > the > > config correctly with the new kernel (I am always updating the kernel > hoping > > the problem be solved in new version), so I gave up. I am running some > commands > > to start fan automatically after booting. I cleaned my laptop so it doesn't > > bother me too much now. > > I will close this bug if you do not want to continue debugging it. > of course you can re-open it again once the problem bothers you again, with > the > latest Linux upstream kernel. does this sound okay to you? Hi again. Could also send me the .aml file please? As I just find with grub2, there is another way which doesn't need to recompile the kernel. Thanks in advance Created attachment 105591 [details]
Customized DSDT in aml format
Modify
Method GTPT
If (And (FSTA, 0x01))
{
Store (Zero, Local3)
Increment (Local2)
}
->
If (LAnd (FSTA, 0x01))
{
Store (Zero, Local3)
Increment (Local2)
}
Method _STA for all power resources of FAN
PowerResource (PF0, 0x00, 0x0000)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (LOr (FSTA, 0x01))
{
Return (One)
}
Else
{
Return (Zero)
}
}
}
->
PowerResource (PF0, 0x00, 0x0000)
{
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (LAnd (FSTA, 0x01))
{
Return (One)
}
Else
{
Return (Zero)
}
}
}
BTW, you can also override DSDT in initrd, please follow the below steps to replace your initrd:
// make a copy of your original initrd. After test, restore it
$ sudo cp /boot/initramfs-xxx.img /boot/initram-xxx.img.orig
// insert the new DSDT table into a new initrd
$ mkdir $HOME/initrd/kernel/firmware/acpi
$ cd $HOME/initrd
// the dsdt.aml is the new DSDT table attached here
$ cp dsdt.aml kernel/firmware/acpi
// generate the new initrd
$ find kernel |cpio -H newc --create > new_initrd
// cat it with the original one
$ cat /boot/initramfs-xxx.img >> new_initrd
Now the new initrd is ready, use it to boot the system. Also, make sure to add
the following kernel command line:
acpi.aml_debug_output=1
(In reply to comment #37) > Created an attachment (id=105591) [details] > Customized DSDT in aml format > > Modify I mean modified here - I have done the below changes. > > Method GTPT > If (And (FSTA, 0x01)) > { > Store (Zero, Local3) > Increment (Local2) > } > -> > If (LAnd (FSTA, 0x01)) > { > Store (Zero, Local3) > Increment (Local2) > } > > Method _STA for all power resources of FAN > PowerResource (PF0, 0x00, 0x0000) > { > Method (_STA, 0, NotSerialized) // _STA: Status > { > If (LOr (FSTA, 0x01)) > { > Return (One) > } > Else > { > Return (Zero) > } > } > } > -> > PowerResource (PF0, 0x00, 0x0000) > { > Method (_STA, 0, NotSerialized) // _STA: Status > { > If (LAnd (FSTA, 0x01)) > { > Return (One) > } > Else > { > Return (Zero) > } > } > } (In reply to comment #38) > (In reply to comment #37) > > Created an attachment (id=105591) [details] [details] > > Customized DSDT in aml format > > > > Modify > > I mean modified here - > I have done the below changes. > > > > > Method GTPT > > If (And (FSTA, 0x01)) > > { > > Store (Zero, Local3) > > Increment (Local2) > > } > > -> > > If (LAnd (FSTA, 0x01)) > > { > > Store (Zero, Local3) > > Increment (Local2) > > } > > > > Method _STA for all power resources of FAN > > PowerResource (PF0, 0x00, 0x0000) > > { > > Method (_STA, 0, NotSerialized) // _STA: Status > > { > > If (LOr (FSTA, 0x01)) > > { > > Return (One) > > } > > Else > > { > > Return (Zero) > > } > > } > > } > > -> > > PowerResource (PF0, 0x00, 0x0000) > > { > > Method (_STA, 0, NotSerialized) // _STA: Status > > { > > If (LAnd (FSTA, 0x01)) > > { > > Return (One) > > } > > Else > > { > > Return (Zero) > > } > > } > > } Thanks, But I don't use initramfs, I will try grub2 with the aml file. Any updates? (In reply to comment #40) > Any updates? I tried yesterday loading the customed file "dsdt.aml" under grub2. Fan still can't start automatically after rebooting. Let it pass. Please close this thread as I will soon change the laptop. Hope there won't be the same problem in the next one. OK. BTW, it's interesting to know grub can do such things, I'll try it sometime later. (In reply to comment #42) > OK. BTW, it's interesting to know grub can do such things, I'll try it > sometime > later. grub2 can load customed acpi dsdt.aml without recompiling the kernel What info do you need? I suppose you mean this bug can be closed in your comment #41. (In reply to comment #44) > What info do you need? I suppose you mean this bug can be closed in your > comment #41. sorry to change the status (In reply to comment #44) > What info do you need? I suppose you mean this bug can be closed in your > comment #41. sorry not to change the status It's OK, I just want to make sure I understand you correctly :-) |