Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External Monitor stays just lit black (HDMI) Notebook Intel integrated + Nvidia but should work on Intel #40

Closed
romanstingler opened this issue Aug 5, 2024 · 27 comments

Comments

@romanstingler
Copy link
Contributor

From the AQ PR my outstanding MultiMonitor Bug.

I am using Tag: v0.41.2-48-gf642fb97, commits: 4934 for now, as this is my office laptop, there everything is fine,
DP-3 is my external HDMI monitor which stays black

I clean-built hyprland-git 0.41.2.r166.0e86808e-1 the issue is still present.

hyprcursor-git 0.1.9.r9.g4493a972-1
hypridle-git 0.1.2.r10.ge5366d34-1
hyprland-git  0.41.2.r166.0e86808e-1
hyprlang-git 0.5.2.r8.gadbefbf4-1
hyprlock-git 0.4.1.r3.gcf0e975f-1
hyprutils-git 0.2.1.r1.g0252fd13-1
hyprwayland-scanner-git 0.4.0.r4.ga048a6cb-1
~ ❯ printenv                                                                                       21:25
XDG_VTNR=1
SHLVL=2
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
SHELL=/usr/bin/fish
MEMORY_PRESSURE_WRITE=c29tZSAyMDAwMDAgMjAwMDAwMAA=
EDITOR=vim
LOGNAME=roman
ELECTRON_USE_OZONE=1
GDK_BACKEND=wayland
XDG_SESSION_ID=1
MOZ_ENABLE_WAYLAND=1
PWD=/home/roman
OZONE_PLATFORM=wayland
DISPLAY=:0
HYPRCURSOR_SIZE=24
XDG_BACKEND=wayland
MOTD_SHOWN=pam
MEMORY_PRESSURE_WATCH=/sys/fs/cgroup/system.slice/system-getty.slice/[email protected]/memory.pressure
SUDO_RS_IS_UNSTABLE=I accept that my system may break unexpectedly
LANG=en_US.UTF-8
CREDENTIALS_DIRECTORY=/run/credentials/[email protected]
XDG_CURRENT_DESKTOP=Hyprland
AQ_MGPU_NO_EXPLICIT=1
ELECTRON_OZONE_PLATFORM_HINT=auto
USER=roman
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
TERM=foot
HL_INITIAL_WORKSPACE_TOKEN=29848760-5e68-43c2-bed9-745f9796232b
XDG_SEAT=seat0
WAYLAND_DISPLAY=wayland-1
XCURSOR_SIZE=24
_JAVA_AWT_WM_NONREPARENTING=1
XDG_SESSION_TYPE=wayland
HOME=/home/roman
INVOCATION_ID=5f3182dd9bd94841b54e99d2448fcafb
COLORTERM=truecolor
XDG_SESSION_CLASS=user
MAIL=/var/spool/mail/roman
XDG_RUNTIME_DIR=/run/user/1000
HYPRLAND_CMD=hyprland
HYPRLAND_INSTANCE_SIGNATURE=f642fb97df5c69267a03452533de383ff8023570_1722885217_1265813201
NO_AT_BRIDGE=1
SYSTEMD_EXEC_PID=812
~ ❯ lspci -v | grep -E "VGA|3D"                                                                                                                                                                        1.439s 21:34
00:02.0 VGA compatible controller: Intel Corporation CometLake-H GT2 [UHD Graphics] (rev 05) (prog-if 00 [VGA controller])
01:00.0 3D controller: NVIDIA Corporation GP107GLM [Quadro P620] (rev a1)
~ ❯ inxi -G                                                                                                                                                                                                                                                                            21:44
Graphics:
  Device-1: Intel CometLake-H GT2 [UHD Graphics] driver: i915 v: kernel
  Device-2: NVIDIA GP107GLM [Quadro P620] driver: nvidia v: 555.58.02
  Device-3: Chicony Integrated Camera driver: uvcvideo type: USB
  Display: wayland server: X.org v: 1.21.1.13 with: Xwayland v: 24.1.1
    compositor: Hyprland v: 0.41.2-48-gf642fb97 driver: X: loaded: intel,nvidia
    unloaded: modesetting,nouveau dri: i965 gpu: i915 resolution:
    1: 3840x2160~60Hz 2: 2560x1440~60Hz
  API: EGL v: 1.5 drivers: iris,nvidia,swrast
    platforms: gbm,wayland,x11,surfaceless,device
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: intel mesa v: 24.1.5-arch1.2
    renderer: Mesa Intel UHD Graphics (CML GT2)
  API: Vulkan v: 1.3.285 drivers: nvidia,intel surfaces: xcb,xlib,wayland

