You are not logged in.

#1 2019-05-11 10:19:03

Soptik
Member
Registered: 2019-03-11
Posts: 64

[Solved] Xrandr stopped detecting HDMI

Hi, I have a problem with xrandr. Two days ago, I've been able to connect my second monitor to my laptop via HDMI and everything worked. Today, it doesn't work.

Xrandr displays just eDP-1 (which is laptop screen) and not HDMI-0 (which is second monitor). The cable and monitor work, as it works fine with another laptop with windows.

When I connect my laptop to the monitor, the monitor lights up and displays "No signal".

I've tried rebooting my laptop several times. I've replugged the cable. Nothing helped.

I don't think it's faulty port, as the laptop is just few months old and it stopped working overnight without any problems before, but I'll test it ASAP.

$ xrandr
(displays only eDP-1 screen)
$ udevadm monitor
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent
(nothing else, even after replugging the cable and turning on/off the monitor)
$ xrandr --listmonitors
 0: +*eDP-1 1920/344x1080/193+0+0  eDP-1

I used this to use my second monitor:

# xrandr --output HDMI-0 --scale 1x1 --left-of eDP-1-1

Now, it displays this:

warning: output HDMI-0 not found; ignoring

lspci -v output here:
https://pastebin.com/xQ4JF5eY

Thanks,
Soptik

Last edited by Soptik (2019-05-13 15:19:35)

Offline

#2 2019-05-11 10:35:33

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [Solved] Xrandr stopped detecting HDMI

Ah, a hybrid graphics intel + nvidia system.

Did you follow the nvidia optimus  wiki page or the bumblebee one ?

Which card is set as primary in your bios/uefi firmware , intel or nvidia ?

post xorg log , look for *.conf files in /etc/X11 & /etc/X11/xorg.conf.d folders and post the contents if there are any.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2019-05-11 11:15:54

Soptik
Member
Registered: 2019-03-11
Posts: 64

Re: [Solved] Xrandr stopped detecting HDMI

Thanks for fast reply.

I did not follow any of these pages, I didn't even known about them, I'm reading through them right now. The default configuration (just installing nvidia drivers) worked, so I didn't research further.

Well. In the bios, there is not an option for primary GPU and it doesn't write which one is the primary. However when I was digging into xorg config, the nvidia seems to be set to primary (see the last pastebin link in this comment).

Xorg log: https://pastebin.com/iJ0J7pmr

The only file is /etc/X11/xorg.conf.d/30-touchpad.conf:

Section "InputClass"
	Identifier "ELAN469D:00 04F3:304B Touchpad"
	MatchIsTouchpad "on"
	Driver "libinput"
	Option "DisableWhileTyping" "0"
EndSection

There are three another config files at /usr/share/X11/xorg.conf.d: 10-nvidia-drm-outputclass.conf, 10-quirks.conf and 40-libinput.conf. All of them (cat *) are here:

https://pastebin.com/Hv70bAfK

Offline

#4 2019-05-11 16:42:23

Soptik
Member
Registered: 2019-03-11
Posts: 64

Re: [Solved] Xrandr stopped detecting HDMI

Okay, I think I know what broke it.

Today, I launched XCOM 2 (native linux), which informed me that I don't have required GPU or something like that (it disappeared and I wasn't able to make the dialog appear since). This never happened before. I'm pretty sure the problems are connected, since they both appeared at the same time.

So I can say the problem is probably because of an update between 2019-05-09 and 2019-05-11.

$ pacman -Q | grep nvidia
nvidia 418.74-1
nvidia-utils 418.74-1

The version I have have been released 2019-05-08, so it might be possible the update broke it. I'll try downgrading.

EDIT:
Here is the pacman log (grep nvidia):

[2019-05-06 17:21] [ALPM] upgraded nvidia (418.56-11 -> 418.56-14)
[2019-05-09 23:12] [ALPM] upgraded nvidia-utils (418.56-1 -> 418.74-1)
[2019-05-09 23:12] [ALPM-SCRIPTLET] If you run into trouble with CUDA not being available, run nvidia-modprobe first.
[2019-05-09 23:12] [ALPM] upgraded lib32-nvidia-utils (418.56-1 -> 418.74-1)
[2019-05-09 23:12] [ALPM] upgraded nvidia (418.56-14 -> 418.74-1)

When I had the secondary monitor plugged in last time, I was working on an project. The last write time on that project is 2019-05-09 21:08. I discovered it doesn't work about an hour or two before making this post. This looks really suspicious, especially considering that XCOM was complaining about GPU.

Edit: this didn't help.

# pacman -U /var/cache/pacman/pkg/nvidia-418.56-1-x86_64.pkg.tar.xz /var/cache/pacman/pkg/nvidia-utils-418.56-1-x86_64.pkg.tar.xz /var/cache/pacman/pkg/lib32-nvidia-utils-418.56-1-x86_64.pkg.tar.xz

