Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 1528  / 2 Years ago, sun, march 6, 2022, 8:06:23

It seems that Ubuntu runs some script or command when I signal that I want to undock my laptop by pressing the undock button on the dock. Most visible thing that happens is that resolution on external display is changed.



After prepearing for undock my laptop is still connected to power, VGA-output and audio jacks through dock but not to any usb devices or optical drive. I'm running 11.04 on a ThinkPad X61s with X6 UltraBase.



What happens when I signal undocking?



This is what dmesg says after pressing undock button:



[81459.990682] ata1.00: disabled
[81459.990727] ata1.00: detaching (SCSI 0:0:0:0)
[81459.991722] ACPI: _SB_.GDCK - undocking
[81460.009462] ehci_hcd 0000:00:1a.7: power state changed by ACPI to D0
[81460.020252] ehci_hcd 0000:00:1a.7: BAR 0: set to [mem 0xfe226c00-0xfe226fff] (PCI address [0xfe226c00-0xfe226fff])
[81460.020265] ehci_hcd 0000:00:1a.7: power state changed by ACPI to D0
[81460.020281] ehci_hcd 0000:00:1a.7: restoring config space at offset 0xf (was 0x300, writing 0x30b)
[81460.020309] ehci_hcd 0000:00:1a.7: restoring config space at offset 0x1 (was 0x2900000, writing 0x2900102)
[81460.020338] ehci_hcd 0000:00:1a.7: PME# disabled
[81460.020346] ehci_hcd 0000:00:1a.7: power state changed by ACPI to D0
[81460.020352] ehci_hcd 0000:00:1a.7: power state changed by ACPI to D0
[81460.020363] ehci_hcd 0000:00:1a.7: PCI INT C -> GSI 22 (level, low) -> IRQ 22
[81460.020372] ehci_hcd 0000:00:1a.7: setting latency timer to 64
[81460.020432] ehci_hcd 0000:00:1d.7: power state changed by ACPI to D0
[81460.040071] ehci_hcd 0000:00:1d.7: BAR 0: set to [mem 0xfe227000-0xfe2273ff] (PCI address [0xfe227000-0xfe2273ff])
[81460.040085] ehci_hcd 0000:00:1d.7: power state changed by ACPI to D0
[81460.040104] ehci_hcd 0000:00:1d.7: restoring config space at offset 0xf (was 0x400, writing 0x40b)
[81460.040133] ehci_hcd 0000:00:1d.7: restoring config space at offset 0x1 (was 0x2900000, writing 0x2900102)
[81460.040170] ehci_hcd 0000:00:1d.7: PME# disabled
[81460.040178] ehci_hcd 0000:00:1d.7: power state changed by ACPI to D0
[81460.040184] ehci_hcd 0000:00:1d.7: power state changed by ACPI to D0
[81460.040195] ehci_hcd 0000:00:1d.7: PCI INT D -> GSI 19 (level, low) -> IRQ 19
[81460.040204] ehci_hcd 0000:00:1d.7: setting latency timer to 64
[81460.040503] ehci_hcd 0000:00:1d.7: PCI INT D disabled
[81460.040552] ehci_hcd 0000:00:1d.7: PME# enabled
[81460.061657] ehci_hcd 0000:00:1d.7: power state changed by ACPI to D3
[81460.200414] usb 1-4: USB disconnect, address 14
[81462.220088] ehci_hcd 0000:00:1a.7: PCI INT C disabled
[81462.220169] ehci_hcd 0000:00:1a.7: PME# enabled
[81462.240115] ehci_hcd 0000:00:1a.7: power state changed by ACPI to D3

More From » 11.04

 Answers
3

/etc/acpi/events/lenovo-undock or some other similar file corresponding to your laptop defines the ACPI event code for your undock button and maps it to a call to /etc/acpi/undock.sh.



/etc/acpi/undock.sh runs through drivers that correspond to devices that hotplug through your docking station, and signals these drivers to disconnect.


[#44399] Monday, March 7, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
arkcker

Total Points: 296
Total Questions: 111
Total Answers: 104

Location: Nepal
Member since Tue, Sep 8, 2020
4 Years ago
arkcker questions
Tue, Aug 17, 21, 00:08, 3 Years ago
Sun, May 14, 23, 01:04, 1 Year ago
Wed, Nov 16, 22, 03:12, 1 Year ago
Tue, Jun 1, 21, 01:29, 3 Years ago
;