hyprland.log

hyprland.conf.txt

I have seen [LOG] [AQ] libseat: Device /dev/dri/card1 does not support kms
no clue if I need linux-headers package, but on the stable release everything is fine.

PS: for testing I used only
monitor=,preferred, auto, auto which also doesn't work.

No pressure guys, I just wanted to have it documented

@romanstingler romanstingler changed the title External Monitor stays just lit black (HDMI) Notebook Intel integrated (Nvidia not set) External Monitor stays just lit black (HDMI) Notebook Intel integrated + Nvidia but should work on Intel Aug 5, 2024
@vaxerski
Copy link
Member

vaxerski commented Aug 6, 2024

ye idk whats up here, looks like some driver bug

@romanstingler
Copy link
Contributor Author

romanstingler commented Aug 6, 2024

I know, just very insteresting that it works on wlroots but not on AQ.
I will keep it open until resolved, let's see what the issue will be.

it doesn't work on 555.58.02 and also not on 560.31.02
Not on the HDMI output and also not on the USB-C=>HDMI adapter (both works on other compositors and HL<0.42)

in the wiki we have

Then, create and edit /etc/modprobe.d/nvidia.conf. Add this line to the file:
options nvidia_drm modeset=1 fbdev=1

but the journal says that fbdev is unknown (probably deprecated)
I use cachyos kernel and cachyos-nvidia package
I removed everything in the /etc/modprobe.d/nvidia.conf file and
I get

~ ❯ sudo cat /sys/module/nvidia_drm/parameters/modeset                                                     2.257s 23:31
Y

Because I get an image on sway and also on HL <0.42

Unfortunately, I have absolutely no clue about the GFX stack.
if the NV card has no KMS support (in the 0.42 log, but I haven't seen it in the 0.41 logs)

OK on 0.41.2 when starting with

~ ❯ HYPRLAND_TRACE=1 HYPRLAND_LOG_WLR=1 WLR_DRM_DEVICES=/dev/dri/card1 hyprland 

It basically crashes the same with not as KMS device
hyprlandCrashReport32138.txt

In my understanding, then the KMS "config/settings" must come from the iGPU.
no clue if the monitor is detected and also a workspace is created there, and I can also move the mouse there (in 0.42)
but the screen stays black if it is a dmabuf issue, DRM/KMS or DRI.

Because the internal monitor works which is connected to the iGPU
but the external which are connected to the dGPU doesn't this means, in my head at least, that the NV card is not accessing / passing through the rendered data from the iGPU.

wlinfo.log

[sudo] password for roman: 
[    0.779058] ACPI: bus type drm_connector registered
[    1.454653] i915 0000:00:02.0: [drm] Found COMETLAKE (device ID 9bc4) display version 9.00
[    1.455304] i915 0000:00:02.0: [drm] VT-d active for gfx access
[    1.455452] i915 0000:00:02.0: [drm] Using Transparent Hugepages
[    1.456955] i915 0000:00:02.0: [drm] Finished loading DMC firmware i915/kbl_dmc_ver1_04.bin (v1.4)
[    2.233506] i915 0000:00:02.0: [drm] *ERROR* Failed to probe lspcon
[    2.233517] [drm] Initialized i915 1.6.0 for 0000:00:02.0 on minor 0
[    2.283421] fbcon: i915drmfb (fb0) is primary device
[    3.711385] i915 0000:00:02.0: [drm] fb0: i915drmfb frame buffer device
[    4.094107] systemd[1]: Starting Load Kernel Module drm...
[    4.118339] systemd[1]: [email protected]: Deactivated successfully.
[    4.118443] systemd[1]: Finished Load Kernel Module drm.
[    4.780982] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[    5.908427] [drm] Initialized nvidia-drm 0.0.0 for 0000:01:00.0 on minor 1

@alba4k
Copy link

alba4k commented Aug 12, 2024

Experiencing what looks like the same on my single-gpu laptop (integrated intel)


# Monitor configuration (The random numbers are for 1920x1080@72, and my monitors appear as DP-[6,9] after hibernating instead of DP-[5,7])
#monitor = eDP-1, modeline 193.25 1920 2056 2256 2592 1200 1203 1209 1245 -hsync +vsync, 0x0, 1
#monitor = DP-5, modeline 210.25 1920 2056 2256 2592 1080 1083 1088 1128 -hsync +vsync, 0x0, 1
#monitor = DP-6, modeline 210.25 1920 2056 2256 2592 1080 1083 1088 1128 -hsync +vsync, 0x0, 1
#monitor = DP-7, modeline 210.25 1920 2056 2256 2592 1080 1083 1088 1128 -hsync +vsync, 1920x0, 1
#monitor = DP-9, modeline 210.25 1920 2056 2256 2592 1080 1083 1088 1128 -hsync +vsync, 1920x0, 1
monitor = DP-5, 1920x1080@60, 0x0, 1
monitor = DP-6, 1920x1080@60, 0x0, 1
monitor = DP-7, 1920x1080@60, 1920x0, 1
monitor = DP-9, 1920x1080@60, 1920x0, 1
exec = hyprctl monitors all | grep "DP-5\|DP-6" && hyprctl keyword monitor "eDP-1, disabled" || hyprctl keyword monitor "eDP-1, 1920x1200, 0x0, 1"
monitor = , preferred, auto, 1

When logging in, eDP-1 stays lit black, to fix I have to run hyprctl keyword monitor eDP-1,1920x1080@60,3840x0,1 && sleep 2 && hyprctl keyword monitor eDP-1,disabled

@LRitzdorf
Copy link

Very similar issue here, on my hybrid Intel/Nvidia laptop. I'm getting a completely black screen on an HDMI output driven by the Nvidia dGPU — but not a "no signal" screen; the contents are just empty.

Interestingly, I've discovered that mirroring my laptop's own eDP display (driven by the Intel iGPU) to the HDMI output, and then relaunching Hyprland, allows content to be displayed. Feels like some weird multi-GPU franebuffer copy shenanigans happening?

Feel free to let me know if there's more I can do to test this!

@JozefGalbicka
Copy link

Hi, just to add to the stack - I'm experiencing similar issues, though on a single GPU laptop (Intel UHD 620). Back then on wlroots I had issues with running second external monitor (third overall), where on Hyprland launch it would only display one of the two connected external monitors - second would end up with No Signal. I actually got it working by launching Hyprland with only one external monitor connected, and physically connecting the second after launching hyprland.

unfortunately, this stopped working somewhere along migration to aquamarine, and now I'm able to launch only (any) single external monitor again (I'm using HDMI + DP Alt mode). When both connected, I can see the black screen monitor in hyprctl monitors, I also tried clean config with only monitor=,preferred,auto,1. Also I'm able to "blindly" switch to the workspace of the not displayed monitor, open terminals and launch commands, etc.

If I can be of any assistance, just let me know!

@LRitzdorf
Copy link

...okay, I'm very confused now. As of today, with seemingly no relevant changes, my system, uh, partially works? If my external monitor is connected when Hyprland starts, it works as expected (and can even be reconfigured on-the-fly by wdisplays, including being disabled/reenabled without breaking). However, as soon as its HDMI cable is disconnected from and reconnected to my dGPU, this issue appears.

(re: updates, mesa and vulkan were bumped earlier today, but a) not by much, and b) would that even affect aquamarine?)

@vaxerski
Copy link
Member

please try the above mr

@alba4k
Copy link

alba4k commented Aug 16, 2024

will do when I get home in 2 hours or so (if not too drunk)

@alba4k
Copy link

alba4k commented Aug 18, 2024

Issue still exists on my end

@romanstingler
Copy link
Contributor Author

It doesn't fix my monitor issue.

when I install HL-git and start HL from tty , the external monitor first blinks as it would be inactive/disabled,
but after a few seconds the HDMI input is activated and I get just a bright black screen on the external monitor.

what I found out is,
that when I inside my 0.42 HL session with the external monitor and notebook monitor open another HL session and try to drag the newly created HL window to the external monitor, the window starts to stutter extremely as I move it past the monitor border.

@vaxerski
Copy link
Member

ok lets do this, I'll need two logs:

  • trace log from hl-git + aq-git
  • HYPRLAND_TRACE=1 HYPRLAND_LOG_WLR=1 Hyprland from 0.41.2

@romanstingler
Copy link
Contributor Author

romanstingler commented Aug 19, 2024

Here you go
hyprland.log

PS: Mesa 24.1 or 24.3 doesn't change a thing

PS2: I was not focused
AQ LOG
hyprland.log

@Hannes1909
Copy link

hyprland_git-aquamarine_git.log
hyprland_0.41.2.log

Both with HYPRLAND_TRACE=1 HYPRLAND_LOG_WLR=1 Hyprland

@vaxerski
Copy link
Member

@Hannes1909 are you on 10b? Can you disable it?

If that doesn't help, can you get a drm log https://wiki.hyprland.org/Crashes-and-Bugs/#debugging-drm-issues

@romanstingler I need a git log too

@Hannes1909
Copy link

Sorry can you elaborate on 10b? Doesnt Ring a bell :(

@vaxerski
Copy link
Member

10 bit

@LRitzdorf
Copy link

LRitzdorf commented Aug 20, 2024

During earlier testing, I found that I could get Hyprland to crash by playing around with monitor settings — specifically, starting with my external HDMI output set to mirror my laptop's eDP port, then editing Hyprland's config to disable the output altogether (i.e. the only monitor line is explicitly for the eDP port). I've reproduced this just now (with latest Arch aquamarine, v0.3.3) and attached a debug log here.

I'm completely guessing, but based on my general feeling that framebuffer shenanigans are happening, a crash (which could occur due to said memory shenanigans) seems like it might help pinpoint what's going on here.
Happy to test more if that'd help!

hyprland.log

@Hannes1909
Copy link

Hannes1909 commented Aug 20, 2024

10 bit

not by choice, thats why i didnt know what that meant :) I have my internal laptop display on the left, DP-4 (working) in the middle and DP-5 to the right and rotated.

monitor=eDP-1,[email protected],0x0,1.0
monitor=DP-4,[email protected],1920x0,1.0
monitor=DP-5,1920x1080@60,3840x-350,1,transform,3

Ill add an DRM Log when i find the time today. Thanks!

@Hannes1909
Copy link

dmesg.log.zip

DRM Log from starting Hyprland, since the monitor is black from the beginning I just kept it running for a minute or so.

@romanstingler
Copy link
Contributor Author

560.35.03 doesn't fix it

@vgmethod
Copy link

vgmethod commented Aug 22, 2024

tldr +1

trying to serve two monitors with my dgpu nvidia. one connected to nvidia card, one connected to amd igpu. amd connected monitor is just black. both connected via separate displayports, no hdmi

potentially relevant settings?

env = LIBVA_DRIVER_NAME,nvidia
env = GBM_BACKEND,nvidia-drm
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
env = __GL_GSYNC_ALLOWED,0
env = __GL_VRR_ALLOWED,0
env = AQ_DRM_DEVICES,/dev/dri/card0:/dev/dri/card1

@LRitzdorf
Copy link

FWIW, this appears to be fixed(?) in Git now; we just need to wait for a new release by the Arch team. Or, of course, use the -git AUR packages.

@romanstingler
Copy link
Contributor Author

FWIW, this appears to be fixed(?) in Git now; we just need to wait for a new release by the Arch team. Or, of course, use the -git AUR packages.

My issue is a different one

@romanstingler
Copy link
Contributor Author

romanstingler commented Aug 26, 2024

I can finally use 0.42 and bug Vaxry with all the bugs :P

I got a new "screen" and played around and for me,
if I have my external screen connected to my notebook, sometimes all screens stay lit-black,
sometimes only the external screens.

After unplugging and re-plugging the HDMI cable, sometimes 1x sometimes 2,3x,
I got my external screen to display properly.

Here is my Log
DP-1 was configured in the conf but unplugged (doesn't change a thing)
DP-3 was the external "monitor" which was resurrected after plugging and unplugging it.
hyprland.log

~[1] ❯ yay -Q | grep -E "hypr|aqua"  21:32
aquamarine-git 0.3.3_r201.gabb3c81-1
hyprcursor-git 0.1.9.r11.g912d5602-1
hypridle-git 0.1.2.r10.ge5366d34-1
hyprland-git 0.42.0.r75.09dbcabc-1
hyprlang-git 0.5.2.r9.g16e5c946-1
hyprlock-git 0.4.1.r3.gcf0e975f-1
hyprpaper-git 0.7.0.r17.ge32a2c8-1
hyprutils-git 0.2.1.r1.g0252fd13-1
hyprwayland-scanner-git 0.4.0.r4.ga048a6cb-1

@romanstingler
Copy link
Contributor Author

The latest changes fix the HDMI output. Now my internal screen and my HDMI external screen work just fine out-of-the-box.

The only remaining issue is that I get no image on the UsbC=>Hdmi output.

@LRitzdorf
Copy link

Confirmed here as well — mu dGPU's HDMI output now hotplugs properly.

@Hannes1909
Copy link

latest aq fixed it for me too :) thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants