vypinanie usb portu v sleep mode

Problémy a zkušenosti s hardwarem, perifériemi a jejich ovladači
Zpráva
Autor
gusto1
Příspěvky: 155
Registrován: 07 pro 2017, 08:46

vypinanie usb portu v sleep mode

#1 Příspěvek od gusto1 »

Je mozne nejako vypnut konkretny (alebo aj vsetky) USB port v rezime spanku ?
V PC zostavaju USB porty trvalo napajane aj po vypnuti PC. Ked mam v USB porte zasunutu USB lampu, tak po vypnuti PC (alebo v rezime spanku) stale svieti. Mam dosku asrock a v uefi sa da nastavit

Kód: Vybrat vše

advanced -> chipset confuguration -> deep sleep 
na S4 a S5 alebo len S5, kde sa USB vypnu ak sa vypne PC. Nie je tam moznost S3 (Suspend to Ram) co je vlastne uspatie PC.
Ked je nastavene S4, S5, alebo len S5. tak PC odpoji napajanie na USB portoch len pri vypnuti PC (cize S5). Ja by som potreboval odpajat USB aj pre rezim spanku.
Je mozne to niekde nastavit ?
Ked som hladal info, tak vsade boli navody pre windows.

menom
Příspěvky: 2781
Registrován: 12 pro 2012, 15:10

Re: vypinanie usb portu v sleep mode

#2 Příspěvek od menom »

.

Mohol by si sem kopirovat co odpovie terminal po zadani prikazov:

Kód: Vybrat vše

cat /sys/power/mem_sleep

Kód: Vybrat vše

lspci -v


.
.

gusto1
Příspěvky: 155
Registrován: 07 pro 2017, 08:46

Re: vypinanie usb portu v sleep mode

#3 Příspěvek od gusto1 »

Kód: Vybrat vše

s2idle [deep]

Kód: Vybrat vše

00:00.0 Host bridge: Intel Corporation Device 3e0f (rev 07)
	DeviceName: Onboard - Other
	Subsystem: ASRock Incorporation Device 3e0f
	Flags: bus master, fast devsel, latency 0
	Capabilities: <access denied>
	Kernel driver in use: skl_uncore
	Kernel modules: ie31200_edac

00:02.0 VGA compatible controller: Intel Corporation Device 3e90 (prog-if 00 [VGA controller])
	DeviceName: Onboard - Video
	Subsystem: ASRock Incorporation Device 3e90
	Flags: bus master, fast devsel, latency 0, IRQ 128
	Memory at de000000 (64-bit, non-prefetchable) [size=16M]
	Memory at c0000000 (64-bit, prefetchable) [size=256M]
	I/O ports at f000 [size=64]
	Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
	Capabilities: <access denied>
	Kernel driver in use: i915
	Kernel modules: i915

00:14.0 USB controller: Intel Corporation 200 Series/Z370 Chipset Family USB 3.0 xHCI Controller (prog-if 30 [XHCI])
	DeviceName: Onboard - Other
	Subsystem: ASRock Incorporation 200 Series/Z370 Chipset Family USB 3.0 xHCI Controller
	Flags: bus master, medium devsel, latency 0, IRQ 124
	Memory at df230000 (64-bit, non-prefetchable) [size=64K]
	Capabilities: <access denied>
	Kernel driver in use: xhci_hcd

00:14.2 Signal processing controller: Intel Corporation 200 Series PCH Thermal Subsystem
	DeviceName: Onboard - Other
	Subsystem: ASRock Incorporation 200 Series PCH Thermal Subsystem
	Flags: fast devsel, IRQ 11
	Memory at df24e000 (64-bit, non-prefetchable) [size=4K]
	Capabilities: <access denied>

00:16.0 Communication controller: Intel Corporation 200 Series PCH CSME HECI #1
	DeviceName: Onboard - Other
	Subsystem: ASRock Incorporation 200 Series PCH CSME HECI
	Flags: bus master, fast devsel, latency 0, IRQ 133
	Memory at df24d000 (64-bit, non-prefetchable) [size=4K]
	Capabilities: <access denied>
	Kernel driver in use: mei_me
	Kernel modules: mei_me

00:17.0 SATA controller: Intel Corporation 200 Series PCH SATA controller [AHCI mode] (prog-if 01 [AHCI 1.0])
	DeviceName: Onboard - SATA
	Subsystem: ASRock Incorporation 200 Series PCH SATA controller [AHCI mode]
	Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 125
	Memory at df248000 (32-bit, non-prefetchable) [size=8K]
	Memory at df24c000 (32-bit, non-prefetchable) [size=256]
	I/O ports at f090 [size=8]
	I/O ports at f080 [size=4]
	I/O ports at f060 [size=32]
	Memory at df24b000 (32-bit, non-prefetchable) [size=2K]
	Capabilities: <access denied>
	Kernel driver in use: ahci
	Kernel modules: ahci

00:1c.0 PCI bridge: Intel Corporation 200 Series PCH PCI Express Root Port #5 (rev f0) (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0, IRQ 122
	Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
	I/O behind bridge: [disabled]
	Memory behind bridge: df100000-df1fffff [size=1M]
	Prefetchable memory behind bridge: [disabled]
	Capabilities: <access denied>
	Kernel driver in use: pcieport

00:1d.0 PCI bridge: Intel Corporation 200 Series PCH PCI Express Root Port #11 (rev f0) (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0, IRQ 123
	Bus: primary=00, secondary=02, subordinate=02, sec-latency=0
	I/O behind bridge: [disabled]
	Memory behind bridge: df000000-df0fffff [size=1M]
	Prefetchable memory behind bridge: [disabled]
	Capabilities: <access denied>
	Kernel driver in use: pcieport

00:1f.0 ISA bridge: Intel Corporation Device a2ca
	DeviceName: Onboard - Other
	Subsystem: ASRock Incorporation Device a2ca
	Flags: bus master, medium devsel, latency 0

00:1f.2 Memory controller: Intel Corporation 200 Series/Z370 Chipset Family Power Management Controller
	DeviceName: Onboard - Other
	Subsystem: ASRock Incorporation 200 Series/Z370 Chipset Family Power Management Controller
	Flags: bus master, fast devsel, latency 0
	Memory at df244000 (32-bit, non-prefetchable) [size=16K]

00:1f.3 Audio device: Intel Corporation 200 Series PCH HD Audio
	DeviceName: Onboard - Sound
	Subsystem: ASRock Incorporation 200 Series PCH HD Audio
	Flags: bus master, fast devsel, latency 32, IRQ 135
	Memory at df240000 (64-bit, non-prefetchable) [size=16K]
	Memory at df220000 (64-bit, non-prefetchable) [size=64K]
	Capabilities: <access denied>
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel

00:1f.4 SMBus: Intel Corporation 200 Series/Z370 Chipset Family SMBus Controller
	DeviceName: Onboard - Other
	Subsystem: ASRock Incorporation 200 Series/Z370 Chipset Family SMBus Controller
	Flags: medium devsel, IRQ 16
	Memory at df24a000 (64-bit, non-prefetchable) [size=256]
	I/O ports at f040 [size=32]
	Kernel driver in use: i801_smbus
	Kernel modules: i2c_i801

00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (2) I219-V
	DeviceName: Onboard - Ethernet
	Subsystem: ASRock Incorporation Ethernet Connection (2) I219-V
	Flags: bus master, fast devsel, latency 0, IRQ 126
	Memory at df200000 (32-bit, non-prefetchable) [size=128K]
	Capabilities: <access denied>
	Kernel driver in use: e1000e
	Kernel modules: e1000e

01:00.0 Non-Volatile memory controller: Kingston Technology Company, Inc. Device 2263 (rev 03) (prog-if 02 [NVM Express])
	Subsystem: Kingston Technology Company, Inc. Device 2263
	Flags: bus master, fast devsel, latency 0, IRQ 16, NUMA node 0
	Memory at df100000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: <access denied>
	Kernel driver in use: nvme
	Kernel modules: nvme

02:00.0 Network controller: Intel Corporation Dual Band Wireless-AC 3168NGW [Stone Peak] (rev 10)
	Subsystem: Intel Corporation Dual Band Wireless-AC 3168NGW [Stone Peak]
	Flags: bus master, fast devsel, latency 0, IRQ 134
	Memory at df000000 (64-bit, non-prefetchable) [size=8K]
	Capabilities: <access denied>
	Kernel driver in use: iwlwifi
	Kernel modules: iwlwifi

menom
Příspěvky: 2781
Registrován: 12 pro 2012, 15:10

Re: vypinanie usb portu v sleep mode

#4 Příspěvek od menom »

.
s2idle [deep] je dobre tak to ma byt
A podla tohto:

Kód: Vybrat vše

00:14.0 USB controller: Intel Corporation 200 Series/Z370 Chipset Family USB 3.0 xHCI Controller (prog-if 30 [XHCI])
	DeviceName: Onboard - Other
	Subsystem: ASRock Incorporation 200 Series/Z370 Chipset Family USB 3.0 xHCI Controller
	Flags: bus master, medium devsel, latency 0, IRQ 124
	Memory at df230000 (64-bit, non-prefetchable) [size=64K]
	Capabilities: <access denied>
	Kernel driver in use: xhci_hcd

Vieme ze sa pouziva ovladac xhci_hcd pre usb, ktory je znamy tym, ze robi problemy.
Mne sa napriklad nechcel na niektorych systemoch vobec uspat notebook.

Nepises aky je to system, ale mozno sa trafim.
Mozes vyskusat vytvorit subor s nazvom unload_module
s obsahom:

Kód: Vybrat vše

SUSPEND_MODULES="xhci-hcd"
Ulozit a kopirovat ako root do umiestnenia /etc/pm/config.d/

Alebo v terminali cez editor nano:

Kód: Vybrat vše

sudo nano /etc/pm/config.d/unload_module

Dopisat:

Kód: Vybrat vše

SUSPEND_MODULES="xhci-hcd"
Stlacit spolu dve klavesy CTRL a X cim ukoncis editaciu.
Potvrdit klavesou Y aby sa zapisali zmeny z buffera do suboru
Potvrdit klavesou ENTER.
Reboot.

.
.

gusto1
Příspěvky: 155
Registrován: 07 pro 2017, 08:46

Re: vypinanie usb portu v sleep mode

#5 Příspěvek od gusto1 »

je to linux mint 20 a MB. Aj ked som sa drzal tvojich instrukcii, ale nepomohlo to, usb ostane pod napatim aj vsleep mode.

menom
Příspěvky: 2781
Registrován: 12 pro 2012, 15:10

Re: vypinanie usb portu v sleep mode

#6 Příspěvek od menom »

.

Pred uspatim by si mohol skusit rucne odobrat modul z jadra prikazom:

Kód: Vybrat vše

sudo rmmod -v xhci_hcd

Zhasne usb lampa ?

.
.

gusto1
Příspěvky: 155
Registrován: 07 pro 2017, 08:46

Re: vypinanie usb portu v sleep mode

#7 Příspěvek od gusto1 »

modul nejde odobrat

Kód: Vybrat vše

rmmod: ERROR: Module xhci_hcd is builtin.

menom
Příspěvky: 2781
Registrován: 12 pro 2012, 15:10

Re: vypinanie usb portu v sleep mode

#8 Příspěvek od menom »

.

A co toto:

Kód: Vybrat vše

sudo rmmod -v xhci_pci


.
.

gusto1
Příspěvky: 155
Registrován: 07 pro 2017, 08:46

Re: vypinanie usb portu v sleep mode

#9 Příspěvek od gusto1 »

Tak isto :)

Kód: Vybrat vše

rmmod: ERROR: Module xhci_pci is builtin.
Nieco som nasiel tu, ale zatial som to neskusal

menom
Příspěvky: 2781
Registrován: 12 pro 2012, 15:10

Re: vypinanie usb portu v sleep mode

#10 Příspěvek od menom »

.

Ta druha moznost sa mi zda lepsia:
Easier solution power off all USB ports
Create the file /lib/systemd/system-sleep/custom-xhci_hcd using sudo powers ....

Lebo v tom prvom skripte je konkretne ID 1b1a:7001 co asi neni tvoj pripad.

.
.

Zamčeno