You are not logged in.

#1 2012-01-19 22:37:59

lamnk
Member
Registered: 2008-01-30
Posts: 65
Website

Detecting HDMI cable whether it's plugged in or not

I was trying to output video and sound to my TV over HDMI.

According to the ALSA wiki page the sound was outputed to my TV with playcommand

% aplay -l                                                    
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: SB [HDA ATI SB], device 0: CONEXANT Analog [CONEXANT Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

% aplay -D plughw:0,3 /usr/share/sounds/ekiga/newmessage.wav

However when I tried the script in the wiki to detect hot plug cable, my system reported that there is no

/sys/class/drm/card0-HDMI-A-1/status

In "/sys/class" there is no "drm" directory

How can I detect if the HDMI cable is plugged in ?

Offline

#2 2012-01-19 23:23:53

/dev/zero
Member
From: Melbourne, Australia
Registered: 2011-10-20
Posts: 1,247
Website

Re: Detecting HDMI cable whether it's plugged in or not

What happens when you run this command,

udevadm monitor

and then plug and unplug the HDMI cable?

Offline

#3 2012-01-20 17:51:37

lamnk
Member
Registered: 2008-01-30
Posts: 65
Website

Re: Detecting HDMI cable whether it's plugged in or not

I tried 2-3 times plugging and unpluggin, nothing

% sudo udevadm monitor                                              
Password: 
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent

Last edited by lamnk (2012-01-20 17:53:12)

Offline

#4 2012-01-20 23:57:34

/dev/zero
Member
From: Melbourne, Australia
Registered: 2011-10-20
Posts: 1,247
Website

Re: Detecting HDMI cable whether it's plugged in or not

That's weird that udev doesn't detect the plug/unplug events.

What do you get from these commands?

lspci -nnmvk | grep -B1 -A8 -i audio
lsmod

Offline

#5 2012-01-21 15:22:53

lamnk
Member
Registered: 2008-01-30
Posts: 65
Website

Re: Detecting HDMI cable whether it's plugged in or not

Oh, i found out why: it's because i'm using catalyst and not radeon driver. When I switch to radeon, then there is a drm directory in /sys/class.

However the question still remains: how do i detect the status of HDMI port, given that i use catalyst? Because my netbook has an AMD Evergreen GPU (AMD E-350), and according to  the Radeon feature page, HDMI audio is not available until kernel 3.3

Otherwise what is this drm directory ?

% lsmod                                                                
Module                  Size  Used by
tun                    15099  2 
fuse                   66922  2 
cryptd                  8309  0 
aes_x86_64              7508  3 
aes_generic            26138  1 aes_x86_64
ipv6                  288511  26 
ext2                   63387  1 
uvcvideo               64311  0 
videodev               82069  1 uvcvideo
media                  10597  2 uvcvideo,videodev
usbhid                 35352  0 
v4l2_compat_ioctl32     8316  1 videodev
joydev                  9895  0 
rts5139               328712  0 
hid                    83267  1 usbhid
btusb                  11385  0 
bluetooth             151999  1 btusb
snd_hda_codec_conexant    47186  1 
arc4                    1410  2 
rt2800pci               9405  0 
snd_hda_codec_hdmi     24121  1 
rt2800lib              40260  1 rt2800pci
crc_ccitt               1363  1 rt2800lib
rt2x00pci               5082  1 rt2800pci
snd_hda_intel          23311  4 
rt2x00lib              35183  3 rt2800pci,rt2800lib,rt2x00pci
fglrx                3064599  95 
mac80211              229016  3 rt2800lib,rt2x00pci,rt2x00lib
snd_hda_codec          89032  3 snd_hda_codec_conexant,snd_hda_codec_hdmi,snd_hda_intel
snd_hwdep               6389  1 snd_hda_codec
snd_pcm                74780  3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec
snd_timer              19544  1 snd_pcm
cfg80211              172260  2 rt2x00lib,mac80211
snd                    59214  15 snd_hda_codec_conexant,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_timer
i2c_piix4               8224  0 
soundcore               6210  1 snd
snd_page_alloc          7153  2 snd_hda_intel,snd_pcm
eeprom_93cx6            1376  1 rt2800pci
sp5100_tco              4568  0 
r8169                  49040  0 
k10temp                 2883  0 
mii                     4059  1 r8169
ideapad_laptop          8534  0 
sparse_keymap           3120  1 ideapad_laptop
serio_raw               4429  0 
rfkill                 15498  3 bluetooth,cfg80211,ideapad_laptop
psmouse                61311  0 
thermal                 7799  0 
evdev                   9530  19 
ac                      2344  0 
battery                 6453  0 
wmi                     8475  0 
video                  11164  0 
button                  4470  1 fglrx
cpufreq_ondemand        6164  2 
powernow_k8            13347  0 
freq_table              2515  2 cpufreq_ondemand,powernow_k8
processor              25582  3 powernow_k8
mperf                   1275  1 powernow_k8
ext4                  417052  2 
mbcache                 5881  2 ext2,ext4
jbd2                   71243  1 ext4
crc16                   1359  2 bluetooth,ext4
sd_mod                 28307  5 
ohci_hcd               21631  0 
ahci                   20037  4 
libahci                19559  1 ahci
libata                166654  2 ahci,libahci
ehci_hcd               40698  0 
scsi_mod              133443  3 rts5139,sd_mod,libata
usbcore               146241  7 uvcvideo,usbhid,rts5139,btusb,ohci_hcd,ehci_hcd
usb_common               954  1 usbcore
radeon                754158  0 
ttm                    54904  1 radeon
drm_kms_helper         26137  1 radeon
drm                   188362  3 radeon,ttm,drm_kms_helper
i2c_algo_bit            5263  1 radeon
i2c_core               20492  6 videodev,i2c_piix4,radeon,drm_kms_helper,drm,i2c_algo_bit
% lspci -nnmvk | grep -B1 -A8 -i audio                                 
Device:	00:01.1
Class:	Audio device [0403]
Vendor:	ATI Technologies Inc [1002]
Device:	Wrestler HDMI Audio [Radeon HD 6250/6310] [1314]
SVendor:	Lenovo [17aa]
SDevice:	Device [397b]
Driver:	snd_hda_intel
Module:	snd-hda-intel

Device:	00:11.0
Class:	SATA controller [0106]
Vendor:	ATI Technologies Inc [1002]
--
Device:	00:14.2
Class:	Audio device [0403]
Vendor:	ATI Technologies Inc [1002]
Device:	SBx00 Azalia (Intel HDA) [4383]
SVendor:	Lenovo [17aa]
SDevice:	Device [397b]
Rev:	40
Driver:	snd_hda_intel
Module:	snd-hda-intel

Offline

#6 2015-05-28 00:05:01

dracer
Member
Registered: 2015-05-27
Posts: 1

Re: Detecting HDMI cable whether it's plugged in or not

/dev/zero wrote:

That's weird that udev doesn't detect the plug/unplug events.

What do you get from these commands?

lspci -nnmvk | grep -B1 -A8 -i audio
lsmod


Elementary OS Freya (Built on Ubuntu 14.04)

I've /installed/(hopefully) my GTS240 Nvidia driver via: http://www.howopensource.com/2012/10/in … using-ppa/

sudo apt-add-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install nvidia-current nvidia-settings

My outputs:

$ lspci -nnmvk | grep -B1 -A8 -i audio
Device:	00:1b.0
Class:	Audio device [0403]
Vendor:	Intel Corporation [8086]
Device:	5 Series/3400 Series Chipset High Definition Audio [3b56]
SVendor:	Dell [1028]
SDevice:	Device [040d]
Rev:	06
Driver:	snd_hda_intel

Device:	00:1c.0
Class:	PCI bridge [0604]
Vendor:	Intel Corporation [8086]
$ lsmod
Module                  Size  Used by
ctr                    13049  1 
ccm                    17773  1 
bnep                   19624  2 
rfcomm                 69509  0 
bluetooth             446409  10 bnep,rfcomm
6lowpan_iphc           18702  1 bluetooth
binfmt_misc            17468  1 
arc4                   12608  2 
gpio_ich               13586  0 
snd_hda_codec_hdmi     47548  1 
dcdbas                 14928  0 
snd_hda_codec_realtek    77467  1 
snd_hda_codec_generic    68937  1 snd_hda_codec_realtek
ir_lirc_codec          13062  0 
lirc_dev               19980  1 ir_lirc_codec
ir_mce_kbd_decoder     13214  0 
coretemp               13441  0 
ir_sharp_decoder       12716  0 
ir_sanyo_decoder       12839  0 
ir_sony_decoder        12713  0 
kvm_intel             143590  0 
ir_jvc_decoder         12751  0 
ir_rc6_decoder         12874  0 
ir_rc5_decoder         12710  0 
ir_nec_decoder         12915  0 
snd_hda_intel          30469  5 
snd_hda_controller     31056  1 snd_hda_intel
snd_hda_codec         139682  5 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_intel,snd_hda_controller
snd_hwdep              17698  1 snd_hda_codec
snd_pcm               104112  5 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel,snd_hda_controller
rt2800usb              27189  0 
rt2x00usb              20742  1 rt2800usb
rt2800lib              89076  1 rt2800usb
rt2x00lib              55307  3 rt2x00usb,rt2800lib,rt2800usb
snd_seq_midi           13564  0 
kvm                   452043  1 kvm_intel
snd_seq_midi_event     14899  1 snd_seq_midi
mac80211              652718  3 rt2x00lib,rt2x00usb,rt2800lib
snd_rawmidi            30876  1 snd_seq_midi
snd_seq                63074  2 snd_seq_midi_event,snd_seq_midi
joydev                 17393  0 
rc_rc6_mce             12502  0 
snd_seq_device         14497  3 snd_seq,snd_rawmidi,snd_seq_midi
cfg80211              494362  2 mac80211,rt2x00lib
snd_timer              29562  2 snd_pcm,snd_seq
mceusb                 28108  0 
rc_core                28718  13 ir_sharp_decoder,lirc_dev,ir_lirc_codec,ir_rc5_decoder,ir_nec_decoder,ir_sony_decoder,mceusb,ir_mce_kbd_decoder,ir_jvc_decoder,ir_rc6_decoder,ir_sanyo_decoder,rc_rc6_mce
crc_ccitt              12707  1 rt2800lib
serio_raw              13483  0 
i7core_edac            24139  0 
edac_core              56549  2 i7core_edac
snd                    79468  20 snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_seq,snd_rawmidi,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel,snd_seq_device
lpc_ich                21093  0 
mei_me                 19696  0 
mei                    87875  1 mei_me
soundcore              15047  2 snd,snd_hda_codec
parport_pc             32741  0 
ppdev                  17671  0 
lp                     17759  0 
parport                42348  3 lp,ppdev,parport_pc
shpchp                 37047  0 
mac_hid                13227  0 
uas                    23159  0 
usb_storage            66545  1 uas
hid_generic            12559  0 
usbhid                 52616  0 
hid                   110426  2 hid_generic,usbhid
nouveau              1206535  5 
mxm_wmi                13021  1 nouveau
wmi                    19193  2 mxm_wmi,nouveau
video                  20128  1 nouveau
i2c_algo_bit           13413  1 nouveau
ttm                    93588  1 nouveau
broadcom               13184  0 
drm_kms_helper         61574  1 nouveau
tg3                   166618  0 
drm                   311018  8 ttm,drm_kms_helper,nouveau
ahci                   34062  2 
psmouse               106561  0 
firewire_ohci          40551  0 
ptp                    19395  1 tg3
firewire_core          68769  1 firewire_ohci
libahci                32424  1 ahci
pps_core               19382  1 ptp
crc_itu_t              12707  1 firewire_core

I've restarted my PC and this is the second time after installing an NVidia driver my resolution is off. All that shows is the wallpaper and my mouse goes off the screen, to the left and my pointer stops mid screen.
I'm trying to resize my screen via command line Ctrl+Alt+F1

$ xrandr
Can't open display

Last edited by dracer (2015-05-28 00:56:21)

Offline

#7 2015-05-28 07:15:00

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 9,863
Website

Re: Detecting HDMI cable whether it's plugged in or not

dracer, please seek support on your distribution's own forums, these forums are fore Arch Linux support only.

https://wiki.archlinux.org/index.php/Fo … pport_ONLY

As this this is an old thread, I'm going to close it now (https://wiki.archlinux.org/index.php/Fo … bumping.22)

Closing.


Sakura:-
Mobo: MSI X299 TOMAHAWK ARCTIC // Processor: Intel Core i7-7820X 3.6GHz // GFX: nVidia GeForce GTX 970 // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 5x 1TB HDD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB