You are not logged in.

#1 2024-01-29 03:51:29

Xsofito
Member
Registered: 2024-01-29
Posts: 50

[SOLVED] Black screen after startx using any mode of optimus manager

Hi, I started using wayland but Nvidia, dual GPU and wayland isn´t the best combination, so I'm trying to move to X11.
I managed to get X11 working fast, but as soon as I started messing with optimus manager startx would leave the screen black, I'm able to switch between tty sessions, but optimus manager (faq) troubleshot to this didn't work at all.
The goal was to get a xorg installation using optimus manager hybrid mode with Nvidia prime working.
I had a pretty hard time trying to configure my dual gpu intel/nvidia to work in wayland, so it wouldn't surprice me that something on the drivers or init modules is broken.
Right now I'm using my wayland installation to get a desktop, xorg is unusable right now...

Xorg log

Optimus-manager switch log

Any help is appreciated, I'm stuck in this for the past two days...

Last edited by Xsofito (2024-01-31 15:55:57)

Offline

#2 2024-01-29 07:51:28

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,357

Re: [SOLVED] Black screen after startx using any mode of optimus manager

using optimus manager hybrid mode with Nvidia prime working

That's the default behavior w/o optimus-manager. Just remove it.

so it wouldn't surprice me that something on the drivers or init modules is broken

The nvidia GPU shows up as PCI device, the driver is loaded but doesn't apply so this most likely is a kernel module issue, you're unloading it or powering down the GPU.
Please post your complete system journal for the boot:

sudo journalctl -b | curl -F 'file=@-' 0x0.st

Online

#3 2024-01-29 11:52:03

Xsofito
Member
Registered: 2024-01-29
Posts: 50

Re: [SOLVED] Black screen after startx using any mode of optimus manager

Offline

#4 2024-01-29 15:29:08

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,357

Re: [SOLVED] Black screen after startx using any mode of optimus manager

Jan 29 00:23:58 Xsofito systemd-logind[487]: /boot/loader/entries/arch.conf:8: Field 'nvidia.NVreg_PreserveVideoMemoryAllocations=1' without value, ignoring line.
Jan 29 00:19:50 Xsofito kernel: simple-framebuffer simple-framebuffer.0: [drm] fb0: simpledrmdrmfb frame buffer device

Enable https://wiki.archlinux.org/title/NVIDIA … de_setting (use the nvidia_drm.modeset=1 kernel parameters, skip fbdev=1, modprobe.conf will *not* do itr)

Jan 29 00:19:54 Xsofito python3[525]: [118] INFO: Writing to /etc/X11/xorg.conf.d/10-optimus-manager.conf
seth wrote:

That's the default behavior w/o optimus-manager. Just remove [optimus-manager]

Fix the kernel and module parameters, remove optimus-manager (and in doubt residual xorg configlets it may have left behind) and post an updated xorg log.
The nvidia modules loads very late, if that doesn't change w/ optimus manager (or it doesn't load at all) check

modprobe -c | grep nvidia | grep black

Online

#5 2024-01-30 00:47:13

Xsofito
Member
Registered: 2024-01-29
Posts: 50

Re: [SOLVED] Black screen after startx using any mode of optimus manager

After removing optimus and trying to fix the kernel modules screen get frozen after running startx, no black screen, just frozen in tty.
I still able to change between tty sessions.
After using "killall Xorg" I was able to see tons of errors about the monitor not existing and not having a size value.
This is the new xorg log.

This is what I have in /etc/modprobe.d/nvidia.conf

options nvidia-drm modeset=1

And this is /etc/mkinitcpio.conf

MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)
BINARIES=()
FILES=()
HOOKS=(base udev autodetect modconf keyboard keymap consolefont block filesystems fsck mdadm_udev)

No line is found using

modprobe -c | grep nvidia | grep black

Hope this helps

Last edited by Xsofito (2024-01-30 01:40:54)

Offline

#6 2024-01-30 07:09:40

d.ALT
Member
Registered: 2019-05-10
Posts: 958

Re: [SOLVED] Black screen after startx using any mode of optimus manager

Xsofito wrote:

This is what I have in /etc/modprobe.d/nvidia.conf

options nvidia-drm modeset=1
seth wrote:

Enable https://wiki.archlinux.org/title/NVIDIA … de_setting (use the nvidia_drm.modeset=1 kernel parameters, skip fbdev=1, modprobe.conf will *not* do itr)


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#7 2024-01-30 09:28:32

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,357

Re: [SOLVED] Black screen after startx using any mode of optimus manager

And seth also wrote:

remove optimus-manager (and in doubt residual xorg configlets it may have left behind)

[    41.355] (==) Using config directory: "/etc/X11/xorg.conf.d"
[    41.355] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[    41.359] (==) No Layout section.  Using the first Screen section.
[    41.359] (==) No screen section available. Using defaults.
[    41.359] (**) |-->Screen "Default Screen Section" (0)
[    41.359] (**) |   |-->Monitor "<default monitor>"
[    41.359] (==) No device specified for screen "Default Screen Section".
	Using the first device section listed.
[    41.359] (**) |   |-->Device "NVIDIA Card"
[    41.359] (==) No monitor specified for screen "Default Screen Section".

You're forcing the nvidia GPU and completely disable the intel one but there're not outputs attached to the nvidia chip.

Online

#8 2024-01-30 11:37:52

Xsofito
Member
Registered: 2024-01-29
Posts: 50

Re: [SOLVED] Black screen after startx using any mode of optimus manager

I change the kernel parameter not to use /etc/modprobe.d but /boot/loader/entries/arch.conf.


seth wrote:

You're forcing the nvidia GPU and completely disable the intel one but there're not outputs attached to the nvidia chip.

I removed every config file from xorg, optimus, and even tried removing nvidia and configuring it again, but the output on the log is exactly the same, am I missing something?

Offline

#9 2024-01-30 13:01:47

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,895

Re: [SOLVED] Black screen after startx using any mode of optimus manager

Please post the output of

ls -lR /etc/X11 /usr/share/X11/xorg.conf.d/

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

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#10 2024-01-30 13:35:51

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,357

Re: [SOLVED] Black screen after startx using any mode of optimus manager

And an updated xorg log to make sure you're not lookign at some dated data.
pastebin.com seems to timeout atm, in doubt use 0x0.st or ix.io

Online

#11 2024-01-30 16:12:33

Xsofito
Member
Registered: 2024-01-29
Posts: 50

Re: [SOLVED] Black screen after startx using any mode of optimus manager

ls -lR /etc/X11 /usr/share/X11/xorg.conf.d/
/etc/X11/:
xinit
xorg.conf
xorg.conf.backup
xorg.conf.d
xorg.conf.nvidia-xconfig-original

/etc/X11/xinit:
xinitrc
xinitrc.d
xserverrc

/etc/X11/xinit/xinitrc.d:
40-libcanberra-gtk-module.sh
50-systemd-user.sh
80xapp-gtk3-module.sh

/etc/X11/xorg.conf.d:
00-keyboard.conf
20-nvidia.conf

/usr/share/X11/xorg.conf.d/:

Offline

#12 2024-01-30 16:18:11

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,357

Re: [SOLVED] Black screen after startx using any mode of optimus manager

I removed every config file from xorg

So what's that:

xorg.conf
xorg.conf.backup
xorg.conf.nvidia-xconfig-original

Notably /etc/X11/xorg.conf

Also post
/etc/X11/xorg.conf.d/20-nvidia.conf

Online

#13 2024-01-30 16:23:44

Xsofito
Member
Registered: 2024-01-29
Posts: 50

Re: [SOLVED] Black screen after startx using any mode of optimus manager

/etc/X11/xorg.conf.d/20-nvidia.conf
Section "Device"
		Identifier "NVIDIA Card"
		Driver "nvidia"
		VendorName "NVIDIA Corporation"
		BoardName "GeForce GTX 1650 Mobile / Max-Q"
		Option "NoLogo" "1"
		Option "ConnectedMonitor" "CRT"
		BusID "PCI:1:0:0"
EndSection

Offline

#14 2024-01-30 16:24:27

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,357

