Bug 2754

Summary: ATI Technologies Inc Radeon Mobility M6 LY in DRM/DRI mode locks up if CPU frequency changes on battery power
Product: Drivers Reporter: Josef Rysanek (ailas)
Component: Video(DRI - non Intel)Assignee: drivers_video-dri
Status: CLOSED PATCH_ALREADY_AVAILABLE    
Severity: normal CC: acpi-bugzilla, ailas, bunk, esigra, linux, nickj, spyderous
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.6-mm5 Subsystem:
Regression: --- Bisected commit-id:
Attachments: acpidump from cvs (acpidump > file as root)
turn on debug option for speedstep driver
dmesg kernel with debug speedstep patch
my kernel config
disable IRQs while switching freqs in acpi-io-driver

Description Josef Rysanek 2004-05-22 10:22:45 UTC
Distribution: 
debian sid
Hardware Environment:
HP Notebook xt6200
nbdebian ailas # lspci       
0000:00:00.0 Host bridge: ALi Corporation M1671 Super P4 Northbridge [AGP4X,PCI
and SDR/DDR] (rev 02)
0000:00:01.0 PCI bridge: ALi Corporation PCI to AGP Controller
0000:00:02.0 USB Controller: ALi Corporation USB 1.1 Controller (rev 03)
0000:00:04.0 Multimedia audio controller: ALi Corporation M5451 PCI AC-Link
Controller Audio Device (rev 02)
0000:00:06.0 Bridge: ALi Corporation M7101 PMU
0000:00:07.0 ISA bridge: ALi Corporation M1533 PCI to ISA Bridge [Aladdin IV]
0000:00:08.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
RTL-8139/8139C/8139C+ (rev 10)
0000:00:09.0 Network controller: Intersil Corporation Prism 2.5 Wavelan chipset
(rev 01)
0000:00:0a.0 CardBus bridge: Texas Instruments PCI1410 PC card Cardbus
Controller (rev 02)
0000:00:0b.0 Communication controller: ESS Technology ES2838/2839 SuperLink
Modem (rev 01)
0000:00:0f.0 IDE interface: ALi Corporation M5229 IDE (rev c4)
0000:01:00.0 VGA compatible controller: ATI Technologies Inc Radeon Mobility M6 LY

Software Environment: kernel 2.6.6-mm5
Problem Description: 
nbdebian ailas # cat /proc/cpuinfo 
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 2
model name      : Mobile Intel(R) Pentium(R) 4 - M CPU 1.70GHz
stepping        : 7
cpu MHz         : 2358.487
cache size      : 512 KB

nbdebian ailas # cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq     
        
1200000
(1.2GHz) ??
nbdebian ailas # cat
/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies 
62000 86000 
(62kHz-86kHz) ??
If i boot kernel 2.6.0 with almost same kernel configuration as 2.6.5(6),
cpu frequency is right and cpufreq working.
Steps to reproduce:
Compile kernel 2.6.6 with cpufreq and ACPI processor P states.
Comment 1 Shaohua 2004-05-23 17:48:40 UTC
Please attach your acpidmp, we want to check it. Thanks.
Comment 2 Josef Rysanek 2004-05-24 02:09:33 UTC
Created attachment 2958 [details]
acpidump from cvs (acpidump > file as root)
Comment 3 Zhu Yi 2004-06-02 19:47:58 UTC
How about

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed

and

echo 1700000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed

Did you use vanilla 2.6.6 or 2.6.6 mm kernel?
Comment 4 Josef Rysanek 2004-06-03 03:03:18 UTC
I haven't file /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed

nbdebian ailas $ ls /sys/devices/system/cpu/cpu0/cpufreq/
cpuinfo_cur_freq               scaling_available_governors  scaling_max_freq
cpuinfo_max_freq               scaling_cur_freq             scaling_min_freq
cpuinfo_min_freq               scaling_driver
scaling_available_frequencies  scaling_governor

I'm running kernel 2.6.6-mm. (In 2.6.5 vanilla from kernel.org doesn't work too)
Comment 5 Zhu Yi 2004-06-04 00:53:16 UTC
Do you use speedstep-ich or p4-clockmod? Can you please post lsmod and dmesg?
Comment 6 Josef Rysanek 2004-06-04 02:54:44 UTC
I have both (speedstep-ich, p4-clockmod) compiled in kernel.

nbdebian linux # lsmod
Module                  Size  Used by
radeon                125860  4 
ppp_deflate             6272  0 
zlib_deflate           21272  1 ppp_deflate
zlib_inflate           21632  1 ppp_deflate
ppp_async              12288  0 
usb_storage            41600  0 
hci_usb                11264  0 
rfcomm                 36124  0 
l2cap                  23684  3 rfcomm
snd_ali5451            24136  1 
snd_ac97_codec         63108  1 snd_ali5451
scsi_mod              111564  1 usb_storage

and 

nbdebian root # dmesg
Linux version 2.6.6_6_mm5 (root@nbdebian) (gcc version 3.3.3 (Debian 20040417))
#5 Mon May 24 10:11:41 CEST 2004
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 000000000009f800 (usable)
 BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved)
 BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 000000001fef0000 (usable)
 BIOS-e820: 000000001fef0000 - 000000001feff000 (ACPI data)
 BIOS-e820: 000000001feff000 - 000000001ff00000 (ACPI NVS)
 BIOS-e820: 000000001ff00000 - 0000000020000000 (reserved)
 BIOS-e820: 00000000fffc0000 - 0000000100000000 (reserved)
510MB LOWMEM available.
On node 0 totalpages: 130800
  DMA zone: 4096 pages, LIFO batch:1
  Normal zone: 126704 pages, LIFO batch:16
  HighMem zone: 0 pages, LIFO batch:1
DMI present.
ACPI: RSDP (v000 PTLTD                                     ) @ 0x000f6eb0
ACPI: RSDT (v001 PTLTD  EGRSDT   0x02310000  LTP 0x00000000) @ 0x1fef5e29
ACPI: FADT (v001 ALI    EG533    0x02310000 PTL  0x000f4240) @ 0x1fefef64
ACPI: BOOT (v001 PTLTD  EGBFTBL$ 0x02310000  LTP 0x00000001) @ 0x1fefefd8
ACPI: DSDT (v001    ALI    EG533 0x02310000 MSFT 0x0100000d) @ 0x00000000
ACPI: PM-Timer IO Port: 0x8008
Built 1 zonelists
No local APIC present or hardware disabled
Initializing CPU#0 
Kernel command line: auto BOOT_IMAGE=2.6.6 ro root=301
PID hash table entries: 2048 (order 11: 16384 bytes)
Detected 1700.060 MHz processor.
Using pmtmr for high-res timesource
Console: colour VGA+ 80x25
Memory: 513996k/523200k available (2655k kernel code, 8436k reserved, 1107k
data, 148k init, 0k highmem)
Checking if this processor honours the WP bit even in supervisor mode... Ok.
Calibrating delay loop... 3366.91 BogoMIPS 
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
CPU:     After generic identify, caps: bfebf9ff 00000000 00000000 00000000
CPU:     After vendor identify, caps: bfebf9ff 00000000 00000000 00000000
CPU: Trace cache: 12K uops, L1 D cache: 8K
CPU: L2 cache: 512K
CPU:     After all inits, caps: bfebf9ff 00000000 00000000 00000080
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
CPU0: Intel P4/Xeon Extended MCE MSRs (12) available
CPU: Intel Mobile Intel(R) Pentium(R) 4 - M CPU 1.70GHz stepping 07
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Checking 'hlt' instruction... OK.
POSIX conformance testing by UNIFIX
NET: Registered protocol family 16
PCI: PCI BIOS revision 2.10 entry at 0xfd88b, last bus=1
PCI: Using configuration type 1
mtrr: v2.0 (20020519)
ACPI: Subsystem revision 20040326
ACPI: IRQ9 SCI: Edge set to Level Trigger.
ACPI: Interpreter enabled
ACPI: Using PIC for interrupt routing
ACPI: PCI Root Bridge [PCI0] (00:00) 
PCI: Probing PCI hardware (bus 00)
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 11 12) *0, disabled.
ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 11 12) *10
ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 *10 12)
ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 *10 12)
ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 6 7 10 12) *0, disabled.
ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 6 7 10 12) *0, disabled.
ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 6 7 10 12) *0, disabled.
ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 11 12) *7
ACPI: PCI Interrupt Link [LNKU] (IRQs 3 4 6 7 *10 12)
ACPI: Embedded Controller [EC0] (gpe 24)
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.AGP_._PRT]
ACPI: Power Resource [PFNL] (off) 
Linux Plug and Play Support v0.97 (c) Adam Belay
pnp: the driver 'system' has been registered
PnPBIOS: Scanning system for PnP BIOS support...
PnPBIOS: Found PnP BIOS installation structure at 0xc00f6ee0
PnPBIOS: PnP BIOS version 1.0, entry 0xf0000:0x9abb, dseg 0x400
pnp: match found with the PnP device '00:00' and the driver 'system'
pnp: match found with the PnP device '00:01' and the driver 'system'
pnp: 00:01: ioport range 0x370-0x371 has been reserved
pnp: match found with the PnP device '00:02' and the driver 'system'
pnp: match found with the PnP device '00:0b' and the driver 'system'
pnp: 00:0b: ioport range 0x4d0-0x4d1 has been reserved
pnp: 00:0b: ioport range 0x40b-0x40b has been reserved
pnp: 00:0b: ioport range 0x480-0x48f has been reserved
pnp: 00:0b: ioport range 0x4d6-0x4d6 has been reserved
pnp: 00:0b: ioport range 0x8000-0x803f has been reserved
pnp: 00:0b: ioport range 0x8040-0x805f has been reserved
pnp: match found with the PnP device '00:0c' and the driver 'system'
PnPBIOS: 18 nodes reported by PnP BIOS; 18 recorded by driver
usbcore: registered new driver usbfs
usbcore: registered new driver hub
ACPI: PCI Interrupt Link [LNKU] enabled at IRQ 10
ACPI: PCI Interrupt Link [LNKH] enabled at IRQ 11
ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 10
ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 10
ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 11
ACPI: PCI Interrupt Link [LNKB] enabled at IRQ 11
ACPI: No IRQ known for interrupt pin A of device 0000:00:0f.0
PCI: Using ACPI for IRQ routing 
NET: Registered protocol family 23
Bluetooth: Core ver 2.4
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Simple Boot Flag at 0x38 set to 0x1 
cpufreq: Intel(R) SpeedStep(TM) for this chipset not (yet) available.
NTFS driver 2.1.12-WIP [Flags: R/O].
SGI XFS with no debug enabled
Initializing Cryptographic API
Activating ISA DMA hang workarounds.
ACPI: AC Adapter [ACAD] (on-line)
ACPI: Battery Slot [BAT1] (battery present)
ACPI: Battery Slot [BAT2] (battery absent)
ACPI: Power Button (FF) [PWRF]
ACPI: Sleep Button (CM) [SLPB]
ACPI: Lid Switch [LID]
ACPI: Fan [FAN2] (off) 
ACPI: Processor [CPU0] (supports C1, 8 throttling states)
ACPI: Thermal Zone [THRM] (36 C)
isapnp: Scanning for PnP cards...
isapnp: No Plug & Play device found
Linux agpgart interface v0.100 (c) Dave Jones
agpgart: Detected ALi M1671 chipset
agpgart: Maximum main memory to use for agp memory: 438M
agpgart: AGP aperture is 128M @ 0xf0000000
Serial: 8250/16550 driver $Revision: 1.90 $ 8 ports, IRQ sharing disabled
ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
pnp: the driver 'serial' has been registered
pnp: match found with the PnP device '00:0e' and the driver 'serial'
loop: loaded (max 8 devices)
PPP generic driver version 2.4.2
8139too Fast Ethernet driver 0.9.27
eth0: RealTek RTL8139 at 0xe0835000, 00:c0:9f:1a:ed:c1, IRQ 10
eth0:  Identified 8139 chip type 'RTL-8100B/8139D'
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ALI15X3: IDE controller at PCI slot 0000:00:0f.0
ACPI: No IRQ known for interrupt pin A of device 0000:00:0f.0
ALI15X3: chipset revision 196
ALI15X3: not 100% native mode: will probe irqs later
    ide0: BM-DMA at 0x1810-0x1817, BIOS settings: hda:DMA, hdb:pio
    ide1: BM-DMA at 0x1818-0x181f, BIOS settings: hdc:pio, hdd:pio
hda: TOSHIBA MK6022GAX, ATA DISK drive
Using anticipatory io scheduler
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hdc: TOSHIBA DVD-ROM SD-R2102, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15
hda: max request size: 128KiB
hda: 117210240 sectors (60011 MB), CHS=65535/16/63, UDMA(100)
 hda: hda1 hda2
ohci_hcd: 2004 Feb 02 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)
ohci_hcd: block sizes: ed 64 td 64
ohci_hcd 0000:00:02.0: ALi Corporation USB 1.1 Controller
ohci_hcd 0000:00:02.0: USB HC TakeOver from BIOS/SMM
ohci_hcd 0000:00:02.0: reset, control = 0x83
ohci_hcd 0000:00:02.0: irq 10, pci mem e0837000
ohci_hcd 0000:00:02.0: new USB bus registered, assigned bus number 1
usb usb1: new device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: default language 0x0409
usb usb1: Product: ALi Corporation USB 1.1 Controller
usb usb1: Manufacturer: Linux 2.6.6_6_mm5 ohci_hcd
usb usb1: SerialNumber: 0000:00:02.0
usb usb1: hotplug
usb usb1: adding 1-0:1.0 (config #1, interface 0)
usb 1-0:1.0: hotplug
hub 1-0:1.0: usb_probe_interface
hub 1-0:1.0: usb_probe_interface - got id
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
hub 1-0:1.0: standalone hub
hub 1-0:1.0: no power switching (usb 1.0)
hub 1-0:1.0: global over-current protection
hub 1-0:1.0: power on to power good time: 6ms
hub 1-0:1.0: local power source is good
hub 1-0:1.0: no over-current condition exists
ohci_hcd 0000:00:02.0: created debug files
ohci_hcd 0000:00:02.0: OHCI controller state
ohci_hcd 0000:00:02.0: OHCI 1.0, with legacy support registers
ohci_hcd 0000:00:02.0: control 0x083 HCFS=operational CBSR=3
ohci_hcd 0000:00:02.0: cmdstatus 0x00000 SOC=0
ohci_hcd 0000:00:02.0: intrstatus 0x00000044 RHSC SF
ohci_hcd 0000:00:02.0: intrenable 0x8000000a MIE RD WDH
ohci_hcd 0000:00:02.0: hcca frame #0012
ohci_hcd 0000:00:02.0: roothub.a 03000202 POTPGT=3 NPS NDP=2
ohci_hcd 0000:00:02.0: roothub.b 00000000 PPCM=0000 DR=0000
ohci_hcd 0000:00:02.0: roothub.status 00008000 DRWE
ohci_hcd 0000:00:02.0: roothub.portstatus [0] 0x00010301 CSC LSDA PPS CCS
ohci_hcd 0000:00:02.0: roothub.portstatus [1] 0x00000100 PPS
usbcore: registered new driver hiddev
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.0:USB HID core driver
mice: PS/2 mouse device common for all mice
serio: i8042 AUX port at 0x60,0x64 irq 12
Synaptics Touchpad, model: 1
 Firmware: 5.8
 180 degree mounted touchpad 
 Sensor: 27
 new absolute packet format
 Touchpad has extended capability bits 
 -> four buttons 
 -> multifinger detection
 -> palm detection
 -> pass-through port
ohci_hcd 0000:00:02.0: GetStatus roothub.portstatus [1] = 0x00010301 CSC LSDA
PPS CCS
hub 1-0:1.0: port 1, status 0301, change 0001, 1.5 Mb/s
input: SynPS/2 Synaptics TouchPad on isa0060/serio1
serio: Synaptics pass-through port at isa0060/serio1/input0
serio: i8042 KBD port at 0x60,0x64 irq 1
input: AT Translated Set 2 keyboard on isa0060/serio0
Bluetooth: HCI UART driver ver 2.1 
Bluetooth: HCI H4 protocol initialized
Bluetooth: HCI BCSP protocol initialized
Advanced Linux Sound Architecture Driver Version 1.0.4 (Mon May 17 14:31:44 2004
UTC).
ALSA device list:
  No soundcards found. 
NET: Registered protocol family 2
IP: routing cache hash table of 4096 buckets, 32Kbytes
TCP: Hash tables configured (established 32768 bind 65536)
ip_conntrack version 2.1 (4087 buckets, 32696 max) - 296 bytes per conntrack
ip_tables: (C) 2000-2002 Netfilter core team
NET: Registered protocol family 1
NET: Registered protocol family 17
cpufreq: P4/Xeon(TM) CPU On-Demand Clock Modulation available
ACPI: (supports S0 S1 S3 S4 S5)
hub 1-0:1.0: debounce: port 1: delay 100ms stable 4 status 0x301
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 148k freed
ohci_hcd 0000:00:02.0: GetStatus roothub.portstatus [1] = 0x00100303 PRSC LSDA
PPS PES CCS
usb 1-1: new low speed USB device using address 2
usb 1-1: skipped 1 descriptor after interface
usb 1-1: new device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1: default language 0x0409
usb 1-1: Product: Optical USB Mouse
usb 1-1: Manufacturer: Logitech
usb 1-1: hotplug
usb 1-1: adding 1-1:1.0 (config #1, interface 0)
usb 1-1:1.0: hotplug
usbhid 1-1:1.0: usb_probe_interface 
usbhid 1-1:1.0: usb_probe_interface - got id 
input: USB HID v1.10 Mouse [Logitech Optical USB Mouse] on usb-0000:00:02.0-1
EXT3 FS on hda1, internal journal
SCSI subsystem initialized
Bluetooth: L2CAP ver 2.1
Bluetooth: L2CAP socket layer initialized
Bluetooth: RFCOMM ver 1.2
Bluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM TTY layer initialized
Bluetooth: HCI USB driver ver 2.5
usbcore: registered new driver hci_usb
Initializing USB Mass Storage driver...
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
PPP Deflate Compression module registered
XFS mounting filesystem hda2
Ending clean XFS mount for filesystem: hda2
eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
Adding 131064k swap on /home/swapfile.  Priority:-1 extents:2
[drm] Initialized radeon 1.10.0 20020828 on minor 0: ATI Technologies Inc Radeon
Mobility M6 LY
agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0.
agpgart: Putting AGP V2 device at 0000:00:00.0 into 4x mode
agpgart: Putting AGP V2 device at 0000:01:00.0 into 4x mode
agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0.
agpgart: Putting AGP V2 device at 0000:00:00.0 into 4x mode
agpgart: Putting AGP V2 device at 0000:01:00.0 into 4x mode
Comment 7 Zhu Yi 2004-06-05 21:47:37 UTC
Created attachment 3089 [details]
turn on debug option for speedstep driver

I suspect the get_frequence method change since 2.6.0 caused the problem. Could
you please turn on the debug option with this patch? Please attach the dmesg
after applying this patch.

Thanks,
-yi
Comment 8 Josef Rysanek 2004-06-07 02:10:08 UTC
Created attachment 3105 [details]
dmesg kernel with debug speedstep patch

Here is my dmesg from kernel with this patch to kernel:
http://bugme.osdl.org/attachment.cgi?id=3089&action=view

nbdebian linux # patch -p1 < /root/zaloha/kernel-patches/speedstep-debug 
patching file arch/i386/kernel/cpu/cpufreq/speedstep-lib.c
nbdebian linux # 

(in /usr/src/linux, here i have sources for my 2.6.6 kernel, before this
i use make clean command)

But i can't see any differences.
Comment 9 Dominik Brodowski 2004-06-10 08:13:53 UTC
Please de-select p4-clockmod from your kernel config, it doesn't do you any good
anyway, AFAICS.

Please de-selct speedstep-ich from your kernel config also, as your notebook
does not contain an ICH southbridge.

Please select the ACPI P-States cpufreq driver in your kernel config, though, as
that one likely will offer you frequency and voltage scaling -- and it will
likely report correct frequencies.
Comment 10 Josef Rysanek 2004-06-10 11:34:11 UTC
Created attachment 3137 [details]
my kernel config

I recompiled my kernel same config without p4-clockmod and speedstep-ich.
But same result.
nbdebian ailas $ grep -i mhz /proc/cpuinfo 
cpu MHz 	: 2358.716
Comment 11 Dominik Brodowski 2004-06-10 12:33:48 UTC
can you please post a cat /sys/devices/system/cpu/cpu0/cpufreq/* and -- if the
file exists -- cat /proc/acpi/processor/*/performance
Comment 12 Josef Rysanek 2004-06-10 13:00:05 UTC
New info:
Now, i have much faster responses in X.
i try recompile kernel again, without CONFIG_X86_PM_TIMER (in ACPI),
CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI and CONFIG_X86_SPEEDSTEP_SMI.
If i cat /proc/cpuinfo i get right frequency cpu MHz : 1700.384.

i start /etc/init.d/cpufreqd,
while ac is on, freq is 1.7G it's ok, while i unplug power freq goes down to
1.2G (it's ok, this i have set in /etc/cpufreqd.cond based on cat
/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies which show
me 1700000 1200000).
In terminal it's ok, but if i'm in X, seems to crash my keyboard
(sometime whole system)

Info what you want:
(i wrote simple script for better info)

nbdebian cpufreq $ pwd
/sys/devices/system/cpu/cpu0/cpufreq
nbdebian cpufreq $ for i in `ls *`;do echo -n "$i: "; cat $i;done
cpuinfo_max_freq: 1700000
cpuinfo_min_freq: 1200000
scaling_available_frequencies: 1700000 1200000 
scaling_available_governors: powersave userspace performance 
scaling_cur_freq: 1700000
scaling_driver: acpi-cpufreq
scaling_governor: performance
scaling_max_freq: 1700000
scaling_min_freq: 1200000

nbdebian CPU0 $ cat /proc/acpi/processor/CPU0/performance 
state count:             2
active state:            P0
states:
   *P0:                  1700 MHz, 20000 mW, 250 uS
    P1:                  1200 MHz, 10000 mW, 250 uS

(i have only CPU0)
Comment 13 Dominik Brodowski 2004-06-11 00:36:36 UTC
Thanks for the information. It seems that the original problem (wrong cpu_khz)
is solved; with regard to the keyboard or system lockups you're experiencing:
are these happening right when the frequency is changed, or does this happen
independent of frequency switching?
Comment 14 Josef Rysanek 2004-06-12 09:01:12 UTC
I make some tests:
If i run with ac in, there is no problem.

In console without ac, all ok. 1.7G and 1.2G, no matter, seems to work.

In X (XFree86 Version 4.3.0.1 (Debian 4.3.0.dfsg.1-4) and Gnome (2.6) sawfish
wm, i have problem.
If i try start my session (from login gdm screen) without ac adapter, system
hang up after draw wallpaper with color links (vertical). I must force unplug power.

If i have started session and unplug ac, after few seconds screen stay "freezed"
and i can move only mouse - but i can't click anywhere and in terminal i have
"tail -f /var/log/kern.log", but if i push power button, i can't see any change
like "system goes down....". Screen is like screenshot.
Sometimes system correctly goes down, sometime freeze.
Comment 15 Dominik Brodowski 2004-06-14 00:17:23 UTC
can you 
cat /proc/acpi/processor/CPU0/performance 
when running on battery, please?
Also, what kernel are you (currently) running?
Comment 16 Josef Rysanek 2004-06-14 03:57:38 UTC
cat /proc/acpi/processor/CPU0/performance
state count:             2
active state:            P1
states:
    P0:                  1700 MHz, 20000 mW, 250 uS
   *P1:                  1200 MHz, 10000 mW, 250 uS

I'm running kernel 2.6.6_8_mm5-debug, version from Comment #12.
(-debug in name because is still with patch from comment #7)
Comment 17 Dominik Brodowski 2004-06-14 04:48:31 UTC
Let me summarize:
if booting on AC, speed is detected correctly now, everything works fine.

if booting on battery power, speed is detected correctly. Random errors not
related to switching frequencies. To rule out any cpufreq-related errors: could
you re-compile with CONFIG_CPUFREQ set to "n", and test on battery? If the
errors continue, these are _not_ related to cpufreq...
Comment 18 Josef Rysanek 2004-06-14 05:47:14 UTC
Hi.
No.
Everything depends on cpufreqd now.
I have disabled autostart cpufreqd on boot in rc script.
If i unplug AC and cpufreqd is not started, is all ok.

If i do /etc/init.d/cpufreqd start:
AC off in terminal - no problem.
AC off in X, system freeze after  1s (few ms).
If i unplug power before i'm in X, gdm start ok, and after login hangs.
Comment 19 Dominik Brodowski 2004-06-14 06:27:39 UTC
OK, I see. Obviously, the ACPI cpufreq driver doesn't like doing dynamic
frequency switching on your notebook. Will look closer at the problem this evening.
Comment 20 Dominik Brodowski 2004-06-14 13:09:20 UTC
Created attachment 3164 [details]
disable IRQs while switching freqs in acpi-io-driver

Disable IRQs when switching frequencies in the acpi-io-driver. This might solve
the bug reported here.
Comment 21 Josef Rysanek 2004-06-15 02:04:37 UTC
Same result.
After recompile i try in X terminal start cpufreqd.

nbdebian ailas # /etc/init.d/cpufreqd start
Starting CPU Frequency daemon: cpufreqd.

And X freeze, keyboard seems death too.Only power button react, after i push
power button, system shutdown in 2-3 minutes (it is too long).
Comment 22 Dominik Brodowski 2004-06-15 04:52:13 UTC
Strange. I'd like to zero in on this X freeze... can you re-compile with AGP and
DRI/DRM disabled, and explicitely disable these features in /etc/X11/xorg.conf
or /etc/X11/XFree86.conf, depending on your X package...
Comment 23 Josef Rysanek 2004-06-16 11:32:59 UTC
I try just turn off Load "dri" module in /etc/X11/XF86Config-4
and everything seems to be ok now.
I'm running cpufreqd while i'm in X with ac or without ac correctly.
Much Thanks for all!
(what can i do now? i don't know where is the problem)
Comment 24 Dominik Brodowski 2004-06-16 14:00:16 UTC
The problem (probably) lies somewhere in the 
0000:01:00.0 VGA compatible controller: ATI Technologies Inc Radeon Mobility M6 LY
and the DRI/DRM code which utilizes the advanced features of this video card.
However, it is a really really strange bug. To rule a small bug out John Stultz
discovered lately, could you try out again with dri enabled, but these three
patches applied to your kernel, please?

http://lkml.org/lkml/diff/2004/6/15/17/1
http://lkml.org/lkml/diff/2004/6/15/16/1
http://lkml.org/lkml/diff/2004/6/15/18/1
Comment 25 Josef Rysanek 2004-06-17 00:36:52 UTC
nbdebian linux # patch -p1 < /root/zaloha/kernel-patches/1
patching file arch/i386/lib/delay.c
patch unexpectedly ends in middle of line

is this ok?
Comment 26 Josef Rysanek 2004-06-17 07:50:13 UTC
Same result, i try start cpufreqd, X (keyboard?) freeze.
Button power off working.
Comment 27 Dominik Brodowski 2004-07-19 00:43:42 UTC
Let me summarize: 
- the original problem is solved

- the video (and, partly, other parts of X) locks up if the _CPU_ frequency is
changed _and_ the DRI/DRM driver is active. CPU frequency changes with
DRI/DRM disabled works fine, DRI/DRM works fine if CPU frequency stays the
same...

- does anybody have an idea how the CPU frequency might affect the radeon
DRI/DRM driver, given the FSB stays the same, and the "delay()" functions
still work properly even after frequency transitions as loops_per_jiffy is
adjusted (also the per-CPU copy of it).

- because of this, I'll try to re-assign this bug to DRI/DRM -- if they don't
like this bug, please close this bug, OK?
Comment 28 Josef Rysanek 2004-07-20 00:48:20 UTC
Yes, this is exactly the problem now.
OK.
Comment 29 Dave Airlie 2005-06-04 21:18:39 UTC
I've no ideas on this either, there should be nothing cpufreq should affect in
the dri/drm driver, I'm thinking the X server may be doing something bad and
XFree86 4.3 in Debian is pretty old...

I might see if I can reproduce this on my laptop when I get a DRM working on my
pciexpress graphics card...
Comment 30 Nick Jones 2005-06-23 15:30:05 UTC
I have the exact same problem with DRI/DRM enabled, the video in AGP mode and
cpufreq changing cpu clock speeds.  Everything runs fine so long as the cpu
frequency stays at one setting.

Setup:
HP Omnibook xt6200
Gentoo Linux 2005.x
Kernel: 2.6.11-gentoo-r11 
CPU: Intel(R) Pentium(R) 4 Mobile CPU 2.00GHz
(It has the same low clock speed of 1.2GHz when in "low power mode".)
Comment 31 Nick Jones 2005-06-27 10:34:50 UTC
I did find that changing to a console virtual terminal (not using a frame
buffer), changing the clock speed and then flipping back over to X does work
flawlessly in both directions (high->low, low->high).  When doing this (even
without changing the clock), agpgart reports putting the device into AGP Nx mode
each time.
Comment 32 Nick Jones 2005-08-20 09:27:45 UTC
It looks like this only occurs with the Radeon in >1x mode while doing FID/VID
changes.  Both 2x and 4x modes will lockup the system during a FID/VID but 1x
mode will not.  To make it work for even 1x AGP mode, enable CONFIG_I2C,
CONFIG_I2C_ALGOBIT, CONFIG_I2C_ALI1535 as compiled in options.  I've tested this
with using both the ondemand governor and forcing a FID/VID by setting the
P-state in /proc/acpi/cpu/CPU#/performance.  I'm still not sure why having the
AGP clock at 2x or 4x locks up though.
Comment 33 Josef Rysanek 2005-08-21 02:54:46 UTC
Sorry, i can't test it.
I changed notebook model and vendor, so i can't help with report in
future.

Thanks

--
sign:	Josef Rysanek (ailas) <ailas@ailas.net>
www:	http://www.ailas.net/
--
Odchozi zprava neobsahuje viry, protoze nepouzivam MS Windows

Comment 34 Shawn Starr 2007-03-04 00:04:37 UTC
I think this can be closed. I have a Radeon 9600 mobile, no lockups on switching
laptop power mode and I'm using AGP 4x mode always.
Comment 35 Josef Rysanek 2007-03-04 07:08:38 UTC
Yes, thank you.