Last edited by Soptik (2019-05-11 17:11:48)

Offline

#5 2019-05-11 17:19:16

Soptik
Member
Registered: 2019-03-11
Posts: 64

Re: [Solved] Xrandr stopped detecting HDMI

That's weird. I downgraded my drivers:

$ pacman -Q | grep nvidia
lib32-nvidia-utils 418.56-1
nvidia 418.56-1
nvidia-utils 418.56-1

Then I rebooted. The monitor issue wasn't solved and I had like 5 FPS in the xcom 2 main menu. Before ingame fps never went below 30. There is definitely something wrong with GPU. I'm confused why it wasn't fixed by downgrading drivers.

Here is relevant pacman log, something in there probably broke it:
https://pastebin.com/28F8n35W

Edit:

$ find /dev -group video 
/dev/fb0
/dev/dri/card0
find: ‘/dev/vboxusb’: Permission denied

So I guess GPUs are fb0 and dri/card0. According to xorg log (which I uploaded in the posts above):

Applying OutputClass "intel" to /dev/dri/card0"

There is not a word about fb0 in xorg log. So I guess it only loads intel card and not the nvidia card?

Edit:
Yes.

$ glxinfo|egrep "OpenGL vendor|OpenGL renderer"
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) UHD Graphics 620 (Kabylake GT2)

Edit: is this a problem?

$ dmesg | grep nvidia
[    2.212278] nvidia: loading out-of-tree module taints kernel.
[    2.212284] nvidia: module license 'NVIDIA' taints kernel.
[    2.216625] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[    2.222652] nvidia-nvlink: Nvlink Core is being initialized, major device number 241
[    2.222845] nvidia 0000:01:00.0: enabling device (0006 -> 0007)
[    2.222945] nvidia 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=none
[    4.132433] nvidia_modeset: version magic '5.0.3-arch1-1-ARCH SMP preempt mod_unload ' should be '5.0.13-arch1-1-ARCH SMP preempt mod_unload '

Last edited by Soptik (2019-05-11 17:50:55)

Offline

#6 2019-05-11 18:43:35

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,425

Re: [Solved] Xrandr stopped detecting HDMI

Your log shows that you are not upgrading the linux package? Do you have that in ignore for some reason?

The issue right now is that the new nvidia module can't load because it is built against the newer kernel, update your entire system.

If you think your kernel is updated what are the outputs of

pacman -Q linux
uname -a

Last edited by V1del (2019-05-11 19:04:42)

Offline

#7 2019-05-11 19:27:34

Soptik
Member
Registered: 2019-03-11
Posts: 64

Re: [Solved] Xrandr stopped detecting HDMI

After update:

linux 5.0.13.arch1-1
Linux arstotzka 5.0.13-arch1-1-ARCH #1 SMP PREEMPT Sun May 5 18:05:41 UTC 2019 x86_64 GNU/Linux
$ dmesg | grep nvidia
[    2.220584] nvidia: loading out-of-tree module taints kernel.
[    2.220590] nvidia: module license 'NVIDIA' taints kernel.
[    2.225016] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[    2.231198] nvidia-nvlink: Nvlink Core is being initialized, major device number 241
[    2.231411] nvidia 0000:01:00.0: enabling device (0006 -> 0007)
[    2.231507] nvidia 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=none
[    4.145079] nvidia-modeset: Version mismatch: nvidia.ko(418.56) nvidia-modeset.ko(418.74)

Last edited by Soptik (2019-05-11 20:23:01)

Offline

#8 2019-05-12 13:42:39

Soptik
Member
Registered: 2019-03-11
Posts: 64

Re: [Solved] Xrandr stopped detecting HDMI

arstotzka:~:% nvidia-settings 

ERROR: An internal driver error occurred


ERROR: Unable to load info from any available system

arstotzka:~:% nvidia-debugdump -l
Error: nvmlInit(): Driver/library version mismatch
arstotzka:~:% nvidia-debugdump -D
Error: nvmlInit(): Driver/library version mismatch

So I assume I'll have to wait until drivers 74-3 (in testing currently) get released? Or is there something I can do to fix it?

Offline

#9 2019-05-12 14:15:48

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [Solved] Xrandr stopped detecting HDMI

Somehow you got conflicting versions on your system, post pacman -Qs nvidia and output of

$ modinfo nvidia
$ modinfo nvidia-modeset

Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#10 2019-05-12 14:23:41

Soptik
Member
Registered: 2019-03-11
Posts: 64

Re: [Solved] Xrandr stopped detecting HDMI

$ modinfo nvidia

https://pastebin.com/rn8RVG5c

$ modinfo nvidia-modeset
filename:       /lib/modules/5.0.13-arch1-1-ARCH/extramodules/nvidia-modeset.ko.gz
version:        418.74
supported:      external
license:        NVIDIA
srcversion:     8529841E0A109FD9E7D0835
depends:        nvidia
retpoline:      Y
name:           nvidia_modeset
vermagic:       5.0.13-arch1-1-ARCH SMP preempt mod_unload
$ pacman -Qs nvidia
local/lib32-nvidia-utils 418.74-1
    NVIDIA drivers utilities (32-bit)
local/libvdpau 1.2-1
    Nvidia VDPAU library
local/libxnvctrl 418.74-1
    NVIDIA NV-CONTROL X extension
local/nvidia 418.74-1
    NVIDIA drivers for linux
local/nvidia-settings 418.74-1
    Tool for configuring the NVIDIA graphics driver
local/nvidia-utils 418.74-1
    NVIDIA drivers utilities
local/opencl-nvidia 418.74-1
    OpenCL implemention for NVIDIA

Offline

#11 2019-05-12 14:33:31

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [Solved] Xrandr stopped detecting HDMI

Those are all as they should be, we need to look deeper.

post full dmesg -T   and journalctl -b


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#12 2019-05-12 15:08:20

Soptik
Member
Registered: 2019-03-11
Posts: 64

Re: [Solved] Xrandr stopped detecting HDMI

Offline

#13 2019-05-12 15:30:42

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [Solved] Xrandr stopped detecting HDMI

May 12 16:04:59 arstotzka kernel: NVRM: loading NVIDIA UNIX x86_64 Kernel Module  418.56  Fri Mar 15 12:59:26 CDT 2019

That looks to be early in the boot process, possibly during initramfs stage .
post /etc/mkinitcpio.conf , output of mkinitcpio -M , lsblk -f and /etc/fstab


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#14 2019-05-12 15:40:25

Soptik
Member
Registered: 2019-03-11
Posts: 64

Re: [Solved] Xrandr stopped detecting HDMI

/etc/mkinitcpio.conf (excluding comments)

MODULES=(nvidia)
BINARIES=()
FILES=()
HOOKS=(base udev autodetect modconf block filesystems keyboard fsck)

mkinitcpio -M
https://pastebin.com/UL4rHEdx

$ lsblk -f
NAME        FSTYPE LABEL      UUID                                 FSAVAIL FSUSE% MOUNTPOINT
sda                                                                               
└─sda3      ext4              7ef541e2-13c8-4640-b45a-7b57be7b555e  768,2G    11% /mnt/data
nvme0n1                                                                           
├─nvme0n1p1 vfat   SYSTEM_DRV 202C-5D55                                           
├─nvme0n1p5 ext4              00ee6ae0-47dc-4606-ba0d-828f0888cf0c   53,9G    48% /
└─nvme0n1p6 swap              443ae341-e6df-4aa0-bac6-37136a3f885c                [SWAP]

There are only comments in /etc/fstab.

The sda3 is HDD that I use to store big files. My system is on nvme0n1p5, p6 is swap. nvme0n1p1 is what lasted after I nuked windows (it was dualboot before).

Last edited by Soptik (2019-05-12 15:43:36)

Offline

#15 2019-05-12 16:00:31

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [Solved] Xrandr stopped detecting HDMI

Finally things start making sense.
What i THINK happened is that your ESP wasn't mounted, so when you updated kernel/drivers  the initramfs wasn't updated correctly.

mount nvme0n1p1 somewhere temporarily, look for the folder where initramfs-linux.img is located (exact location depends on your bootloader)
post ls -l    output for that folder.

If i'm correct, it will have an old timestamp.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#16 2019-05-12 16:18:20

Soptik
Member
Registered: 2019-03-11
Posts: 64

Re: [Solved] Xrandr stopped detecting HDMI

There is actually not initramfs-linux.img in p1.

(running at p1 mountpoint)
$ find .
.
./EFI
./EFI/Microsoft
./EFI/Microsoft/Boot
(many files and folders)
./EFI/Microsoft/Recovery
./EFI/Microsoft/Recovery/BCD
./EFI/Microsoft/Recovery/BCD.LOG
./EFI/Microsoft/Recovery/BCD.LOG1
./EFI/Microsoft/Recovery/BCD.LOG2
./EFI/Boot
./EFI/Boot/fbx64.efi
./EFI/Boot/mmx64.efi
./EFI/Boot/bootx64.efi
./EFI/arch
./EFI/arch/grubx64.efi
./BOOT
./BOOT/BOOT.SDI
./System Volume Information
./System Volume Information/WPSettings.dat
./System Volume Information/IndexerVolumeGuid
./$RECYCLE.BIN
./$RECYCLE.BIN/desktop.ini

