Bug 280457

Summary: Laptop suspends when an usb device is plugged in
Product: [Unmaintained] solid Reporter: Mamy Ratsimbazafy <chok>
Component: powermanagement-daemonAssignee: Dario Freddi <drf>
Status: RESOLVED UPSTREAM    
Severity: normal CC: chok
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Mamy Ratsimbazafy 2011-08-20 09:30:51 UTC
Version:           4.7 (using KDE 4.7.0) 
OS:                Linux

Hello,

Everytime I plug an USB device on my laptop it suspends. My laptop is an acer 4930G.

I've narrowed down the issue to the process named : kdeinit4: kglobalaccel [kdeinit] .

When setting the keyboard shortcut for sleep to none, this doesn't happen anymore.

This happens with mass storage devices (usb key/hdd) and also with a USB mouse, I didn't try any other devices.

This happens in kde on a new user profile, but not in tty.

I'll be happy to help you in your investigation. See this thread for a similar and probably duplicate problem https://bbs.archlinux.org/viewtopic.php?id=116288

Regards
Mamy

Reproducible: Always

Steps to Reproduce:
Plug in an USB device when Sleeping is set to the sleep shortcut (System settings > shortcuts and gestures > global shortcuts > kde-daemon > sleep)

Actual Results:  
Laptop is suspending

Expected Results:  
Laptop is not suspending
Comment 1 Mamy Ratsimbazafy 2011-08-20 10:28:12 UTC
Hello,

further testing shows that it it is not kde related.

I use the following scripts when booting up for power management :

for i in /sys/bus/{pci,i2c}/devices/*/power/control; do echo -n 'auto' > $i; done

When I don't load the pci part, the sleeping doesn't happen anymore. It seems like this setting will send a sleep keyboard event when a USB device is connected. KDE interprets it and suspend the computer. I'll file this to kernel devs.
Comment 2 Mamy Ratsimbazafy 2011-08-20 23:12:28 UTC
Upstream Bug 41422 on bugzilla.kernel.org