Re: [SOLVED] Black screen after startx using any mode of optimus manager

And we'll get rid of that one as well…

Online

#15 2024-01-30 16:30:20

Xsofito
Member
Registered: 2024-01-29
Posts: 50

Re: [SOLVED] Black screen after startx using any mode of optimus manager

I'm able to start the WM, but the input devices aren't working, is it something with the xorg conf files?

Offline

#16 2024-01-30 16:32:22

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,357

Re: [SOLVED] Black screen after startx using any mode of optimus manager

What does /etc/X11/xorg.conf.d/00-keyboard.conf look like? (And in in doubt just move it aside)
Then post an updated xorg log.

Online

#17 2024-01-30 16:34:43

Xsofito
Member
Registered: 2024-01-29
Posts: 50

Re: [SOLVED] Black screen after startx using any mode of optimus manager

/etc/X11/xorg.conf.d/00-keyboard.conf
Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "latam"
EndSection

My bad, here is the Xorg log

Last edited by Xsofito (2024-01-30 16:44:09)

Offline

#18 2024-01-30 16:58:56

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,357

Re: [SOLVED] Black screen after startx using any mode of optimus manager

[   153.361] (**) ydotoold virtual device: Applying InputClass "system-keyboard"

ydotool is a wayland thing, why is that running?

[   153.355] (**) Logitech G203 LIGHTSYNC Gaming Mouse Keyboard: Applying InputClass "system-keyboard"
[   153.358] (II) config/udev: Adding input device AT Translated Set 2 keyboard (/dev/input/event3)
[   153.358] (**) AT Translated Set 2 keyboard: Applying InputClass "system-keyboard"

The input devices are detected, what's your metric for "doesn't work"? Can you move around the mouse cursor?

The system is running on the intel chip w/ the modesetting driver, the nvidia chip isn't considered at all - do you disable it w/ bbswitch/acpi_call?
Please post your complete system journal for the boot:

sudo journalctl -b | curl -F 'file=@-' 0x0.st

Online

#19 2024-01-30 17:02:46

Xsofito
Member
Registered: 2024-01-29
Posts: 50

Re: [SOLVED] Black screen after startx using any mode of optimus manager

ydotool might be running due that I'm using wayland to have a desktop and comment here, the mouse dosn't move once in Xorg and keyboard inputs aren't working, I tried restarting without starting wayland and didn't work neither.
Let me reboot and start xorg to show you the journal...

Here is the journal

The system is running on the intel chip w/ the modesetting driver, the nvidia chip isn't considered at all - do you disable it w/ bbswitch/acpi_call?

Just removed optimus-manager, it's conf files and Xorg ones

Last edited by Xsofito (2024-01-30 17:51:27)

Offline

#20 2024-01-31 15:54:27

Xsofito
Member
Registered: 2024-01-29
Posts: 50

Re: [SOLVED] Black screen after startx using any mode of optimus manager

Seeing that Xorg manages to start at least using the iGPU, I'll mark this as solved and open a new thread for fixing the Nvidia drivers and Prime installation:
https://bbs.archlinux.org/viewtopic.php?id=292421

Offline

#21 2024-01-31 16:22:40

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,357

Re: [SOLVED] Black screen after startx using any mode of optimus manager

Sorry,  didn't see your edit.
There's nothing inhibiting the nvidia chip

Ftr, you've apparently iwd networkc config enabled but are also using NM and dnsmasq fails to start.


Jan 30 14:03:08 Xsofito kernel: [drm] Initialized simpledrm 1.0.0 20200625 for simple-framebuffer.0 on minor 0
Jan 30 14:03:08 Xsofito kernel: simple-framebuffer simple-framebuffer.0: [drm] fb0: simpledrmdrmfb frame buffer device

Enable https://wiki.archlinux.org/title/NVIDIA … de_setting (use the "nvidia_drm.modeset=1" kernel parameter, modprobe.conf won't do. Skip fbdev=1 for the moment)

regarding you input devices, we'll need an updated Xorg log and perhaps the output of "xinput -display=:0" (should work from a different TTY while the "bad" X11 server is running)

Online

Board footer

Powered by FluxBB