The initramfs-linux.img is actually at /boot (at p5), and it looks like this:

$ ls -l
total 67048
drwxr-xr-x 2 root root     4096 Mar 10 12:44 efi
drwxr-xr-x 6 root root     4096 Mar 10 13:08 grub
-rw-r--r-- 1 root root 42035641 May  6 17:22 initramfs-linux-fallback.img
-rw-r--r-- 1 root root 20667279 May  6 17:22 initramfs-linux.img
-rw-r--r-- 1 root root  5941120 May  5 20:04 vmlinuz-linux

Offline

#17 2019-05-13 10:41:02

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [Solved] Xrandr stopped detecting HDMI

Seems I was jumping to conclusions way to fast and should have asked info about your bootloader setup first.

What I suspect is that something went wrong with regenerating initramfs and the 418.56 nvidia module in the initramfs wasn't replaced by the 418.74 version .

run

mkinitcpio -p linux

reboot, check dmesg to see if the mismatch between nvidia versions is still there.

Last edited by Lone_Wolf (2019-05-13 10:42:32)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#18 2019-05-13 15:19:13

Soptik
Member
Registered: 2019-03-11
Posts: 64

Re: [Solved] Xrandr stopped detecting HDMI

Thank you very much, this fixed it instantly. Now everything works perfectly.

I just have one question about the problem I had.

Version mismatch: nvidia.ko(418.56) nvidia-modeset.ko(418.74)

Does this mean that while I had some library/API at .74 version, the driver/module itself was at old version .56? Are drivers/modules loaded in initramfs? I'm trying to figure out more about how Linux actually works, so I can fix problems myself. Learning something new was actually even the reason why I got into Arch.

Last edited by Soptik (2019-05-13 15:22:00)

Offline

#19 2019-05-13 15:56:28

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: [Solved] Xrandr stopped detecting HDMI

Soptik wrote:

Thank you very much, this fixed it instantly. Now everything works perfectly.

I just have one question about the problem I had.

Version mismatch: nvidia.ko(418.56) nvidia-modeset.ko(418.74)

Does this mean that while I had some library/API at .74 version, the driver/module itself was at old version .56? Are drivers/modules loaded in initramfs? I'm trying to figure out more about how Linux actually works, so I can fix problems myself. Learning something new was actually even the reason why I got into Arch.

The module is normally not inside the initramfs image. You have added it manually to the initramfs by editing your /etc/mkinitcpio.conf file. When the file for the module is available in the initramfs, the kernel will load it early at boot. When the file is not inside the initramfs image, the kernel will load it later after the root filesystem is mounted and the files from there start being available.

You probably added the module to your mkinitcpio.conf file because it's needed for "PRIME synchronization" between the Nvidia and Intel GPU to work, to have a chance to fix tearing when rendering stuff on the laptop's Nvidia GPU.

The Arch package named "linux" for the kernel has a "hook" file for pacman that is supposed to run the "mkinitcpio -p ..." command after files change in /usr/lib/modules/. Something went wrong there. You might be able to find the time it happened in "/var/log/pacman.log". That hook that runs the mkinitcpio command is named "90-linux.hook" for the "linux" package and there will be a message about it being run in pacman.log.

Offline

#20 2020-02-26 10:57:35

moinfar
Member
Registered: 2017-11-05
Posts: 4

Re: [Solved] Xrandr stopped detecting HDMI

Hi,

I had the same issue (which is now SOLVED) on ASUS ZenBook (UX433F). My HDMI output was fine and suddenly it stopped working.
The output of xrandr and intel-virtual-output were as following:

> $ xrandr
Screen 0: minimum 16 x 16, current 1920 x 1080, maximum 32767 x 32767
XWAYLAND0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 310mm x 170mm
   1920x1080     59.96*+
> $ intel-virtual-output
No VIRTUAL outputs on ":0".

It took me several days to test proposed solutions from different threads (such as https://wiki.archlinux.org/index.php/Bu … _monitors), However, none of them worked.
Last night I faced this thread: https://bbs.archlinux.org/viewtopic.php?id=194811 and this simple solution:

Maybe it's not a hardware problem. If xrandr is not detecting the HDMI1 display, disconnect the HDMI cord and power down the laptop and the monitor. While the laptop is shutdown, connect the HDMI port and turn on the monitor. Then turn on the laptop. You might find some success now.

And it worked!

So I posted here to suggest users with such issues to test this simple solution at the cost of a restart.

Last edited by moinfar (2020-02-26 11:00:52)

Offline

#21 2020-02-26 11:12:54

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,425

Re: [Solved] Xrandr stopped detecting HDMI

Please don't bump solved threads that already contain solutions that have no relation to your problem.

https://wiki.archlinux.org/index.php/Co … bumping%22

Closing.

Offline

Board footer

Powered by FluxBB