date int64 1,220B 1,719B | question_description stringlengths 28 29.9k | accepted_answer stringlengths 12 26.4k | question_title stringlengths 14 159 |
|---|---|---|---|
1,390,858,111,000 |
Problem description
I am trying to get the audio to work correctly in my Linux installation. However, every time the audio signal goes to zero, even for only about half a second, and when it comes back up, I hear a click/pop from my speakers. This is most obvious when listening to sources without constant background noise, wherein the clicks happen each time a character begins or stops talking and any time one pauses or restarts music playback. While typical modern movies are never completely silent, certain type of content, such as talk shows or push-to-talk voice communication software, are completely ruined.
System hardware and software setup
I have built a media PC with an Intel i5 processor. The motherboard is an ASUS Prime B560M-A and the display being used is an LG CX series OLED. I am using Debian testing (Bullseye) and Pulseaudio, which comes default with Debian.
Sound is sent outwards through HDMI1 and the TV forwards it to a Harman Kadron AVR (171S) through its audio return channel (ARC). Pulseaudio output mode is "HDMI1 Digital Stereo" with several pass-through audio formats enabled.
Problem isolation and presumed cause
It seems that audio system power saving (or other) functions in Debian shut down the audio signal immediately when it detects complete silence. This causes the AVR to turn off its audio output, which produces the click. The same happens in reverse, when sound resumes.
I can confirm this by observing the audio format indicator in my AVR. When I switch to a source from my amplifier, it displays the format being received. If there is a signal, the AVR displays "2/0/0 48kHz ARC" (for regular PCM) or something like 3/2/1 48kHz ARC (for DTS). In Debian, when I switch to the ARC input at any time when audio volume is at zero, the receiver displays "--- ARC", which indicates no signal at all. It really seems like the signal is immediately killed when it reaches zero.
How do I know that this is a Linux/Debian issue
At this point there are still multiple options. It could be that the AVR itself is shutting down if it is only receiving zeroes, and it could also be that the TV stops sending any signal if it is only receiving zeroes. However, the TV is in the simplest possible pass-through mode, and I can isolate the problem to Debian by testing the same setup through a Playstation 4 console.
In the exact same situation, when absolutely no sound is being played by the PS4, the AVR still reports "2/0/0 ARC". When the audio playback stops or continues, there are no cracks and pops whatsoever. I.e. with the PS4, the audio signal never cuts out completely.
What have I tried?
I have searched for this site and the internet at large for people with similar problems, and found the following advice.
This has been set to 0:
/sys/module/snd_hda_intel/parameters/power_save
This has been set to N:
/sys/module/snd_hda_intel/parameters/power_save_controller
These changes have been made permanent:
root@mycomputername|/etc/modprobe.d:cat audio_disable_powersave.conf
options snd-hda-intel power_save=0 power_save_controller=N
I have turned off muting idle sinks in pulseaudio at locations
/etc/pulse/default.pa
/etc/pulse/system.pa
by commenting out the line:
### Automatically suspend sinks/sources that become idle for too long
#load-module module-suspend-on-idle
Pulseaudio has been restarted after this change.
I have also enabled silent stream in the hdmi output module by setting this to Y:
/sys/module/snd_hda_codec_hdmi/parameters/enable_silent_stream
It was made permanent the same way as the module settings above.
Additionally, I have disabled the "Auto Mute Mode" from Alsamixer, though this should not have any effect as I believe it is related to the headphone jack.
Several sources also suggest sending a stream of zeroes through aplay to keep the signal alive. I have done this by using:
aplay /dev/zero -f S16_LE
None of the above have had any kind of effect. Pressing pause always produces an immediate click, and any silence in the output always produces an immediate click. Checking the AVR signal mode after this always shows, that it is not receiving any signal at all.
I'm absolutely at my wits end and can't think of anything else to try, and would very much appreciate help from anyone who has actually solved this issue.
|
In the end, I did not find a satisfactory answer, and there seems to be no good solution for my case, possibly because of the automation in the AVR. It is still unclear why the PS4 is capable of keeping the signal alive, but at least the following does the same:
/usr/bin/play -qn synth sin 10 gain -191
It is below both the sensitivity of my speaker and its lower frequency cutoff. If this is active, I can pause music without hearing a pop.
(edit): No-one has provided a better solution, and as a consequence, I am accepting this answer. Furthermore, to make the answer more generally useful, it is worth noting that if your signal output data format is 16-bit instead of 32-bit, use:
/usr/bin/play -qn synth sin 10 gain -95
| Cracks and pops in HDMI audio output in linux (Debian) |
1,390,858,111,000 |
I bought a new dell laptop ( inspiron 15 3000 series ) with 2 gb nvidia geforce 117m. It shipped with ubuntu 14.04. That was very choppy and slow. I installed nvidia 346.47 ( from the nvidia website). This caused my lightdm to stop working.
Next time i tried the same thing and my screen froze. I did a hard reboot and that caused boot drive not get recognized.
Then I installed 14.10. This time followed this reply.
I still have the same issues. My text looks like this.
.
The output of uname -a:
Linux prakhar-Inspiron-3543 3.16.0-23-generic #31-Ubuntu SMP Tue Oct 21 17:56:17 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
EDIT 1 (Narrowed Down the problem after further inquiry)
This happens when I attach my laptop to a external screen using a HDMI port.
EDIT 2 (Narrowed down further)
Everything works fine when single screen is active (either one of them)... not able to get them to work together. The result is same as the image.
|
Finally I got it working for both screens. I didnt read the xorg log carefully enough. Noveau was being loaded along with nvidia and intel drivers. And it might be that the priority for noveau was higher.
I did a complete uninstall of noveau and didnt install any driver apart form nvidia-340. That makes ubuntu graphics stable.
sudo apt-get purge xserver-xorg-video-nouveau
I found this package name from the answer provided for this question. Thanks a lot to user224082 for the answer.
| Ubuntu (14.10, 14.04) Graphics rendering issues with nvidia 331, 346 when using two screens at once (built in and external) |
1,390,858,111,000 |
My employers want to try to send a video signal from a laptop in their storage room to a tv they have mounted in the dining room (restaurant). There is no HDMI output from this laptop (Toshiba Satellite running Trisquel), so they bought a USB-HDMI adapter. I'm looking at the adapter's packaging now, which confirms that it is a video and audio adapter, showing which video resolutions are supported, etc. But the laptop is only detecting it as an audio adapter. How do I get it to recognize its video capabilities? Do I need to install a different OS which includes non-free drivers/modules?
lsusb -v gives me the following:
Bus 001 Device 010: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0d8c C-Media Electronics, Inc.
idProduct 0x000c Audio Adapter
bcdDevice 1.00
iManufacturer 0
iProduct 1
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 253
bNumInterfaces 4
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 1 Control Device
bInterfaceProtocol 0
iInterface 0
AudioControl Interface Descriptor:
bLength 10
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdADC 1.00
wTotalLength 100
bInCollection 2
baInterfaceNr( 0) 1
baInterfaceNr( 1) 2
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 1
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bNrChannels 2
wChannelConfig 0x0003
Left Front (L)
Right Front (R)
iChannelNames 0
iTerminal 0
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 2
wTerminalType 0x0201 Microphone
bAssocTerminal 0
bNrChannels 1
wChannelConfig 0x0001
Left Front (L)
iChannelNames 0
iTerminal 0
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 6
wTerminalType 0x0301 Speaker
bAssocTerminal 0
bSourceID 9
iTerminal 0
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 7
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bSourceID 8
iTerminal 0
AudioControl Interface Descriptor:
bLength 7
bDescriptorType 36
bDescriptorSubtype 5 (SELECTOR_UNIT)
bUnitID 8
bNrInPins 1
baSource( 0) 10
iSelector 0
AudioControl Interface Descriptor:
bLength 10
bDescriptorType 36
bDescriptorSubtype 6 (FEATURE_UNIT)
bUnitID 9
bSourceID 15
bControlSize 1
bmaControls( 0) 0x01
Mute Control
bmaControls( 1) 0x02
Volume Control
bmaControls( 2) 0x02
Volume Control
iFeature 0
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 6 (FEATURE_UNIT)
bUnitID 10
bSourceID 2
bControlSize 1
bmaControls( 0) 0x43
Mute Control
Volume Control
Automatic Gain Control
bmaControls( 1) 0x00
iFeature 0
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 6 (FEATURE_UNIT)
bUnitID 13
bSourceID 2
bControlSize 1
bmaControls( 0) 0x03
Mute Control
Volume Control
bmaControls( 1) 0x00
iFeature 0
AudioControl Interface Descriptor:
bLength 13
bDescriptorType 36
bDescriptorSubtype 4 (MIXER_UNIT)
bUnitID 15
bNrInPins 2
baSourceID( 0) 1
baSourceID( 1) 13
bNrChannels 2
wChannelConfig 0x0003
Left Front (L)
Right Front (R)
iChannelNames 0
bmControls 0x00
iMixer 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 0
iInterface 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 0
iInterface 0
AudioStreaming Interface Descriptor:
bLength 7
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 1
bDelay 1 frames
wFormatTag 1 PCM
AudioStreaming Interface Descriptor:
bLength 14
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bNrChannels 2
bSubframeSize 2
bBitResolution 16
bSamFreqType 2 Discrete
tSamFreq[ 0] 48000
tSamFreq[ 1] 44100
Endpoint Descriptor:
bLength 9
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 9
Transfer Type Isochronous
Synch Type Adaptive
Usage Type Data
wMaxPacketSize 0x00c8 1x 200 bytes
bInterval 1
bRefresh 0
bSynchAddress 0
AudioControl Endpoint Descriptor:
bLength 7
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x01
Sampling Frequency
bLockDelayUnits 1 Milliseconds
wLockDelay 1 Milliseconds
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 0
iInterface 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 0
iInterface 0
AudioStreaming Interface Descriptor:
bLength 7
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 7
bDelay 1 frames
wFormatTag 1 PCM
AudioStreaming Interface Descriptor:
bLength 14
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bNrChannels 1
bSubframeSize 2
bBitResolution 16
bSamFreqType 2 Discrete
tSamFreq[ 0] 48000
tSamFreq[ 1] 44100
Endpoint Descriptor:
bLength 9
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0064 1x 100 bytes
bInterval 1
bRefresh 0
bSynchAddress 0
AudioControl Endpoint Descriptor:
bLength 7
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x01
Sampling Frequency
bLockDelayUnits 0 Undefined
wLockDelay 0 Undefined
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 3
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 0 None
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.00
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 50
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 32
|
Took the device home with me to continue testing it. Looks like the video component is a separate device:
ryan@pocketwee:~$ lsusb -v
[snip]
Bus 002 Device 002: ID 1d5c:2000
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 3.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2 ?
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 9
idVendor 0x1d5c
idProduct 0x2000
bcdDevice 2.00
iManufacturer 0
iProduct 0
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 663
bNumInterfaces 4
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 124mA
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 3
bFunctionClass 14 Video
bFunctionSubClass 1 Video Control
bFunctionProtocol 3
iFunction 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 16
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 1
bNumEndpoints 2
bInterfaceClass 16
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
** UNRECOGNIZED: 04 21 00 01
** UNRECOGNIZED: 06 25 01 00 00 00
** UNRECOGNIZED: 06 25 02 00 00 00
** UNRECOGNIZED: 0a 22 01 00 05 00 02 00 00 00
** UNRECOGNIZED: 06 25 01 00 00 00
** UNRECOGNIZED: 0a 22 02 00 10 00 14 00 0d 00
** UNRECOGNIZED: 0a 23 03 00 0d 00 05 00 00 00
** UNRECOGNIZED: 06 25 02 00 01 00
** UNRECOGNIZED: 10 26 01 00 00 00 00 00 64 00 00 00 01 00 00 00
** UNRECOGNIZED: 0a 24 01 00 14 00 00 00 00 00
** UNRECOGNIZED: 06 25 03 00 01 00
** UNRECOGNIZED: 0a 24 02 00 02 00 00 00 00 00
** UNRECOGNIZED: 06 25 03 00 01 00
** UNRECOGNIZED: 06 25 0c 00 00 00
** UNRECOGNIZED: 06 25 09 00 02 00
** UNRECOGNIZED: 06 25 0b 00 01 00
** UNRECOGNIZED: 14 27 00 00 01 00 3c 00 01 00 02 00 03 00 00 00 00 00 02 00
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 15
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 16
bInterfaceSubClass 2
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 15
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 4
bInterfaceClass 16
bInterfaceSubClass 2
bInterfaceProtocol 1
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 25
Transfer Type Isochronous
Synch Type Adaptive
Usage Type Feedback
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 7
bMaxBurst 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 9
Transfer Type Isochronous
Synch Type Adaptive
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 1
bMaxBurst 5
Mult 2
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 2
bNumEndpoints 4
bInterfaceClass 16
bInterfaceSubClass 2
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 25
Transfer Type Isochronous
Synch Type Adaptive
Usage Type Feedback
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 7
bMaxBurst 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 9
Transfer Type Isochronous
Synch Type Adaptive
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 1
bMaxBurst 7
Mult 2
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 3
bNumEndpoints 4
bInterfaceClass 16
bInterfaceSubClass 2
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 25
Transfer Type Isochronous
Synch Type Adaptive
Usage Type Feedback
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 7
bMaxBurst 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 9
Transfer Type Isochronous
Synch Type Adaptive
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 1
bMaxBurst 9
Mult 2
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 4
bNumEndpoints 4
bInterfaceClass 16
bInterfaceSubClass 2
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 25
Transfer Type Isochronous
Synch Type Adaptive
Usage Type Feedback
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 7
bMaxBurst 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 9
Transfer Type Isochronous
Synch Type Adaptive
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 1
bMaxBurst 11
Mult 2
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 5
bNumEndpoints 4
bInterfaceClass 16
bInterfaceSubClass 2
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 25
Transfer Type Isochronous
Synch Type Adaptive
Usage Type Feedback
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 7
bMaxBurst 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 9
Transfer Type Isochronous
Synch Type Adaptive
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 1
bMaxBurst 13
Mult 2
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 6
bNumEndpoints 4
bInterfaceClass 16
bInterfaceSubClass 2
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 25
Transfer Type Isochronous
Synch Type Adaptive
Usage Type Feedback
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 7
bMaxBurst 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 9
Transfer Type Isochronous
Synch Type Adaptive
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 1
bMaxBurst 15
Mult 2
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 16
bInterfaceSubClass 2
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0001 1x 1 bytes
bInterval 6
bMaxBurst 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 3
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk-Only
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 0
[snip]
...a Fresco Logic, Inc. device.
According to Fresco's support page, and also according to the thread with subject 'new driver Fresco Logic' (https://www.mail-archive.com/[email protected]/msg42844.html), it looks like I'm probably out of luck getting this thing supported.
cy384's efforts are much appreciated (http://www.cy384.com/projects/fl2000dx-driver.html) but support for these devices is just not there.
If somebody's still reading and knows a way to extract something usable from Fresco's provided Win driver and inject it into this Ubuntu-based Trisquel, that'd be great! But I'm just going to accept this as an answer for now.
| USB/HDMI adapter detected only as audio adapter |
1,390,858,111,000 |
I can tell my programs to output to either HDMI or the headphone jack just fine, but is there a way to create a virtual device in asound.conf that outputs to both simultaneously?
This config comes very close to working but it creates a sort of pulsing noise on the headphone jack.
pcm.internal {
type hw
card 1
device 0
}
pcm.hdmi_hw {
type hw
card 0
device 7
}
pcm.hdmi_complete {
type softvol
slave.pcm hdmi_hw
control.name hdmi_volume
control.card 1
}
pcm.sirmix {
type plug
slave.pcm {
type multi
slaves {
a { channels 2 pcm "internal" }
b { channels 2 pcm "hdmi_complete" }
}
bindings {
0 { slave a channel 0 }
1 { slave a channel 1 }
2 { slave b channel 0 }
3 { slave b channel 1 }
}
}
ttable [
[ 1 0 1 0 ]
[ 0 1 0 1 ]
]
}
gst-launch-1.0 audiotestsrc ! audioconvert ! alsasink device="sirmix"
|
So apparently the settings and pipeline above are essentially good, and if you go to the ALSA forums they'll recommend something like the above, but a matching rate on your outputs is something that must be considered in addition.
pcm.internal {
type hw
card 1
device 0
rate 48000
}
pcm.hdmi_hw {
type hw
card 0
device 7
rate 48000
}
My final config file, which includes volume controls for both the individual output devices, as well as their shared parent, and mixing across multiple playback processes, is the following:
pcm.m_headphone_mixed {
type dmix
ipc_key 595900
ipc_perm 0666
slave {
pcm "hw:1,0"
rate 48000
period_time 0
period_size 1024
buffer_size 4096
format S16_LE
}
bindings {
0 0
1 1
}
}
pcm.m_headphone_rate_adjusted {
type rate
slave {
pcm "m_headphone_mixed"
rate 48000
}
}
pcm.m_headphone {
type softvol
slave.pcm m_headphone_rate_adjusted
control.name m_headphone_volume
control.card 1
}
pcm.m_hdmi_mixed {
type dmix
ipc_key 595901
ipc_perm 0666
slave {
pcm "hw:0,7"
rate 48000
period_time 0
period_size 1024
buffer_size 4096
format S16_LE
channels 2
}
bindings {
0 0 # channel 0 -> channel 0
1 1
}
}
pcm.m_hdmi {
type softvol
slave.pcm "m_hdmi_mixed"
control.name m_hdmi_volume
control.card 1
}
pcm.m_all_base {
type plug
slave.pcm {
type multi
slaves {
a { channels 2 pcm "m_hdmi" }
b { channels 2 pcm "m_headphone" }
}
bindings [
{ slave a channel 0 }
{ slave a channel 1 }
{ slave b channel 0 }
{ slave b channel 1 }
]
}
}
pcm.m_all_routed {
type route
slave.pcm "m_all_base"
slave.channels 4
ttable [
[ 1 0 1 0 ] # route left to channels 0,2
[ 0 1 0 1 ] # route right to channels 1,3
]
}
pcm.m_all {
type softvol;
control.name m_all_volume;
control.card 1
slave.pcm "m_all_routed"
}
pcm.!default "m_all"
This was done for a standard Dell desktop PC to output simultaneously to the headphone jack and DisplayPort.
| How do I create an ALSA virtual device that outputs to both HDMI and headphone jack? |
1,390,858,111,000 |
I'm using Arch Linux on a small HTPC called an Xtreamer, which has an Nvidia GT218/ION graphics card and HDMI out. My television is an Orion DL40-71BK (manual, note everything's in Japanese).
HDMI video output works fine on some settings, for example 1440x900 and 1280x720, and xrandr shows many modes without any X11 configuration, including 1920x1080@60Hz (which it lists as the preferred mode). Full xrandr output follows:
Screen 0: minimum 8 x 8, current 1440 x 900, maximum 8192 x 8192
DVI-I-0 disconnected primary (normal left inverted right x axis y axis)
DVI-I-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected 1440x900+0+0 (normal left inverted right x axis y axis) 160mm x 90mm
1920x1080 60.05 + 60.00 59.94 60.00
1440x900 59.89*
1360x768 60.02
1280x1024 60.02
1280x768 59.87
1280x720 60.00 59.94
1024x768 60.00
800x600 60.32
720x480 59.94 60.05
640x480 59.94 59.93
One thing I do not understand here: What are the columns to the right of 60.00 in the 1920x1080 line?
Anyway, the problem is if I use xrandr to switch to the 1920x1080 mode (or let X11 do so by default on startup) my television shows a black screen and an error (非対応の入力信号, "unsupported input signal"). This also happens if I use the nvidia-settings tool to set the resolution (it also lists 1920x1080 as supported, but has the same error).
I can find this error a few places online, but nothing to with Linux, just people having problems with game consoles and older versions of the TV.
I know the TV works with 1920x1080; the manufacturer lists it and my PS3 uses 1080p just fine.
What can I do to use 1920x1080 on my TV? Is there some configuration I've overlooked?
|
Thanks to brm's comment and reading the xrandr man page, I figured out what the issue was. There were two problems:
First, I'd always used xrandr's -s option, which specifies size, rather than the newer --mode option. This almost always works anyway, and in this case switching to xrandr --output HDMI-0 --mode 1920x1080 didn't fix things. However, it was needed to deal with the second problem: refresh rates.
Apparently the default refresh rate for 1920x1080 wasn't actually supported by my TV (thus the signal error), so I had to specify 60Hz. xrandr -s 1920x1080 -r 60 gave the error Rate 60.00 Hz not available for this size, as did using any of the other frequences listed in the xrandr output.
The final solution was to use this command:
xrandr --output HDMI-0 --mode 1920x1080 -r 60
And everything works nicely. I'm still not sure exactly why this works, especially since the man page says -r (a 1.1 option) shouldn't work well with --mode (a 1.2 option). But I'm happy to have my pixels at least.
| How can I get 1080p to work on my TV with HDMI using xrandr? |
1,390,858,111,000 |
The EDID sent by my monitor when directly connected to my graphic card is ok, I dumped it in /lib/firmware/edid/viewsonic.bin.
I want to access my monitor through a KVM-switch, an HDMI-audio-extractor and an HDMI splitter. With that setup, the EDID received by my computer is broken, and even the UEFI can't detect my screen is on.
I found a workaround by appending drm_kms_helper.edid_firmware=edid/viewsonic.bin video=HDMI-A-1:D to my kernel boot line. Thanks to that line, the HDMI video output is ok in Linux.
However, the HDMI audio doesn't work. Pulseaudio is set to the correct sink, which is detected as unplugged (not-available).
I tried the following without any resulting change:
Add the edid file in initramfs so that EDID is loaded earlier
xrandr --output HDMI-1 --set audio on
The only way I was able to make all this work was to boot with monitor directly plugged to the computer (without enforcing EDID) and go back to my setup once boot is completed. However, sound goes away anyway after suspend or long idling time and then I can't make it work again.
Thank you for any suggestions you'd have!
Maybe relevant:
$ pactl list sinks
Sink #0
State: RUNNING
Name: alsa_output.pci-0000_00_1f.3.hdmi-stereo
Description: Audio interne Digital Stereo (HDMI)
Driver: module-alsa-card.c
Sample Specification: s16le 2ch 44100Hz
Channel Map: front-left,front-right
Owner Module: 7
Mute: no
Volume: front-left: 65536 / 100% / 0,00 dB, front-right: 65536 / 100% / 0,00 dB
balance 0,00
Base Volume: 65536 / 100% / 0,00 dB
Monitor Source: alsa_output.pci-0000_00_1f.3.hdmi-stereo.monitor
Latency: 39654 usec, configured 40000 usec
Flags: HARDWARE DECIBEL_VOLUME LATENCY SET_FORMATS
Properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "HDMI 0"
alsa.id = "HDMI 0"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "3"
alsa.card = "0"
alsa.card_name = "HDA Intel PCH"
alsa.long_card_name = "HDA Intel PCH at 0xdf240000 irq 325"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:00:1f.3"
sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "a170"
device.product.name = "Sunrise Point-H HD Audio"
device.form_factor = "internal"
device.string = "hdmi:0"
device.buffering.buffer_size = "352800"
device.buffering.fragment_size = "176400"
device.access_mode = "mmap+timer"
device.profile.name = "hdmi-stereo"
device.profile.description = "Digital Stereo (HDMI)"
device.description = "Audio interne Digital Stereo (HDMI)"
alsa.mixer_name = "Realtek ALC1150"
alsa.components = "HDA:10ec0900,1462da12,00100001 HDA:80862809,80860101,00100000"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
Ports :
hdmi-output-0: HDMI / DisplayPort (priority: 5900, not available)
Active port: hdmi-output-0
Formats:
pcm
EDIT: When booting with the edid_firmware option, eld are not set (result is the same for eld#2.0 as for other 2.*):
$ grep eld_valid /proc/asound/card0/eld#2.0
monitor_present 0
eld_valid 0
But when booting with the monitor directly connected and with or without the boot parameters, result for eld#2.0 is now a valid eld:
$ cat /proc/asound/card0/eld\#2.0
monitor_present 1
eld_valid 1
monitor_name VX2703 SERIES
connection_type HDMI
eld_version [0x2] CEA-861D or below
edid_version [0x3] CEA-861-B, C or D
manufacture_id 0x635a
product_id 0xf62b
port_id 0x0
support_hdcp 0
support_ai 0
audio_sync_delay 0
speakers [0x1] FL/FR
sad_count 1
sad0_coding_type [0x1] LPCM
sad0_channels 2
sad0_rates [0x1ee0] 32000 44100 48000 88200 96000 176400 192000
sad0_bits [0xe0000] 16 20 24
aplay -l output
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC1150 Analog [ALC1150 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC1150 Digital [ALC1150 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 10: HDMI 4 [HDMI 4]
Subdevices: 1/1
Subdevice #0: subdevice #0
$ edid-decode /lib/firmware/edid/viewsonic.bin
Extracted contents:
header: 00 ff ff ff ff ff ff 00
serial number: 5a 63 2b f6 01 01 01 01 19 17
version: 01 03
basic params: 80 3c 22 78 2e
chroma info: b2 05 a3 56 4f 9e 28 0f 50 54
established: bf ef 80
standard: b3 00 a9 40 95 00 90 40 81 80 81 40 71 4f 01 01
descriptor 1: 02 3a 80 18 71 38 2d 40 58 2c 45 00 55 50 21 00 00 1e
descriptor 2: 00 00 00 ff 00 54 38 47 31 33 32 35 30 30 34 32 30 0a
descriptor 3: 00 00 00 fd 00 32 4c 0f 53 12 00 0a 20 20 20 20 20 20
descriptor 4: 00 00 00 fc 00 56 58 32 37 30 33 20 53 45 52 49 45 53
extensions: 01
checksum: f2
Manufacturer: VSC Model f62b Serial Number 16843009
Made week 25 of 2013
EDID version: 1.3
Digital display
Maximum image size: 60 cm x 34 cm
Gamma: 2.20
DPMS levels: Off
Supported color formats: RGB 4:4:4, YCrCb 4:4:4
Default (sRGB) color space is primary color space
First detailed timing is preferred timing
Established timings supported:
720x400@70Hz
640x480@60Hz
640x480@67Hz
640x480@72Hz
640x480@75Hz
800x600@56Hz
800x600@60Hz
800x600@72Hz
800x600@75Hz
832x624@75Hz
1024x768@60Hz
1024x768@70Hz
1024x768@75Hz
1280x1024@75Hz
1152x870@75Hz
Standard timings supported:
1680x1050@60Hz
1600x1200@60Hz
1440x900@60Hz
1400x1050@60Hz
1280x1024@60Hz
1280x960@60Hz
1152x864@75Hz
Detailed mode: Clock 148.500 MHz, 597 mm x 336 mm
1920 2008 2052 2200 hborder 0
1080 1084 1089 1125 vborder 0
+hsync +vsync
Serial number: T8G132500420
Monitor ranges (GTF): 50-76Hz V, 15-83kHz H, max dotclock 180MHz
Has 1 extension blocks
Checksum: 0xf2 (valid)
CEA extension block
Extension version: 3
30 bytes of CEA data
Video data block
VIC 16 1920x1080@60Hz (native)
VIC 5 1920x1080i@60Hz
VIC 4 1280x720@60Hz
VIC 3 720x480@60Hz
VIC 2 720x480@60Hz
VIC 7 1440x480i@60Hz
VIC 6 1440x480i@60Hz
VIC 31 1920x1080@50Hz
VIC 20 1920x1080i@50Hz
VIC 19 1280x720@50Hz
VIC 18 720x576@50Hz
VIC 17 720x576@50Hz
VIC 22 1440x576i@50Hz
VIC 21 1440x576i@50Hz
VIC 1 640x480@60Hz
Audio data block
Linear PCM, max channels 2
Supported sample rates (kHz): 192 176.4 96 88.2 48 44.1 32
Supported sample sizes (bits): 24 20 16
Speaker allocation data block
Speaker map: FL/FR
Vendor-specific data block, OUI 000c03 (HDMI)
Source physical address 1.0.0.0
Underscans PC formats by default
Basic audio support
Supports YCbCr 4:4:4
Supports YCbCr 4:2:2
1 native detailed modes
Detailed mode: Clock 148.500 MHz, 597 mm x 336 mm
1920 2008 2052 2200 hborder 0
1080 1084 1089 1125 vborder 0
+hsync +vsync
Detailed mode: Clock 74.250 MHz, 597 mm x 336 mm
1920 2008 2052 2200 hborder 0
540 542 547 562 vborder 0
+hsync +vsync interlaced
Detailed mode: Clock 74.250 MHz, 597 mm x 336 mm
1280 1390 1430 1650 hborder 0
720 725 730 750 vborder 0
+hsync +vsync
Detailed mode: Clock 27.000 MHz, 597 mm x 336 mm
720 736 798 858 hborder 0
480 489 495 525 vborder 0
-hsync -vsync
Detailed mode: Clock 148.500 MHz, 597 mm x 336 mm
1920 2448 2492 2640 hborder 0
1080 1084 1089 1125 vborder 0
+hsync +vsync
Checksum: 0x4d (valid)
EDID block does NOT conform to EDID 1.3!
Name descriptor not terminated with a newline
EDIT: Digging kernel side
After some more digging, it appears that it all begins in linux-source-4.12/drivers/gpu/drm/i915/intel_ddi.c. The return value of I915_READ(HSW_AUD_PIN_ELD_CP_VLD) & AUDIO_OUTPUT_ENABLE(intel_crtc->pipe) determines whether the output "has_audio" or not. Since it hasn't, the function intel_audio_codec_enable isn't called.
I tried forcing the call to it. After that, the ELD got configured properly and reported valid in /proc/asound/card0/eld#2.0. Pulseaudio no longer says the output is unplugged. But it still doesn't work, and I get an error: [drm:pipe_config_err [i915]] ERROR mismatch in has_audio (expected 0, found 1) which is normal since I tempered with it. So, I don't know, maybe can I manually change HSW_AUD_PIN_ELD_CP_VLD with intel gpu tools, but I prefer to ask people who know better.
|
I got an answer on IRC from #intel-gfx on freenode.
The problem is that i915 module as well as others are calling the drm_(do_)get_edid which ignores the edid firmware given to the drm_kms_helper.
There exists a patch for linux (I applied it to linux 4.12 with minor conflict resolution) to change that behavior. It requires to rebuild all modules under the linux-source/drivers/gpu/drm/ and add a new boot parameter: drm.edid_firmware=edid/viewsonic.bin
After that, the audio output is marked as available and the sound works. So the problem is solved. I hope this patch will be accepted!
| How to force HDMI audio (intel card) to be enabled despite receiving broken EDID |
1,390,858,111,000 |
I have a GIGABYTE GA-H170N-WIFI motherboard which I'd like to use as a basis for home audio system. It has got two HDMI outputs and 5.1 analog audio output.
The question is, how do I find out how many independent audio channels does the sound card/subsystem support? Can I really have 8 independent audio channels per HDMI output, plus 6 analog channels (not to mention up to 8 channels on the S/PDIF output) running at the same time, sending different signals? Furthermore, is it possible to convince PulseAudio to "split" the HDMI audio channels and provide them as 8 independent sinks?
Thanks!
Update: my /proc/asound/card0/codec#2
Codec: Intel Skylake HDMI
Address: 2
AFG Function Id: 0x1 (unsol 0)
Vendor Id: 0x80862809
Subsystem Id: 0x80860101
Revision Id: 0x100000
No Modem Function Group found
Default PCM:
rates [0x0]:
bits [0x0]:
formats [0x0]:
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
State of AFG node 0x01:
Power states: D0 D3 CLKSTOP EPSS
Power: setting=D0, actual=D0, Clock-stop-OK
GPIO: io=0, o=0, i=0, unsolicited=0, wake=0
Node 0x02 [Audio Output] wcaps 0x6611: 8-Channels Digital
Converter: stream=0, channel=0
Digital: Enabled KAE
Digital category: 0x0
IEC Coding Type: 0x0
PCM:
rates [0x7f0]: 32000 44100 48000 88200 96000 176400 192000
bits [0x1a]: 16 24 32
formats [0x5]: PCM AC3
Power states: D0 D3 EPSS
Power: setting=D0, actual=D0
Node 0x03 [Audio Output] wcaps 0x6611: 8-Channels Digital
Converter: stream=0, channel=0
Digital: Enabled KAE
Digital category: 0x0
IEC Coding Type: 0x0
PCM:
rates [0x7f0]: 32000 44100 48000 88200 96000 176400 192000
bits [0x1a]: 16 24 32
formats [0x5]: PCM AC3
Power states: D0 D3 EPSS
Power: setting=D0, actual=D0
Node 0x04 [Audio Output] wcaps 0x6611: 8-Channels Digital
Converter: stream=0, channel=0
Digital: Enabled KAE
Digital category: 0x0
IEC Coding Type: 0x0
PCM:
rates [0x7f0]: 32000 44100 48000 88200 96000 176400 192000
bits [0x1a]: 16 24 32
formats [0x5]: PCM AC3
Power states: D0 D3 EPSS
Power: setting=D0, actual=D0
Node 0x05 [Pin Complex] wcaps 0x40778d: 8-Channels Digital Amp-Out CP
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x00 0x00]
Pincap 0x0b000094: OUT Detect HBR HDMI DP
Pin Default 0x18560010: [Jack] Digital Out at Int HDMI
Conn = Digital, Color = Unknown
DefAssociation = 0x1, Sequence = 0x0
Pin-ctls: 0x40: OUT
Unsolicited: tag=00, enabled=0
Power states: D0 D3 EPSS
Power: setting=D0, actual=D0
Devices: 0
Connection: 3
0x02* 0x03 0x04
Node 0x06 [Pin Complex] wcaps 0x40778d: 8-Channels Digital Amp-Out CP
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x00 0x00]
Pincap 0x0b000094: OUT Detect HBR HDMI DP
Pin Default 0x18560010: [Jack] Digital Out at Int HDMI
Conn = Digital, Color = Unknown
DefAssociation = 0x1, Sequence = 0x0
Pin-ctls: 0x00:
Unsolicited: tag=00, enabled=0
Power states: D0 D3 EPSS
Power: setting=D0, actual=D0
Devices: 0
Connection: 0
In-driver Connection: 3
0x02 0x03 0x04
Node 0x07 [Pin Complex] wcaps 0x40778d: 8-Channels Digital Amp-Out CP
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x00 0x00]
Pincap 0x0b000094: OUT Detect HBR HDMI DP
Pin Default 0x18560010: [Jack] Digital Out at Int HDMI
Conn = Digital, Color = Unknown
DefAssociation = 0x1, Sequence = 0x0
Pin-ctls: 0x00:
Unsolicited: tag=00, enabled=0
Power states: D0 D3 EPSS
Power: setting=D0, actual=D0
Devices: 0
Connection: 0
In-driver Connection: 3
0x02 0x03 0x04
Node 0x08 [Vendor Defined Widget] wcaps 0xf00000: Mono
|
According to the codec information, you have 3 converter nodes (which accept a digital data stream) of 8 channels each, and 3 pin nodes (which are connected to the graphic card to embed the sound stream into HDMI).
So your hardware is indeed capable of 8 channels per HDMI plus 6 channels analog (unless the HDA soundcard has bandwidth restrictions, but I'll guess one just has to try that), and it could even do an additional 8 channels for another HDMI output if you had the physical output.
Setting up simultanous output on both HDMI channels in Pulseaudio may be a bit of a headache, though. You may have to fiddle with the profile sets in /usr/share/pulseaudio/alsa-mixer/ if you actually plan to do this.
You can split off channels as additional sinks easily in Pulseaudio with the module-remap-sink module.
| How many audio channels does my sound card have? |
1,517,636,397,000 |
Context: Debian/testing on a ASRock B450 with Ryzen 2200G, HDMI monitor.
I can set the default audio sink either via /etc/pulse/default.pa or manually with this command:
pacmd set-default-sink alsa_output.pci-0000_38_00.1.hdmi-stereo-extra1
However, once the monitor enters standby mode, the default gets reset to the internal HDaudio card and the volume applet is no longer tracking the HDMI volume, rather the internal audio card feeding the headphone and back panel jacks. I assume this happens because the HDMI "card" gets unplugged but I'm not sure.
I also tried the suggestion in this other question but it didn't work. Most questions seems to be about setting pulseaudio defaults but this doesn't work: the audio is still routed correctly to the HDMI monitor, it's just the applet which is tracking the wrong volume. If I reset the default card with the command above, it goes back to showing the proper volume until the next standby.
How do I fix this? Basically, I need to run "pacmd set-default-sink" right after the hdmi sink becomes available again.
New info on sinks
before standby: card 0 is hdmi, card 1 is internal; card 0 is default and available, card 1 is also available but not default
(link to details: https://paste.scratchbook.ch/view/83c0e9a5)
during standby: hdmi becomes unavailable, internal card is marked default
(link to details: https://paste.scratchbook.ch/view/9e9ae422)
after standby: hdmi is again available, internal card is still default
(link to details: https://paste.scratchbook.ch/view/9be5801a)
After interrupting standby, I started a new player and I can confirm the music comes from the hdmi monitor, yet the applet shows a crossed-out speaker.
|
Ok, what happens is the following:
Each port of a sink has an "available" state, and putting the HDMI monitor into standby puts the port state into "not available".
The default sink can also be thought as fallback sink: It's the sink that gets used of Pulseaudio can't assign a valid sink to an application using the stream cache (where it remembers which stream used which sink). So it can't keep the default sink pointing to something that can't be used for this purpose, which is why the default sink switches to whatever other sink is available.
And when the monitor comes back from standby, the default sink stays, and doesn't switch back (there's no "preferred" default sink).
The simplest way to deal with this would be to write a simple Pulseaudio application that subscribes to configuration changes (see here for an example), and whenever your HDMI sink becomes available again, sets it as default.
Another option may be to use pactl subscribe, parse the output, and do the same in a shell script.
| re-set xfce4-pulseaudio-plugin default after HDMI monitor standby |
1,517,636,397,000 |
My laptop's display has native resolution of 1366x768, and I connect it to my TV which has 1920x1080i. My problem is that the only supported resolution for cloning is 640x480, which happens to be the only resolution that is supported by both the TV and the laptop's display.
But on Windows, I've noticed that cloning works without changing the laptop's display resolution, even when the TV doesn't support the same resolution. Instead of trying to set the TV on the same resolution as the laptop's primary display, they somehow scale each frame (using software scaling or more likely the GPU) to the TV's native resolution.
Is it possible to do that in Linux? I noticed that there is a --scale-from option in xrandr, and it looks like it does just that, but how do I use it? What would the command look like?
|
Finally I made it work using this line:
xrandr --output HDMI1 --off
xrandr --output HDMI1 --auto --scale-from 1366x768
Note that --auto is needed, though I don't know why.
| Clone monitor on HDMI without changing laptop display resolution |
1,517,636,397,000 |
I am using CentOS 7.9 and I have Asus H110M-E (which has built-in audio and video) and GeForce GT 710 video card with the driver installed via yum:
(1/4): nvidia-x11-drv-470.103.01-1.el7_9.elrepo.x86_64.rpm | 4.5 MB 00:00:02
(2/4): kmod-nvidia-470.103.01-1.el7_9.elrepo.x86_64.rpm | 48 MB 00:00:03
(3/4): yum-plugin-nvidia-1.0.2-1.el7.elrepo.noarch.rpm | 12 kB 00:00:00
(4/4): nvidia-x11-drv-libs-470.103.01-1.el7_9.elrepo.x86_64.rpm
And I am not using the latest (version 510) because Nvidia removed support after version 470 for GeForce GT 710.
I am trying to use GeForce GT 710's HDMI to output the audio as well to my Samsung TV.
However, there is no audio (but video). And I looked into dmesg, and these lines look fishy:
[ 3.194768] asus_wmi: Disabling ACPI video driver
[ 3.218574] AVX2 version of gcm_enc/dec engaged.
[ 3.218576] AES CTR mode by8 optimization enabled
[ 3.226895] alg: No test for __gcm-aes-aesni (__driver-gcm-aes-aesni)
[ 3.226930] alg: No test for __generic-gcm-aes-aesni (__driver-generic-gcm-aes-aesni)
[ 3.242290] snd_hda_intel 0000:00:1f.3: enabling device (0000 -> 0002)
[ 3.242459] snd_hda_intel 0000:01:00.1: Disabling MSI
[ 3.242464] snd_hda_intel 0000:01:00.1: Handle vga_switcheroo audio client
[ 3.265463] snd_hda_intel 0000:00:1f.3: irq 125 for MSI/MSI-X
[ 3.300528] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC887-VD: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:line
[ 3.300532] snd_hda_codec_realtek hdaudioC0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ 3.300534] snd_hda_codec_realtek hdaudioC0D0: hp_outs=1 (0x1b/0x0/0x0/0x0/0x0)
[ 3.300536] snd_hda_codec_realtek hdaudioC0D0: mono: mono_out=0x0
[ 3.300538] snd_hda_codec_realtek hdaudioC0D0: dig-out=0x11/0x0
[ 3.300540] snd_hda_codec_realtek hdaudioC0D0: inputs:
[ 3.300542] snd_hda_codec_realtek hdaudioC0D0: Front Mic=0x19
[ 3.300544] snd_hda_codec_realtek hdaudioC0D0: Rear Mic=0x18
[ 3.300546] snd_hda_codec_realtek hdaudioC0D0: Line=0x1a
[ 3.301579] kvm: disabled by bios
[ 3.314616] kvm: disabled by bios
[ 3.316354] intel_rapl: Found RAPL domain package
[ 3.316358] intel_rapl: Found RAPL domain core
[ 3.316360] intel_rapl: Found RAPL domain uncore
[ 3.316362] intel_rapl: Found RAPL domain dram
[ 3.330539] snd_hda_codec_hdmi hdaudioC0D2: No i915 binding for Intel HDMI/DP codec
[ 3.332496] kvm: disabled by bios
[ 3.332523] hdaudio hdaudioC0D2: Unable to bind the codec
[ 3.333055] resource sanity check: requesting [mem 0xfdffe800-0xfe0007ff], which spans more than pnp 00:07 [mem 0xfdb00000-0xfdffffff]
[ 3.333058] caller pmc_core_probe+0x8f/0x1000 [intel_pmc_core] mapping multiple BARs
[ 3.333065] intel_pmc_core: initialized
It seems like the HDMI audio on GeForce GT 710 is suppressed. Is there a way to fix it?
aplay detects HDMI audio device (tho I am not sure whether it is my video card or the builtin video device on my motherboard):
$ sudo aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC887-VD Analog [ALC887-VD Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC887-VD Digital [ALC887-VD Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
Another way to look at the detected sound cards:
$ cat /proc/asound/cards
0 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xf7220000 irq 125
1 [NVidia ]: HDA-Intel - HDA NVidia
HDA NVidia at 0xf7080000 irq 17
lspci also sees my Nvidia card as an audio device:
$ lspci | grep -i "NVIDIA"
01:00.0 VGA compatible controller: NVIDIA Corporation GK208B [GeForce GT 710] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GK208 HDMI/DP Audio Controller (rev a1)
Thanks!
|
You need to actually select the output. Under Pulseaudio, you can do this with pavucontrol for applications, even if the application itself doesn't support it.
| No Audio From HDMI? |
1,517,636,397,000 |
Everything used to work until recently. Now, whenever I connect my HDMI monitor to my laptop nothing happens. Running xrandr doesn't show the HDMI output. Can anyone help out? I've been trying to fix this for the last 3 hours. I even reinstalled unity but that didn't work.
I'm on 14.04 ubuntu.
Any help is appreciated!!
Vladimir
xrandr
Screen 0: minimum 320 x 200, current 1360 x 768, maximum 32767 x 32767
eDP1 connected primary 1360x768+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
1920x1080 60.1 + 59.9 40.0
1680x1050 60.0 59.9
1600x1024 60.2
1400x1050 60.0
1280x1024 60.0
1440x900 59.9
1280x960 60.0
1360x768 59.8* 60.0
1152x864 60.0
1024x768 60.0
800x600 60.3 56.2
640x480 59.9
VGA1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
|
Ok, after a sleepless night of googling and trying things out (like reinstalling unity and the x drivers), I decided to try out Intel's approach. Apparently they officially support linux and they have a graphics driver installer (link below). After downloading and installing everything started working again.
I'm in Ubuntu heaven again.
Enjoy!
https://01.org/linuxgraphics/downloads/2014/intelr-graphics-installer-linux-1.0.7
| hdmi not showing up in xrandr |
1,517,636,397,000 |
I have tried to use a hub with hdmi port that connects to the USB-C port of my computer but this one doesn't work.
Checking other similar threads on Internet (and here), I see that the problem is probably that the USB-C port in question does not support video output (the hub itself has USB ports and they work properly).
So is there a way to demonstrate it from my PC to stay calm? Ar can I only check it using the manufacturer's documentation?
For more info:
lsusb -t before hub attachment:
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 10000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/12p, 480M
|__ Port 7: Dev 2, If 0, Class=Video, Driver=uvcvideo, 480M
|__ Port 7: Dev 2, If 1, Class=Video, Driver=uvcvideo, 480M
|__ Port 7: Dev 2, If 2, Class=Video, Driver=uvcvideo, 480M
|__ Port 7: Dev 2, If 3, Class=Video, Driver=uvcvideo, 480M
|__ Port 10: Dev 4, If 0, Class=Wireless, Driver=btusb, 12M
|__ Port 10: Dev 4, If 1, Class=Wireless, Driver=btusb, 12M
lsusb -t after hub attachment:
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 10000M
|__ Port 3: Dev 8, If 0, Class=Hub, Driver=hub/4p, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/12p, 480M
|__ Port 7: Dev 2, If 0, Class=Video, Driver=uvcvideo, 480M
|__ Port 7: Dev 2, If 1, Class=Video, Driver=uvcvideo, 480M
|__ Port 7: Dev 2, If 2, Class=Video, Driver=uvcvideo, 480M
|__ Port 7: Dev 2, If 3, Class=Video, Driver=uvcvideo, 480M
|__ Port 8: Dev 41, If 0, Class=Hub, Driver=hub/5p, 480M
|__ Port 10: Dev 4, If 0, Class=Wireless, Driver=btusb, 12M
|__ Port 10: Dev 4, If 1, Class=Wireless, Driver=btusb, 12M
xrander output before and after hub attachment:
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
eDP1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 310mm x 170m
1920x1080 60.01*+ 59.93
1680x1050 59.95 59.88
1400x1050 59.98
1600x900 60.00 59.95 59.82
1280x1024 60.02
1400x900 59.96 59.88
1280x960 60.00
1368x768 60.00 59.88 59.85
1280x800 59.81 59.91
1280x720 59.86 60.00 59.74
1024x768 60.00
1024x576 60.00 59.90 59.82
960x540 60.00 59.63 59.82
800x600 60.32 56.25
864x486 60.00 59.92 59.57
640x480 59.94
720x405 59.51 60.00 58.99
640x360 59.84 59.32 60.00
HDMI1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
And xrandr after HDMI port monitor attachment:
Screen 0: minimum 8 x 8, current 3840 x 1080, maximum 32767 x 32767
eDP1 connected primary 1920x1080+1920+0 (normal left inverted right x axis y axis) 310mm x 170mm
1920x1080 60.01*+ 59.93
1680x1050 59.95 59.88
1400x1050 59.98
1600x900 60.00 59.95 59.82
1280x1024 60.02
1400x900 59.96 59.88
1280x960 60.00
1368x768 60.00 59.88 59.85
1280x800 59.81 59.91
1280x720 59.86 60.00 59.74
1024x768 60.00
1024x576 60.00 59.90 59.82
960x540 60.00 59.63 59.82
800x600 60.32 56.25
864x486 60.00 59.92 59.57
640x480 59.94
720x405 59.51 60.00 58.99
640x360 59.84 59.32 60.00
HDMI1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 480mm x 270mm
1920x1080 60.00*+ 50.00 59.94
1680x1050 59.88
1600x900 60.00
1280x1024 60.02
1440x900 59.90
1280x800 59.91
1280x720 60.00 50.00 59.94
1024x768 60.00
800x600 60.32
720x576 50.00
720x480 60.00 59.94
640x480 60.00 59.94
720x400 70.08
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
|
Finally, my laptop's USB-C doesnt support Video output, and it seems that it cannot be demonstrated by software, just going to the hardware manufacturer.
Therefore I had to install a USB 3.0 to HDMI adapter that supports displaylink drivers and install it to get a second external monitor.
| How can I find out if the USB-C port on my laptop has video output (for adapter USB-C - HDMI)? |
1,517,636,397,000 |
I've tried this :
https://wiki.archlinux.org/index.php/xrandr#Permanently_adding_undetected_resolutions
Here I was advised on the Debian IRC channel to change the path of the config file to: /etc/X11/xorg.conf.d instead of /etc/X11/xorg.conf.d/10-monitor.conf as per the ArchWiki.
However, the person who was helping me out vanished.
and also this : How to set custom resolution using xrandr when the resolution is not available in 'Display Settings'
none of the above worked.
Using arandr instead I see that the maximum available resolution is 1024x768 which is weird considering that the "manual" says it can support up to 1080p 60Hz which is what I want.
Mind helping me out ?
|
In Debian, the default directory that contains xorg.conf files is indeed /usr/share/X11/xorg.conf.d/. This would be the correct location to place custom X settings.
Here is the configuration file you need to force a specific resolution (and have none other to choose from!). Save it in /usr/share/X11/xorg.conf.d/10-monitor.conf and reboot. Note, I generated the modeline with the command cvt 1280 1080.
Section "Monitor"
Identifier "VGA1"
Modeline "1280x1080_60.00" 115.00 1280 1368 1496 1712 1080 1083 1093 1120 -hsync +vsync
EndSection
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "VGA1"
SubSection "Display"
Modes "1280x1080_60.00"
EndSubSection
EndSection
Section "Device"
Identifier "Device0"
Driver "intel"
EndSection
If this still doesn't work, then you VGA adapter probably doesn't support this mode, despite what the manual says.
| Can't set the resolution to 1080 on a VGA to HDMI adapter on Debian 10 (Thinkpad X220) |
1,517,636,397,000 |
I'm running Ubuntu 18.04 on an MSI GE63 Stealth 8RE, with an NVIDIA GTX 1060. There's a good amount of screen tearing when watching videos, and I found several sources online telling me that creating a file in /etc/modprobe.d/ with options nvidia_drm modeset=1 would resolve the issue.
Lo and behold, it did! No more screen tearing! It fixed the Prime Synchronization issues. However, for some reason, I was no longer able to connect to my HDMI monitor. The output of xrandr --query is as follows:
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
eDP-1-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
1920x1080 60.02*+ 60.01 59.97 59.96 59.93
1680x1050 59.95 59.88
1600x1024 60.17
1400x1050 59.98
1600x900 59.99 59.94 59.95 59.82
1280x1024 60.02
1440x900 59.89
1400x900 59.96 59.88
1280x960 60.00
1440x810 60.00 59.97
1368x768 59.88 59.85
1360x768 59.80 59.96
1280x800 59.99 59.97 59.81 59.91
1152x864 60.00
1280x720 60.00 59.99 59.86 59.74
1024x768 60.04 60.00
960x720 60.00
928x696 60.05
896x672 60.01
1024x576 59.95 59.96 59.90 59.82
960x600 59.93 60.00
960x540 59.96 59.99 59.63 59.82
800x600 60.00 60.32 56.25
840x525 60.01 59.88
864x486 59.92 59.57
800x512 60.17
700x525 59.98
800x450 59.95 59.82
640x512 60.02
720x450 59.89
700x450 59.96 59.88
640x480 60.00 59.94
720x405 59.51 58.99
684x384 59.88 59.85
680x384 59.80 59.96
640x400 59.88 59.98
576x432 60.06
640x360 59.86 59.83 59.84 59.32
512x384 60.00
512x288 60.00 59.92
480x270 59.63 59.82
400x300 60.32 56.34
432x243 59.92 59.57
320x240 60.05
360x202 59.51 59.13
320x180 59.84 59.32
DP-1-1 disconnected (normal left inverted right x axis y axis)
HDMI-1-1 disconnected (normal left inverted right x axis y axis)
I'd like to not have screen tearing, but I'd also like to be able to use my HDMI port. Does anyone have a suggestion as to what I can do to resolve this issue?
|
I fixed the issue!! I switched from using GDM3 to LightDM, rebooted, and I no longer have the issue of not being able to connect to external monitors. I tested on both DisplayPort and HDMI external monitors. It also happened to fix a problem I'd been having with external monitors not being recognized as viable audio sinks, so now I also get audio out of my external monitors, with no screen tearing :)
To switch from GDM3 (which is the default display manager since Ubuntu 17.10) to LightDM, I just ran sudo apt install lightdm because it wasn't already installed, and it prompted me with the option to choose which display manager to have as my default.
If you already have it installed, running sudo dpkg-reconfigure gdm3 will show you the same prompt.
I hope this helps anyone else who runs into this issue :)
| HDMI not showing in xrandr after nvidia modeset=1 |
1,517,636,397,000 |
I have a machine installed with OpenELEC and I'd like to use the motherboard line input (jack) and redirect sound through the HDMI link. All the other jacks from the motherboard will be unused.
I tried playing with alsamixer (booting the machine with a LiveCD since OpenELEC has no ALSA mixer application) but all I can get is sound going out through the output jack. With Kodi I can use any HDMI link I wish as the main output but I have come to wondering if both sound hardware can interact...
Input is made through Intel HDA Realtek ALC892. HDMI is an Intel Haswell HDMI.
|
Well obviously you can do it by running a program that reads audio from a capture device and writes it to the HDMI output (potentially through pulseaudio, so you can mix other sounds with it).
I don't have any specific suggestion for you about what program to look for, sorry.
I think it's unlikely that two different cards (the analog codec on the mobo, and the Haswell GPU HDMI) can talk to each other without software intervention. I wouldn't even be confident about being able to get the Realtek audio hardware to internally send audio from its ADC to its digital S/PDIF output.
| Can ALSA output sound from a motherboard jack input line to HDMI? |
1,517,636,397,000 |
Observation:
I switch on a Linux box
Boot loader displays its output on screen
Boot starts with first output messages
Screen goes blank, and never comes back on.
Note: this is about the console, NOT about X11.
I keep running into the same problem, on a variety of hardware (x86, ARM) with different video connectors (VGA, HDMI). It more frequently happens with "modern" LCDs than with "ancient" CRTs. The LCDs would either say "no signal detected" (frequently), or "signal out of range" (rarely).
Some example combinations:
PC with VGA / CRT -- works
same PC with VGA / analog monitor -- "no signal"
same PC with HDMI / LCD -- "no signal"
Raspberry Pi with HDMI -- "no signal"
pcduino3 with HDMI -- "out of range"
happened on the Raspberry Pi, too, but I don't recall the exact configuration.
I'm trying to understand what exactly the kernel does to detect the "graphics" for console output, and why, on balance, it somehow is less successful in getting the configuration right than boot loaders and the early stage of the boot (which may be ramdisk; not sure). Or, if the kernel doesn't actually do any detecting, where the settings are defined that are somehow less successful than the boot loader's etc. I'm baffled that it happens on all sorts of hardware.
|
It works if I add
video=LVDS-1:d
to the kernel parameters.
| How does the Linux kernel initialize console graphics? |
1,396,909,704,000 |
I've got an ATI Radeon (not sure exact card; forgot to write it down when I left this morning; will update when I get back) and it is connected to an LG IPS237L 23" IPS LED monitor.
As you can seen in the xrandr output below, the resolution is currently set to 1920x1080. The monitor's information panel indicates this as well. The auto-adjustment is disabled as it's connected via HDMI, so the only thing I can really adjust is turning the over-scan on.
It helps a little, but the text is still blocky and the output doesn't extend to the end of the screen. It's almost as if 1920x1080 wasn't the monitor native resolution, but everything I've found on the monitor indicates that is the native resolution.
I'm using a DVI-HDMI cable, but that really shouldn't make any difference since they both use the same TMDS protocol. What am I missing here?
|
Discovered this question:
https://askubuntu.com/questions/219044/ati-proprietary-driver-over-underscan-setting-ignored-after-reboot
Looks like it was just an underscan issue. Running the following as root:
aticonfig --initial #if you haven't already setup your xorg.conf for ATI
aticonfig --set-pcs-val=MCIL,DigitalHDTVDefaultUnderscan,0
and now everything looks great.
| Blurry image between Radeon / DVI-to-HDMI / LG LCD monitor |
1,396,909,704,000 |
I recently brought home a 1440p HDMI 60 Hz monitor. However, on Ubuntu and Fedora it has problems displaying correctly. Some images of the problem are here: https://i.sstatic.net/szawh.jpg
Initially, I had Fedora installed, and thought it was a Fedora problem. Then, I wanted to try Ubuntu, figuring the VGA drivers might be different. I first loaded Ubuntu from the installation media, to try it out and voila! It worked! I decide to go ahead and install Ubuntu.
After I loaded Ubuntu from disk, my monitor started having the exact same problem it was having on Fedora.
The problem goes away when I set the monitor's resolution to 1080p.
Interestingly, the same problem appeared when the Ubuntu live USB version was loading. However, once it loaded, the problem went away!
What could the live version be doing that the installed version does not?
Edit: I tried running xrandr on both Live and Installed versions of Ubuntu and the resulting difference was interesting:
Live
ubuntu-gnome@ubuntu-gnome:~$ xrandr
Screen 0: minimum 320 x 200, current 4480 x 1440, maximum 16384 x 16384
DisplayPort-0 disconnected (normal left inverted right x axis y axis)
DisplayPort-1 disconnected (normal left inverted right x axis y axis)
DisplayPort-2 disconnected (normal left inverted right x axis y axis)
HDMI-A-0 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 553mm x 311mm
2560x1440 59.95*+
1920x1080 60.00 60.00 50.00 59.94 30.00 25.00 24.00 29.97 23.98
1920x1080i 60.00 50.00 59.94
1680x1050 59.88
1280x1024 75.02 60.02
1440x900 59.90
1280x960 60.00
1280x800 59.91
1152x864 75.00
1280x720 60.00 50.00 59.94
1440x576 50.00
1024x768 75.03 70.07 60.00
1440x480 60.00 59.94
832x624 74.55
800x600 72.19 75.00 60.32 56.25
720x576 50.00
720x480 60.00 59.94
640x480 75.00 66.67 60.00 59.94
720x400 70.08
DVI-D-0 connected 1920x1080+2560+0 (normal left inverted right x axis y axis) 477mm x 268mm
1920x1080 60.00*+
1680x1050 59.88
1280x1024 75.02 60.02
1440x900 59.90
1280x960 60.00
1280x720 60.00
1024x768 75.03 70.07 60.00
832x624 74.55
800x600 72.19 75.00 60.32 56.25
640x480 75.00 72.81 66.67 59.94
720x400 70.08
Installed:
Screen 0: minimum 320 x 200, current 4480 x 1440, maximum 8192 x 8192
XWAYLAND0 connected 1920x1080+0+360 (normal left inverted right x axis y axis) 480mm x 270mm
1920x1080 59.96*+
XWAYLAND1 connected 2560x1440+1920+0 (normal left inverted right x axis y axis) 550mm x 310mm
2560x1440 59.91*+
Edit 2: Also, I realized that this graphics artifact is causing some sort of striping that basically shows basically every other column of the display and double its width. When I am typing on that display, every other letter appears.
|
I came up with a solution, though I'd love some expanded input on whether this is an acceptable long term solution.
I followed the screenshot here:
Which I found from the debugging Wayland page Using both GNOME Classic and GNOME on Xorg allowed me to correctly run the HDMI monitor at 1440p. I could back switch into the normal GNOME 3 desktop without problems.
It seems that the problem comes back when I boot into the default GNOME 3. All I have to do to resolve the problem is to log in under GNOME Classic then log out and back in under regular GNOME.
| Why does my 1440p HDMI monitor only display correctly when running from the bootable USB? |
1,396,909,704,000 |
I am posting this question up mostly because after years (yes, years - cf. [this post][1], for example) of living with this frustration, I finally solved this yesterday and would like to spare others this frustration.
I mainly use Firefox for my browsing needs, but at some point I ran into not being able to watch videos on twitter and found that Chrome could play them, except that I couldn't hear anything. Some investigation showed that it was due to the fact that these were HTML5 videos, and neither Firefox nor Chrome would produce sound on HTML5 videos (as tested on Youtube, for example) while flash on both worked fine.
If you ran into the same problem and solved this some other way, please post your solution here.
|
Further investigation led me to find that if I launched pulseaudio before launching Chrome, I could get sound coming out of my TV via the HDMI connection. Strange.
No amount of tweaking the .asoundrc fixed this issue, where I had previously added:
defaults.pcm.card 0
defaults.ctl.card 0
To fix the problem, but this was obviously no longer working.
Then I found this file: /usr/share/alsa/alsa.conf.d/99-pulseaudio-default.conf:
# Default to PulseAudio
pcm.!default {
type pulse
hint {
show on
description "Default ALSA Output (currently PulseAudio Sound Server)"
}
}
ctl.!default {
type pulse
}
Which looked very suspicious, so I commented out all the lines (deleting would achieve the same effect). Restarted my browers, and poof now I have sound in HTML5 videos. It is strange, because you would think that alsa would take my .asoundrc with greatest priority, where I specify my !default to be something else (ie, not pulseaudio). But there you have it. Problem solved. Hope this helps someone else out there.
| No sound from Firefox or Chrome HTML5 videos, but flash works (alsa) |
1,396,909,704,000 |
I'm trying to play some audio through HDMI to a sound system (https://www.amazon.com/dp/B09H5GJCML). On the back of the speakers, by the HDMI-shaped hole, it says "ARC". I'm driving it with a laptop running arch linux, XFCE4, and pulse audio. When I plug in HDMI and set the speaker to "ARC" mode, pavucontrol shows the HDMI settings as "unplugged unavailable":
I've run a few tests including
for i in 0 1 2 3 4 5; do
echo "doing 1,$i";
speaker-test -l 1 -c 6 -D hdmi:HDMI,"$i";
done;
(aplay -l shows
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: 92HD93BXX Analog [92HD93BXX Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 9: HDMI 3 [HDMI 3]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 10: HDMI 4 [HDMI 4]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 11: HDMI 5 [HDMI 5]
Subdevices: 0/1
Subdevice #0: subdevice #0
aplay -L shows
null
Discard all samples (playback) or generate zero samples (capture)
lavrate
Rate Converter Plugin Using Libav/FFmpeg Library
samplerate
Rate Converter Plugin Using Samplerate Library
speexrate
Rate Converter Plugin Using Speex Resampler
jack
JACK Audio Connection Kit
oss
Open Sound System
pulse
PulseAudio Sound Server
speex
Plugin using Speex DSP (resample, agc, denoise, echo, dereverb)
upmix
Plugin for channel upmix (4,6,8)
vdownmix
Plugin for channel downmix (stereo) with a simple spacialization
default
Default ALSA Output (currently PulseAudio Sound Server)
sysdefault:CARD=PCH
HDA Intel PCH, 92HD93BXX Analog
Default Audio Device
front:CARD=PCH,DEV=0
HDA Intel PCH, 92HD93BXX Analog
Front output / input
surround21:CARD=PCH,DEV=0
HDA Intel PCH, 92HD93BXX Analog
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
HDA Intel PCH, 92HD93BXX Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
HDA Intel PCH, 92HD93BXX Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
HDA Intel PCH, 92HD93BXX Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
HDA Intel PCH, 92HD93BXX Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
HDA Intel PCH, 92HD93BXX Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
usbstream:CARD=PCH
HDA Intel PCH
USB Stream Output
hdmi:CARD=HDMI,DEV=0
HDA ATI HDMI, HDMI 0
HDMI Audio Output
hdmi:CARD=HDMI,DEV=1
HDA ATI HDMI, HDMI 1
HDMI Audio Output
hdmi:CARD=HDMI,DEV=2
HDA ATI HDMI, HDMI 2
HDMI Audio Output
hdmi:CARD=HDMI,DEV=3
HDA ATI HDMI, HDMI 3
HDMI Audio Output
hdmi:CARD=HDMI,DEV=4
HDA ATI HDMI, HDMI 4
HDMI Audio Output
hdmi:CARD=HDMI,DEV=5
HDA ATI HDMI, HDMI 5
HDMI Audio Output
usbstream:CARD=HDMI
HDA ATI HDMI
USB Stream Output
)
According to a post I saw, I installed sof-firmware' and 'alsa-ucm-conf after which dmesg | grep sof; says
[ 0.074515] software IO TLB: area num 8.
[ 0.389221] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[ 0.389222] software IO TLB: mapped [mem 0x00000000c670a000-0x00000000ca70a000] (64MB)
pacmd list-sinks looks like so:
1 sink(s) available.
* index: 8
name: <alsa_output.pci-0000_01_00.1.hdmi-surround>
driver: <module-alsa-card.c>
flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
state: IDLE
suspend cause: (none)
priority: 9030
volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB, rear-left: 65536 / 100% / 0.00 dB, rear-right: 65536 / 100% / 0.00 dB, front-center: 65536 / 100% / 0.00 dB, lfe: 65536 / 100% / 0.00 dB
balance 0.00
base volume: 65536 / 100% / 0.00 dB
volume steps: 65537
muted: no
current latency: 39.72 ms
max request: 20 KiB
max rewind: 20 KiB
monitor source: 9
sample spec: s16le 6ch 44100Hz
channel map: front-left,front-right,rear-left,rear-right,front-center,lfe
Surround 5.1
used by: 0
linked by: 1
configured latency: 40.00 ms; range is 0.50 .. 1999.82 ms
card: 0 <alsa_card.pci-0000_01_00.1>
module: 6
properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "HDMI 0"
alsa.id = "HDMI 0"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "3"
alsa.card = "1"
alsa.card_name = "HDA ATI HDMI"
alsa.long_card_name = "HDA ATI HDMI at 0xf7e60000 irq 33"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:01:00.1"
sysfs.path = "/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1"
device.bus = "pci"
device.vendor.id = "1002"
device.vendor.name = "Advanced Micro Devices, Inc. [AMD/ATI]"
device.product.id = "aab0"
device.product.name = "Oland/Hainan/Cape Verde/Pitcairn HDMI Audio [Radeon HD 7000 Series]"
device.string = "hdmi:1"
device.buffering.buffer_size = "1058304"
device.buffering.fragment_size = "529152"
device.access_mode = "mmap+timer"
device.profile.name = "hdmi-surround"
device.profile.description = "Digital Surround 5.1 (HDMI)"
device.description = "Oland/Hainan/Cape Verde/Pitcairn HDMI Audio [Radeon HD 7000 Series] Digital Surround 5.1 (HDMI)"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
ports:
hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: no)
properties:
device.icon_name = "video-display"
active port: <hdmi-output-0>
(I have the built-in output disabled)
and pacmd list-cards says
index: 0
name: <alsa_card.pci-0000_01_00.1>
driver: <module-alsa-card.c>
owner module: 6
properties:
alsa.card = "1"
alsa.card_name = "HDA ATI HDMI"
alsa.long_card_name = "HDA ATI HDMI at 0xf7e60000 irq 33"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:01:00.1"
sysfs.path = "/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1"
device.bus = "pci"
device.vendor.id = "1002"
device.vendor.name = "Advanced Micro Devices, Inc. [AMD/ATI]"
device.product.id = "aab0"
device.product.name = "Oland/Hainan/Cape Verde/Pitcairn HDMI Audio [Radeon HD 7000 Series]"
device.string = "1"
device.description = "Oland/Hainan/Cape Verde/Pitcairn HDMI Audio [Radeon HD 7000 Series]"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
profiles:
output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5900, available: no)
output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (priority 800, available: no)
output:hdmi-surround71: Digital Surround 7.1 (HDMI) Output (priority 800, available: no)
output:hdmi-stereo-extra1: Digital Stereo (HDMI 2) Output (priority 5700, available: no)
output:hdmi-surround-extra1: Digital Surround 5.1 (HDMI 2) Output (priority 600, available: no)
output:hdmi-surround71-extra1: Digital Surround 7.1 (HDMI 2) Output (priority 600, available: no)
output:hdmi-stereo-extra2: Digital Stereo (HDMI 3) Output (priority 5700, available: no)
output:hdmi-surround-extra2: Digital Surround 5.1 (HDMI 3) Output (priority 600, available: no)
output:hdmi-surround71-extra2: Digital Surround 7.1 (HDMI 3) Output (priority 600, available: no)
output:hdmi-stereo-extra3: Digital Stereo (HDMI 4) Output (priority 5700, available: no)
output:hdmi-surround-extra3: Digital Surround 5.1 (HDMI 4) Output (priority 600, available: no)
output:hdmi-surround71-extra3: Digital Surround 7.1 (HDMI 4) Output (priority 600, available: no)
output:hdmi-stereo-extra4: Digital Stereo (HDMI 5) Output (priority 5700, available: no)
output:hdmi-surround-extra4: Digital Surround 5.1 (HDMI 5) Output (priority 600, available: no)
output:hdmi-surround71-extra4: Digital Surround 7.1 (HDMI 5) Output (priority 600, available: no)
output:hdmi-stereo-extra5: Digital Stereo (HDMI 6) Output (priority 5700, available: no)
output:hdmi-surround-extra5: Digital Surround 5.1 (HDMI 6) Output (priority 600, available: no)
output:hdmi-surround71-extra5: Digital Surround 7.1 (HDMI 6) Output (priority 600, available: no)
off: Off (priority 0, available: unknown)
active profile: <output:hdmi-surround>
sinks:
alsa_output.pci-0000_01_00.1.hdmi-surround/#8: Oland/Hainan/Cape Verde/Pitcairn HDMI Audio [Radeon HD 7000 Series] Digital Surround 5.1 (HDMI)
sources:
alsa_output.pci-0000_01_00.1.hdmi-surround.monitor/#9: Monitor of Oland/Hainan/Cape Verde/Pitcairn HDMI Audio [Radeon HD 7000 Series] Digital Surround 5.1 (HDMI)
ports:
hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: no)
properties:
device.icon_name = "video-display"
hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: no)
properties:
device.icon_name = "video-display"
hdmi-output-2: HDMI / DisplayPort 3 (priority 5700, latency offset 0 usec, available: no)
properties:
device.icon_name = "video-display"
hdmi-output-3: HDMI / DisplayPort 4 (priority 5600, latency offset 0 usec, available: no)
properties:
device.icon_name = "video-display"
hdmi-output-4: HDMI / DisplayPort 5 (priority 5500, latency offset 0 usec, available: no)
properties:
device.icon_name = "video-display"
hdmi-output-5: HDMI / DisplayPort 6 (priority 5400, latency offset 0 usec, available: no)
properties:
device.icon_name = "video-display"
(I left out the built in one)
But pavucontrol output looks the same and there is still no sound.
I'm wondering if there's anything special I need to do because of "ARC"? Is it different than "just" sending audio over HDMI? Any suggestions would be helpful, or maybe you see something I missed?
|
ARC = Audio Return Channel. It is used to allow transferring audio in the opposite direction to the main signal, i.e. if you are using HDMI to transfer a signal (audio, video or both) from device A to B, ARC could be used to transfer audio from B to A.
For example, you might have an ARC-capable home theatre amplifier plugged into an ARC-capable TV with a HDMI cable. When viewing something from a source connected to the amplifier, it would send a regular (non-ARC) HDMI video+audio signal to the TV, although you might prefer having the amplifier handle the audio with its better speakers, so the TV would actually use only the video part of the signal.
But when watching TV transmissions, the ARC would come into play: the ARC would transmit audio of the TV channel back to the amplifier, so you could use the multi-channel speakers plugged into the amplifier to hear the sound of the TV. At the same time, the same HDMI cable could optionally be used to transmit the amplifier's on-screen menu displays to the TV.
Since your ATI display adapter is purely a HDMI output (which means its ARC capability, if it had one, would be an audio input), the use of the ARC mode is not applicable here. To send audio from a computer's HDMI output to the speakers, you would use the "primary signal" of the HDMI, not the reverse-direction ARC.
Try selecting a non-ARC HDMI mode for the speakers, if possible.
| Archlinux HDMI Audio-Only Output Unplugged Unavailable |
1,396,909,704,000 |
I finally found out how to make my Pop!_OS recognize my HDMI for audio. (basically I'm using an ASUS laptop with a 1060 hooked with a monitor, everything was fine except for the HDMI audio output not displaying on the audio output list)
I followed this guide and it works flawlessly, but every time I reboot my machine I have to run this commands in order for the fix to apply again..
sudo modprobe nvhda
sudo tee /proc/acpi/nvhda <<<ON
I originally extracted the zip file on my downloads folder and followed the steps from there on, I'm aware I can now skip the make and install part and just just straight use the sudo modprobe nvhda to load the fix; I don't know if I can already delete that extracted folder (or should I move it to root folder/other..).
That's a separate question basically, but main question is how would I make a script that executes those 2 pieces of code on system start/boot.
|
You can delete the folder if you installed the module with sudo make install.
See https://bugs.freedesktop.org/show_bug.cgi?id=75985#c33:
I can confirm that kernel module, posted by Maik Freudenberg [Comment 27], is working fine on my system. Thank you for the fix. The HDMI audio device now works as it should.
The steps I did to enable HDMI audio device:
Download and extract the file nvhda.tar.xz.
Run commands in terminal:
make
sudo make install
echo nvhda | sudo tee -a /etc/initramfs-tools/modules
echo "options nvhda load_state=1" | sudo tee /etc/modprobe.d/nvhda.conf
sudo update-initramfs -u
Reboot.
With this fix, I did not notice any problems with power management or system stability. HDMI audio works at system startup, after resume from sleep, after plugging/unplugging HDMI cable.
No need to write an extra script.
Related: Nvidia NVHDA Non-Detected Workaround and Suspend Fix for NVHDA (ubuntuforums)
| How do I set this HDMI output fix permanent? |
1,396,909,704,000 |
I have an Intel card, and it appears that it is not possible to just stream audio and no video. So is there a way to just activate the port and send a dummy video signal to have audio working? I do not want to extend my desktop on the additional screen.
|
You can set up a second X display for the HDMI output. This will still use up video RAM and display it, but it will be separate from your primary desktop, so your desktop stays on your monitor and doesn't extend to the additional screen. I've set this up on my Intel integrated graphics with an /etc/X11/xorg.conf file that contains
Section "Device"
Identifier "intel0"
Driver "intel"
Option "AccelMethod" "sna"
Option "ZaphodHeads" "VGA1,HDMI1,DP1"
Screen 0
EndSection
Section "Device"
Identifier "intel1"
Driver "intel"
Option "AccelMethod" "sna"
Option "ZaphodHeads" "HDMI3"
Screen 1
EndSection
You can add Screen sections to specify the resolution if you want.
You'll probably need different output names, look at the output of xrandr to see what outputs your card has. I don't remember why I had to specify the AccelMethod, maybe it was to make it work on my particular chipset. The first screen will have the display name :0, the second on the HDMI port :1 (so you can still tell programs to make use of it if you want to by adding options like -display :1 when you run them).
I'm using two instances of the fvwm window manager for each display; possibly you may need to tell your window manager to only use the first display.
| Activate HDMI output without using as desktop |
1,396,909,704,000 |
I have a RPi that is running videos with omxplayer and outputting to my tv. HDMI video and audio out work just fine, but I would additionally like to stream only the audio to my network (via RTP or other means) so I can connect other devices in different rooms and continue listening -- like a LAN radio broadcast of sorts. I have tried using avconv and ffmpeg but have only been successful in capturing audio before it is sent to the tv (on $DISPLAY=0).
I am currently working on duplicating the audio and capturing it that way but have only come up with silent audio files so far.
I can record audio with avconv / ffmpeg before it gets sent to HDMI out but can't get the duplicated audio to record anything.
I successfully streamed previously saved audio files via RTP, but it was a little too choppy for my liking - audio was dropping every 10-ish seconds. Is this a limitation of the RPi 3B+ hardware? Ideally I would like to stream the HDMI audio with as little delay as possible. It is not necessarily my goal to save the HDMI audio as a large file as I plan to leave the service running for long periods of time.
Also, while following the above link, I am not entirely sure what to put as the device name in asound.conf
pcm.output {
type hw
card <Your Output Device Name>
card 0? or the HDMI device?
|
You need Pulseaudio to stream audio over LAN
you would need to install Pulseaudio and:
Pulseaudio Volume Control (pavucontrol) for sound levels and routing audio streams
Pulseaudio Preferences (paprefs) for streaming
Multicast/RTP tab to configure for RTP sender or reciever
Simultaneous Output tab to get audio playing to multiple devices
LAN streaming audio can be delayed by 1 or 2 seconds compared to audio source, so audio is not good if you can hear both unsynchronized audio streams at once when moving between two rooms
| How do I capture RPi’s hdmi audio output and stream it to LAN |
1,396,909,704,000 |
I have a very strange issue with my Arch Linux install.
When a HDMI cable is connected to my graphic card (a GTX 970), my PC won't boot, it only shows a black screen, but it will start if the HDMI cable is disconnected.
If I plug in the HDMI cable while Arch runs, the PC freezes.
I have the same issue if I use the DVI-D port.
At this time I'm using Display Port and DVI-A do not have this problem.
How may I approach this? Which logs would be useful?
EDIT :
I later found this happens when i plug a third screen using any connector.
Another strange detail, 3 screens are working only if i plug the third one (DVI-A) during the boot; if I plug it before, it won't start, and if I plug it in after boot, the PC freezes.
EDIT 2:
Thank you for your answer ! This is not a laptop but a tower i build myself with:
Nvidia GTX970 ASUS STRIX (driver : nvidia 415.27-5 )
Intel i5 4590K (xf86-video-intel not installed)
Motherboard H81M-PLUS
|
The problem came from GDM, so I move the custom config and re-install it with :
sudo systemctl disable gdm
sudo pacman -R gdm
sudo pacman -S gdm
sudo mv /etc/gdm/custom.conf /etc/gdm/custom.conf.old
sudo systemctl enable gdm
| Arch PC freezes when third screen connects |
1,538,883,631,000 |
After installing Antergos with KDE everything is working fine (as far as I can tell) except my HDMI monitor doesn't work. Instead of rendering anything properly it displays whatever the first image that appears on it is but broken into lines with black lines in between.
I have an NVidia GPU and I think it's Optimus (I got 2 lines following this) so I assumed the Nouveau drivers just weren't up to scratch and it was trying to render the HDMI with those. Installing the proprietary nvidia drivers with nvidia-installer made the OS unbootable (GRUB loaded, selecting Antergos gave a black screen).
Installing Bumblebee (-b with nvidia-installer) had much the same effect. Attempting to revert to Nouveau (-n with nvidia-installer) fixed this however once I logged in KDE Plasma froze on load and I could get no further (particularly strange because that's exactly what I thought I had before when it worked).
It's possible that the drivers aren't the issue at all but at this point I have no clue how to make my HDMI screen work.
Laptop model: Gigabyte P57v7
CPU: Intel i7-7700HQ
GPU: NVidia Geforce GTX 1070
I'll add logs tomorrow because I'll have to boot into non-graphical to get them.
|
For future readers with a similar problem: the fix that worked for me is here.
The solution here of adding acpi_osi=! acpi_osi="Windows 2009" to the kernel parameters both allowed the reinstalled nouveau drivers to finish booting and the nvidia drivers to work at all.
| HDMI output broken after Antergos install |
1,538,883,631,000 |
Installed Kali Linux on my Alienware M17 laptop;
laptop monitor was working
connected to an external monitor via HDMI, configured the external monitor as the primary, laptop monitor as secondary; all were working initially
used xrandr command to dim laptop monitor; laptop monitor stopped working, while external monitor was working
If I unplug the external monitor and reboot my laptop, the laptop monitor will display as expected; as soon as connect the external monitor back in HDMI, external monitor will work but the laptop monitor will black out with occasional flickers.
Does anyone have a solution?
|
I upgraded my video card driver to Nvidia and the problem has been solved, now I am happily running Kali Linux with my laptop monitor and my external monitor.
| Alienware laptop monitor stopped working after connecting to an external monitor, Kali Linux OS |
1,538,883,631,000 |
I installed Ubuntu 16.04 on an ASUS Z450LA laptop with Intel HD5500 graphics (no dedicated graphics card) and am using MATE as my desktop environment.
I had to rebuild the kernel with this patch to fix an issue with the touchpad not working upon waking up from suspend, if this matters.
The problem is that the system freezes completely after a while if I use HDMI. The mouse stops moving, the machine doesn't respond to pings anymore, and the only way out is to hold the power button until the machine turns off.
There is no error message in the logs as far as I can see, and the machine is not overheating or anything (it usually stays at the range of 30 - 40 ºC).
What can be causing this problem and how would I debug this?
|
After a while testing, I came to the conclusion that the problem is not the HDMI; the problem is Chrome anything that uses OpenGL.
As a workaround, run Chrome with --disable-gpu in the command line.
| System freezes completely while using HDMI |
1,538,883,631,000 |
Is it possble to use a HDMI card with OpenBSD? I have a home server but at the moment I have only a TV with an HDMI entry. I would like to use OpenBSD.
|
It depends on the chip on your card.
Support for Intel and Radeon is quite good: quoting one of the developers from a recent mailing list thread:
If you're after acceleration for now it is <= Haswell for
Intel (excluding Bay Trail) or <= Northern Islands for Radeon.
See also the relevant man pages: intel(4) and radeon(4). Nvidia is still not supported (there is port of the Nouveau driver) and blobs are a big no-no in OpenBSD-land.
The azalia(4) audio driver doesn't currently support codecs that are intended for HDMI connectivity.
| It is possible to use a HDMI card with OpenBSD |
1,538,883,631,000 |
I use the cmus console music player through ssh on a device with OSMC (Kodi, based on Debian Jessie) installed. My problem is that the sound is played to the HDMI, and I want to play music to the jack output.
I tried to use alsamixer, amixer, aplay, etc... but these are not installed and sudo apt-get install alsamixer doesn't help. (Package not found - Maybe there's a better option than installing alsamixer anyway).
I tried to read man cmus, which seems to offer the possibility to change some alsa settings : link to the online manual page, but I don't understand which settings are relevant for me, nor which values to put... Anyway : cmus is maybe not the source of my issue.
How can I achieve what I want to, using only the terminal (I am through SSH) ?
--
PS : I finally installed alsamixer (actually the package's name was alsa-utils). And results that my jack output is not recognised. But I know it is working since other programs use it.
|
This 2018 article explains how you can dynamically switch the audio output between hdmi and analogue on a Raspberry Pi. From the command line use
amixer cset numid=3 2
for hdmi and
amixer cset numid=3 1
for analogue. This information is no longer in the current version of that page, so may no longer work. The May 2020 blog says they have changed the sound architecture to handle the hdmi and analogue output as 2 independent devices:
Alsa card 0 will be HDMI, and card 1 will be the headphone jack.
The default is 0, but to use 1 you can create a ~/.asoundrc file with
defaults.pcm.card 1
defaults.ctl.card 1
This presumably requires you to login again.
You can generate a stereo test tone with another command from alsa-utils:
speaker-test -c 2 -s 1 -t sine -f 440
| Set audio output using command line |
1,538,883,631,000 |
Pulseaudio murdered my last Audigy 2 soundcard, it did this because it kept turning the PCM to maximum volume on the sound card, and it kept changing the audio levels automatically every time i switched audio application - e.g. from a Firefox youtube video to Audacious. It was an old card anyway and the caps were getting dry but resetting the volume to high was the final nail in the coffin and eventually it started to sound like Eric Cartman flatulating into a trombone. Then the audio on one side of some of the line outs died and the sound quality started going on all the other outputs. I've got rid of pulseaudio so that this doesn't repeat and I'm not going to use pulseaudio again.
I've recently bought a Asus Strix Soar 7.1 sound card. It's detected by ALSA if and only if the Realtek onboard sound card is enabled. If the onboard sound is disabled in the system UEFI, then no sound cards are detected. Asus Strix Soar is a USB based soundcard that sits on a PCIe PCB. I've tested it, it works fine, and sounds reasonable when i tell Audacious to use the PCM from that card. But many applications are going to want to use the default soundcard which is inevitably going to be the 1st sound device.
If I blacklist all the kernel modules for the onboard sound, then Alsa stops detecting my Strix Soar and it reports "no mixer device" and will not open any sound controls. The same happens when I disable it in the BIOS; it's not detected by ALSA.
I also have an NVidia graphics card, and this wants to output sound through HDMI and this tries to be the default sound card.
I've stopped the HDMI output from being the default with the following config:
options snd_hda_intel index=3 model=auto
In /etc/modprobe.d/alsa-base.conf and this moves the hdmi output to card 3, so that it's at the back of the list and never becomes the default soundcard. Hurray!
But now the realtek sound card is listed as the first device. I don't know what the kernel module is for the realtek sound card is, so i can't move it.
When I do an lspci -k | grep -A2 Audio i get the following:
09:00.1 Audio device: NVIDIA Corporation GK208 HDMI/DP Audio Controller (rev a1)
Subsystem: ASUSTeK Computer Inc. GK208 HDMI/DP Audio Controller
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel
--
0b:00.3 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) HD Audio Controller
Subsystem: ASUSTeK Computer Inc. Family 17h (Models 00h-0fh) HD Audio Controller
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel
When I do an lsmod | grep snd, I get:
snd_hda_codec_hdmi 61440 1
snd_hda_codec_generic 86016 1
snd_usb_audio 262144 1
snd_hda_intel 49152 1
snd_usbmidi_lib 36864 1 snd_usb_audio
snd_hda_codec 151552 3 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel
snd_rawmidi 40960 1 snd_usbmidi_lib
snd_seq_device 16384 1 snd_rawmidi
snd_hda_core 94208 4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec
snd_hwdep 16384 2 snd_usb_audio,snd_hda_codec
snd_pcm 114688 5 snd_hda_codec_hdmi,snd_hda_intel,snd_usb_audio,snd_hda_codec,snd_hda_core
snd_timer 36864 1 snd_pcm
snd 94208 15 snd_hda_codec_generic,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_usb_audio,snd_usbmidi_lib,snd_hda_codec,snd_timer,snd_pcm,snd_rawmidi
soundcore 16384 1 snd
usbcore 294912 5 xhci_hcd,snd_usb_audio,usbhid,snd_usbmidi_lib,xhci_pci
The aplay -l output is:
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 0: Generic Analog [Generic Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: Generic [HD-Audio Generic], device 1: Generic Digital [Generic Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: CARD [STRIX SOUND CARD], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: CARD [STRIX SOUND CARD], device 1: USB Audio [USB Audio #1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: CARD [STRIX SOUND CARD], device 2: USB Audio [USB Audio #2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 3: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 3: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
In summary:
The onboard audio is currently detected as the first sound card.
I can't disable the onboard sound without disabling my Strix Soar as well.
I can't blacklist the onboard sound kernel modules without disabling my Strix Soar.
I can't work out which kernel modules i need in alsa-base.conf to move the realtek soundcard away from default.
What I want to do:
What I am trying to do, is either disable the onboard audio or banish it from being the default sound device, so that my Strix Soar is the default sound card. But I don't know the kernel module for this.
Is there some way to find out what the kernel module is so that I can move it? Or some way to disable the onboard audio without disabling the Strix Soar?
I can't be the only person with this problem.
Edit thanks for Nik's accepted answer which put me on the right path, the solution was to change /etc/modprobe.d/alsa-base.conf to read:
options snd_usb_audio index=0 model=auto
options snd_hda_intel index=3 model=auto
options snd_hda_intel index=4 model=auto
And this fixed everything. Strix is now first.
|
The onboard Realtek and NVidia GPU both use module snd_hda_intel and the device you want as default uses module snd_usb_audio
The slots option can fix the card order so snd_usb_audio takes the first slot (card 0)
Edit /etc/modprobe.d/alsa-base.confand replace the options added in the question with this:
options snd slots=snd_usb_audio,snd_hda_intel
Advanced Linux Sound Architecture - Module Autoloading Support | The Linux Kernel documentation
| Disabling onboard sound so that I can use ASUS Strix Soar as default sound card |
1,538,883,631,000 |
Ubuntu minimal 20.04 LTS running on OdroidXU4. So no desktop environment.
root@odroid:~# cat /proc/asound/cards
0 [OdroidXU4 ]: Odroid-XU4 - Odroid-XU4
Odroid-XU4
1 [Device ]: USB-Audio - USB PnP Sound Device
C-Media Electronics Inc. USB PnP Sound Device at usb-xhci-hcd.3.auto-1.2, full
I modified asound.conf to set the usb audio as default
GNU nano 4.8 /etc/asound.conf
pcm.!default {
type plug
slave {
pcm "hw:1,0"
}
}
ctl.!default {
type hw
card 1
}
If I now execute
speaker-test -t wav -c 2
the 'front left' and 'front right' are played back to me so I assume this means that the usb audio card is now the default one.
If I start a process the audio is still coming through the hdmi.
I also tried - besides a ton of other things - to edit the /etc/modprobe.d/alsa-base.conf and setting the options snd-usb-audio index=0
two times, as it appears two times.
If I do that I loose the usb sound card upon reboot. If I set it to options snd-usb-audio index=1 it reappears but the situation remains the same. I just tried that because normally it is being specified as options snd-usb-audio index=-2 to prohibit 'abnormal cards' to become the default and I assumed it was interfering with me wanting to set is as the default.
I took care to revert non working changes so the system is audio wise in the exact state as described here. The defaults with the described changes. The OS originally comes from 18.04 -> 19.04 -> 20.04 as 18.04 is the latest image I could download from hardkernel for the sbc.
I did loose sound after the distribution upgrades. A known problem apparently. I repaired it after a few attempts as being described in a lot of posts.
My question : How do I make all the applications use the usb audio device please?
|
If you run Pulseaudio anyway, don't mess with the ALSA settings (which say to use Pulseaudio for ALSA-only applications), instead use pavucontrol or pacmd to set the default sink and/or the sink of a specific application in Pulseaudio.
Pulseaudio has a database that will assign the same sink to an application the next time the application starts, so setting the default sink in Pulseaudio will only get picked app for applications that have never run before.
| 2nd usb audio card - unable to set as default on OdroidXU4 - application still uses hdmi sound |
1,538,883,631,000 |
I am trying to configure dual monitors on a custom built machine with an Intel i7-7700K CPU, a NVIDIA 1080-Ti GPU, and a CentOS 7 operating system. I have no problem booting with the primary monitor connected to the DVI port, but activating the secondary monitor with the HDMI port has been a struggle. After reading this post I tried updating the /etc/X11/xorg.conf for the GPU with the following lines:
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BusID "PCI:01:00:0"
Option "NoLogo" "true"
Option "UseEDID" "true"
Option "ConnectedMonitor" "DFP"
EndSection
I did not reboot the computer at this point. Just saved the file and switched the power on the secondary display on and off.
This post also points to xorg.conf as being part of the solution, but so far I haven't had any luck. I've opened up my displays panel and only my primary monitor is being detected. In case it's relevant information, I have also installed all NVIDIA drivers and configured CUDA on this build.
Any thoughts? How do I get this secondary monitor up and running?
|
Open a command terminal and then run 'sudo nvidia-settings' . This should open up the nvidia setup application where you can fix your video settings to support multiple monitors and then reboot and you should be up and running.
| How to configure multiple monitors with DVI and HDMI connections with CentOS 7 |
1,538,883,631,000 |
I have a really broken up computer, the LCD screen is internally cracked and the WiFi doesn't work. I have a live Ubuntu CD that I wanted to try, to see if I like Ubuntu as much as Debian on other devices. I put the live CD in and it worked and booted the Ubuntu terminal.
The problem with this is that the computer would normally display the data over HDMI. Is there a way to display the terminal or start the GUI other than startx which I cannot see the output of. I do believe the dc has the GUI as when i checked the files it had some Ubuntu images for the background.
|
I used a virtual machine to run the disk.
| Can you display terminal via hdmi |
1,538,883,631,000 |
When I plug my Raspberry Pi to my TV (which supports SimpLink, or respectively CEC) the TV automatically turns on from standby. This is due to the fact that the Raspberry Pi also supports CEC: http://www.raspberrypi.org/archives/1839
I would like to see this working with my HTPC aswell. It runs Debian Wheezy - the HDMI-connector is on a ASUS P8H77-I-board.
How can I
check, if CEC is supported by my mainboard?
make CEC work if it's supported?
|
Based on the specifications at the link you provided, I don't believe this motherboard has CEC support. It's a fairly new standard, especially to the PC world..
You might try looking at http://www.pulse-eight.com/store/products/104-usb-hdmi-cec-adapter.aspx for an alternate solution. I haven't tried the device as of yet, but it is an intriguing looking device.
| use CEC with my TV |
1,538,883,631,000 |
After some struggle, I got systemctl suspend working with my Nvidia graphics card; only that when machine resumes, the monitor is blank. Yet I discovered that if I unplug the HDMI cable and plug it in again, it recovers and the image is back.
Now I wonder if I could run a command that does the same as the manual unplugging? It seems that Linux is perfectly able to reset the state; but I don't know how to trigger it (through software).
So, I'm looking for a command that resets the HDMI connection. Do you know if that is possible?
One caveat is that in that situation, the screensaver will be active. That means, it would need to be a script that can be run on resume without any interaction from my side.
(How to fix the problem of the blank screen is a separate question. From what I see, I'm not the only one affected by it. Even getting even to the state where it doesn't freeze after waking up was a success for me.)
|
In X11 xset dpms force off ; xset dpms force on might fix it.
In wayland, you might be able to do something with swayidle but I haven't tried it.
| How to simulate the plugging and unplugging of an HDMI cable through software? |
1,538,883,631,000 |
I'm on Dell Latitude 3420; it came with pre-installed Ubuntu 20.04.
I am dual booting with Devuan Chimeara
uname -a
Linux devuan-Latitude 5.10.0-22-amd64 #1 SMP Debian 5.10.178-3 (2023-04-22) x86_64 GNU/Linux
I am able to connect to the external TV display; but no sound in the external TV display.
The HDMI sound output works fine with Ubuntu 20.04.7, but not with Devuan.
Earlier, there was no sound output even through the internal speakers. But that was resolved after installing firmware-sof-signed
Ubuntu info:
uname -a
Linux Latitude-3420 5.14.0-1032-oem #35-Ubuntu SMP Thu Mar 31 12:49:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
|
The following config change in /etc/modprobe.d/alsa-base.conf (at the end of this file) did the trick:
snd-hda-intel dmic_detect=0
So, the HDMI sound output is solved. Hurray!!
Thanks to the guys at Official Devuan Forum, especially delgado.
| HDMI sound output not coming |
1,307,362,518,000 |
When a Linux system hibernates and resumes from hibernation, I think that the kernel needs to know that it's resuming, not booting. Otherwise, the kernel will start the usual boot process, and will not load the swapped data. How does the kernel know it's resuming?
At first, I thought that GRUB (or another boot loader) tells the kernel by kernel parameters. But as long as I check /proc/cmdline, the kernel parameters are the same as usual. Is there any mechanism for the kernel to know it's resuming?
|
Hibernation works by using a swap partition¹ to swap out all processes' memories, the kernel state, finally save some state of CPU and possibly other devices, then power off. On the way, it notes in the swap partition that this is a hibernation image.
Resuming from hibernation works by telling the kernel to try resuming from a swap partition, using the resume= kernel argument, resume=/dev/sda4 (if /dev/sda4 is your swap partition), resume=UUID=deadbeef-cafe-b00b-1337-123456123456 or similar.
The kernel during boot then looks into that partition, finds the note in the swap partition that says "hey, this is a hibernation image", and restores device, kernel and processes from that. If the note is not there, it just boots as normal.
You can check the source code, specifically the description of the software_resume() function:
* software_resume - Resume from a saved hibernation image.
*
* This routine is called as a late initcall, when all devices have been
* discovered and initialized already.
*
* The image reading code is called to see if there is a hibernation image
* available for reading. If that is the case, devices are quiesced and the
* contents of memory is restored from the saved image.
So this involves two instances of the kernel, the "boot kernel" and "the image kernel" and the process is described in the official kernel documentation which also explains why this isn't done via the bootloader:
Although in principle the image might be loaded into memory and the
pre-hibernation memory contents restored by the boot loader, in
practice this can’t be done because boot loaders aren’t smart enough
and there is no established protocol for passing the necessary
information. So instead, the boot loader loads a fresh instance of the
kernel, called “the restore kernel”, into memory and passes control to
it in the usual way. Then the restore kernel reads the system image,
restores the pre-hibernation memory contents, and passes control to
the image kernel. Thus two different kernel instances are involved in
resuming from hibernation.
¹ These days, can also be a swap file on many (most?) file systems, or an LVM volume….
| How does the kernel know it's resuming from hibernation, not booting? |
1,307,362,518,000 |
Based on various sources I have cobbled together ~/.config/systemd/user/screenlock.service:
[Unit]
Description=Lock X session
Before=sleep.target
[Service]
Environment=DISPLAY=:0
ExecStart=/usr/bin/xautolock -locknow
[Install]
WantedBy=sleep.target
I've enabled it using systemctl --user enable screenlock.service. But after rebooting, logging in, suspending and resuming (tested both with systemctl suspend and by closing the lid) the screen is not locked and there is nothing in journalctl --user-unit screenlock.service. What am I doing wrong?
Running DISPLAY=:0 /usr/bin/xautolock -locknow locks the screen as expected.
$ systemctl --version
systemd 215
+PAM -AUDIT -SELINUX -IMA -SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ +SECCOMP -APPARMOR
$ awesome --version
awesome v3.5.5 (Kansas City Shuffle)
• Build: Apr 11 2014 09:36:33 for x86_64 by gcc version 4.8.2 (nobody@)
• Compiled against Lua 5.2.3 (running with Lua 5.2)
• D-Bus support: ✔
$ slim -v
slim version 1.3.6
If I run systemctl --user start screenlock.service the screen locks immediately and I get a log message in journalctl --user-unit screenlock.service, so ExecStart clearly is correct.
Relevant .xinitrc section:
xautolock -locker slock &
Creating a system service with the same file works (that is, slock is active when resuming):
# ln -s "${HOME}/.config/systemd/user/screenlock.service" /usr/lib/systemd/system/screenlock.service
# systemctl enable screenlock.service
$ systemctl suspend
But I do not want to add a user-specific file outside $HOME for several reasons:
User services should be clearly separated from system services
User services should be controlled without using superuser privileges
Configuration should be easily version controlled
|
sleep.target is specific to system services. The reason is, sleep.target is not a magic target that automatically gets activated when going to sleep. It's just a regular target that puts the system to sleep – so the 'user' instances of course won't have an equivalent. (And unfortunately the 'user' instances currently have no way to depend on systemwide services.)
(That, and there's the whole "hardcoding $DISPLAY" business. Every time you hardcode session parameters in an OS that's based on the heavily multi-user/multi-seat Unix, root kills a kitten.)
So there are two good ways to do this (I suggest the 2nd one):
Method 1
Create a system service (or a systemd-sleep(8) hook) that makes systemd-logind broadcast the "lock all sessions" signal when the system goes to sleep:
ExecStart=/usr/bin/loginctl lock-sessions
Then, within your X11 session (i.e. from ~/.xinitrc), run something that reacts to the signal:
systemd-lock-handler slock &
xss-lock --ignore-sleep slock &
(GNOME, Cinnamon, KDE, Enlightenment already support this natively.)
Method 2
Within your X11 session, run something that directly watches for the system going to sleep, e.g. by hooking into systemd-logind's "inhibitors".
The aforementioned xss-lock actually does exactly that, even without the explicit "lock all" signal, so it is enough to have it running:
xss-lock slock &
It will run slock as soon as it sees systemd-logind preparing to suspend the computer.
| How to run systemd user service to trigger on sleep (aka. suspend, hibernate)? |
1,307,362,518,000 |
When a computer goes into hibernation mode, it saves the contents of the RAM into the swap space so that it can resume exactly where it left off when it powers back on.
So, what if you are currently using more memory than you have RAM. In this case, some data that would otherwise be in RAM is saved to swap.
An example. A computer has 1GB of RAM and 1GB of swap space. It is currently using all but 100MB of RAM and 500MB of swap. Thus, it is needing to remember about 1.4GB of memory to save its state. However, swap is only 1GB.
What will happen in this case?
~~ edit ~~
As answered below, the hibernate fails. So then a follow-up question:
When this fails, where is the error reported?
|
That depends on the implementation of hibernation. Even if you restrict the question to Linux, the implementation has evolved over time.
First, consider that some of the RAM is used for disk caches. This doesn't need to be moved to the swap as it can be reloaded from the disk after the system resumes. On a system with a good cost/efficiency balance, it's typical for about half of RAM being allocated to caches. (See also Why use swap when there is more than enough RAM.) Under Linux, some early implementations would store all allocated memory into the swap, but the current implementation(s?) of hibernation skip disk caches.
Second, some systems compress memory as it's written to the swap, which can make the exact required amount of swap hard to predict. Some versions of Linux's hibernation support have supported compression; I don't know if current ones do.
What you can generally expect if there isn't enough swap space is that hibernation will fail: the system will try to store the (useful) contents of RAM into the swap, and as soon as it detects that there isn't enough space, the hibernation attempt is aborted (typically with an error message on the console and in the system logs). As far as I know, Linux has always behaved like this (not that there's really another sensible behavior).
| What happens to data in swap when your computer hibernates? |
1,307,362,518,000 |
I recently upgraded my kernel from 3.16.4 (Debian jessie) to 4.9.0 (Debian stretch).
Everything was fine, until I tried to "Hibernate" (suspend to disk).
When I use Hibernate option in LXDE, it appears to hibernate. I can hear the disk spindle ticking and writing data. But the problems appears when resuming from hibernation. The kernel successfully restores the image from swap, but then freezes and reboots, with all that work lost. I could not find answer anywhere on internet. The people are just solving some mistakes around not setting /etc/initramfs-tools/conf.d/resume or have set kernel paramters, or have wrong entry in /etc/fstab. I have these correct. Correct UUID in /etc/initramfs-tools/conf.d/resume, correct fstab and not set resume kernel paramter.
I moved the swap partition outside of the extended partition to primary. The UUID was saved and applied to the new swap.
The system reaches "Restoring image 100%" and then "Suspending consoles", and then it powers off and boots normally, with all work lost.
Tried clean install, but without luck.
Happens only on i386 (32-bit x86), amd64 (64-bit x86) does not suffer.
Disk partition table layout:
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1 ext4 HDD <ROOT-UUID> /
└─sda2 swap HDD-SWAP <SW-UUID> [SWAP]
sr0
The sda2 was logical(resides-inside-extended) before the upgrade.
Fstab:
UUID=<ROOT-UUID> / ext4 errors=remount-ro 0 1
UUID=<SW-UUID> none swap sw 0 0
/etc/initramfs-tools/conf.d/resume
RESUME=UUID=<SW-UUID>
Kernel cmdline
BOOT_IMAGE=/boot/vmlinuz-4.9.0-3-686-pae root=UUID=<ROOT-UUID> ro quiet
System information:
Computer: Compaq CQ60-120ec
Swap Size: 3.5GiB
Processor: AMD Athlon X2 64 QL-66
GPU: Nvidia Geforce 8200M G
Memory: 2G DDR2 667MHz
Desktop Environment: LXDE
Debian Version: 9 (stretch)
Kernel version: 4.9.0-3
Graphics Driver: nvidia legacy 304xxx
(I know the processor is 64bit but it came with 32bit os originally, so I thought it was 32bit until I examined /proc/cpuinfo)
|
The issue is due to a conflict between hibernate and kASLR on x86-32. This can be solved by disabling kASLR with the nokaslr kernel boot option. x86-64 is not affected.
For Grub this can be done by editing /etc/default/grub and adding nokaslr to the boot options, e.g.:
GRUB_CMDLINE_LINUX_DEFAULT="quiet nokaslr"
Then run update-grub to update the configuration and reboot to give it a try.
I had exactly the same issue and it seems that only the PAE kernel is affected by that issue. The same kernel without PAE works without issues.
The workaround for me was to install linux-image-686 and uninstall linux-image-686-pae and linux-image-4.9.0-4-686-pae. The exact kernel version may change over time due to upgrades, but basically the currently running PAE kernel need to be replaced with a kernel without PAE.
It has actually nothing to do with PAE support of the CPU, as my CPU supports PAE according to /proc/cpuinfo. But PAE is anyway not of much use on old notebooks.
It has also nothing to do with kernel 4.9 PAE as the same issue happens with kernel 4.13 PAE from Debian backports.
| Hibernation resume fail on linux kernel 4.9.0, Debian 9 |
1,307,362,518,000 |
I think that Sleep/Suspend to RAM is just saving session to RAM, therefore entering sleep and restoring very quickly, but in case of total battery drain the session is lost as the machine shuts down by power failure.
In Hibernation, the session data active in RAM is saved on the HDD (I think swap partition is needed for this) and then the machine shuts down completely. When the Linux system is started up again the session is restored from disk with all the open programs. (In case of multi boot, one may chose to use other systems like Windows before going back to the Linux, with no impact on the effectiveness of the hibernation procedure.)
I know that Hybrid-Sleep is an intermediary operation; it doesn't shut down the machine (you cannot for example go to Windows in multi-boot) and the RAM is refreshed (like in "Sleep/Suspend to RAM") while data is also saved to the swap space of the HDD.
In case of total battery drain when the machine shuts down completely: what happens with the hybrid-sleep state? I think the RAM data is lost, but is the HDD backup restored when the Linux system is started again?
|
As I was expecting a quick answer which didn't came, I have subjected an older laptop to a rough test intended to provide the answer:
I have opened a text document, written something and, without saving the document, entered hybrid sleep with the command systemctl hybrid-sleep. At this point the LED beside the power button was blinking, like in Sleep mode. As the laptop cable was disconnected, I have also removed the battery. At this point the machine was fully shut down, the LED was dead.
Putting the battery back and starting the machine from the power button, my multi-boot list became available (Windows etc.), and when booting Linux it all went just like in the case of hibernation (message with booting from dev/disk/...), my open unsaved document was available.
So, the answer is YES.
Hybrid Sleep is not an intermediary state between Suspension/backup to RAM ("Sleep") and that to disk ("Hibernation"), but a double operation; it simply does both.
It ensures all that is needed for the Hibernation procedure to work, but it doesn't shut down the machine; instead, it suspends it to RAM (Sleep mode). As long as power is not completely drained, only the 'Sleep/Suspend to RAM' capability is visible. In case of total power drain, the Hibernation capability is used: the machine is shut down but is able to restore all programs from swap upon startup.
It is important to know that in the case of Hibernation/Hybrid-Sleep, the boot/startup procedure should not be interrupted (by the power button or power failure) or the programs' session&data saved on swap-partition (by the 'hibernation' action) will be lost.
| Is hybrid-sleep effective in case of battery drain (restoring session and open programs)? |
1,307,362,518,000 |
I'm currently on Linux Mint 19.1 and it uses swap file by default instead of swap partition. Everything including suspend works fine. But resume after hibernation is not working. I have following configuration in my /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=38c97b08-a1d5-44b5-9e96-afca13595fe2 resume_offset=27854848"
where UUID is the root partition where swap file belongs and resume_offset is the offset of the swap file. System successfully hibernates. But on the next boot, it shows resuming from the UUID location and suddenly screen goes blank( see this ). There is no response from the system after that. I have gone through the following threads and nothing seems to work.
Ubuntu 18.04 can't resume after hibernate
Hibernation in 18.04
Complete system details can be found here
I have secure boot disabled and currently on kernel 4.18. Does anyone have success with hibernation using swap file or any idea on why hibernation not working?
|
I have followed many tutorials and none of them seems to work. Sadly, this is caused by a regression in recent kernel versions and there is already an active bug report on launchpad.
hibernation (freezes on resume) since 4.13.0-25.29
It's more than a year now since the the bug was reported and no fix or workarounds till now. Please report on the above launchpad bug if somebody also experience this bug.
| Hibernation not working on Linux Mint 19 |
1,307,362,518,000 |
For many years I set up my Linux machines with no swap, as they had enough memory to do what I needed and I would rather a process get killed if it used too much memory, instead of growing larger and larger and quietly slowing everything down.
However I found out I required swap in order to use hibernate on a laptop, so I created a swap partition and hibernate has been working fine.
Recently I found the machine was going into standby rather than hibernate, and upon investigation it turned out there was not enough space in the swap partition for hibernation to take place. This was because the swap partition I thought was reserved for hibernation, was in fact being used as normal swap space.
Is there some way I can tell Linux to use a given swap partition for hibernation only, and not to use it for swapping during normal operation?
EDIT: Per the question below, the machine has 8GB of memory and the swap partition is also 8GB, since I only wanted it for hibernation use and not actual swap use, so any larger than the machine's memory size would've been wasted. The underlying issue is that because the 8GB swap partition is being used as additional memory, the machine can now allocate up to 16GB of memory (8GB physical + 8GB swap). It recently had 10GB in use and of course could not hibernate as that 10GB could not fit in the 8GB swap partition.
|
Is there some way I can tell Linux to use a given swap partition for hibernation only, and not to use it for swapping during normal operation?
Remove or comment the corresponding line from /etc/fstab. Example on my system
$ grep swap /etc/fstab
/dev/mapper/NEO--L196--vg-swap_1 none swap sw 0 0
Deleted because pm-hibernate needs a swap partition "activated" to work
Keep the swap activated (so leave it alone in /etc/fstab)
but explicitly ask the kernel to ignore it.
This is done using the sysctl parameter vm.swappiness to 0 (valid values are 0-100; higher will make the kernel swap more aggressively;
the default is 60).
To ensure this setting is persistent over reboots, edit /etc/sysctl.conf and add a line vm.swappiness=0.
| Hibernate to a swap partition without using it as actual swap space |
1,307,362,518,000 |
using linux. I know you can do an @reboot cronjob. I want to do an equivalent thing but instead of running at reboot, running after my computer awakens from suspend. Is that possible?
|
Depends on your distro and/or your destop enviroment, without this info i cant tel much, only that each dispo/desktop enviroment handle it on other ways.
like you see the way for ubuntu is nearly complete different how debian handle this.
Ubuntu solution https://askubuntu.com/questions/226278/run-script-on-wakeup
Debian solution http://forums.debian.net/viewtopic.php?f=5&t=53442
depending on which distro or desktop enviroment you use i recommand to have the first look in your runlevels.
| cronjob at resume from suspend |
1,307,362,518,000 |
My Wi-Fi will not work after suspending but WILL work after hibernating.
I've tried a couple things and have had some luck so I'll post what I've done and the effects I've seen.
$ sudo lshw
description: Notebook
product: HP ENVY 14 Notebook PC (J9L59UA#ABA)
vendor: Hewlett-Packard
version: 096C120014405F10000620182
serial: 5CD5143D9B
width: 64 bits
capabilities: smbios-2.7 dmi-2.7 vsyscall32
configuration: administrator_password=disabled boot=normal chassis=notebook family=103C_5335KV G=N L=CON B=HP S=ENV X=Null sku=J9L59UA#ABA uuid=35434435-3134-3344-3942-D0BF9C9A90FA
*-core
description: Motherboard
product: 2298
vendor: Hewlett-Packard
physical id: 0
version: 78.21
serial: PEWNT018J8I1ER
slot: Type2 - Board Chassis Location
*-firmware
description: BIOS
vendor: Insyde
physical id: 0
version: F.36
date: 02/02/2015
size: 128KiB
capacity: 6080KiB
capabilities: pci upgrade shadowing cdboot bootselect edd int13floppynec int13floppytoshiba int13floppy360 int13floppy1200 int13floppy720 int13floppy2880 int9keyboard int10video acpi usb biosbootspecification uefi
*-cpu
description: CPU
product: Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz
vendor: Intel Corp.
physical id: 4
bus info: cpu@0
version: Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz
serial: To Be Filled By O.E.M.
slot: U3E1
size: 2200MHz
capacity: 2700MHz
width: 64 bits
clock: 100MHz
capabilities: x86-64 fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap xsaveopt cpufreq
configuration: cores=2 enabledcores=2 threads=4
*-cache:0
description: L1 cache
physical id: 6
slot: L1 Cache
size: 32KiB
capacity: 32KiB
capabilities: synchronous internal write-back instruction
*-cache:1
description: L2 cache
physical id: 7
slot: L2 Cache
size: 256KiB
capacity: 256KiB
capabilities: synchronous internal write-back unified
*-cache:2
description: L3 cache
physical id: 8
slot: L3 Cache
size: 3MiB
capacity: 3MiB
capabilities: synchronous internal write-back unified
*-cache
description: L1 cache
physical id: 5
slot: L1 Cache
size: 32KiB
capacity: 32KiB
capabilities: synchronous internal write-back data
*-memory
description: System Memory
physical id: 15
slot: System board or motherboard
size: 12GiB
*-bank:0
description: SODIMM DDR3 Synchronous 1600 MHz (0.6 ns)
product: HMT451S6AFR8A-PB
vendor: Hynix
physical id: 0
serial: 16575711
slot: Bottom-Slot 1(left)
size: 4GiB
width: 64 bits
clock: 1600MHz (0.6ns)
*-bank:1
description: SODIMM DDR3 Synchronous 1600 MHz (0.6 ns)
product: M471B1G73QH0-YK0
vendor: Samsung
physical id: 1
serial: 25172419
slot: Bottom-Slot 2(right)
size: 8GiB
width: 64 bits
clock: 1600MHz (0.6ns)
*-pci
description: Host bridge
product: Broadwell-U Host Bridge -OPI
vendor: Intel Corporation
physical id: 100
bus info: pci@0000:00:00.0
version: 09
width: 32 bits
clock: 33MHz
*-display
description: VGA compatible controller
product: Broadwell-U Integrated Graphics
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 09
width: 64 bits
clock: 33MHz
capabilities: msi pm vga_controller bus_master cap_list rom
configuration: driver=i915_bpo latency=0
resources: irq:50 memory:c1000000-c1ffffff memory:b0000000-bfffffff ioport:5000(size=64)
*-multimedia:0
description: Audio device
product: Broadwell-U Audio Controller
vendor: Intel Corporation
physical id: 3
bus info: pci@0000:00:03.0
version: 09
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list
configuration: driver=snd_hda_intel latency=0
resources: irq:53 memory:c3210000-c3213fff
*-usb
description: USB controller
product: Wildcat Point-LP USB xHCI Controller
vendor: Intel Corporation
physical id: 14
bus info: pci@0000:00:14.0
version: 03
width: 64 bits
clock: 33MHz
capabilities: pm msi xhci bus_master cap_list
configuration: driver=xhci_hcd latency=0
resources: irq:46 memory:c3200000-c320ffff
*-communication
description: Communication controller
product: Wildcat Point-LP MEI Controller #1
vendor: Intel Corporation
physical id: 16
bus info: pci@0000:00:16.0
version: 03
width: 64 bits
clock: 33MHz
capabilities: pm msi bus_master cap_list
configuration: driver=mei_me latency=0
resources: irq:49 memory:c321a000-c321a01f
*-multimedia:1
description: Audio device
product: Wildcat Point-LP High Definition Audio Controller
vendor: Intel Corporation
physical id: 1b
bus info: pci@0000:00:1b.0
version: 03
width: 64 bits
clock: 33MHz
capabilities: pm msi bus_master cap_list
configuration: driver=snd_hda_intel latency=64
resources: irq:52 memory:c3214000-c3217fff
*-pci:0
description: PCI bridge
product: Wildcat Point-LP PCI Express Root Port #1
vendor: Intel Corporation
physical id: 1c
bus info: pci@0000:00:1c.0
version: e3
width: 32 bits
clock: 33MHz
capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
configuration: driver=pcieport
resources: irq:42
*-pci:1
description: PCI bridge
product: Wildcat Point-LP PCI Express Root Port #2
vendor: Intel Corporation
physical id: 1c.1
bus info: pci@0000:00:1c.1
version: e3
width: 32 bits
clock: 33MHz
capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
configuration: driver=pcieport
resources: irq:43 ioport:4000(size=4096) memory:c2000000-c2ffffff ioport:c0000000(size=16777216)
*-pci:2
description: PCI bridge
product: Wildcat Point-LP PCI Express Root Port #3
vendor: Intel Corporation
physical id: 1c.2
bus info: pci@0000:00:1c.2
version: e3
width: 32 bits
clock: 33MHz
capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
configuration: driver=pcieport
resources: irq:44 memory:c3100000-c31fffff
*-network
description: Wireless interface
product: Wireless 3160
vendor: Intel Corporation
physical id: 0
bus info: pci@0000:08:00.0
logical name: wlan0
version: 83
serial: 34:e6:ad:0c:bf:e3
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=iwlwifi driverversion=3.19.0-32-generic firmware=25.17.12.0 ip=192.168.1.184 latency=0 link=yes multicast=yes wireless=IEEE 802.11abgn
resources: irq:51 memory:c3100000-c3101fff
*-pci:3
description: PCI bridge
product: Wildcat Point-LP PCI Express Root Port #4
vendor: Intel Corporation
physical id: 1c.3
bus info: pci@0000:00:1c.3
version: e3
width: 32 bits
clock: 33MHz
capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
configuration: driver=pcieport
resources: irq:45 ioport:3000(size=4096) memory:c3000000-c30fffff
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:09:00.0
logical name: eth0
version: 10
serial: d0:bf:9c:9a:90:fa
size: 10Mbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl8168g-3_0.0.1 04/23/13 latency=0 link=no multicast=yes port=MII speed=10Mbit/s
resources: irq:48 ioport:3000(size=256) memory:c3004000-c3004fff memory:c3000000-c3003fff
*-isa
description: ISA bridge
product: Wildcat Point-LP LPC Controller
vendor: Intel Corporation
physical id: 1f
bus info: pci@0000:00:1f.0
version: 03
width: 32 bits
clock: 33MHz
capabilities: isa bus_master cap_list
configuration: driver=lpc_ich latency=0
resources: irq:0
*-storage
description: SATA controller
product: Wildcat Point-LP SATA Controller [AHCI Mode]
vendor: Intel Corporation
physical id: 1f.2
bus info: pci@0000:00:1f.2
version: 03
width: 32 bits
clock: 66MHz
capabilities: storage msi pm ahci_1.0 bus_master cap_list
configuration: driver=ahci latency=0
resources: irq:47 ioport:5088(size=8) ioport:5094(size=4) ioport:5080(size=8) ioport:5090(size=4) ioport:5060(size=32) memory:c3218000-c32187ff
*-serial UNCLAIMED
description: SMBus
product: Wildcat Point-LP SMBus Controller
vendor: Intel Corporation
physical id: 1f.3
bus info: pci@0000:00:1f.3
version: 03
width: 64 bits
clock: 33MHz
configuration: latency=0
resources: memory:c3219000-c32190ff ioport:5040(size=32)
*-scsi:0
physical id: 1
logical name: scsi0
capabilities: emulated
*-disk
description: ATA Disk
product: TOSHIBA MQ01ABD1
vendor: Toshiba
physical id: 0.0.0
bus info: scsi@0:0.0.0
logical name: /dev/sda
version: 2C
serial: 25L4PCC6T
size: 931GiB (1TB)
capabilities: gpt-1.00 partitioned partitioned:gpt
configuration: ansiversion=5 guid=92d26b47-bd01-4c24-968c-fb866690e33a sectorsize=4096
*-volume:0
description: Windows FAT volume
vendor: mkfs.fat
physical id: 1
bus info: scsi@0:0.0.0,1
logical name: /dev/sda1
logical name: /boot/efi
version: FAT32
serial: fcda-a86a
size: 510MiB
capacity: 511MiB
capabilities: boot fat initialized
configuration: FATs=2 filesystem=fat mount.fstype=vfat mount.options=rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro state=mounted
*-volume:1
description: EFI partition
vendor: Linux
physical id: 2
bus info: scsi@0:0.0.0,2
logical name: /dev/sda2
logical name: /boot
version: 1.0
serial: 111b5642-8767-4f0b-b5f7-bec74f8f942f
size: 244MiB
capabilities: extended_attributes ext2 initialized
configuration: filesystem=ext2 lastmountpoint=/boot modified=2016-05-25 18:36:22 mount.fstype=ext2 mount.options=rw,relatime,stripe=4 mounted=2016-05-25 18:36:22 state=mounted
*-volume:2
description: EFI partition
physical id: 3
bus info: scsi@0:0.0.0,3
logical name: /dev/sda3
serial: 2af1feb6-4486-442a-a440-248d3f612d38
size: 930GiB
capacity: 930GiB
width: 512 bits
capabilities: encrypted luks initialized
configuration: bits=512 cipher=aes filesystem=luks hash=sha1 mode=xts-plain64 version=1
*-scsi:1
physical id: 2
logical name: scsi1
capabilities: emulated
*-cdrom
description: DVD-RAM writer
product: DVDRW DU8A6SH
vendor: hp
physical id: 0.0.0
bus info: scsi@1:0.0.0
logical name: /dev/cdrom
logical name: /dev/sr0
version: DH61
capabilities: removable audio cd-r cd-rw dvd dvd-r dvd-ram
configuration: ansiversion=5 status=nodisc
*-battery
product: VI04041
vendor: 13-54
physical id: 1
version: ManufDate
serial: DummySerialNumber
slot: Primary
capacity: 41440mWh
configuration: voltage=14.8V
*-power UNCLAIMED
description: OEM Define 1
product: OEM Define 5
vendor: OEM Define 2
physical id: 2
version: OEM Define 6
serial: OEM Define 3
capacity: 75mWh
I ran nmcli nm after suspending and got
RUNNING STATE WIFI-HARDWARE WIFI WWAN-HARDWARE
running disconnected disabled disabled enabled
This output is different than most threads I've seen so that is why I'm making a new post.
lshw -C network shows:
*-network DISABLED
description: Wireless interface
product: Wireless 3160
vendor: Intel Corporation
physical id: 0
bus info: pci@0000:08:00.0
logical name: wlan0
version: 83
serial: 34:e6:ad:0c:bf:e3
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=iwlwifi driverversion=3.19.0-32-generic firmware=25.17.12.0 latency=0 link=no multicast=yes wireless=IEEE 802.11abgn
resources: irq:53 memory:c3100000-c3101fff
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:09:00.0
logical name: eth0
version: 10
serial: d0:bf:9c:9a:90:fa
size: 10Mbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl8168g-3_0.0.1 04/23/13 latency=0 link=no multicast=yes port=MII speed=10Mbit/s
resources: irq:48 ioport:3000(size=256) memory:c3004000-c3004fff memory:c3000000-c3003fff
Attempted fix(s)
I tried
sudo gedit /etc/pm/config.d/config
and put in:
SUSPEND_MODULES="iwlwifi"
I also tried to put in:
SUSPEND_MODULES="r8169"
out of desperation.
Both of these did nothing...
I tried:
sudo gedit /etc/pm/sleep.d/10_resume_wifi
and put in:
#!/bin/sh
case $1 in
suspend|suspend_hybrid|hibernate)
sudo nmcli n off
;;
resume|thaw)
sudo nmcli n on
;;
esac
This made my Wi-Fi work, but took away my ability to suspend or hibernate. Closing my lid would simply log me out and turn of my screen, nothing more...
Help would be most certainly appreciated! Thank you!
|
According to Webupd8 you need to edit /etc/pm/config.d/unload_modules configuration file by adding the following line :
SUSPEND_MODULES="$SUSPEND_MODULES <kernel_module_used_by_the_interface>"
In your case the kernel module in use is iwlwifi :
SUSPEND_MODULES="$SUSPEND_MODULES iwlwifi"
then edit your 10_resume_wifi like the following example:
#!/bin/sh
case "${1}" in
resume|thaw)
nmcli r wifi off && nmcli r wifi on;
esac
| Mint 17.3 Wi-Fi does not work after resuming from suspension |
1,307,362,518,000 |
Suppose I have two different Linux installations A and B, both using the same swap partition.
As I understand, running A or B will cause no problems with swap as only one of them is using it at a given time. However, if I boot A, hibernate, then boot B, swap is being used by both (A in a passive form, but data is there).
The question is: Will the hibernated system survive after this? If not, will the memory be corrupted or will A just be unable to resume, causing a regular boot?
Note: My main concert are live systems that detect and use available swap partitions on the hard drive. Will they destroy hibernated systems?
|
The question is: Will the hibernated system survive after this?
If system B uses the swap space, which you might as well presume it will, then I really doubt system A will be able to reboot from hibernation successfully, and the consequences may be bad if it does.
If not, will the memory be corrupted or will A just be unable to resume?
Although the kernel docs do contain:
* BIG FAT WARNING *********************************************************
*
* If you touch anything on disk between suspend and resume...
* ...kiss your data goodbye.
This is meant to apply, I think, to the actual filesystem, since the same [src]/Documentation/power/swsusp.txt also notes:
The resume process checks for the presence of the resume device, if
found, it then checks the contents for the hibernation image
signature. If both are found, it resumes the hibernation image.
So, presuming that this signature is at the beginning of the swap device, and presuming that normal swap usage also starts at the beginning of the device, then normal swap usage will destroy the "hibernation image signature" and when system A boots, it will not find such a signature and won't resume from hibernation, it will just start fresh.
But while those presumptions seem reasonable, without any promise from the people who implemented the system, it is impossible to say they are completely sound -- my advice is you may be making a serious gamble by doing this.
If you are using hibernation and don't already have such an option in your bootloader menu, by the way, it is a good idea to have one which contains noresume on the kernel line so you can choose to skip resuming from hibernation. As far as I am aware, there is unfortunately no such kernel line parameter to disable the use of swap, e.g. for system B when you know system A used the swap for hibernation.
| Can swap be shared safely while hibernating? |
1,307,362,518,000 |
This question is a more specific "subquestion" of the one about side effects when two distros share a swap partition.
What will actually happen if I install two Linux distributions on my machine with shared swap partition, hibernate in one, and boot into the other? Will the other figure out that the swap data is invalid, or will it try to use it (probably with unpredictable consequences)?
|
It will use the swap partition, (especially) if it has an fstab entry for it.
However your problem is not only with the swap partition, but also with all other filesystem partitions. You're not allowed to mount any of them as long as they're still mounted by the hibernated system.
Only one OS is allowed to mount a filesystem at a time, and with Hibernation, the system is "still running". If you Hibernate, then boot in another OS, change filesystems, then reboot and resume the Hibernated OS that still remembers the old state of those modified filesystem... it all goes ka-boom.
* BIG FAT WARNING
*********************************************************
*
* If you touch anything on disk between suspend and resume...
* ...kiss your data goodbye.
Source: https://www.kernel.org/doc/Documentation/power/swsusp.txt
If you cannot guarantee that the disks won't be touched, best to avoid Hibernation altogether.
| How will hibernation work in two Linux installations sharing a swap partition? |
1,307,362,518,000 |
In my fresh install of Linux Mint 16 with MATE, I have no hibernate option in the Power Manager; only suspend and shutdown.
In the Quit menu I have hibernate as an option. Also sudo pm-hibernate works from the command line.
Any suggestions of how to enable hibernate in the Power Manager? I want to hibernate when the laptop lid closes.
I have just enough swap space for hibernation to work:
$ free -h
total used free shared buffers cached
Mem: 3.5G 1.6G 1.8G 0B 18M 406M
-/+ buffers/cache: 1.2G 2.3G
Swap: 3.6G 16M 3.6G
|
Edit this file: /var/lib/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
eg.: sudo gedit /var/lib/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
Add this content:
[Re-enable hibernate by default in upower]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes
[Re-enable hibernate by default in logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate
ResultActive=yes
This will add hibernate option in menu. But if you want to hibernate, when LID will close, then execute this (this will enable hibernation when LID is closed):
sudo sed -i 's/#HandleLidSwitch=suspend/HandleLidSwitch=hibernate/g' /etc/systemd/logind.conf
And restart system or execute: sudo systemctl restart systemd-logind.service
| No hibernate option in power manager on Mint 16 MATE |
1,307,362,518,000 |
I have installed fresh Fedora 32 Workstation from official .iso image. So far everything works except hibernation. The laptop hibernates without any error and turns off. But when I turn it on it starts like after reboot instead of restoring the previous state.
# cat /proc/cmdline
BOOT_IMAGE=(hd0,msdos1)/vmlinuz-5.7.6-201.fc32.x86_64 root=/dev/mapper/fedora_localhost--live-root ro resume=/dev/mapper/fedora_localhost--live-swap rd.lvm.lv=fedora_localhost-live/root rd.lvm.lv=fedora_localhost-live/swap rhgb quiet
# swapon -s
Filename Type Size Used Priority
/dev/dm-1 partition 11198460 0 -2
# ls -la /dev/mapper/fedora_localhost--live-swap
lrwxrwxrwx. 1 root root 7 Jul 2 20:37 /dev/mapper/fedora_localhost--live-swap -> ../dm-1
Just before turning off journalctl shows:
Jul 02 18:19:41 toczka systemd[1]: Reached target Sleep.
Jul 02 18:19:41 toczka systemd[1]: Starting Hibernate...
Jul 02 18:19:41 toczka kernel: PM: Image not found (code -22)
Jul 02 18:19:41 toczka systemd-sleep[2705]: Suspending system...
Jul 02 18:19:41 toczka kernel: PM: hibernation: hibernation entry
Jul 02 18:19:42 toczka kernel: rfkill: input handler enabled
I tested the machine with fresh Fedora 31 installation and hibernation works there, then looks like some issue with Fedora 32.
|
I found solution that solves the problem but I'm not sure if this is correct one.
If
$ sudo lsinitrd -m | grep 'resume'
returns nothing then there is lack of resume module in initrd. To insert it temporarily do:
$ sudo dracut -vf -a resume
and check again with use of previous command. If it returns 'resume' then try to hibernate and wake up. It should work now.
The change can be set permanently by adding a new rule file into dracut, i.e. in file named:
/etc/dracut.conf.d/99-resume.conf
that should contain:
add_dracutmodules+="resume"
Don't forget to update initramfs file by:
$ sudo dracut -vf
In general this is issue with Fedora 32 installation media. The issue has been described here: Red Hat Bug 1795422
| Wake up from hibernation causes reboot instead of resume |
1,307,362,518,000 |
I am running XUbuntu 16.04 with kernel 4.4.0-116-generic (but the same goes for earlier versions) and 16 GB of RAM. I am using a "traditional" hard drive (no SSD) and my swappiness is 0 (RAM is rarely full).
I have been experiencing the following with hibernation : hibernation proper takes less than 2 minutes, but resuming from it takes much, much more time until the applications are responsive (today it took more that 10 minutes to get to the light-locker prompt).
I do not think this is usable (it takes more time to resume from hibernation than booting to a fresh session and reopening the programs).
How can I improve performance ? Am I the only one experiencing these problems ?
True, memory usage right now is 8.8 GB, but what bugs me is the discrepancy between hibernating and resuming times. I understand from other questions that it may be because during hibernation, the kernel freezes all processes and dump the RAM en bloc to swap, while on resuming it just lets processes ask for their pages in swap.
Is this a valid explanation ? If so, why is it done so, as reading big blocks from a hard drives is faster than random accesses ? Can I configure hibernation to not proceed this way ? The question "Restoring in-memory/swapped page state on resume from hibernation" seems related, but I do not know enough of pages to really understand if what they do ("take note of the tags that label what pages are on disk and in RAM, then restore this exact state on resume") is useful and I also do not know how to do it.
|
I think your experiences are very common for the hibernation aka. suspend-to-disk, especially when using a rotating disk.
From the kernel documentation, there is a workaround mentioned which seems to be related to the idea of the link you have posted. If I got it right, this would just empty the swap at once instead of step by step on resume. But it still has to read all the used swap and might take some time.
Q: After resuming, system is paging heavily, leading to very bad
interactivity.
A: Try running
cat /proc/[0-9]/maps | grep / | sed 's:. /:/:' | sort -u | while
read file do test -f "$file" && cat "$file" > /dev/null done
after resume. swapoff -a; swapon -a may also be useful.
What you might want to test is suspend-to-ram or suspend-to-both which is pretty good explained in the Arch Wiki. Basically:
suspend-to-ram does not power off the computer, but puts it in a power save mode. If battery is depleted the state is lost and might lead to problems
suspend-to-both is similar to suspend-to-ram but also saves the state into swap, which makes it possible to resume after battery is depleted
Depending on your environment, how the suspend/hibernate method is initiated you can configure this e.g. in XFCE with the xfce4-power-manager GUI.
| Why does resume from hibernation take 10 minutes and how to avoid this? |
1,307,362,518,000 |
A while back, I set up hibernation on my Linux system. It's been working really well, up until tonight when I installed another hard disk, which shuffled the device node names around. So now on boot I get a message saying something to the effect of (I didn't write down the exact wording) couldn't stat /dev/sda3 and asking me to enter the hibernation device node name or press Enter to continue without resuming from hibernation. This happens on a plain boot, not resuming from hibernation (I haven't tried resuming from hibernation, and am afraid it wouldn't work very well at all when the system can't properly identify the device to resume from hibernation from). When I do use hibernation, I do so using the /usr/sbin/hibernate script provided by the hibernate package (version 2.0+15+g88d54a8-1 is installed); I don't recall really setting it up in any particular manner.
This started because when I installed the new hard disk, it appeared earlier in the detection order than the SSD I have the root file system and swap space on. That shouldn't pose a problem, particularly as I am using stable /dev/disk/by-*/ names all around -- or so I thought.
I grepped through /boot and /etc, but none of the matches appear relevant.
/proc/swaps shows /dev/sdb3 which is the name that partition is now known under. /etc/fstab names it using its /dev/disk/by-id/ata-*-part3 name.
I'm using a fairly up-to-date Debian Wheezy. Here's my /etc/default/grub:
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT=0
GRUB_TIMEOUT=300
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet pci=nomsi"
GRUB_CMDLINE_LINUX=""
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# Uncomment to disable graphical terminal (grub-pc only)
GRUB_TERMINAL=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
GRUB_PRELOAD_MODULES="uhci usb_keyboard"
and here is /boot/grub/grub.cfg:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
insmod uhci
insmod usb_keyboard
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
set default="0"
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
terminal_input console
terminal_output console
if [ "${recordfail}" = 1 ] ; then
set timeout=-1
else
set timeout=300
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-c050d662-f94a-447a-9342-0fc69f65a513' {
load_video
insmod gzio
insmod part_msdos
insmod diskfilter
insmod mdraid09
insmod ext2
set root='mduuid/0a1be8bb7679264ae488bd5c6f66e022'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='mduuid/0a1be8bb7679264ae488bd5c6f66e022' c050d662-f94a-447a-9342-0fc69f65a513
else
search --no-floppy --fs-uuid --set=root c050d662-f94a-447a-9342-0fc69f65a513
fi
linux /boot/vmlinuz-3.2.0-4-amd64 root=UUID=c050d662-f94a-447a-9342-0fc69f65a513 ro quiet pci=nomsi
initrd /boot/initrd.img-3.2.0-4-amd64
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-c050d662-f94a-447a-9342-0fc69f65a513' {
menuentry 'Debian GNU/Linux, with Linux 3.2.0-4-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.2.0-4-amd64-advanced-c050d662-f94a-447a-9342-0fc69f65a513' {
load_video
insmod gzio
insmod part_msdos
insmod diskfilter
insmod mdraid09
insmod ext2
set root='mduuid/0a1be8bb7679264ae488bd5c6f66e022'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='mduuid/0a1be8bb7679264ae488bd5c6f66e022' c050d662-f94a-447a-9342-0fc69f65a513
else
search --no-floppy --fs-uuid --set=root c050d662-f94a-447a-9342-0fc69f65a513
fi
echo 'Loading Linux 3.2.0-4-amd64 ...'
linux /boot/vmlinuz-3.2.0-4-amd64 root=UUID=c050d662-f94a-447a-9342-0fc69f65a513 ro quiet pci=nomsi
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.2.0-4-amd64
}
menuentry 'Debian GNU/Linux, with Linux 3.2.0-4-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.2.0-4-amd64-recovery-c050d662-f94a-447a-9342-0fc69f65a513' {
load_video
insmod gzio
insmod part_msdos
insmod diskfilter
insmod mdraid09
insmod ext2
set root='mduuid/0a1be8bb7679264ae488bd5c6f66e022'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='mduuid/0a1be8bb7679264ae488bd5c6f66e022' c050d662-f94a-447a-9342-0fc69f65a513
else
search --no-floppy --fs-uuid --set=root c050d662-f94a-447a-9342-0fc69f65a513
fi
echo 'Loading Linux 3.2.0-4-amd64 ...'
linux /boot/vmlinuz-3.2.0-4-amd64 root=UUID=c050d662-f94a-447a-9342-0fc69f65a513 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.2.0-4-amd64
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
and here is /etc/uswsusp.conf:
# /etc/uswsusp.conf(5) -- Configuration file for s2disk/s2both
resume device = /dev/sda3
splash = y
compress = y
early writeout = y
image size = 15529056419
RSA key file = /etc/uswsusp.key
shutdown method = platform
This should be an easy change if I can just find the proper place to make the change in. So, just where is the resume code getting that device name from and how do I change it to reflect the new reality?
(I worked around the problem by swapping the devices involved such that the SSD came first in the detection order, but I'm still interested in an answer to this question.)
|
Basically, your original /etc/uswsusp.conf was written by the scripts invoked by dpkg while installing uswsusp. To see the script, check /var/lib/dpkg/info/uswsusp.config.
To update it semi-automatically, use:
dpkg-reconfigure uswsusp
Or, edit it by hand and then use:
update-initramfs -u
I would sincerely encourage you to read /usr/share/doc/uswsusp/README.Debian as well.
| Where is hibernation resume getting the device node from? |
1,307,362,518,000 |
I was trying to hibernate my Fedora 27 system temporarily using a swap file and failed. Answers in the following question also say that a dedicated swap partition must be used to hibernate the system and a swap file won't work.
Why does Linux use a swap partition rather than a file?
I'm using an ext3 file system in which I created the swap file. What is stopping it being used for hibernation?
|
As said here (link provided by @don_crissti), the system must locate the swap file's header, but in order to do this the filesystem that contains the swap file must be mounted, and a journaled filesystem (as ext3 is) cannot be mounted during resume from disk.
Quoting from the document:
In order to use a swap file with swsusp, you need to:
1) Create the swap file and make it active, eg.
# dd if=/dev/zero of=<swap_file_path> bs=1024 count=<swap_file_size_in_k>
# mkswap <swap_file_path>
# swapon <swap_file_path>
2) Use an application that will bmap the swap file with the help of the
FIBMAP ioctl and determine the location of the file's swap header, as the
offset, in <PAGE_SIZE> units, from the beginning of the partition which
holds the swap file.
3) Add the following parameters to the kernel command line:
resume=<swap_file_partition> resume_offset=<swap_file_offset>
where <swap_file_partition> is the partition on which the swap file is located
and <swap_file_offset> is the offset of the swap header determined by the
application in 2) (of course, this step may be carried out automatically
by the same application that determines the swap file's header offset using the
FIBMAP ioctl)
OR
Use a userland suspend application that will set the partition and offset
with the help of the SNAPSHOT_SET_SWAP_AREA ioctl described in
Documentation/power/userland-swsusp.txt (this is the only method to suspend
to a swap file allowing the resume to be initiated from an initrd or initramfs
image).
| Why can't a file as swap be used for hibernation in Linux? |
1,307,362,518,000 |
When I boot with a resume=.. option to the kernel and an initrd built with a -h option, userland tools (say, batti) offer me the choice of hibernation; when I boot without them it does not.
Where is the fact that I have a system capable of hibernate/resume exposed for these tools to find that out? (This is on Slackware, in case this is init-specific.)
|
One way to do this is via the /sys/power interface. The usual way to induce hibernation (used by various higher level tools) is to write to a couple of the fields there:
echo shutdown > /sys/power/disk
echo disk > /sys/power/state
I believe the first one sets the methodology and the second one triggers the change.1 However, if you read from these nodes, you get a list of possibities:
> cat /sys/power/disk
platform [shutdown] reboot suspend
> cat /sys/power/state
freeze standby mem disk
Since shutdown and disk are available, the machine can be put into hibernation.
1 You can also set platform on /sys/power/disk to do the same thing via the system's ACPI hardware, presuming the driver works properly, and echo mem > /sys/power/state puts the machine into suspend (state saved to ram).
| Where is the ability to hibernate exposed on Linux? |
1,307,362,518,000 |
I try to give a behavior to a closing lid of a laptop following this rules:
When the lid is closed:
After 1m, it should be screenlocked ;
After 10m, it should be suspended ;
After 15m, it should be shutdown.
So, I make the following script:
#!/bin/bash
USER=fauve
sleep 1m
# set screensaver
su -c "$HOME/.local/bin/screenlock" - $USER
# hibernate
sleep 9m
systemctl suspend
sleep 5m
# shutdown
shutdown 0
But as you see, the shutdown comes when the laptop is under suspension, so it will never shutdown.
So how can I program a suspension or shutdown for 5min, and then make the script keep going to shutdown completely the computer?
|
in short: you can't. At least not in software. When you put your computer in suspend, it's suspended. Software like sleep (or more precisely, the systick or timer that tells your kernel to wake up the task after a given time) simply won't run.
So, only thing here is a hardware solution. Your laptop needs to have some alarm clock to wake up, and come out of suspend!
Luckily, that's fairly standard;
echo 0 > /sys/class/rtc/rtc0/wakealarm
echo `date '+%s' -d "+ 5 minutes"` > /sys/class/rtc/rtc0/wakealarm
systemctl suspend
systemctl shutdown
would do that. IF your laptop supports it.
Note that I doubt the sense in this. The way you wrote your script, your laptop always directly shuts down when it comes out of suspend after 5 minutes or longer. I think you want something else. My guess is you'd want to check whether the 5 minutes have actually passed and if they haven't, assume the laptop was manually brought out of suspend and not shut it down. In that case, you'd need to save the pre-suspend time, and compare it to the time after.
Maybe you want systemctl suspend-then-hibernate? That would seem a likely thing. Under the hood, it does the same: rely on the RTC to come out of suspend at some time, then save the system state to disk and power off unless manually woken up before.
| How can I suspend|hibernate for certain time |
1,307,362,518,000 |
On OpenSUSE 12.1 x86_64, Gnome 3.2 . I want to remove the suspend and hibernate options from the Gnome (Shell) menu as
suspend makes no sense IMO for a desktop
hibernate has a slight tendency to lock up
I've found that I should configure these privileges using polkit. I've dropped a file named 90-disable-suspend.conf ( also tried 90-disable-suspend.pkla ) in /etc/polkit-1/localauthority.conf.d with the following contents:
[Disable Suspend]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate;org.freedesktop.upower.suspend
ResultAny=no
ResultInactive=no
ResultActive=no
However, running pkcheck --action-id org.freedesktop.upower.suspend --process $$ prints nothing and has an exit code of 0 , and the menu entries are still present. AFAICT these are provided by gnome-shell-extension-alt-status-menu package.
How can I remove the suspend and hibernate entries from the Gnome Shell menu and leave only Power Off?
|
The directory /etc/polkit-1/localauthority.conf.d is reserved for configuration files.
You should put your file in a subdirectory of /var/lib/polkit-1/localauthority and with extension .pkla. The directory /etc/polkit-1/localauthority should be ok too, but can be modified by updagraded/installed packages, so better to avoid it.
| Removing supend and hibernate privileges |
1,307,362,518,000 |
The existing question how to run a user script after systemd wakeup? already has answers that allow running scripts after wakeup from sleep. However, the solutions provided to that question require hardcoding user.
How to create a script that is automatically run by all currently logged graphical desktop sessions? (That is, when fast user switching / "Switch Account" is used to have multiple desktops in parallel on different virtual terminals, the script should be run with each user with correct environment variable values for DISPLAY and XAUTHORITY.)
I'm personally using lightdm for creating new sessions / logging back to existing session but I'd prefer display manager independent solution.
|
On resume you could enumerate logged in X.org users and run whatever you need for them. There are many solutions of how to get the list of currently logged in users but most of them are outdated and may not work in modern Linux distros, including: w, who and last, e.g. w and who return nothing on my Fedora 36 machine. last shows the last reboot:
last | head -1
reboot system boot 5.19.4-az2 Sun Sep 4 01:56 still running
You can use them if they work for you.
Here's a contemporary method which must work as of September, 2022 (time stamping answers for Linux is always a good idea):
$ loginctl --no-legend list-sessions # or run it without any parameters
SESSION UID USER SEAT TTY
2 1000 birdie seat0 tty7
Or gdbus if you're into programming:
$ gdbus call --system --dest org.freedesktop.login1 --object-path /org/freedesktop/login1 --method org.freedesktop.login1.Manager.ListSessions
([('2', uint32 1000, 'birdie', 'seat0', objectpath '/org/freedesktop/login1/session/_32')],)
Let's continue working with loginctl. You may need to know Xorg displays for the users, here's how you can do that:
#! /bin/bash
for session in `loginctl --no-legend list-sessions | awk '{print $1}'`; do
echo -e "ID\tName\tDisplay"
eval `loginctl show-session $session | egrep '^Display|^User|^Name'`
echo -e "$User\t$Name\t$Display"
done
# output
ID Name Display
1000 birdie :0
Instead of the echo statement you can run what you need, e.g.
export XAUTHORITY="`getent passwd $Name | cut -f6 -d:`/.Xauthority"
export DISPLAY=$Display
command
| How to run X programs automatically after wakeup from S3 sleep (suspend) or S4 sleep (hibernation)? |
1,307,362,518,000 |
uswsusp, which is used for hibernation, presents latest in the old stable, but has gone in Bullseye (the current stable). What is it replaced with?
|
It wasn’t replaced: its removal request says
It's dead upstream and also no longer properly maintained in Debian.
Nowadays, the kernel provided suspend and hibernate functionality is
preferred and should be used instead.
In Debian 11, you should use the suspend features in your desktop environment, or systemctl suspend and siblings:
systemctl suspend instead of s2ram;
systemctl hibernate instead of s2disk;
systemctl hybrid-sleep instead of s2both.
The only missing tool from uswsusp, as far as I can determine, is swap-offset which is used to determine the offset of a swap file’s header in the containing block device. You can obtain this information with filefrag -v — the offset is the first value shown in the “physical offset” column for the first extent.
systemd additionally supports “suspend-then-hibernate” mode, which suspends the system, and then hibernates it after a configurable delay.
| uswsusp package has gone in Debian Bullseye |
1,307,362,518,000 |
I installed the latest stable 64bit Crunchbang backport. When I tried to hibernate it last night, it rebooted into the locked state - when I logged back in all my windows/apps were as they were again.
Two things:
How do I get Crunchbang to hibernate? hibernate works in my Windows7 partition. Crunchbang is installed on a separate physical drive than Windows and the bios.
How did Crunchbang effectively shutdown and restart with the state of all my opened apps intact? If this a feature can someone tell me how to do it explicitly because it would be really useful.
|
Crunchbang did exactly what hibernate is meant to do.
Hibernate writes the contents of your RAM to the disk and shuts the machine down. When you power your machine up again it detects that there is a RAM image file stored on disk and loads the contents of the RAM image back into RAM.
You need to enter your password because it is configured that way in Crunchbang, which is a good thing because otherwise the person that would start your machine could access your machine without a password.
So Crunchbang does exactly what Windows 7 does, just the looks of the process are different.
| Crunchbang hibernate rebooted system? |
1,488,202,671,000 |
After each hibernation process I get a corrupted root filesystem. My setup is a LUKS encrypted root and swap partition on LVM. I use a GPG encrypted key for the root filesystem and a unencrypted key file on the root partition for swap decryption. The initramfs is generated by genkernel with
genkernel --lvm --luks --gpg initramfs
For the hibernation setup I followed the Gentoo Wiki. I tried using
pm-hibernate
s2disk -r /dev/mapper/swap
echo disk > /sys/power/state
but all result in a corrupted root partition. I am not using tuxonice as (afaik) I would need to switch to other kernel sources or apply patches.
System:
Gentoo
Kernel 4.9.6-gentoo-r1
genkernel 3.4.52.4-r2
pm-utils 1.4.1-r7
Disk layout:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 477G 0 disk
├─sda2 8:2 0 128M 0 part /boot
├─sda3 8:3 0 410G 0 part
│ ├─vg1-swap 253:1 0 30G 0 lvm
│ │ └─swap 253:3 0 30G 0 crypt [SWAP]
│ └─vg1-root 253:0 0 380G 0 lvm
│ └─root 253:2 0 380G 0 crypt /
└─sda1 8:1 0 2M 0 part
|
I use a GPG encrypted key for the root filesystem and a unencrypted
key file on the root partition for swap decryption.
Does that mean you have to mount the root filesystem in order to be able to decrypt swap? If so, this could likely be the cause of your problems. You're not allowed to access (write) filesystems while in hibernation (because they are "still mounted" by the hibernated system).
https://www.kernel.org/doc/Documentation/power/swsusp.txt
* BIG FAT WARNING *********************************************************
*
* If you touch anything on disk between suspend and resume...
* ...kiss your data goodbye.
*
* If you do resume from initrd after your filesystems are mounted...
* ...bye bye root partition.
* [this is actually same case as above]
*
Hibernation is very chancy business, basically you have to hope for whatever your Initramfs flavour to handle all cases properly. It's best to use a plain swap partition that can be reached without any shenanigans.
| Corrupt Filesystem after Hibernation |
1,488,202,671,000 |
I have a ThinkPad X230T with Debian testing installed. As the title says, it only boots every other time.
What I mean by this is that I turn it on, I work with it normally, and then I either shut it down or hibernate it. The next time it won't boot. I will press the power button (or open the lid) and both the power and wireless lights will turn on, but nothing else will happen. The screen won't turn on, no disk activity, nothing (I've checked with running an ssh server to see if it was just a display issue, but it definitely isn't). I turn it off and on, and now everything works normally again... until the next time :)
It happens practically every time. I can't seem to reproduce it if I do it a bunch of times in a short period of time, though; it has to be turned off for a while.
I upgraded the BIOS but nothing changed.
What could be the problem? What should I look at?
|
Are you using the BIOS defaults? If not, can you try resetting them?
Are you getting any beeps during start-up (successful or otherwise), running, or shutdown? See page 34 of that manual for beep codes.
One thing I believe could cause this is a device not responding to the power-on self test (POST) in time. BIOSes sometimes allow you to change this timeout. Try increasing this if available.
I'm not sure whether fans are part of POST, but it might be getting stuck. You could try cleaning it (a vacuum seems to work, but I'm not sure that's always safe).
If none of these work, you could try checking all the cables for loose connections, but of course this requires a whole other level of care.
| My Thinkpad X230T only boots on alternate tries |
1,488,202,671,000 |
Situation :
I have installed two Linux Mints OSs on my computer, I'm using the first one for normal use (Browsing, Watching Movies, ...), I use the second one for my programming work, So I always hibernate the second one, to do not lose my opened windows (More than 15 windows).
Problem :
So my problem is after hibernating the second one, when I restart to open the first OS it resume the second one (Programming OS).
Solution (didn't work) :
I tried to disable mounting the swap partition at startup from the first OS, but that did stop it just from using the swap
|
As you know, when you hibernate it saves the contents of memory (most of it) to the swap partition. It sounds like that this partition is shared between the two OS instances.
A possible solution could be using a swap file for the one you want to hibernate (assuming you don't want to create another swap partition). There are some extra options for this, see here: https://wiki.archlinux.org/index.php/Power_management/Suspend_and_hibernate#Hibernation_into_swap_file
This gives you the advantage of having a separate file just for hibernate and use the partition just for swapping.
| Stop Linux from using swap |
1,488,202,671,000 |
I tried two methods to enable hibernation.
First method was invoking
systemctl hibernate
under root. The second was to use Frippery Shut Down Menu.
In both cases the system will eventually show me a black screen with some error message and it does not hibernate. I have the latest updates installed. I believe this is a bug. How can I make hibernation work under Fedora 19?
|
You may find that hibernation is not enabled by default in fedora's grub.cfg and/or fstab.
You need to have a large enough swap partition and an entry for it in /etc/fstab.
e.g.
UUID=da673383-0c15-4b6c-9eab-0d7e425b7d05 swap swap defaults 0 0
And you need to set the resume option for linux through grub. I did that by adding resume=/dev/disk/by-uuid/da673383-0c15-4b6c-9eab-0d7e425b7d05 to /etc/defaults/grub
e.g.
GRUB_CMDLINE_LINUX="rhgb quiet acpi_osi=linux resume=/dev/disk/by-uuid/da673383-0c15-4b6c-9eab-0d7e425b7d05"
You then need to rebuild grub. I use efi, so to do it I ran grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg. You will need to change the -o option if your grub.cfg lives elsewhere in /boot.
Answer found on ORDINATECHNIC.
Update for Fedora 28+: you also need to rebuild initramfs with support for the resume module. Open /etc/dracut.conf.d/resume.conf and include add_dracutmodules+=" resume ". Then run dracut -f.
| Howto make hibernation work under Fedora 19 |
1,488,202,671,000 |
I am using RHEL6 and I don't see a hibernate option for it. Doesn't RHEL6 have a hibernate option?
I tried pm-hibernate from command line but it said:
PM: Cannot find swap device, try swapon -a
I tried swapon -a
then I again tried pm-hibernate and it showed the same message again.
PS: I don't have a swap partition in my machine.
|
In order to hibernate, the system has to have somewhere on the disk to write the data that is in RAM to save it from extermination when the power goes out. There are other ways to do it, but not distros use the swap space for hibernation so as not to run into space problems on the hard drive. There is a kernel parameter to configure this, but you shouldn't need to go there.
The simplest thing would be just to create a swap file and enable it. Make it somewhat bigger than your ram. Say you have 4G ram, make a 5G swap.
$ dd if=/dev/zero of=/swap bs=1024 count=$((5*1024*1024))
$ mkswap /swap
Then enable it:
$ swapon /swap
And add it to fstab so it's enabled on boot:
/swap swap swap defaults 0 0
Lastly you need to tell the kernel when it boots where to check for potential hibernated data to boot too. In this case it needs to know where to find your swap file, so you'll need to add a kernel paramenter. You can find docs for this step in the kernel.org documentation.
Typically it would fall to the hibernate program to determine the exact location of the resume data and mark it in the boot loader.
| How to hibernate a RHEL6 machine? |
1,488,202,671,000 |
My current config is Windows-11 (required for my job) and Ubuntu 21.10 dual-booting on an HP Probook G10. Since I have to have secure-boot to run Win-11, I have to live without hibernation on Linux (really really difficult).
I realize that hibernation is now officially disabled when secure-boot is enabled on all pre-built kernels. I appreciate the security and understand the nature of the decision for the lockout. But is there an "officially unofficial" way to relax this setting in a kernel compile config option or patch so that hibernation and secure-boot and co-exist, despite the staggering security risks it introduces?
I just want to be able to boot Win-11 and Linux while accepting the full litany of risks that this would open me up to.
Possible?
|
The lockdown LSM module is what disables hibernation, and there is a kernel compile flag for this called CONFIG_LOCK_DOWN_IN_EFI_SECURE_BOOT, set it to no and it won't enable lockdown in when EFI secure booted.
| Patching the kernel to allow hibernation with secure-boot enabled |
1,488,202,671,000 |
I have Linux Fedora 20, with Gnome classic desktop. When I power down, via the "Power Down" icon on the top bar, everything shuts down, and everything is gone when I power up again, although I can recover web pages using History in my browser. I would like, if I choose, to have the session restored totally and exactly to the situation when I powered off. Please is this possible, e.g by suspending or sleeping the machine? I cannot find anything already there to do this.
I think that acpi maybe the answer, but I have read that this may clash with Gnome actions, and I have no /etc/acpi/handler.sh file on my system, so I presume that acpi is not installed.. I am reluctant to try acpi until I know how to do so safely.
I would be grateful for any help on this.
|
As root user, and since Fedora 20 uses systemd the more appropiated way to do this is through the hibernate target:
systemctl hibernate
If you want to do this as normal user, you could use sudo and add the following line on /etc/sudoers through the visudo command:
user hostname =NOPASSWD: /usr/bin/systemctl hibernate
Other solution to allow hibernate with a normal user involves some thinkering with PolKit.
To work without further problems, i suggest you to have at least the same size of swap that you have in RAM(look at hibernation - Fedora uses the same method).
| Linux Fedora: can I preserve what I am doing so that everything will be restored when I power up again |
1,488,202,671,000 |
I've been trying to get hibernation to work, and am having problems. The system seems to go into hibernation just fine, but when I try to restore from disk, the process stops just after a message saying "Image restoration successful". This is before I'm able to switch to a new tty. Ctrl-alt-del works. SysRq commands seem to work, although I'm not sure what to do with them.
Suspend (to RAM) works fine when I close the lid or use s2ram or pm-suspend. If I use s2both or s2disk, I see the messages about the image being written to disk; if I treat s2both (or
pm-suspend-hybrid) as a suspend (eg, restore without cutting power), it works. But if I cut power and do a cold boot, after the progress indicator seems to say the image is done loading, the process just stops.
Does anyone know how I can fix this? Or at least what my next debugging/troubleshooting steps should be?
I'm using (K)Ubuntu 12.04, kernel 3.2.0-38-generic. I have 2GB of RAM and 4GB of swap.
This (month-old unanswered forum post) looks very similar to my situation (except for the message about user id - which he gets but I don't)
http://forum.linuxmint.com/viewtopic.php?p=708058&sid=e8bd8eba8fad0b25597209e365d6edf4
-Thanks
Edit: Update
So, this is now kinda 'half-solved'. Gilles' answer got me past the place where I was stuck, but I still don't know what caused the problem. I am now having further problems, so I will need to keep debugging this, in case they are related - and would very much welcome further tips on what might have caused this problem in the first place.
(New problem seems to be a more severe lock-up (that 'magic SysRq' doesn't help) when I try to hibernate/s2disk with more than ~500MB of memory used. Didn't think to test w/ a high memory load, ouch ...)
|
I've observed the same problem, also on Ubuntu 12.04. After resuming, the system is displaying a text mode console and looks frozen, but magic SysRq responds.
I've found that Alt+SysRq+E (which kills all the programs on the current virtual console) works for me. This doesn't kill any of my programs, it's only killing processes on the temporary console used during hibernation preparation.
I have no explanation, I just found that this worked for me and didn't investigate any further.
Note for laptop users:
Press and hold Alt and Fn.
Press and release SysRq (which may be on Pause or PrintScreen or some other function key depending on your model).
Release Fn (but keep Alt down).
Press and release E.
Release Alt.
| Resume from hibernate fails after image restoration |
1,488,202,671,000 |
Here is what happened:
I used the Laptop and accessed some data on my usb stick. Then I closed the Laptop putting the system into sleep mode. The USB-Stick was still plugged in. After the laptop was completely in sleep I removed the Stick (the light was off, so it must have been without power). I woke up the laptop today without the USB-Stick. Now when I re-plug it, the filesystem will not be mounted automatically.
I tried to manually mount it:
chi mnt # mount -t vfat /dev/disk/by-id/usb-JetFlash_Transcend_4GB_QTMFKJQQ-0\:0-part1 usb/
mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
missing codepage or helper program, or other error
Manchmal liefert das Syslog wertvolle Informationen – versuchen
Sie dmesg | tail oder so
Doing a dmesg | tail I found the following:
FAT-fs (sdb1): bogus number of FAT structure
FAT-fs (sdb1): Can't find a valid FAT filesystem
So I tried to do fsck.vfat on the partition of the stick, to see if it can somehow fix it:
chi mnt # fsck.vfat /dev/disk/by-id/usb-JetFlash_Transcend_4GB_QTMFKJQQ-0\:0-part1
dosfsck 3.0.9, 31 Jan 2010, FAT32, LFN
Cluster size is zero.
Is there some way to repair the filesystem on the stick using linux tools? I am using gentoo.
Also shouldn't this behavior be considered a bug or at least dangerous? Removing the stick while the system is in sleep mode sounds like a common use-case to me. Also if you remove it, it is very easy to forget to put it back in before you turn the system back on, and I don't think this should kill your file-system like this. I am willing to report this bug, but I don't know which mailing list/bugtracker would be the correct one.
EDIT:
I found some suggestions online. However if I try this using:
dd if=/dev/disk/by-id/usb-JetFlash_Transcend_4GB_QTMFKJQQ-0\:0-part1 of=sector6.bin bs=512 count=1 skip=6 conv=noerror,sync
dd if=sector6.bin of=/dev/disk/by-id/usb-JetFlash_Transcend_4GB_QTMFKJQQ-0\:0-part1 bs=512 count=1 conv=noerror,sync,notrunc
I still get the same error afterwards. I also tried using CHKDSK F: \R \T under windows as suggested by some posts, but this tool only reports the drive as RAW and thus unsuported.
|
Before you do anything to the USB-stick, you should make an image of it:
dd bs=4k of=stick.img if=/dev/disk/by-id/usb-JetFlash_Transcend_4GB_QTMFKJQQ-0\:0
Then you put your stick safely away and use the stick.img file to do your fiddling, instead of destroying more data.
Are there important files on it? Check http://www.cgsecurity.org/wiki/PhotoRec for recovery tools. It recovers more than just photo's unlike the name suggests.
Once you have recovered you data, create a new filesystem on the USB-stick as the old can no longer be trusted with your data. (mkfs.vfat)
| How to restore a Fat32 filesystem under Linux |
1,488,202,671,000 |
When I try to hibernate with systemctl hibernate, the unit systemd-hibernate.service enters failed state and I get the following entries in my journal:
Feb 09 14:18:14 pike systemd[1]: Starting Sleep.
Feb 09 14:18:14 pike systemd[1]: Reached target Sleep.
Feb 09 14:18:14 pike systemd[1]: Starting Hibernate...
Feb 09 14:18:14 pike systemd-sleep[2284]: Failed to write mode to /sys/power/disk: Operation not permitted
Feb 09 14:18:14 pike systemd[1]: systemd-hibernate.service: main process exited, code=exited, status=1/FAILURE
Feb 09 14:18:14 pike systemd[1]: Failed to start Hibernate.
Feb 09 14:18:14 pike systemd[1]: Dependency failed for Hibernate.
Feb 09 14:18:14 pike systemd[1]: Service sleep.target is not needed anymore. Stopping.
Feb 09 14:18:14 pike systemd[1]: Unit systemd-hibernate.service entered failed state.
Feb 09 14:18:14 pike systemd[1]: Stopping Sleep.
Feb 09 14:18:14 pike systemd[1]: Stopped target Sleep.
Indeed cat /sys/power/disk tells me:
[root@pike ~]# cat /sys/power/disk
[disabled]
My swap looks like this:
[root@pike ~]# swapon -s
Filename Type Size Used Priority
/dev/dm-0 partition 16383996 0 -1
It is on the LVM and is called /dev/fedora/swap.
My RAM size is 16248756 bytes, so the image should fit into swap.
Suspend-to-RAM works as expected, and with other distros (Ubuntu, Arch) I was able to hibernate previously.
How can I find out why /sys/power/disk is [disabled]?
|
I had to disable UEFI Secure Boot because I needed to use VirtualBox. Incidentally, this also enabled standby. I can now systemctl hibernate and systemctl hybrid-sleep.
| F20 Unable to hibernate, /sys/power/disk disabled |
1,488,202,671,000 |
I have recently installed Debian 12 amd64 on a Lenovo IdeaPad 100s. There seem to be a problem with the laptop lid, in paricular I do not find where the behaviour the system should take is set.
In xfce-power-manager gui I have set to "Do nothing". Still when I close the lid the system goes to hibernation. After I reopen the lid it goes in a strange mode in which it is not fully out of hibernation in the graphical session. Still the system is "awake enough" that I can go in the second log in (CTRL-ALT-F2) and log in text mode and reboot.
I have tried to chance "Do nothing" in other settings, but the system always does the same, as if xfce-power-manager were not really setting anything. I have tried to modify by hand /etc/systemd/logind.conf changing the lines
HandleLidSwitch=suspend
HandleLidSwitchExternalPower=suspend
leaving the rest fully commented as I found it
...
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
...
After restarting the service systemctl restart systemd-logind.service and even after rebooting the behavior of the closure of the lid did note change. I doubt systemd-logind is doing anything here because all options are listed as inactive because systemctl status sleep.target suspend.target hibernate.target hybrid-sleep.target
returns
○ sleep.target - Sleep
Loaded: loaded (/lib/systemd/system/sleep.target; static)
Active: inactive (dead)
Docs: man:systemd.special(7)
○ suspend.target - Suspend
Loaded: loaded (/lib/systemd/system/suspend.target; static)
Active: inactive (dead)
Docs: man:systemd.special(7)
○ hibernate.target - System Hibernation
Loaded: loaded (/lib/systemd/system/hibernate.target; static)
Active: inactive (dead)
Docs: man:systemd.special(7)
○ hybrid-sleep.target - Hybrid Suspend+Hibernate
Loaded: loaded (/lib/systemd/system/hybrid-sleep.target; static)
Active: inactive (dead)
Docs: man:systemd.special(7)
At this point I am left to wonder which program is handling the lid ..
Please note that if I use the logout button to do anything like suspend or hibernate or sleep it does it correctly and I am able to wake the machine getting back to a working state. Only when the lid is closed I get this mess ...
|
It's often useful to see what
archlinux has on the
subject. It links to
xfce and the
xfce4-power-manager, and we can then see the
buglist.
One of them sounds
similar:
suspending by closing the lid freezes graphics after resuming
using "When laptop lid is closed" = "Suspend"
... "Lock screen when system is going to sleep"
When closing the lid and then opening it back up, the screen will be
frozen with what it should look like without the lock screen activated.
The suggested workaround is
disabling the compositor with
xfconf-query -c xfwm4 -p /general/use_compositing -s false
The issue is linked back to an earlier issue which is still open
(at 15jan2023), where someone with a Lenovo Ideapad on Debian 12 has another
fix that seems to work, creating /etc/X11/xorg.conf with just the lines:
Section "Device"
Identifier "Card0"
Driver "intel"
EndSection
| How to control laptop lid behaviour in Debian 12 in XFCE |
1,488,202,671,000 |
I'm using Debian-Jessie, when I set my laptop to hibernate mode some processes would be suspended as expected, but after I start it again "pulseaudio" process don't work anymore and when I try to play some music or video using any media player like VLC, SMPlayer, etc. they crash!
I checked pulseaudio status as current user:
pulseaudio --check
echo $?
it returns the value 0, so it seems ok!
when I try to kill pulseaudio and start it over again nothing would happen:
pulseaudio --kill
pulseaudio --start
I try to do the same using SYSKILL signals, still nothing will change and crashes occur:
ps aux | grep pulseaudio
sudo kill 914
pulseaudio --start
and here are logs related in syslog:
rtkit-daemon[915]: Successfully made thread 6881 of process 6881 (/usr/bin/pulseaudio) owned by '1000' high priority at nice level -11.
dmesg:
[ 9903.006551] sound hdaudioC1D3: hda-codec: out of range cmd 3:5:707:ffffffff
I still don't know what's wrong with sound card or audio system; is it possible that the problem comes from another daemon? I don't want to restart my system each time it hibernates.
|
Just found the answer, this problem comes from pulseaudio feature called "auto spawning process"
each time pulseaudio daemon stops working and there is no process, it will try to automatically spawn a process, so we need to stop it by the following way:
cp /etc/pulse/client.conf ~/.config/pulse/
vim ~/.config/pulse/client.conf
then uncomment the line which says "autospawn = yes" by removing the leading semicolon and change it to "autospawn = no" then save it.
now try to restart pulseaudio
pulseaudio --kill
pulseaudio --start
everything is fine now!
| pulseaudio stops working after hibernation |
1,488,202,671,000 |
I was running sfill on a mount point on my laptop and had forgotten to switch on the power, so when the battery ran down the laptop hibernated (I know I should perhaps disable hibernate and I probably will).
On restart top shows sfill as status D (uninterruptible sleep) and %CPU 0.3 to 0.7, %MEM 0.0, but sounds like there is some disk activity.
Is sfill still running - are these %CPU and %MEM figures normal, or do I need to kill sfill and restart? Any implications to killing it?
|
Yes the process is still running but it is in uninterruptable sleep (state D) waiting on I/O. This means that process is stuck waiting for the disk and is unlikely to recover.
The best thing to do is wait and see if the process "wakes up" once the laptop has started everything back up. The only other thing to do is reboot the laptop to clear the process.
More details from stackover flow about this type of sleep can be found here: https://stackoverflow.com/questions/223644/what-is-an-uninterruptable-process
| Is a process still running after hibernate? |
1,488,202,671,000 |
I set up my ASUS X551-CA laptop for hibernating. When tested hibernation, it worked but after a longer period (more than 10 minutes) the system resumes and instantly reboots with file system warnings of the journals. dmesg gave no useful informations, only informs about a succesful resume. The os is Arch Linux with kernel 4.4.5 and systemd 229.
|
When hibernating, there are various ways to "wake up" the system , in addition to the normal power button ; Eg LAN or USB.
[[ Check https://wiki.archlinux.org/index.php/Wake-on-LAN & https://askubuntu.com/questions/61708/automatically-sleep-and-wake-up-at-specific-times ]]
After it wakes up, kernel may have detected a faulty hibernate, which may potentially have corrupted the FileSystem , hence kernel triggers a crash or panic , which results in reboot.
| Why reboots the system after a long hibernation? |
1,488,202,671,000 |
I'm using Debian Jessie with systemd. In the past I've used an acpid script that let's my computer hibernate when the battery is 5% or below.
In an attempt to make a replacement for that I've made this udev rule (as the described here in the Arch wiki):
$ cat /etc/udev/rules.d/99-lowbat.rules
SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="5", RUN+="/usr/bin/systemctl hibernate"
SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="4", RUN+="/usr/bin/systemctl hibernate"
SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="3", RUN+="/usr/bin/systemctl hibernate"
SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="2", RUN+="/usr/bin/systemctl hibernate"
SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="1", RUN+="/usr/bin/systemctl hibernate"
SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="0", RUN+="/usr/bin/systemctl hibernate"
It's not working.
I've tried making this test rule which works:
$ cat /etc/udev/rules.d/98-discharging.rules
SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", RUN+="/usr/bin/touch /home/myname/discharging"
Why doesn't the first rule work to hibernate my laptop?
|
The path you used for systemctl is wrong. systemctl is in /bin/, not /usr/bin/ (this is Debian/Ubuntu specific).
| Auto-hibernate with udev rule |
1,488,202,671,000 |
In X I've used the following script (from here) to lock the computer with i3lock each time pm-suspend or pm-hibernate are invoked.
/etc/pm/sleep.d/00screensaver-lock:
#!/bin/sh
# 00screensaver-lock: lock workstation on hibernate or suspend
username=andreas
userhome=/home/$username
export XAUTHORITY="$userhome/.Xauthority"
export DISPLAY=":0"
case "$1" in
hibernate|suspend)
su $username -c "/usr/bin/i3lock &
;;
thaw|resume)
;;
*) exit $NA
;;
esac
Now I'm in the process of setting up a console-only laptop (a minimal Debian install without the X server installed.)
I've tried using the above script on that machine to lock my session using vlock. (That is: I've switched out i3lock with vlock in the version of the script I'm using on the console machine.) I've also tried commenting out the two lines starting with export XAUTHORITY and export DISPLAY=":0" as they are X specific.
The script doesn't work on the no-X machine.
How should I call vlock each time the computer suspends/hibernates?
|
This simple script does the trick:
#!/bin/sh
case "$1" in
hibernate|suspend)
/usr/bin/vlock -ans &
;;
thaw|resume)
;;
*) exit $NA
;;
esac
| Locking console when computer suspends/hibernates |
1,488,202,671,000 |
Is there any way to make my PC hibernate when I press the power button? Obviously when I press this button somewhere some signal is sent. Can it be intercepted to enable my PC to hibernate?
|
You probably (could) use acpid (check via ps aux | grep acpid). Then have a look at this article in the ArchWiki explaining how to use pm-utils to extend acpid to easily achieve whatever effect you'd like when some hardware button is pressed.
If, however, you use GNOME, there other (also GUI) ways, see this comprehensive thread on askubuntu.com
| How do I hibernate my PC when I press the power button |
1,488,202,671,000 |
This morning I did something stupid. On my Debian 8 I ran apt-get update and apt-get upgrade. In the middle of the unpacking and installation of the updates (approx 500MB) I had to leave fast. As a habit I tend to hibernate my system and sadly I did it this time too.
Now when I try to boot my system right after the OS selection menu (I have only a Debian 8 on my notebook) I go straight to initframs with the following message:
Gave up waiting for root device. Common problems:
- Boot args (cat /proc/cmdline)
- Check rootdelay- (did the system wait long enough?)
- Check root- (did the system wait for the right device?)
- Missing modules (cat /proc/modules; ls /dev)
ALERT! /dev/disk/by-uuid/87f8d463-bb91-4eb0-866c-8189f8ea6afb does not exist. Dropping to a shell!
modprobe: module ehci-orion not found in modules.dep
BusyBox v1.22.1 (Debian 1:1.22.0-9+deb8u1) build-in shell (ash)
Enter 'hel' for a list of build-in commands.
/bin/sh: can't access tty; job control turned off
(initframs) _
Before that (as usual) I can see "Loading from ramdisk" on the screen since I hibernated the system.
Now my guess is that during the update some critical part of the system was in the process of being updated and the hibernation interrupted all this (why was I even allowed to do that if something that critical was being installed is a different topic).
I have never experienced such a problem and all the information I was able to find was about people having RAID problems, which in my case is not the case. Others say that it has something to do with encryption, which I have none.
I can boot from a live USB and provide more information.
Using an old Live CD (sadly 32bit while my Debian is 64bit) I did check /etc/fstab and the device listed in the ALERT! is indeed /dev/sda2 where both my root filesystem as well as /boot/grub are.
|
You need to try to make that update finish.
If you have Live CD/DVD/USB boot into that, then try {blkid | more} to list all your {UUID=xxxxxxxx.xxxxxxxxxxx.xxxxxxxx.xxxxxxxx} numbers. It's strange that update messes that data up. See whether UUID value matches the previous one (it should).
Then connect to internet and try to {chroot} your way into damaged Debian and make that update restart and this time be aware of what you're doing.
Your issue will be fixed when either:
1) You restart update and let it complete properly.
2) You find all files which that update has altered and return them to their value(s) from before you tried to update (by hand).
| Failing to boot followed by initframs prompt after hibernating during update |
1,488,202,671,000 |
Does anyone use swap?
what is your swapiness value? Mine are 60
$ cat /proc/sys/vm/swappiness
I use hibernation. It worked but slow to load when wake-up.. If I tune swappiness from 60 to 10. Does this setting will make wake up from hibernation faster?
Currently using Fedora Gnome 23 with kernel 4.4.9
|
You need swap to properly hibernate, which means save the current state of the system to disk, power off the computer, then resume the previous state.
However you don't need a swap partition/file to suspend the system, the difference here is in this case, the kernel will only turn off non-essential devices of the computer, (everything except, northbridge, MC, RAM, CPUs, probably southbridge too.). In this case, the kernel will attempt to load the current state of the system to main memory, then go to sleep, waiting for an interrupt to wake it up, then proceed from that stored state. this is known as STR (suspend to RAM). which is the default behavior in most systems.
So, swappiness doesn't have an actual effect on how fast or slow your system recovers from hibernation. However, reducing swappiness speeds things up for other operations. What makes things faster is suspend instead of hibernate, cause, as you probably know, RAM access is a lot faster than disk access.
Ultimately, I'd say it depends of your situation, if you're going to power off your computer (battery is depleting), or just leave the computer in power-saving mode while you're not using it (you make a script that can tell if you'd fallen asleep at the keyboard, again xD). etc.
| Can lower swappiness speed up wake-up from hibernate? |
1,488,202,671,000 |
I'm using Arch Linux, and with this in my fstab for mounting my Windows partition:
/dev/sda2 /media/windows ntfs-3g josh,exec 0 0
it panics and goes into emergency mode on boot. I turned off FastBoot, as several articles have suggested, but while Windows doesn't go into hibernation, it still seems to be locking the NTFS partition.
I like to have Linux use files on my Windows partition (for example, symlinking ~/Pictures to /media/windows/Users/Josh/Pictures) so I don't have to reinvent the wheel, so to speak.
How can I get Windows to unlock its partition when it shuts down?
|
Alright, after running powercfg /h off it mounts correctly now
| Mounting Windows 8.1 partition in fstab fails even when FastBoot is turned off |
1,672,937,318,000 |
I have a laptop with the latest version of Linux Mint. I set up a swap partition and running pm-hibernate works normally (shuts down and resumes when booting). However, in Power Management settings "When the battery is critically low" hibernation is not an option.
I looked at the Python config program (/usr/share/cinnamon/cinnamon-settings/modules/cs_power.py) and there seems to be a block of code that checks if hibernation is possible:
def get_available_options(up_client):
can_suspend = False
can_hibernate = False
can_hybrid_sleep = False
# Try logind first
try:
connection = Gio.bus_get_sync(Gio.BusType.SYSTEM, None)
proxy = Gio.DBusProxy.new_sync(
connection,
Gio.DBusProxyFlags.NONE,
None,
"org.freedesktop.login1",
"/org/freedesktop/login1",
"org.freedesktop.login1.Manager",
None)
can_suspend = proxy.CanSuspend() == "yes"
can_hibernate = proxy.CanHibernate() == "yes"
can_hybrid_sleep = proxy.CanHybridSleep() == "yes"
except:
pass
# Next try ConsoleKit
try:
connection = Gio.bus_get_sync(Gio.BusType.SYSTEM, None)
proxy = Gio.DBusProxy.new_sync(
connection,
Gio.DBusProxyFlags.NONE,
None,
"org.freedesktop.ConsoleKit",
"/org/freedesktop/ConsoleKit/Manager",
"org.freedesktop.ConsoleKit.Manager",
None)
can_suspend = can_suspend or (proxy.CanSuspend() == "yes")
can_hibernate = can_hibernate or (proxy.CanHybridSleep() == "yes")
can_hybrid_sleep = can_hybrid_sleep or (proxy.CanHybridSleep() == "yes")
except:
pass
def remove(options, item):
for option in options:
if option[0] == item:
options.remove(option)
break
lid_options = [
("suspend", _("Suspend")),
("shutdown", _("Shutdown immediately")),
("hibernate", _("Hibernate")),
("blank", _("Lock Screen")),
("nothing", _("Do nothing"))
]
button_power_options = [
("blank", _("Lock Screen")),
("suspend", _("Suspend")),
("shutdown", _("Shutdown immediately")),
("hibernate", _("Hibernate")),
("interactive", _("Ask")),
("nothing", _("Do nothing"))
]
critical_options = [
("shutdown", _("Shutdown immediately")),
("hibernate", _("Hibernate")),
("nothing", _("Do nothing"))
]
if not can_suspend:
for options in lid_options, button_power_options, critical_options:
remove(options, "suspend")
if not can_hibernate:
for options in lid_options, button_power_options, critical_options:
remove(options, "hibernate")
return lid_options, button_power_options, critical_options, can_suspend, can_hybrid_sleep
If I set can_hibernate to True after this code, the option appears, but it doesn't work. How can I set it to hibernate when battery is low?
|
i just dealt with enabling hibernation on my Linux Mint 19.3 Cinnamon setup.
A) I first followed this tuto, https://www.reddit.com/r/linuxmint/comments/93ta9u/enable_hibernation_in_linux_mint_19_tara/
NOTE: Be sure you have SWAP partition which is big enough.
1.) Create file with name "com.ubuntu.enable-hibernate.pkla" in "/etc/polkit-1/localauthority/50-local.d" :
sudo touch /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
2.) Open this file with your favorite editor (under root privileges) and paste these lines in it and save it:
[Re-enable hibernate by default]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes
[Re-enable hibernate by default in logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate
ResultActive=yes
3.) Edit this line in file "/etc/default/grub" so it looks like this:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=swap_partition_uuid"
swap_partition_uuid - you can find this UUID in file "/etc/fstab", so
replace that string with your actual uuid of swap partition
4.) Update grub configuration by executing this command:
sudo update-grub
It made hibernation work with the systemctl hibernate command.
But the hibernate button wasn't displayed in the power-off window, nor was the hibernate options displayed in the power management settings (which is what you seemed interested in ;))
B) I then created the /var/lib/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla file as described in this tuto, http://linuxg.net/how-to-enable-hibernation-and-add-the-hibernate-button-to-the-shutdown-menu-on-ubuntu-14-04-trusty-tahr/.
I edited some parts of the quote for more clarity.
1.) Create file with name "com.ubuntu.enable-hibernate.pkla" in "/var/lib/polkit-1/localauthority/50-local.d" :
sudo touch /var/lib/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
2.) Open this file with your favorite editor (under root privileges) and paste these lines in it and save it:
[Re-enable hibernate by default in upower]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes
[Re-enable hibernate by default in logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate
ResultActive=yes
Hibernate button and options are now available on my setup !
Hope this helps.
| Enable hibernation in Power Management? |
1,672,937,318,000 |
Problem: I hibernate the computer at night and my cat wakes it by stepping on the keyboard. Yes, hibernate a.k.a. suspend to disk, with systemctl hibernate. Not suspend to ram. I used to think that, once completed, hibernation would be indistinguishable from a normal shutdown but apparently that's not the case since the computer doesn't wake on usb after a normal shutdown.
System: Debian 10, motherboard ASUS B450.
What I've tried:
I couldn't find anything on the BIOS.
cat /sys/bus/usb/devices/usb[1-7]/power/wakeup
All return disabled.
There are other "devices" under /sys/bus/usb/devices/ but they all seem to be hubs and don't have the power/wakeup option. They all have names like such: 1-0:1.0.
I would like to solve this by software. I would not like to:
Anything that involves changing my setup, locking the room, selling the cat, etc;
Turn off the power strip. The router is connected to it and other people might want wifi while I'm asleep.
Thanks for the help, in advance.
EDIT:
cat /proc/acpi/wakeup returns:
Device S-state Status Sysfs node
GPP0 S4 *disabled
GPP1 S4 *disabled
GPP3 S4 *disabled
GPP4 S4 *disabled
GPP5 S4 *disabled
GPP6 S4 *disabled
GPP7 S4 *disabled
GPP8 S4 *enabled pci:0000:00:03.1
X161 S4 *disabled pci:0000:08:00.0
GPP9 S4 *disabled
X162 S4 *disabled
GPPA S4 *disabled
GPPB S4 *disabled
GPPC S4 *disabled
GPPD S4 *disabled
GPPE S4 *disabled
GPPF S4 *disabled
GP10 S4 *disabled
GP11 S4 *disabled
GP12 S4 *enabled pci:0000:00:07.1
GP13 S4 *enabled pci:0000:00:08.1
XHC0 S4 *enabled pci:0000:0a:00.3
GP30 S4 *enabled pci:0000:00:08.2
GP31 S4 *enabled pci:0000:00:08.3
PS2K S3 *disabled
PS2M S3 *disabled
GPP2 S4 *enabled pci:0000:00:01.3
PX11 S4 *disabled
PX12 S4 *disabled
RLAN S4 *disabled pci:0000:07:00.0
PTXH S4 *enabled pci:0000:01:00.0
|
There's some background on ACPI states in the kernel doc.
Since the keyboard is presumably a usb device, if it cannot be disabled, you can try to disable the controller.
As well as /sys/bus/usb/devices/,
there are also devices listed in pseudo file /proc/acpi/wakeup that you can disable. These tend to be on the motherboard, rather than hotplug. The 4 character names are rather obscure, coming from the bios, but some of them are described in this answer. You can toggle one by writing its name into the file, for example:
echo XHC0 >/proc/acpi/wakeup
This should disable your USB 3 controller. You are still dependent on what the bios does, hence suspend-to-ram might be necessary, as C.M. pointed out in the comments.
For a permanent setting, you need to write this everytime you boot, and as you found, the systemd-tmpfiles utility can do this using its general purpose methods.
Create a file such as /etc/tmpfiles.d/disable-usb-wake.conf with the lines
# Path Mode UID GID Age Argument
w /proc/acpi/wakeup - - - - XHC0
The first line is just a comment. See man tmpfiles.d for the format.
| Disable wake on usb after hibernation |
1,672,937,318,000 |
Using Debian wheezy graphical install I want to ensure I have enough swap space to hibernate, what are the simplest steps to achieve this?
|
I want to ensure I have enough swap space to hibernate, what are the simplest steps to achieve this?
You'll want at least as much swap space as you have RAM. I'd recommend 50% more if you are used to using most of your memory, since while I have not found any official number, I seem to recall it refusing to work occasionally when they are roughly equal in size.
| Setting up linux with enought swap space to hibernate |
1,672,937,318,000 |
Debian 11 bullseye
I know there are 1008 threads on hibernation only in Unix&Linux. However, I could not find the answer to my problem.
I cannot SSH my PC when it is logged out. I suspect this is because it is in suspension/hibernation.
If I am logged in, the PC does not go to hibernation/suspension (disabled in settings), and SSH works.
After logging out, the PC will go to suspension/hibernation.
How can I disable suspension/hibernation when I am logged out? so Linux responds to network ssh?
Thank you
|
Ok, I think I found the answer
-Using settings will only change the behavior while the account is logged in
Then, there is the login screen or greeter session
To change the setting in the greeter session, and in gnome, edit the file:
/etc/gdm3/greeter.dconf-defaults
In this file, there is the configuration:
# Automatic suspend
# =================
[org/gnome/settings-daemon/plugins/power]
# - Time inactive in seconds before suspending with AC power
# 1200=20 minutes, 0=never
# sleep-inactive-ac-timeout=1200
# - What to do after sleep-inactive-ac-timeout
# 'blank', 'suspend', 'shutdown', 'hibernate', 'interactive' or 'nothing'
# sleep-inactive-ac-type='suspend'
# - As above but when on battery
# sleep-inactive-battery-timeout=1200
# sleep-inactive-battery-type='suspend'
sleep-inactive-battery-type='blank'
I set the sleep-inactive-ac-timeout=0
| hibernation or suspension during system logged out prevent form network connection ssh |
1,672,937,318,000 |
I have a script that verifies the battery level using acpi and if it's below certain threshold it should lock the machine and hibernate. The script is executed every minute using crontab
The problem is that the machine gets locked but never hibernates.
The script:
#!/bin/sh
acpi -b | awk -F'[,:%]' '{print $2, $3}' | {
read -r status capacity
if [ "$status" = Discharging -a "$capacity" -lt 10 ]; then
echo 'Success' >> /tmp/low;
logger "Critical battery threshold";
DISPLAY=:0 i3lock -t -i $(ls -d ~/.wallpapers/* | shuf | head -n 1);
echo 'Locked' >> /tmp/low;
systemctl hibernate;
fi
}
The /tmp/low log file shows the following:
$ cat /tmp/low
Success
Locked
Success
Locked
Success
Locked
I tried to directly run a similar script (Without the ACPI check) and it worked perfectly
The testing script:
#!/bin/sh
acpi -b | awk -F'[,:%]' '{print $2, $3}' | {
read -r status capacity
echo 'Success' >> /tmp/low;
logger "Critical battery threshold";
DISPLAY=:0 i3lock -t -i $(ls -d ~/.wallpapers/* | shuf | head -n 1);
echo 'Locked' >> /tmp/low;
systemctl hibernate;
}
Same testing script was run using at but it didn't hibernate the machine. Any ideas why crontab can't execute systemctl hibernate?
|
I have found a solution. Apparently the problem was in the polkit package that defines the policies for users to shutdown, reboot, suspend, hibernate, etc
As I had no rule file in /etc/polkit-1/rules.d the default is not to allow users to hibernate or suspend the machine while a user is logged in (I believe the problem here is that I'm locking the machine before hibernating, and therefore there is an open session)
To solve it I had to create the file /etc/polkit-1/rules.d/99-allow-hibernate-on-low-battery.rules with the following content:
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.login1.suspend" ||
action.id == "org.freedesktop.login1.suspend-multiple-sessions" ||
action.id == "org.freedesktop.login1.hibernate" ||
action.id == "org.freedesktop.login1.hibernate-multiple-sessions") {
return polkit.Result.YES;
}
});
After that, cron and at can hibernate the machine correctly
| `systemctl hibernate` not executed on crontab script |
1,672,937,318,000 |
I am having a problem with my laptop (HP Elitebook 8570w) -- whenever I close the screen and it goes into sleep/suspend/hibernation mode (take your pick on the name of this feature). When I reopen the laptop lid and the session comes back up, everything is fine EXCEPT that the xfce4-panel does not draw correctly (it will be either all black, or will have artifacts of whatever previously drew on that area of the screen).
The panel still functions when you click buttons, but they no longer draw/update. Any other graphical elements get 'drawn over' it and the panel becomes very difficult to use. The best way to describe it is 'graphical corruption' or perhaps 'artifacts' - but thus far I've been unsuccessful in seeing anyone else online describe exactly the same problem I'm having.
I have tried restarting the xfce4-panel process, but it results in the same thing again. I have tried restarting some other xfce processes, and also tried xrefresh among other things but to no avail. The only way I can get rid of it is to log out and log back in, but I lose all my windows and stuff and it's extremely annoying. I run a VMWare VM and a bunch of other stuff which I want to keep in the memory state to be restored when I come back from suspend/hibernation state.
Is there perhaps some other process(es) I can restart to restore my panel without logging all the way out and losing my session?
Any insight into this problem would be very much appreciated, even if it's some kind of workaround. Thanks!
ADDITIONAL INFO -
Notes:
Discovered that when i use Printscreen to take a screenshot, the draw call comes through ONCE and refreshes the panel and the existing artifacts are removed (hence I can't even take a screenshot of the artifacts happening) But it still won't continue to update after that. Simply hovering over any 'window button' area will open a tooltip with the full name of the window which will overwrite the panel area and be stuck there until some other graphical element overwrites it.
Graphics:
Card: Advanced Micro Devices [AMD/ATI] Chelsea XT GL [FirePro M4000] bus-ID: 01:00.0
X.Org: 1.15.1 driver: fglrx Resolution: [email protected], [email protected], [email protected]
GLX Renderer: AMD Radeon HD 7700M Series GLX Version: 4.3.12798 - CPC FireGL 13.35.1005
Direct Rendering: Yes
Driver: fglrx-updates (proprietary AMD/ATI driver)
Seemingly notable entries in /var/log/pm-suspend.log :
...
Running hook /usr/lib/pm-utils/sleep.d/60_wpa_supplicant suspend suspend:
Failed to connect to non-global ctrl_ifname: (null) error: No such file or directory
/usr/lib/pm-utils/sleep.d/60_wpa_supplicant suspend suspend: success.
...
Running hook /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler suspend suspend:
ATI Catalyst driver detected, not using quirks.
/usr/lib/pm-utils/sleep.d/98video-quirk-db-handler suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/99video suspend suspend:
kernel.acpi_video_flags = 0
/usr/lib/pm-utils/sleep.d/99video suspend suspend: success.
Running hook /etc/pm/sleep.d/novatel_3g_suspend suspend suspend:
/etc/pm/sleep.d/novatel_3g_suspend suspend suspend: success.
Tue Apr 7 19:20:51 MST 2015: performing suspend
** THIS IS WHEN THE LAPTOP GOES TO SUSPEND MODE **
** NOW I OPEN THE LID AND PRESS POWER TO WAKE UP **
Tue Apr 7 19:21:16 MST 2015: Awake.
Tue Apr 7 19:21:16 MST 2015: Running hooks for resume
Running hook /etc/pm/sleep.d/novatel_3g_suspend resume suspend:
/etc/pm/sleep.d/novatel_3g_suspend resume suspend: success.
...
Running hook /usr/lib/pm-utils/sleep.d/60_wpa_supplicant resume suspend:
Failed to connect to non-global ctrl_ifname: (null) error: No such file or directory
/usr/lib/pm-utils/sleep.d/60_wpa_supplicant resume suspend: success.
Here is the full output from the log:
Initial commandline parameters:
Tue Apr 7 19:20:49 MST 2015: Running hooks for suspend.
Running hook /usr/lib/pm-utils/sleep.d/000kernel-change suspend suspend:
/usr/lib/pm-utils/sleep.d/000kernel-change suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/000record-status suspend suspend:
/usr/lib/pm-utils/sleep.d/000record-status suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/00logging suspend suspend:
Linux ad-work 3.13.0-48-generic #80-Ubuntu SMP Thu Mar 12 11:16:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Module Size Used by
vmnet 51277 13
vmw_vsock_vmci_transport 26278 0
vsock 34903 1 vmw_vsock_vmci_transport
vmw_vmci 62966 1 vmw_vsock_vmci_transport
vmmon 76182 0
bnep 19624 2
rfcomm 69160 12
binfmt_misc 17468 1
arc4 12608 2
iwldvm 232285 0
mac80211 630669 1 iwldvm
btusb 32412 0
uvcvideo 80885 0
bluetooth 391136 22 bnep,btusb,rfcomm
videobuf2_vmalloc 13216 1 uvcvideo
videobuf2_memops 13362 1 videobuf2_vmalloc
pl2303 19133 0
videobuf2_core 40664 1 uvcvideo
usbserial 45014 1 pl2303
videodev 134688 2 uvcvideo,videobuf2_core
hp_wmi 14062 0
sparse_keymap 13948 1 hp_wmi
snd_hda_codec_hdmi 46368 1
snd_hda_codec_idt 54762 1
intel_rapl 18773 0
x86_pkg_temp_thermal 14205 0
intel_powerclamp 14705 0
coretemp 13435 0
kvm_intel 143187 0
kvm 455835 1 kvm_intel
crct10dif_pclmul 14289 0
crc32_pclmul 13113 0
ghash_clmulni_intel 13216 0
aesni_intel 55624 0
snd_hda_intel 56531 11
aes_x86_64 17131 1 aesni_intel
lrw 13286 1 aesni_intel
gf128mul 14951 1 lrw
snd_hda_codec 192906 3 snd_hda_codec_hdmi,snd_hda_codec_idt,snd_hda_intel
glue_helper 13990 1 aesni_intel
ablk_helper 13597 1 aesni_intel
snd_hwdep 13602 1 snd_hda_codec
cryptd 20359 3 ghash_clmulni_intel,aesni_intel,ablk_helper
snd_pcm 102099 4 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel
snd_page_alloc 18710 2 snd_pcm,snd_hda_intel
joydev 17381 0
snd_seq_midi 13324 0
snd_seq_midi_event 14899 1 snd_seq_midi
serio_raw 13462 0
iwlwifi 169932 1 iwldvm
snd_rawmidi 30144 1 snd_seq_midi
snd_seq 61560 2 snd_seq_midi_event,snd_seq_midi
cfg80211 484040 3 iwlwifi,mac80211,iwldvm
snd_seq_device 14497 3 snd_seq,snd_rawmidi,snd_seq_midi
snd_timer 29482 2 snd_pcm,snd_seq
lpc_ich 21080 0
fglrx 8081247 124
snd 69322 32 snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_hda_codec_idt,snd_pcm,snd_seq,snd_rawmidi,snd_hda_codec,snd_hda_intel,snd_seq_device,snd_seq_midi
mei_me 18627 0
mei 82276 1 mei_me
soundcore 12680 1 snd
amd_iommu_v2 19054 1 fglrx
video 19476 0
parport_pc 32701 1
hp_accel 26012 0
tpm_infineon 17372 0
lis3lv02d 20156 1 hp_accel
wmi 19177 1 hp_wmi
ppdev 17671 0
input_polldev 13896 1 lis3lv02d
shpchp 37032 0
hp_wireless 12637 0
mac_hid 13205 0
lp 17759 0
parport 42348 3 lp,ppdev,parport_pc
hid_generic 12548 0
usbhid 52659 0
hid 106148 2 hid_generic,usbhid
psmouse 106714 0
firewire_ohci 40409 0
e1000e 254433 0
ahci 29915 2
firewire_core 68769 1 firewire_ohci
sdhci_pci 23172 0
libahci 32716 1 ahci
sdhci 43015 1 sdhci_pci
ptp 18933 1 e1000e
crc_itu_t 12707 1 firewire_core
pps_core 19382 1 ptp
total used free shared buffers cached
Mem: 16364188 9371636 6992552 65936 202812 5697516
-/+ buffers/cache: 3471308 12892880
Swap: 16705532 0 16705532
/usr/lib/pm-utils/sleep.d/00logging suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/00powersave suspend suspend:
/usr/lib/pm-utils/sleep.d/00powersave suspend suspend: success.
Running hook /etc/pm/sleep.d/10_grub-common suspend suspend:
/etc/pm/sleep.d/10_grub-common suspend suspend: success.
Running hook /etc/pm/sleep.d/10_unattended-upgrades-hibernate suspend suspend:
/etc/pm/sleep.d/10_unattended-upgrades-hibernate suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/50unload_alx suspend suspend:
/usr/lib/pm-utils/sleep.d/50unload_alx suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/60_wpa_supplicant suspend suspend:
Failed to connect to non-global ctrl_ifname: (null) error: No such file or directory
/usr/lib/pm-utils/sleep.d/60_wpa_supplicant suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/75modules suspend suspend:
/usr/lib/pm-utils/sleep.d/75modules suspend suspend: not applicable.
Running hook /usr/lib/pm-utils/sleep.d/90clock suspend suspend:
/usr/lib/pm-utils/sleep.d/90clock suspend suspend: not applicable.
Running hook /usr/lib/pm-utils/sleep.d/94cpufreq suspend suspend:
/usr/lib/pm-utils/sleep.d/94cpufreq suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/95anacron suspend suspend:
stop: Unknown instance:
/usr/lib/pm-utils/sleep.d/95anacron suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/95hdparm-apm suspend suspend:
/usr/lib/pm-utils/sleep.d/95hdparm-apm suspend suspend: not applicable.
Running hook /usr/lib/pm-utils/sleep.d/95led suspend suspend:
/usr/lib/pm-utils/sleep.d/95led suspend suspend: not applicable.
Running hook /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler suspend suspend:
ATI Catalyst driver detected, not using quirks.
/usr/lib/pm-utils/sleep.d/98video-quirk-db-handler suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/99video suspend suspend:
kernel.acpi_video_flags = 0
/usr/lib/pm-utils/sleep.d/99video suspend suspend: success.
Running hook /etc/pm/sleep.d/novatel_3g_suspend suspend suspend:
/etc/pm/sleep.d/novatel_3g_suspend suspend suspend: success.
Tue Apr 7 19:20:51 MST 2015: performing suspend
Tue Apr 7 19:21:16 MST 2015: Awake.
Tue Apr 7 19:21:16 MST 2015: Running hooks for resume
Running hook /etc/pm/sleep.d/novatel_3g_suspend resume suspend:
/etc/pm/sleep.d/novatel_3g_suspend resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/99video resume suspend:
/usr/lib/pm-utils/sleep.d/99video resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler resume suspend:
/usr/lib/pm-utils/sleep.d/98video-quirk-db-handler resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/95led resume suspend:
/usr/lib/pm-utils/sleep.d/95led resume suspend: not applicable.
Running hook /usr/lib/pm-utils/sleep.d/95hdparm-apm resume suspend:
/dev/sda:
setting Advanced Power Management level to 0xfe (254)
APM_level = 254
/dev/sdb:
setting Advanced Power Management level to 0xfe (254)
APM_level = 254
/usr/lib/pm-utils/sleep.d/95hdparm-apm resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/95anacron resume suspend:
/usr/lib/pm-utils/sleep.d/95anacron resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/94cpufreq resume suspend:
/usr/lib/pm-utils/sleep.d/94cpufreq resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/90clock resume suspend:
/usr/lib/pm-utils/sleep.d/90clock resume suspend: not applicable.
Running hook /usr/lib/pm-utils/sleep.d/75modules resume suspend:
Reloaded unloaded modules.
/usr/lib/pm-utils/sleep.d/75modules resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/60_wpa_supplicant resume suspend:
Failed to connect to non-global ctrl_ifname: (null) error: No such file or directory
/usr/lib/pm-utils/sleep.d/60_wpa_supplicant resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/50unload_alx resume suspend:
/usr/lib/pm-utils/sleep.d/50unload_alx resume suspend: success.
Running hook /etc/pm/sleep.d/10_unattended-upgrades-hibernate resume suspend:
/etc/pm/sleep.d/10_unattended-upgrades-hibernate resume suspend: success.
Running hook /etc/pm/sleep.d/10_grub-common resume suspend:
/etc/pm/sleep.d/10_grub-common resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/00powersave resume suspend:
/usr/lib/pm-utils/sleep.d/00powersave resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/00logging resume suspend:
/usr/lib/pm-utils/sleep.d/00logging resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/000record-status resume suspend:
/usr/lib/pm-utils/sleep.d/000record-status resume suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/000kernel-change resume suspend:
/usr/lib/pm-utils/sleep.d/000kernel-change resume suspend: success.
Tue Apr 7 19:21:17 MST 2015: Finished.
When I kill xfce4-panel and restart to look at debug output. Commands:
xfce4-panel -q
PANEL_DEBUG=1 xfce4-panel
(nothing appears out of the ordinary):
xfce4-panel(main): version 4.11.0 on gtk+ 2.24.23 (2.24.22), glib 2.40.2 (2.39.90)
xfce4-panel(module-factory): reading /usr/share/xfce4/panel/plugins
xfce4-panel(module-factory): reading /usr/share/xfce4/panel-plugins
xfce4-panel(application): found window manager after 1 tries
xfce4-panel(base-window): 0x7ff7c204c1e0: rgba colormap=0x7ff7c2038250, compositing=false
xfce4-panel(base-window): 0x7ff7c204c1e0: rgba colormap=0x7ff7c2038250, compositing=false
xfce4-panel(display-layout): 0x7ff7c204c1e0: display=:0.0{comp=true}, screen-0[0x7ff7c201c000]=[5760,1080] (DFP1=[0,0;1920,1080], DFP_=[1920,0;1920,1080], LVDS=[3840,0;1920,1080])
xfce4-panel(positioning): 0x7ff7c204c1e0: screen=0x7ff7c201c000, monitors=3, output-name=(null), span-monitors=false, base=960,1067
xfce4-panel(positioning): 0x7ff7c204c1e0: working-area: screen=0x7ff7c201c000, x=0, y=0, w=1920, h=1080
xfce4-panel(struts): 0x7ff7c204c1e0: bottom=25, start_x=0, end_x=1919
xfce4-panel(external): register dbus path /org/xfce/Panel/Wrapper/1
xfce4-panel(module): new item (type=external-wrapper, name=whiskermenu, id=1)
xfce4-panel(external): whiskermenu-1: child spawned; pid=15768, argc=8
xfce4-panel(module): new item (type=object-type, name=tasklist, id=2)
xfce4-panel(module): new item (type=object-type, name=separator, id=3)
xfce4-panel(external): register dbus path /org/xfce/Panel/Wrapper/4
xfce4-panel(module): new item (type=external-wrapper, name=systray, id=4)
xfce4-panel(external): systray-4: child spawned; pid=15770, argc=8
xfce4-panel(external): register dbus path /org/xfce/Panel/Wrapper/5
xfce4-panel(module): new item (type=external-wrapper, name=indicator, id=5)
xfce4-panel(external): indicator-5: child spawned; pid=15771, argc=8
xfce4-panel(module): new item (type=object-type, name=separator, id=6)
xfce4-panel(module): new item (type=object-type, name=clock, id=7)
xfce4-panel(module): new item (type=object-type, name=showdesktop, id=8)
xfce4-panel(systray): registered manager on screen 0
xfce4-panel(external): systray-4: child is embedded; 5 properties in queue
xfce4-panel(external): whiskermenu-1: child is embedded; 5 properties in queue
xfce4-panel(external): indicator-5: child is embedded; 5 properties in queue
And one more thing, I tried xfce4-panel with debug enabled on the module debug channel using PANEL_DEBUG=module xfce4-panel. I'm not sure if this is the right channel, but it did have some more interesting output:
xfce4-panel(main): version 4.11.0 on gtk+ 2.24.23 (2.24.22), glib 2.40.2 (2.39.90)
xfce4-panel(module-factory): reading /usr/share/xfce4/panel/plugins
xfce4-panel(module): new module tasklist, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libtasklist.so, internal=true
xfce4-panel(module): new module separator, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libseparator.so, internal=true
xfce4-panel(module): new module xfce4-mount-plugin, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libmount.so, internal=false
xfce4-panel(module): new module actions, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libactions.so, internal=false
xfce4-panel(module): new module systemload, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libsystemload.so, internal=false
xfce4-panel(module): new module genmon, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libgenmon.so, internal=false
xfce4-panel(module): new module launcher, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/liblauncher.so, internal=true
xfce4-panel(module): new module datetime, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libdatetime.so, internal=false
xfce4-panel(module): new module screenshooter, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libscreenshooterplugin.so, internal=false
xfce4-panel(module): new module xfce4-clipman-plugin, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libclipman.so, internal=false
xfce4-panel(module): new module weather, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libweather.so, internal=false
xfce4-panel(module): new module mailwatch, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libmailwatch.so, internal=false
xfce4-panel(module): new module windowmenu, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libwindowmenu.so, internal=true
xfce4-panel(module): new module battery, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libbattery.so, internal=false
xfce4-panel(module): new module pager, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libpager.so, internal=true
xfce4-panel(module): new module clock, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libclock.so, internal=true
xfce4-panel(module): new module whiskermenu, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libwhiskermenu.so, internal=false
xfce4-panel(module): new module xfce4-dict-plugin, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libxfce4dict.so, internal=false
xfce4-panel(module): new module indicator, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libindicator-plugin.so, internal=false
xfce4-panel(module): new module systray, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libsystray.so, internal=false
xfce4-panel(module): new module smartbookmark, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libsmartbookmark.so, internal=false
xfce4-panel(module): new module wavelan, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libwavelan.so, internal=false
xfce4-panel(module): new module fsguard, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libfsguard.so, internal=false
xfce4-panel(module): new module applicationsmenu, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libapplicationsmenu.so, internal=true
xfce4-panel(module): new module cpugraph, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libcpugraph.so, internal=false
xfce4-panel(module): new module directorymenu, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libdirectorymenu.so, internal=true
xfce4-panel(module): new module showdesktop, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libshowdesktop.so, internal=true
xfce4-panel(module): new module mixer, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libmixer.so, internal=false
xfce4-panel(module): new module diskperf, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libdiskperf.so, internal=false
xfce4-panel(module): new module cpufreq, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libcpufreq.so, internal=false
xfce4-panel(module): new module places, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libplaces.so, internal=false
xfce4-panel(module-factory): reading /usr/share/xfce4/panel-plugins
xfce4-panel(module): new module xfce4-orageclock-plugin, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel-plugins/xfce4-orageclock-plugin, internal=false
xfce4-panel(module): new module quicklauncher, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel-plugins/libquicklauncher.so, internal=false
xfce4-panel(module): new module xfce4-notes-plugin, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel-plugins/libnotes.so, internal=false
xfce4-panel(module): new module xkb-plugin, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel-plugins/xfce4-xkb-plugin, internal=false
xfce4-panel(module): new module thunar-tpa, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libthunar-tpa.so, internal=false
xfce4-panel(module): new module netload, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel-plugins/xfce4-netload-plugin, internal=false
xfce4-panel(module): new module xfce4-verve-plugin, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel-plugins/xfce4-verve-plugin, internal=false
xfce4-panel(module): new module xfce4-sensors-plugin, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel-plugins/xfce4-sensors-plugin, internal=false
xfce4-panel(module): new module xfce4-timer, filename=/usr/lib/x86_64-linux-gnu/xfce4/panel-plugins/xfce4-timer, internal=false
xfce4-panel(application): found window manager after 1 tries
xfce4-panel(base-window): 0x7fa9dc1f61e0: rgba colormap=0x7fa9dc1e2250, compositing=false
xfce4-panel(base-window): 0x7fa9dc1f61e0: rgba colormap=0x7fa9dc1e2250, compositing=false
xfce4-panel(display-layout): 0x7fa9dc1f61e0: display=:0.0{comp=true}, screen-0[0x7fa9dc1c4b60]=[5760,1080] (DFP1=[0,0;1920,1080], DFP_=[1920,0;1920,1080], LVDS=[3840,0;1920,1080])
xfce4-panel(positioning): 0x7fa9dc1f61e0: screen=0x7fa9dc1c4b60, monitors=3, output-name=(null), span-monitors=false, base=960,1067
xfce4-panel(positioning): 0x7fa9dc1f61e0: working-area: screen=0x7fa9dc1c4b60, x=0, y=0, w=1920, h=1080
xfce4-panel(struts): 0x7fa9dc1f61e0: bottom=25, start_x=0, end_x=1919
xfce4-panel(external): register dbus path /org/xfce/Panel/Wrapper/1
xfce4-panel(module): new item (type=external-wrapper, name=whiskermenu, id=1)
xfce4-panel(external): whiskermenu-1: child spawned; pid=16362, argc=8
xfce4-panel(module): new item (type=object-type, name=tasklist, id=2)
xfce4-panel(module): new item (type=object-type, name=separator, id=3)
xfce4-panel(external): register dbus path /org/xfce/Panel/Wrapper/4
xfce4-panel(module): new item (type=external-wrapper, name=systray, id=4)
xfce4-panel(external): systray-4: child spawned; pid=16364, argc=8
xfce4-panel(external): register dbus path /org/xfce/Panel/Wrapper/5
xfce4-panel(module): new item (type=external-wrapper, name=indicator, id=5)
xfce4-panel(external): indicator-5: child spawned; pid=16365, argc=8
xfce4-panel(module): new item (type=object-type, name=separator, id=6)
xfce4-panel(module): new item (type=object-type, name=clock, id=7)
xfce4-panel(module): new item (type=object-type, name=showdesktop, id=8)
xfce4-panel(systray): registered manager on screen 0
xfce4-panel(external): whiskermenu-1: child is embedded; 5 properties in queue
xfce4-panel(external): systray-4: child is embedded; 5 properties in queue
xfce4-panel(external): indicator-5: child is embedded; 5 properties in queue
init: indicator-power main process ended, respawning
init: indicator-messages main process ended, respawning
init: indicator-application main process ended, respawning
init: indicator-power main process ended, respawning
init: indicator-messages main process ended, respawning
init: indicator-sound main process ended, respawning
init: indicator-application main process ended, respawning
init: indicator-power main process ended, respawning
init: indicator-messages respawning too fast, stopped
init: indicator-application respawning too fast, stopped
init: indicator-sound main process ended, respawning
init: indicator-power main process ended, respawning
init: indicator-power main process ended, respawning
init: indicator-sound respawning too fast, stopped
init: indicator-power main process ended, respawning
init: indicator-power main process ended, respawning
init: indicator-power main process ended, respawning
init: indicator-power main process ended, respawning
init: indicator-power main process ended, respawning
init: indicator-power respawning too fast, stopped
|
This is the only post I have seen mentioning this specific issue. I also had the problem with the corruption of the XFCE panel in Xubuntu 14.04 after suspending by closing the lid of my laptop. Once I opened the lid, the panel was always corrupted - often just black. The desktop looked OK but if I opened files, the various buttons to maximise etc were missing too.
If I suspended the laptop via the Log Out menu, there was no problem. Everything came back perfectly.
After a bit of pondering, I came up with the idea of re-enabling the Compositing option for the desktop which I had disabled to save memory. And enabling compositing solved the corruption issues for me. Simple.
My laptop is also a HP (different model though) although I am not sure if the problem is HP specific.
Hope this might help someone.
| XUbuntu 14.04 - Why does my XFCE panel (xfce4-panel) become corrupted after sleep/suspend is resumed? |
1,672,937,318,000 |
After making some changes to my swap space, namely deleting and recreating swap space, my Kubuntu 11.10 has lost hibernate functionality. Although the button has returned, hibernating only appears to be working superficially until you try to resume the system - but instead of resuming you find it is restarting.
swapon -s:
Filename Type Size Used Priority
/dev/sda5 partition 10237948 0 -1
Partitions:
/etc/fstab:
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda3 during installation
UUID=0b109499-4feb-4ec1-b368-c7f945194e44 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
#/dev/sda5 none swap sw 0 0
/dev/sda5 none swap sw 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
|
Maybe you missed this?
"Making the swap partition work for hibernate (optional)", third subsection in this Ubuntu community help site. I think it's just what you need, telling the resume part of initramfs where swap is (via GRUB).
| How to re-enable hibernate in Kubuntu 11.10? |
1,672,937,318,000 |
I have a Fedora 32 system and it works fine but when I suspend/hibernate the system when it back to online the network is unreachable.
$ ip a show enp3s0
2: enp3s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether 08:62:66:27:58:6f brd ff:ff:ff:ff:ff:ff
inet 192.168.1.35/24 brd 192.168.1.255 scope global noprefixroute enp3s0
valid_lft forever preferred_lft forever
I have tried multiples forms to activate it but it's without success.
I have try :
$ sudo systemctl restart NetworkManager
$ ip a show enp3s0
2: enp3s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether 08:62:66:27:58:6f brd ff:ff:ff:ff:ff:ff
inet 192.168.1.35/24 brd 192.168.1.255 scope global noprefixroute enp3s0
valid_lft forever preferred_lft forever
$
$ sudo ifdown enp3s0 && sudo ifup enp3s0
Error: «/etc/sysconfig/network-scripts/ifcfg-enp3s0» no es una conexión activa.
Error: no se proporcionó una conexión activa.
$
$ sudo nmcli networking off && sudo nmcli networking on
$ ip a show enp3s0
2: enp3s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether 08:62:66:27:58:6f brd ff:ff:ff:ff:ff:ff
$ sudo ifdown enp3s0 && sudo ifup enp3s0
Error: «/etc/sysconfig/network-scripts/ifcfg-enp3s0» no es una conexión activa.
Error: no se proporcionó una conexión activa.
$
$ sudo nmcli con down enp3s0 && sudo nmcli con up enp3s0
Error: «enp3s0» no es una conexión activa.
Error: no se proporcionó una conexión activa.
$ sudo nmtui (with gui)
All this form to activate fails but When I restart the system the network is working properly again.
Regards
Update 1:
Before suspend the system (Work fine):
$ nmcli device show enp3s0
GENERAL.DEVICE: enp3s0
GENERAL.TYPE: ethernet
GENERAL.HWADDR: 08:62:66:27:58:6F
GENERAL.MTU: 1500
GENERAL.STATE: 100 (conectado)
GENERAL.CONNECTION: nmcli device show enp3s0
GENERAL.DEVICE: enp3s0
GENERAL.TYPE: ethernet
GENERAL.HWADDR: enp3s0
GENERAL.CON-PATH: /org/freedesktop/NetworkManager/ActiveConnection/3
WIRED-PROPERTIES.CARRIER: activado
IP4.ADDRESS[1]: 192.168.1.35/24
IP4.GATEWAY: 192.168.1.1
IP4.ROUTE[1]: dst = 192.168.1.0/24, nh = 0.0.0.0, mt = 100
IP4.ROUTE[2]: dst = 0.0.0.0/0, nh = 192.168.1.1, mt = 100
IP4.DNS[1]: 192.168.1.222
IP4.DNS[2]: 1.1.1.1
IP4.DNS[3]: 8.8.8.8
IP6.GATEWAY: --
-- Pring to router
$ ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.394 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.293 ms
$ ip -br -c link show
lo UNKNOWN 00:00:00:00:00:00 <LOOPBACK,UP,LOWER_UP>
enp3s0 UP 08:62:66:27:58:6f <BROADCAST,MULTICAST,UP,LOWER_UP>
virbr0 DOWN 52:54:00:c2:1b:e5 <NO-CARRIER,BROADCAST,MULTICAST,UP>
virbr0-nic DOWN 52:54:00:c2:1b:e5 <BROADCAST,MULTICAST>
[soyyo@aqua Scripts]$ ip -br -c addr show
lo UNKNOWN 127.0.0.1/8
enp3s0 UP 192.168.1.35/24
virbr0 DOWN 192.168.122.1/24
virbr0-nic DOWN
After resume the system :
$ nmcli device show enp3s0
GENERAL.DEVICE: enp3s0
GENERAL.TYPE: ethernet
GENERAL.HWADDR: 08:62:66:27:58:6F
GENERAL.MTU: 1500
GENERAL.STATE: 20 (no disponible)
GENERAL.CONNECTION: --
GENERAL.CON-PATH: --
WIRED-PROPERTIES.CARRIER: desactivado
$ sudo nmcli connection up abbecaa6-6237-333e-9eaf-c4f994c350cf
Conexión activada con éxito (ruta activa D-Bus: /org/freedesktop/NetworkManager/ActiveConnection/4)
$ nmcli device show enp3s0
GENERAL.DEVICE: enp3s0
GENERAL.TYPE: ethernet
GENERAL.HWADDR: 08:62:66:27:58:6F
GENERAL.MTU: 1500
GENERAL.STATE: 100 (conectado)
GENERAL.CONNECTION: enp3s0
GENERAL.CON-PATH: /org/freedesktop/NetworkManager/ActiveConnection/4
WIRED-PROPERTIES.CARRIER: desactivado
IP4.ADDRESS[1]: 192.168.1.35/24
IP4.GATEWAY: 192.168.1.1
IP4.ROUTE[1]: dst = 192.168.1.0/24, nh = 0.0.0.0, mt = 100
IP4.ROUTE[2]: dst = 0.0.0.0/0, nh = 192.168.1.1, mt = 20100
IP4.DNS[1]: 192.168.1.222
IP4.DNS[2]: 1.1.1.1
IP4.DNS[3]: 8.8.8.8
$ ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
From 192.168.1.35 icmp_seq=1 Destination Host Unreachable
From 192.168.1.35 icmp_seq=2 Destination Host Unreachable
From 192.168.1.35 icmp_seq=3 Destination Host Unreachable
From 192.168.1.35 icmp_seq=4 Destination Host Unreachable
$ ip -br -c link show
lo UNKNOWN 00:00:00:00:00:00 <LOOPBACK,UP,LOWER_UP>
enp3s0 DOWN 08:62:66:27:58:6f <NO-CARRIER,BROADCAST,MULTICAST,UP>
virbr0 DOWN 52:54:00:c2:1b:e5 <NO-CARRIER,BROADCAST,MULTICAST,UP>
virbr0-nic DOWN 52:54:00:c2:1b:e5 <BROADCAST,MULTICAST>
[soyyo@aqua Scripts]$ ip -br -c addr show
lo UNKNOWN 127.0.0.1/8
enp3s0 DOWN 192.168.1.35/24
virbr0 DOWN 192.168.122.1/24
virbr0-nic DOWN
-- I try to up the device
$ sudo ip link set enp3s0 up
$ ip -br -c link show
lo UNKNOWN 00:00:00:00:00:00 <LOOPBACK,UP,LOWER_UP>
enp3s0 DOWN 08:62:66:27:58:6f <NO-CARRIER,BROADCAST,MULTICAST,UP>
virbr0 DOWN 52:54:00:c2:1b:e5 <NO-CARRIER,BROADCAST,MULTICAST,UP>
virbr0-nic DOWN 52:54:00:c2:1b:e5 <BROADCAST,MULTICAST>
Update 2:
These are the ocurrences of systemd-rfkill.
After normal boot:
Tue 2021-01-26 20:36:23 CET aqua systemd[1]: systemd-rfkill.service: Succeeded.
-- The unit systemd-rfkill.service has successfully entered the 'dead' state.
Tue 2021-01-26 20:36:23 CET aqua audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Tue 2021-01-26 20:36:18 CET aqua kernel: audit: type=1130 audit(1611689778.178:91): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Tue 2021-01-26 20:36:18 CET aqua audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
After back from resume:
Tue 2021-01-26 20:41:07 CET aqua audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Tue 2021-01-26 20:41:07 CET aqua systemd[1]: systemd-rfkill.service: Succeeded.
-- The unit systemd-rfkill.service has successfully entered the 'dead' state.
-- Subject: A start job for unit systemd-rfkill.service has finished successfully
-- A start job for unit systemd-rfkill.service has finished successfully.
-- Subject: A start job for unit systemd-rfkill.service has begun execution
-- A start job for unit systemd-rfkill.service has begun execution.
Tue 2021-01-26 20:41:02 CET aqua audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Update 3.
-- Before Suspend
$ sudo systemctl status NetworkManager
● NetworkManager.service - Network Manager
Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2021-01-29 19:51:56 CET; 35min ago
Docs: man:NetworkManager(8)
Main PID: 1204 (NetworkManager)
Tasks: 3 (limit: 38399)
Memory: 11.1M
CPU: 262ms
CGroup: /system.slice/NetworkManager.service
└─1204 /usr/sbin/NetworkManager --no-daemon
ene 29 19:52:05 aqua NetworkManager[1204]: <info> [1611946325.1522] device (enp3s0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
ene 29 19:52:05 aqua NetworkManager[1204]: <info> [1611946325.1532] device (enp3s0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
ene 29 19:52:05 aqua NetworkManager[1204]: <info> [1611946325.1544] device (enp3s0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
ene 29 19:52:05 aqua NetworkManager[1204]: <info> [1611946325.1545] device (enp3s0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
ene 29 19:52:05 aqua NetworkManager[1204]: <info> [1611946325.1548] manager: NetworkManager state is now CONNECTED_LOCAL
ene 29 19:52:05 aqua NetworkManager[1204]: <info> [1611946325.1557] manager: NetworkManager state is now CONNECTED_SITE
ene 29 19:52:05 aqua NetworkManager[1204]: <info> [1611946325.1558] policy: set 'enp3s0' (enp3s0) as default for IPv4 routing and DNS
ene 29 19:52:05 aqua NetworkManager[1204]: <info> [1611946325.1581] device (enp3s0): Activation: successful, device activated.
ene 29 19:52:08 aqua NetworkManager[1204]: <info> [1611946328.4583] manager: NetworkManager state is now CONNECTED_GLOBAL
ene 29 19:53:43 aqua NetworkManager[1204]: <info> [1611946423.9003] agent-manager: agent[420a8f889bafe72e,:1.78/org.kde.plasma.networkmanagement/1001]: agent registered
-- After Suspend
$ sudo systemctl stop NetworkManager && sudo systemctl start NetworkManager
$ sudo systemctl status NetworkManager
● NetworkManager.service - Network Manager
Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2021-01-29 20:28:55 CET; 9s ago
Docs: man:NetworkManager(8)
Main PID: 112720 (NetworkManager)
Tasks: 4 (limit: 38399)
Memory: 3.3M
CPU: 85ms
CGroup: /system.slice/NetworkManager.service
└─112720 /usr/sbin/NetworkManager --no-daemon
ene 29 20:28:55 aqua NetworkManager[112720]: <info> [1611948535.8664] device (58:D9:C3:5D:4A:81): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
ene 29 20:28:55 aqua NetworkManager[112720]: <info> [1611948535.8672] agent-manager: agent[0b56fd872b56034c,:1.78/org.kde.plasma.networkmanagement/1001]: agent registered
ene 29 20:28:55 aqua NetworkManager[112720]: <info> [1611948535.8673] device (58:D9:C3:5D:4A:81): state change: unavailable -> disconnected (reason 'none', sys-iface-state: 'managed')
ene 29 20:28:55 aqua NetworkManager[112720]: <info> [1611948535.8754] device (virbr0): state change: config -> ip-config (reason 'none', sys-iface-state: 'assume')
ene 29 20:28:55 aqua NetworkManager[112720]: <info> [1611948535.8781] device (virbr0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'assume')
ene 29 20:28:55 aqua NetworkManager[112720]: <info> [1611948535.8821] device (virbr0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'assume')
ene 29 20:28:55 aqua NetworkManager[112720]: <info> [1611948535.8825] device (virbr0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'assume')
ene 29 20:28:55 aqua NetworkManager[112720]: <info> [1611948535.8828] manager: NetworkManager state is now CONNECTED_LOCAL
ene 29 20:28:55 aqua NetworkManager[112720]: <info> [1611948535.8833] device (virbr0): Activation: successful, device activated.
ene 29 20:29:01 aqua NetworkManager[112720]: <info> [1611948541.8354] manager: startup complete
$ ping 192.168.1.1
ping: connect: La red es inaccesible
Update 4
]$ ping 192.168.1.1
ping: connect: La red es inaccesible
$ sudo dhclient enp3s0
dhclient(6463) is already running - exiting.
This version of ISC DHCP is based on the release available
on ftp.isc.org. Features have been added and other changes
have been made to the base software release in order to make
it work better with this distribution.
Please report issues with this software via:
https://bugzilla.redhat.com/
exiting.
$ ping 192.168.1.1
ping: connect: La red es inaccesible
** Update 5 **
$ ping 192.168.1.1
ping: connect: La red es inaccesible
$ ethtool -i enp3s0
driver: r8169
version: 5.10.8-100.fc32.x86_64
firmware-version: rtl8168g-2_0.0.1 02/06/13
expansion-rom-version:
bus-info: 0000:03:00.0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: yes
supports-priv-flags: no
$ sudo modprobe -vr r8169 && sudo modprobe -v r8169
rmmod r8169
insmod /lib/modules/5.10.8-100.fc32.x86_64/kernel/drivers/net/ethernet/realtek/r8169.ko.xz
$ ping 192.168.1.1
ping: connect: La red es inaccesible
|
I solved the problem by deleting the network file configuration and recreate it again with network gui tool.
Regards
| Network doesn't works after hibernate/suspend system |
1,672,937,318,000 |
Theoretical question, but for example, is it possible to hibernate on a laptop and boot into that image on a desktop which could have otherwise identical configuration in terms of distro/config files.
The practical application for this would be to transfer all running programs from a laptop to a desktop for greater performance or vice versa for portability.
Is it possible to "pretend" to hibernate the OS and to copy all changed files to another computer.
I understand that this might not be practical but I want to hear your thoughts on if it is even possible using current technologies.
|
This is indeed possible through the magic of virtualization. See, for example
https://www.usenix.org/legacy/event/hotos09/tech/full_papers/kozuch/kozuch_html/index.html
and
https://en.wikipedia.org/wiki/Live_migration
which contains a list of virtual machine managers that support live migration.
| Transfer running instance of OS to another machine |
1,672,937,318,000 |
My machine (ThinkPad x230) hangs on wake up from s2disk or s2ram after a recent aptitude safe-upgrade.† The hang looks like a blank screen with a blinking cursor in the upper right after loading data pages completes.
Confirmed the same behavior after sudo hibernate, sudo pm-hibernate, and echo disk | sudo tee /sys/power/state.
I am on Debian testing, kernel 4.0.0-2-rt-amd64. Not sure where to go from here. Searching on Google produces many old results. Dump of /var/log/pm-suspend.log here.
† Confirmed s2ram works as intended on wake up from suspend. s2disk still broken.
|
Found a solution that works:
sudo blkid and copy your swap UUID to clipboard
sudo vim /boot/grub/menu.lst, search for resume= and add resume=UUID=xxxxx-xxxxx-xxx-xxxx-xxxx
update grub with sudo update-grub
That worked once and never again. Still looking.
Update: My problems went away once I switched from Linux kernel 4.0.0-2-rt-amd64 to 4.1.0-2-amd64. If you are experiencing a similar issue, first make sure you are not using the RT kernel without a good reason and second either upgrade or downgrade the kernel to see if that resolves the issue. Marking as solved.
| debian testing hangs on wakeup from s2disk / hibernate |
1,391,839,012,000 |
I'm using Debian 6 (Squeeze) and I happened to hibernate my laptop today. After hibernation everything was very slow (a lot of disk accesses... most likely page faults, I guess) but this is a usual behaviour in my case.
My usual fix to this situation is rebooting. However, this time I rebooted and GNOME never came back. GRUB is loaded and a lot of stuff is output to the console however at some point, when the console is replaced by a black screen in which GNOME will be loaded the black screen stays there.
I've been using fglrx driver for a year, however, I changed it in xorg.conf into vesa. This showed a little improvement as, although the situation repeated, instead of seeing a full black screen I could read:
lp: driver loaded but no devices found
ppdev: user-space parallel port driver
Those messages stayed on top of the screen blinking as if they were cleared and written in a loop. The fans went on so I guess there was some kind of loop doing something.
Hitting the power button shut down the laptop properly (the usual shutdown messages appeared in the screen).
I haven't seen any unusual output rather than that in dmesg, /var/log/kern.log /var/log/messages.
Any ideas on what I can do? Maybe dpgk-reconfigure some packages?
|
It seemed to be a video driver issue. Reinstalling fglrx driver fixed this.
| Unable to start GNOME after hibernation |
1,391,839,012,000 |
Is there an application that will set an audible alarm when the battery goes low on a centos 6 IBM 430 machine?
Details of the problem here:
I have set it hibernate when battery is low. However, it does not hibernate possibly because most of the time I am working in a full screen windows VM that prevents it from going to hibernate when I try to do it manually.
Since I am not able to see the battery levels (I am working in a full screen windows VM), the nmachine switches off when battery goes low. So I lose all my data and in one instance, the VMs (I am running windows and ubuntu) got corrupted.
|
A quick google throws this up:
Check your battery status from the command line
A suggestion might be to parse out the percentage remaining of the battery charge, and play a sound when it falls to a certain low water mark/threshold. You could then run this from cron/at every few minutes or so. Very rudimentary but...
cheers
sc.
| any utility on centos 6 to sound an alarm when power is low |
1,391,839,012,000 |
It's a laptop from 2010 that has been running XP, Debian 9, Windows 10 and now this new Debian 12 system, and only in this last one it shows this problem: sometimes it resumes ok from suspend or hibernation, but sometimes it hangs a few seconds after resuming.
It's weird because it's not totally stalled for a while: caps lock LED turns on and off, I can Alt-Tab and the white border of the next window shows but not the contents. I can do CTRL+ALT+F2 and the text console shows, I type the username but I never get the Password: prompt. After that it totally hangs and even the caps lock LED does not change. Ctrl+Alt+Del doesn't work either. Interestingly, it still answers to ping from other PC in the LAN, but a ssh connection can't be established
Sometimes (very rarely) it has happened without suspending but after sitting there idle for some minutes, it is running ok while it was sitting idle (I can see that because the tray clock shows the correct time) but after some clicks or commands it hangs and the clock stops updating
I tried:
disconnecting all external devices like USB mouse and USB sticks
using the suspend/hibernate commands in XFCE menu as well as pm-suspend, systemctl suspend, and echo -n mem > /sys/power/state
checking different log files in /var/log: they don't show anything related to the crash (the timestamps go from the last seconds of running correctly, to the new boot)
The only thing I can think of is that for the first time I'm using an encrypted swap partition (both / and swap were configured with LUKS with the Debian installer). Could this be the problem?
|
This seems to be working fine for a couple of days:
The main problem is that I can't check logs as the crash makes it impossible to write to the log file, so in cases like this one should tail -f /var/log/syslog in a Terminal window and leave that window at the front so you can read it when it crashes. Another option would be sending those logs to another machine in the network.
There I could see some HDD errors:
I don't know why the system performs Discard on a HDD, but anyway I remembered that the BIOS setting for the HDD was in IDE mode and not AHCI, changed it and know it works fine.
| Debian 12 system randomly hangs after suspend or hibernation |
1,391,839,012,000 |
I'm on Slackware current usingd elogind, I can sleep and hibernate only using sudo from terminal.
With the old good pm-utils I had only to edit the 10-enable-suspend.rules, make init 3 && init 4 and I can hibernate as user.
Now I make those steps
a)copying the two polkit rules
cp /usr/share/polkit-1/rules.d/10-enable-* /etc/polkit-1/rules.d/
b)I add my user in power group
usermod -aG power myuser
c)in logind.conf I had those options enabled
grep -v ^# /etc/elogind/logind.conf
[Login]
HandlePowerKey=poweroff
HandleHibernateKey=hibernate
HandleLidSwitch=hibernate
[Sleep]
AllowSuspend=yes
AllowHibernation=yes
AllowSuspendThenHibernate=yes
AllowHybridSleep=yes
d) I reboot the system
reboot
And from xfce4-power-manager I cannot hibernate or sleep.
I tried also from cli
$ loginctl hibernate
$ echo $?
1
|
Solution found.
a)I have created 3 files, one for brightness, one for suspend, one for hibernate
/etc/polkit-1/rules.d/88-suspend.rules
/etc/polkit-1/rules.d/88-hibernate.rules
/etc/polkit-1/rules.d/89-backlight.rules
b) the contents of files: I assign to the group power the possibility to decrease brightness, suspend and hibernate the os, of course your user must be in the group power(as secondary or primary)
cat /etc/polkit-1/rules.d/88-hibernate.rules
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.login1.hibernate" &&
subject.isInGroup("power")) {
return polkit.Result.YES;
}
});
cat /etc/polkit-1/rules.d/88-suspend.rules
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.login1.suspend" &&
subject.isInGroup("power")) {
return polkit.Result.YES;
}
});
cat /etc/polkit-1/rules.d/89-blacklight.rules
polkit.addRule(function(action, subject) {
if (action.id == "org.xfce.power.backlight-helper" &&
subject.isInGroup("power")) {
return polkit.Result.YES;
}
});
c)restart power-manager
xfce4-power-manager --restart
Tested and works fine from xfce4 gui and loginctl command line
| Slackware and elogind: how to enable suspend and hibernate for power user? |
1,391,839,012,000 |
I have a dell inspiron 6000 laptop running debian testing lxde. I can't figure out how to disable hibernation once the lid is closed. Do I modify the systmd files or the lib/systemd/systemd-sleep <hybrid-sleep/hibernate> command?
|
I found the answer. It is to edit the conf. file in /etc/systemd/logind.conf as described in How to disable auto suspend when I close laptop lid?
| Disabling hibernation in debian testing (lxde) |
1,391,839,012,000 |
My Ubuntu 13.10 installation does not hibernate, no matter what I do. Although I have Tuxonice and enough swap space to cover the real RAM, it still doesn't work.
Is the problem specific to Ubuntu or to the machine? If it's the former, I'd try to install a different Linux dist, otherwise I'd give up.
Update: VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 18) (prog-if 00 [VGA controller])
I have 50% of free RAM.
There is no problem suspending the machine.
I have tried all the tips on https://www.kernel.org/doc/Documentation/power/basic-pm-debugging.txt.
|
Try putting this in a script:
#!/bin/bash
sync
echo shutdown > /sys/power/disk
echo disk > /sys/power/state
and run it as root (su root, for which you need a root password, you may also be able to use sudo -i with your own password). I've noticed with, e.g., KDE, that the various shutdown options do not all work for me as an unprivileged user.
If that doesn't work there is probably something wrong with the kernel ACPI module(s) in relation to your hardware.
Note, however, that you also need enough RAM to create the hibernation image, not just swap. Otherwise, you will fail with a "not enough free memory" error. If that happens, try adding:
echo 0 > /sys/power/image_size
To the top of that script. To see the current image size, use cat /sys/power/image_size. This is the maximum size of the image, but if set to zero, it will be as small as possible (presumably the kernel opts to minimalize compression, so it prefers larger images if allowed).
To check what suspend states are available on your hardware:
cat /sys/power/state
You should see a short list including at least standby mem disk. Documentation for this stuff is in [kernel src]/Documentation/ABI/testing/sysfs-power.
| My Ubuntu doesn't hibernate |
1,391,839,012,000 |
I've read that hibernation often causes trouble in Linux environments, e.g. system fails to wake-up or freezes and sometimes even refuses booting after reset. I really like the idea of hibernating the system into a zero-power state, especially for traveling. But I don't wanna hurt my system's stability. So I'm wondering, how is the situation nowadays? Is hibernation in Ubuntu reliable? I'll also be using LUKS for full-disk-encryption if that changes the equation.
|
Try it (when you have all files saved).
The problem is that not all hardware is (fully) supported, or Ubuntu doesn't know much about some devices (if it is save to switch them off). There are two main classes of problems: not all devices can be set to hibernation (e.g. often some external devices, and Ubuntu doesn't know if it can switch them off), and not all devices can restore status from hibernation (or they will not start automatically).
So the best way it is to test it. So you will see if the hardware support it. And if some hardware is not 100% ok with it, you can search again in this site (and others), to find a work-around (e.g. putting modules on some black/white list, force to reload modules after hibernation, etc.).
It should be safe to test: since a lot of time we have standardized ACPI and other tools to control power, and the more standard components (protocol-wise) CPUs, motherboards and disks should be fully supported.
So test it, and if you are not full happy remember to do a full power-off and restart so to have hardware in a well defined state.
| Is it risky to use hibernation in Ubuntu? |
1,391,839,012,000 |
Running $ systemctl hibernate shows login screen after a few seconds in Debian bullseye and GNOME desktop.
Can someone help identify the issue?
$ free -m
total used free shared buff/cache available
Mem: 15755 3449 9848 954 2457 10981
Swap: 975 0 975
$ cat /proc/sys/vm/swappiness
60
$ sudo journalctl -r -u hibernate.target
-- Journal begins at Sun 2023-03-12 12:48:17 CET, ends at Sun 2023-05-07 17:18:39 CEST. --
May 07 16:58:10 debija systemd[1]: hibernate.target: Job hibernate.target/start failed with result 'dependency'.
May 07 16:58:10 debija systemd[1]: Dependency failed for Hibernate.
$ sudo systemctl list-dependencies -a hibernate.target
hibernate.target
●RED └─systemd-hibernate.service
●GREEN ├─system.slice
●GREEN │ └─-.slice
●WHITE └─sleep.target
$ sudo journalctl -r -u systemd-hibernate.service
-- Journal begins at Sun 2023-03-12 12:48:17 CET, ends at Sun 2023-05-07 17:22:59 CEST. --
May 07 16:58:10 debija systemd[1]: systemd-hibernate.service: Consumed 2.899s CPU time.
May 07 16:58:10 debija systemd[1]: Failed to start Hibernate.
May 07 16:58:10 debija systemd[1]: systemd-hibernate.service: Failed with result 'exit-code'.
May 07 16:58:10 debija systemd[1]: systemd-hibernate.service: Main process exited, code=exited, status=1/FAILURE
May 07 16:58:10 debija systemd-sleep[12620]: Failed to suspend system. System resumed again: No space left on device
May 07 16:58:04 debija systemd-sleep[12620]: Suspending system...
May 07 16:57:53 debija systemd[1]: Starting Hibernate...
sudo systemctl status systemd-hibernate.service
●RED systemd-hibernate.service - Hibernate
Loaded: loaded (/lib/systemd/system/systemd-hibernate.service; static)
Active: failed (Result: exit-code) since Sun 2023-05-07 16:58:10 CEST; 26min ago
Docs: man:systemd-suspend.service(8)
Process: 12620 ExecStart=/lib/systemd/systemd-sleep hibernate (code=exited, status=1/FAILURE)
Main PID: 12620 (code=exited, status=1/FAILURE)
CPU: 2.899s
May 07 16:57:53 debija systemd[1]: Starting Hibernate...
May 07 16:58:04 debija systemd-sleep[12620]: Suspending system...
May 07 16:58:10 debija systemd-sleep[12620]: Failed to suspend system. System resumed again: No space left on device
May 07 16:58:10 debija systemd[1]: systemd-hibernate.service: Main process exited, code=exited, status=1/FAILURE
May 07 16:58:10 debija systemd[1]: systemd-hibernate.service: Failed with result 'exit-code'.
May 07 16:58:10 debija systemd[1]: Failed to start Hibernate.
May 07 16:58:10 debija systemd[1]: systemd-hibernate.service: Consumed 2.899s CPU time.
$ systemctl status systemd-hibernate
systemd-hibernate.service - Hibernate
Loaded: loaded (/lib/systemd/system/systemd-hibernate.service; static)
Active: failed (Result: exit-code) since Sun 2023-05-07 16:58:10 CEST; 7min ago
Docs: man:systemd-suspend.service(8)
Process: 12620 ExecStart=/lib/systemd/systemd-sleep hibernate (code=exited, status=1/FAILURE)
Main PID: 12620 (code=exited, status=1/FAILURE)
CPU: 2.899s
$ sudo cat /var/log/syslog
May 7 16:57:52 debija NetworkManager[606]: <info> [1683471472.6019] manager: sleep: sleep requested (sleeping: no enabled: yes)
May 7 16:57:52 debija ModemManager[672]: <info> [sleep-monitor] system is about to suspend
May 7 16:58:04 debija [12621]: /usr/lib/systemd/system-sleep/displaylink.sh failed with exit status 142.
May 7 16:58:04 debija systemd-sleep[12620]: Suspending system...
May 7 16:58:04 debija kernel: [ 4203.397433] evdi: [I] (card1) Notifying display power state: off
May 7 16:58:04 debija kernel: [ 4215.252282] PM: hibernation: hibernation entry
May 7 16:58:04 debija kernel: [ 4215.252655] (NULL device *): firmware: direct-loading firmware i915/kbl_dmc_ver1_04.bin
May 7 16:58:04 debija kernel: [ 4215.253038] (NULL device *): firmware: direct-loading firmware regulatory.db
May 7 16:58:04 debija kernel: [ 4215.253114] (NULL device *): firmware: direct-loading firmware regulatory.db.p7s
May 7 16:58:10 debija kernel: [ 4215.270202] Filesystems sync: 0.015 seconds
May 7 16:58:10 debija kernel: [ 4215.270207] Freezing user space processes ... (elapsed 0.005 seconds) done.
May 7 16:58:10 debija kernel: [ 4215.275631] OOM killer disabled.
May 7 16:58:10 debija kernel: [ 4215.276067] PM: hibernation: Marking nosave pages: [mem 0x00000000-0x00000fff]
May 7 16:58:10 debija kernel: [ 4215.276071] PM: hibernation: Marking nosave pages: [mem 0x00058000-0x00058fff]
May 7 16:58:10 debija kernel: [ 4215.276074] PM: hibernation: Marking nosave pages: [mem 0x0009d000-0x000fffff]
May 7 16:58:10 debija kernel: [ 4215.276082] PM: hibernation: Marking nosave pages: [mem 0x40000000-0x403fffff]
May 7 16:58:10 debija kernel: [ 4215.276138] PM: hibernation: Marking nosave pages: [mem 0x454e3000-0x454e4fff]
May 7 16:58:10 debija kernel: [ 4215.276141] PM: hibernation: Marking nosave pages: [mem 0x49226000-0x492b6fff]
May 7 16:58:10 debija kernel: [ 4215.276151] PM: hibernation: Marking nosave pages: [mem 0x49370000-0x49372fff]
May 7 16:58:10 debija kernel: [ 4215.276154] PM: hibernation: Marking nosave pages: [mem 0x4ee59000-0x4fffefff]
May 7 16:58:10 debija kernel: [ 4215.276384] PM: hibernation: Marking nosave pages: [mem 0x50000000-0xffffffff]
May 7 16:58:10 debija kernel: [ 4215.282800] PM: hibernation: Basic memory bitmaps created
May 7 16:58:10 debija kernel: [ 4215.283059] PM: hibernation: Preallocating image memory
May 7 16:58:10 debija kernel: [ 4216.573474] PM: hibernation: Allocated 1544087 pages for snapshot
May 7 16:58:10 debija kernel: [ 4216.573477] PM: hibernation: Allocated 6176348 kbytes in 1.29 seconds (4787.86 MB/s)
May 7 16:58:10 debija kernel: [ 4216.573478] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
May 7 16:58:10 debija kernel: [ 4216.575682] printk: Suspending console(s) (use no_console_suspend to debug)
May 7 16:58:10 debija kernel: [ 4216.819061] ACPI: EC: interrupt blocked
May 7 16:58:10 debija kernel: [ 4216.837976] ACPI: Preparing to enter system sleep state S4
May 7 16:58:10 debija kernel: [ 4216.843453] ACPI: EC: event blocked
May 7 16:58:10 debija kernel: [ 4216.843454] ACPI: EC: EC stopped
May 7 16:58:10 debija kernel: [ 4216.843455] PM: Saving platform NVS memory
May 7 16:58:10 debija kernel: [ 4216.844130] Disabling non-boot CPUs ...
May 7 16:58:10 debija kernel: [ 4216.845592] smpboot: CPU 1 is now offline
May 7 16:58:10 debija kernel: [ 4216.848788] smpboot: CPU 2 is now offline
May 7 16:58:10 debija kernel: [ 4216.851124] smpboot: CPU 3 is now offline
May 7 16:58:10 debija kernel: [ 4216.853568] smpboot: CPU 4 is now offline
May 7 16:58:10 debija kernel: [ 4216.856128] smpboot: CPU 5 is now offline
May 7 16:58:10 debija kernel: [ 4216.858484] smpboot: CPU 6 is now offline
May 7 16:58:10 debija kernel: [ 4216.860855] smpboot: CPU 7 is now offline
May 7 16:58:10 debija kernel: [ 4216.863275] PM: hibernation: Creating image:
May 7 16:58:10 debija kernel: [ 4217.086098] PM: hibernation: Need to copy 1541961 pages
May 7 16:58:10 debija kernel: [ 4217.086100] PM: hibernation: Normal pages needed: 1541961 + 1024, available pages: 2586850
May 7 16:58:10 debija kernel: [ 4218.255333] PM: hibernation: Image created (1541961 pages copied)
May 7 16:58:10 debija kernel: [ 4216.863588] PM: Restoring platform NVS memory
May 7 16:58:10 debija kernel: [ 4216.863799] ACPI: EC: EC started
May 7 16:58:10 debija kernel: [ 4216.864425] Enabling non-boot CPUs ...
May 7 16:58:10 debija kernel: [ 4216.864457] x86: Booting SMP configuration:
May 7 16:58:10 debija kernel: [ 4216.864458] smpboot: Booting Node 0 Processor 1 APIC 0x2
May 7 16:58:10 debija kernel: [ 4216.865164] CPU1 is up
May 7 16:58:10 debija kernel: [ 4216.865187] smpboot: Booting Node 0 Processor 2 APIC 0x4
May 7 16:58:10 debija kernel: [ 4216.865834] CPU2 is up
May 7 16:58:10 debija kernel: [ 4216.865855] smpboot: Booting Node 0 Processor 3 APIC 0x6
May 7 16:58:10 debija kernel: [ 4216.866524] CPU3 is up
May 7 16:58:10 debija kernel: [ 4216.866544] smpboot: Booting Node 0 Processor 4 APIC 0x1
May 7 16:58:10 debija kernel: [ 4216.867318] CPU4 is up
May 7 16:58:10 debija kernel: [ 4216.867340] smpboot: Booting Node 0 Processor 5 APIC 0x3
May 7 16:58:10 debija kernel: [ 4216.868025] CPU5 is up
May 7 16:58:10 debija kernel: [ 4216.868047] smpboot: Booting Node 0 Processor 6 APIC 0x5
May 7 16:58:10 debija kernel: [ 4216.868727] CPU6 is up
May 7 16:58:10 debija kernel: [ 4216.868745] smpboot: Booting Node 0 Processor 7 APIC 0x7
May 7 16:58:10 debija kernel: [ 4216.869443] CPU7 is up
May 7 16:58:10 debija kernel: [ 4216.871975] ACPI: Waking up from system sleep state S4
May 7 16:58:10 debija kernel: [ 4216.957533] ACPI: EC: interrupt unblocked
May 7 16:58:10 debija kernel: [ 4216.957983] pcieport 0000:00:1c.0: Intel SPT PCH root port ACS workaround enabled
May 7 16:58:10 debija kernel: [ 4216.957994] pcieport 0000:00:1d.0: Intel SPT PCH root port ACS workaround enabled
May 7 16:58:10 debija kernel: [ 4216.958113] pcieport 0000:00:1c.2: Intel SPT PCH root port ACS workaround enabled
May 7 16:58:10 debija kernel: [ 4216.958167] pcieport 0000:00:1c.4: Intel SPT PCH root port ACS workaround enabled
May 7 16:58:10 debija kernel: [ 4216.997238] ACPI: EC: event unblocked
May 7 16:58:10 debija kernel: [ 4217.011701] nvme nvme0: Shutdown timeout set to 8 seconds
May 7 16:58:10 debija kernel: [ 4217.021394] nvme nvme0: 8/0/0 default/read/poll queues
May 7 16:58:10 debija kernel: [ 4217.312540] usb 1-10: reset full-speed USB device number 12 using xhci_hcd
May 7 16:58:10 debija kernel: [ 4217.472289] acpi LNXPOWER:01: Turning OFF
May 7 16:58:10 debija kernel: [ 4217.472929] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_component_ops [i915])
May 7 16:58:10 debija kernel: [ 4217.476960] PM: Using 3 thread(s) for compression
May 7 16:58:10 debija kernel: [ 4217.476965] PM: Compressing and saving image data (1544973 pages)...
May 7 16:58:10 debija kernel: [ 4217.476998] PM: Image saving progress: 0%
May 7 16:58:10 debija kernel: [ 4218.032175] PM: Image saving progress: 10%
May 7 16:58:10 debija kernel: [ 4218.506624] PM: Image saving progress: 20%
May 7 16:58:10 debija kernel: [ 4218.959117] PM: Image saving progress: 30%
May 7 16:58:10 debija kernel: [ 4219.478393] PM: Image saving progress: 40%
May 7 16:58:10 debija kernel: [ 4219.952894] PM: Image saving progress: 50%
May 7 16:58:10 debija kernel: [ 4220.240624] PM: hibernation: Wrote 6179892 kbytes in 2.76 seconds (2239.09 MB/s)
May 7 16:58:10 debija kernel: [ 4220.433817] PM: hibernation: Basic memory bitmaps freed
May 7 16:58:10 debija kernel: [ 4220.433819] OOM killer enabled.
May 7 16:58:10 debija kernel: [ 4220.433820] Restarting tasks ...
May 7 16:58:10 debija kernel: [ 4220.434523] pci_bus 0000:08: Allocating resources
May 7 16:58:10 debija kernel: [ 4220.434535] pci_bus 0000:3c: Allocating resources
May 7 16:58:10 debija kernel: [ 4220.437012] done.
May 7 16:58:10 debija kernel: [ 4220.480901] thermal thermal_zone9: failed to read out thermal zone (-61)
May 7 16:58:10 debija systemd-sleep[12620]: Failed to suspend system. System resumed again: No space left on device
May 7 16:58:10 debija kernel: [ 4220.506829] PM: hibernation: hibernation exit
May 7 16:58:10 debija NetworkManager[606]: <info> [1683471490.7058] audit: op="radio-control" arg="wwan-enabled" pid=13033 uid=0 result="success"
May 7 16:58:10 debija systemd[1]: systemd-hibernate.service: Main process exited, code=exited, status=1/FAILURE
May 7 16:58:10 debija systemd[1]: systemd-hibernate.service: Failed with result 'exit-code'.
May 7 16:58:10 debija systemd[1]: Failed to start Hibernate.
May 7 16:58:10 debija systemd[1]: Dependency failed for Hibernate.
May 7 16:58:10 debija systemd[1]: hibernate.target: Job hibernate.target/start failed with result 'dependency'.
May 7 16:58:10 debija systemd[1]: systemd-hibernate.service: Consumed 2.899s CPU time.
May 7 16:58:10 debija systemd[1]: Stopped target Sleep.
May 7 16:58:11 debija kernel: [ 4220.879314] evdi: [I] (card2) Notifying display power state: on
May 7 16:58:11 debija kernel: [ 4220.879397] evdi: [I] (card2) Notifying mode changed: 1920x1200@60; bpp 32; pixel format XR24 little-endian (0x34325258)
May 7 16:58:11 debija kernel: [ 4220.879402] evdi: [I] (card2) Notifying display power state: on
May 7 16:58:11 debija kernel: [ 4220.895196] evdi: [I] (card1) Notifying display power state: on
May 7 16:58:11 debija kernel: [ 4220.895245] evdi: [I] (card1) Notifying mode changed: 1920x1200@60; bpp 32; pixel format XR24 little-endian (0x34325258)
May 7 16:58:11 debija kernel: [ 4221.523182] evdi: [W] evdi_painter_connect:883 (card1) Double connect - replacing 00000000b819c3ef with 00000000b819c3ef
May 7 16:58:11 debija kernel: [ 4221.523184] evdi: [I] (card1) Connected with Task 9725 (DesktopManagerE) of process 9702 (DisplayLinkMana)
May 7 16:58:11 debija kernel: [ 4221.523186] evdi: [I] (card1) Connector state: connected
May 7 16:58:11 debija kernel: [ 4221.523317] evdi: [W] evdi_painter_connect:883 (card2) Double connect - replacing 000000006fed4c53 with 000000006fed4c53
May 7 16:58:11 debija kernel: [ 4221.523318] evdi: [I] (card2) Connected with Task 9725 (DesktopManagerE) of process 9702 (DisplayLinkMana)
May 7 16:58:11 debija kernel: [ 4221.523319] evdi: [I] (card2) Connector state: connected
May 7 16:58:13 debija ModemManager[672]: <info> [base-manager] couldn't check support for device '/sys/devices/pci0000:00/0000:00:1c.0/0000:02:00.0': not supported by any plugin
May 7 16:58:13 debija ModemManager[672]: <info> [base-manager] couldn't check support for device '/sys/devices/pci0000:00/0000:00:1d.0/0000:06:00.0/0000:07:02.0/0000:3c:00.0/usb4/4-1/4-1.3': not supported by any plugin
May 7 16:58:13 debija ModemManager[672]: <info> May 7 16:58:11 debija kernel: [ 4221.523182] evdi: [W] evdi_painter_connect:883 (card1) Double connect - replacing 00000000b819c3ef with 00000000b819c3ef
May 7 16:58:14 debija kernel: [ 4224.765358] evdi: [I] (card2) Notifying mode changed: 1920x1200@60; bpp 32; pixel format XR24 little-endian (0x34325258)
May 7 16:58:15 debija kernel: [ 4224.765375] evdi: [I] (card2) Notifying display power state: on
May 7 16:58:15 debija kernel: [ 4225.193084] evdi: [I] (card1) Notifying mode changed: 1920x1200@60; bpp 32; pixel format XR24 little-endian (0x34325258)
EDIT Updating BIOS may help - but it didn't:
$ sudo fwupdmgr get-updates
Devices with no available firmware updates:
• USB3.1 Hub
• USB3.1 Hub
• ThinkPad Hybrid USB-C with USB-A Dock
• ThinkPad USB-C Dock Hybrid PD Controller
• UEFI dbx
• USB2.0 Hub
• USB2.0 Hub
Devices with the latest available firmware version:
• Thunderbolt host controller
• SAMSUNG MZVLB512HAJQ-000L7
________________________________________________
Devices that have been updated successfully:
• Intel Management Engine (184.86.3909 → 184.93.4323)
• System Firmware (0.1.43 → 0.1.49)
EDIT this alternative command could work - but it didn't
sudo /usr/lib/systemd/systemd-sleep hibernate
/usr/lib/systemd/system-sleep/displaylink.sh failed with exit status 142.
Suspending system...
Failed to suspend system. System resumed again: No space left on device
|
The solution is to increase swap space 1 2, albeit it is not everyone who advice doing so, and although how much is not that clear. One way to increase swap.
| how to interprete log/journal after failed hibernation |
1,391,839,012,000 |
Consider that I'm using two users at distinct times on my PC. They both need ram that causes swapping if I switch from one to the other.
One solution is to log-out of one user and then log-in to (Gnome|KDE|xfce|...) the other and hope that everything is restored. This seems time-consuming to check all opened correctly.
Instead of these, is it possible to hibernate and resume the session so that the session can continue easily?
|
No. It does not work that way. Hibernating is working on a hardware level, not session.
If you are bothered by manually starting applications - auto-start them. All modern WM has ability to auto-start application, and majority of application have ability to restore its last working state.
The probable solution could be a virtual machine - put one (or both) users in a separate VM instances and they would be independent from each other and you would be able to hibernate an instance which is not needed right now.
But most likely, the hardware, which would allow a VM for normal user work, would not need to shut one session to free resources for another one...
But ultimately - if your task requires so much memory that you have to shut down parallel processes - increase physical RAM on the machine. It is cheap. Not free, but cheap. Or buy a second machine.
| Can we hibernate only users' graphical sessions |
1,391,839,012,000 |
I have my Linux installed on a portable SSD, so I can switch devices (laptop at home, desktop in office) easily and don't need to consider any syncronization problems. This is called Linux To Go.
It's quite nice already, but could it be even better?
To switch devices during a work flow, I must exit all applications (gracefully), shutdown the OS completely, then detach and attach the SSD, boot the OS, wait for its powering-up, and last, reopen all the applications needed to resume my work.
Now I want to find a way to achieve "pause and resume" instead of such "stop and restart". I want the OS memory to persist across different devices.
It seems like hibernation is a potential solution. Maybe I could save the memory in a swap partition by hibernating the OS, then detach and attach the SSD, boot the OS, and shortly, the memory is restored so I can continue my work flow.
But after some googling, I can't find any tutorial/blogs about hibernation across multiple devices.
How to hibernate Linux To Go to disk and restore it on a different device? Or, is it simply impossible?
|
I don't think hibernation across different devices can possibly work unless the devices are exactly the same in terms of HW configuration (CPU, GPU, RAM, storage, peripherals) and even in this case it's far from certain.
There used to be a project called CryoPID which allowed to save the image of a running application and later resume it however it's long been dead and unmaintained and doesn't work with new Linux kernels. Please check this topic for more possible up to date solutions: https://stackoverflow.com/questions/2134771/how-to-hibernate-a-process-in-linux-by-storing-its-memory-to-disk-and-restorin
To be honest I don't see any modern working solutions in the mentioned topic except using VirtualBox/virtualization to preserve the state of your running applications. That's not quite pleasant to deal with but it works perfectly.
Here's an even better idea: if you have a fast Internet connection you could probably consider having an always on remote PC where you have your workflow and access it using whatever means possible, e.g. RDP/VNC/SSH -x/etc.
| How to hibernate Linux To Go to disk and restore it on a different device? |
1,391,839,012,000 |
I don't know why, but until recently this command no longer works:
root# exec systemctl suspend
The system does try to suspend, with the screen even momentarily going off, but then it comes right back to the login prompt, so something is preventing suspension.
The system is a laptop with it's lid always closed (it's been like that for years). Because the lid is always closed, the following two entries were added years ago to accommodate that:
# /etc/systemd/logind.conf
[Login]
# ===========================================================
# VIA: https://unix.stackexchange.com/a/460405/103956
# ===========================================================
HandleLidSwitch=ignore
HandleLidSwitchDocked=ignore
# ===========================================================
I'm just mentioning that for completeness.
Below is more information.
Any ideas friends? Thank you in advance. =:)
Linux g750asus 5.13.12-100.fc33.x86_64 #1 SMP Wed Aug 18 20:12:01 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 15:54 ? 00:00:01 /usr/lib/systemd/systemd --switched-root --system --deserialize 30
root 720 1 0 15:54 ? 00:00:00 /usr/lib/systemd/systemd-journald
root 733 1 0 15:54 ? 00:00:00 /usr/lib/systemd/systemd-udevd
systemd+ 1107 1 0 15:55 ? 00:00:00 /usr/lib/systemd/systemd-resolved
root 1111 1 0 15:55 ? 00:00:00 /usr/sbin/ModemManager
root 1112 1 0 15:55 ? 00:00:00 /usr/sbin/NetworkManager --no-daemon
root 1114 1 0 15:55 ? 00:00:00 /usr/sbin/alsactl -s -n 19 -c -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf --initfile=/lib/alsa/init/00main rdaemon
root 1117 1 0 15:55 ? 00:00:00 /usr/libexec/bluetooth/bluetoothd
chrony 1130 1 0 15:55 ? 00:00:00 /usr/sbin/chronyd
root 1135 1 8 15:55 ? 00:00:32 /usr/sbin/rngd -f
root 1138 1 0 15:55 ? 00:00:00 /usr/sbin/rsyslogd -n
root 1139 1 0 15:55 ? 00:00:00 /usr/lib/systemd/systemd-homed
root 1141 1 0 15:55 ? 00:00:00 /usr/lib/systemd/systemd-logind
avahi 1148 1115 0 15:55 ? 00:00:00 avahi-daemon: chroot helper
dbus 1149 1 0 15:55 ? 00:00:00 /usr/bin/dbus-broker-launch --scope system --audit
dbus 1168 1149 0 15:55 ? 00:00:00 dbus-broker --log 4 --controller 9 --machine-id 7dda623a3a624e458a393c700c042270 --max-bytes 536870912 --max-fds 4096 --max-matches 131072 --audit
jdoe 1174 1 0 15:55 ? 00:00:00 /usr/lib/code-server/lib/node /usr/lib/code-server
root 1196 1 0 15:55 ? 00:00:00 /usr/sbin/gssproxy -D
root 1203 1 0 15:55 ? 00:00:00 /usr/sbin/atd -f
root 1204 1 0 15:55 ? 00:00:00 /usr/sbin/crond -n
root 1207 1 0 15:55 tty1 00:00:00 /sbin/agetty -o -p -- \u --noclear tty1 linux
jdoe 1261 1174 0 15:55 ? 00:00:00 /usr/lib/code-server/lib/node /usr/lib/code-server
jdoe 1297 1261 0 15:55 ? 00:00:00 /usr/lib/code-server/lib/node /usr/lib/code-server/lib/vscode/out/vs/server/fork
root 1315 1 0 15:55 ? 00:00:00 /usr/lib/systemd/systemd-userdbd
root 1320 1 0 15:55 ? 00:00:00 /usr/lib/systemd/systemd --user
root 1321 1320 0 15:55 ? 00:00:00 (sd-pam)
root 1329 1320 0 15:55 ? 00:00:00 /usr/bin/python3 -u /usr/bin/autojack
root 1339 1320 0 15:55 ? 00:00:00 /usr/bin/dbus-broker-launch --scope user
root 1353 1339 0 15:55 ? 00:00:00 dbus-broker --log 4 --controller 10 --machine-id 7dda623a3a624e458a393c700c042270 --max-bytes 100000000000000 --max-fds 25000000000000 --max-matches 5000000000
root 1379 1 0 15:55 ? 00:00:00 ssh-agent -s
root 1461 1459 0 15:56 ? 00:00:00 sshd: root@pts/0
root 1462 1461 0 15:56 pts/0 00:00:00 -bash
root 1519 1315 0 16:00 ? 00:00:00 systemd-userwork
root 1520 1315 0 16:00 ? 00:00:00 systemd-userwork
root 1521 1315 0 16:00 ? 00:00:00 systemd-userwork
root 1544 1462 0 16:01 pts/0 00:00:00 ps -ef
|
I think this is an issue with the 470 nvidia driver. I am experiencing the same problem under Fedora 34 with the driver from RPMFusion. Uninstalling the driver fixes the issue, but it's not really ideal. I tried downgrading to the 465 driver, but it left my laptop such that it wouldn't boot, even into single user mode. I gave up for now.
| Fedora-33: This suddenly does not work: "root# exec systemctl suspend" |
1,391,839,012,000 |
I am using Manjaro, and out of the box hibernation was not working, so I made some changes to fstab, mkinitcpio and grub and it worked but after sometime it doesn't hibernate and instead locks the screen, even though after a restart it works fine and yes I have made the swap twice the size of my RAM. Please help I couldn't find this exact question anywhere online.
|
How you can fix it...
sudo swapoff -a
sudo /sbin/mkswap /dev/sd##(swap)
sudo swapon -a
In /etc/fstab add:
UUID=[UUID_of_the_swap_partition] none swap defaults 0 0
In /etc/default/grub add:
resume=UUID=[UUID_of_the_swap_partition] to GRUB_CMDLINE_LINUX
In /etc/mkinitcpio.conf add:
resume to HOOKS (after udev) sudo mkinitcpio -P && sudo update-grub
| Hibernate not working |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.