LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch
User Name
Password
Arch This Forum is for the discussion of Arch Linux.

Notices


Reply
  Search this Thread
Old 11-17-2021, 10:21 AM   #1
vladimir1986
Member
 
Registered: Jul 2011
Posts: 112

Rep: Reputation: Disabled
Balck screen with Nvidia


Hey there, I would love if someone can find a fix for this annoying problem:

Every time I try to startx on my laptop (with a Quadro M2000M), I just get a black screen. You can actually find the exact same problem here https://wiki.archlinux.org/title/NVI..._at_X_shutdown, but none of the solutions work.

So far I have KDE5 installed with SDDM, and I3. KDE5 always worked (I am using the X11 version, not wayland). I3 is the one who gets a black screen if I use Startx. Using SDDM makes it work (but my goal was to avoid using a graphic manager to start X. Tried other ones, like xdm, but I get a black screen)

I am quite sure It is a Nvidia driver issue, because I have other partitions with different Linux distros and FreeBSD, and using Nouveau I have 0 problems. The thing is that I am sort of using this Arch partition to play videogames, so I want to be able to use the full potential of my GPU.

BTW. I get no warnings: X server starts fine and I can ssh into my system. It is just that I silently get a black screen.
 
Old 11-17-2021, 10:55 AM   #2
biker_rat
Member
 
Registered: Feb 2010
Posts: 373

Rep: Reputation: 220Reputation: 220Reputation: 220
You need to set kernel parameter nvidia_drm.modeset=1 and boot without any xorg.conf (or other configuration file). Your bios has to be set to switchable graphics (or equivalent). This will boot you in Optimus/PRIME mode (see Nvidia README associtated with your driver section 34). You probably need to set some subset of the the environment variables discussed in that section of the Readme to get your nvidia gpu to do the vulkan and glx 3d acceleration (instead of the intel apu graphics).
 
Old 11-19-2021, 07:03 AM   #3
vladimir1986
Member
 
Registered: Jul 2011
Posts: 112

Original Poster
Rep: Reputation: Disabled
That is quite interesting. I remember I had optimus manager loaded at boot. Disabled it and found now I can start x normally....

Apart fromt he fact that my laptop display switches off and I can only get output from an external display. My laptop screen would not be detected at all! (it works if I move into a terminal tho)

Man, I knew Nvidia drivers where bad, but this is a new level

BTW, my BIOS has no option for switching cards. It sucks, but the last two laptops with multiples GPUS totally lacked any option to choose which one I wanted

In any case I am not that interested into doing that. But I have been trying for a while to do a GPU pass trough, unsuccesfully

Last edited by vladimir1986; 11-19-2021 at 07:13 AM.
 
Old 11-19-2021, 07:28 AM   #4
biker_rat
Member
 
Registered: Feb 2010
Posts: 373

Rep: Reputation: 220Reputation: 220Reputation: 220
Does xrandr list your laptop screen?
 
Old 11-19-2021, 04:16 PM   #5
vladimir1986
Member
 
Registered: Jul 2011
Posts: 112

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by biker_rat View Post
Does xrandr list your laptop screen?
Thank you for all the replies! At the moment I got no access to a secondary screen or another computer I can use to ssh into the system, but tomorrow morning (in a few hours) I will be able to check what exactly xrandr reports.

I remeber nvidia-settings seemed to detect it as a dummy display, called "X.org display", it will allow me to select different colour intensity for it, but the resolution selection list was empty. I used arandr to check if I could activate the laptop screen, but it wasn't detected.

Thinking about that, when I tried in the past to connect another screen in one of my partitions with nouveau, I got the opossite result: The secondary screen would not be detected.

I will report tomorrow. Is there something else I should check out that might help?

Thanks.
 
Old 11-20-2021, 02:31 AM   #6
vladimir1986
Member
 
Registered: Jul 2011
Posts: 112

Original Poster
Rep: Reputation: Disabled
Hi there. So connected an external display wthout optimus started at boot, and yeah, my laptop screen was not detected at all (the laptop screen is recognised as eDP1).

Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 16384 x 16384
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 509mm x 286mm
1920x1080 60.00*+ 59.94 50.00 60.05 60.00 50.04
1600x900 60.00
1280x1024 75.02 60.02
1280x720 60.00 59.94 50.00
1152x864 75.00
1024x768 75.03 60.00
800x600 75.00 60.32
720x576 50.00
720x480 59.94
640x480 75.00 59.94 59.93
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 disconnected (normal left inverted right x axis y axis)
DP-5 disconnected (normal left inverted right x axis y axis)

This is a normal session with optimus enabled, and just using my laptop display:

Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 16384 x 16384
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 disconnected (normal left inverted right x axis y axis)
DP-5 disconnected (normal left inverted right x axis y axis)
eDP-1-1 connected primary 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 48.00
1680x1050 59.95 59.88
1400x1050 59.98
1600x900 59.99 59.94 59.95 59.82
1280x1024 60.02
1400x900 59.96 59.88
1280x960 60.00
1440x810 60.00 59.97
1368x768 59.88 59.85
1280x800 59.99 59.97 59.81 59.91
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
700x525 59.98
800x450 59.95 59.82
640x512 60.02
700x450 59.96 59.88
640x480 60.00 59.94
720x405 59.51 58.99
684x384 59.88 59.85
640x400 59.88 59.98
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
 
Old 11-20-2021, 03:29 AM   #7
vladimir1986
Member
 
Registered: Jul 2011
Posts: 112

Original Poster
Rep: Reputation: Disabled
Note: tough it might try nvidia-xrun instead of optimus and see if there where better results, but I got the same black screen problem, plus it requires sudo, which I don't want to have it installed on my system, as I use doas.
 
Old 11-21-2021, 09:14 AM   #8
biker_rat
Member
 
Registered: Feb 2010
Posts: 373

Rep: Reputation: 220Reputation: 220Reputation: 220
When your are using the external display, do you have and xorg.conf file or any files in xorg.conf.d directory (look while it is running)? What are the grub.cfg kernel options you are using, as well as those in other files? What modules are in your initramfs?
 
Old 11-24-2021, 07:08 AM   #9
vladimir1986
Member
 
Registered: Jul 2011
Posts: 112

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by biker_rat View Post
When your are using the external display, do you have and xorg.conf file or any files in xorg.conf.d directory (look while it is running)? What are the grub.cfg kernel options you are using, as well as those in other files? What modules are in your initramfs?
Sorry for the late reply. I assumed the answer was "no" (I did create some files in xorg.conf.d so I could have ctrl+alt+delete to kill X. keyboard layout changes and tap to click, but nothing GPU related). When I looked I saw an autogenerated "10-optimus-manager.conf". I got no memory of creating it, and when changing the name, after restart, it is repopulated. I can just move it out of the way and restart sddm to have the main display to work and secondary one to be off, like I do with Nouveau. There I got on a roadblock: I am not familiar at all with systemd. Tried to find an "optimus" service, but no luck. I did deactivate "optimus-manager" with systemd disable optimus-manager, but I still get the "10-optimus-manager.conf" rebuilt every time I restart. I can imagine I did something I can't remember and will fix it just by reinstalling, but I would like to learn what caused it and how to fix it. Protip: I got no systemd "optimus" service running, except from optimus-manager. But deactivating it doesn't avoid and 10-optimus-manager.conf to pop in at boot.

Here's the content. I can imagine I can just define normal and external monitor there. But why it is being created?

Section "Files"
ModulePath "/usr/lib/nvidia"
ModulePath "/usr/lib32/nvidia"
ModulePath "/usr/lib32/nvidia/xorg/modules"
ModulePath "/usr/lib32/xorg/modules"
ModulePath "/usr/lib64/nvidia/xorg/modules"
ModulePath "/usr/lib64/nvidia/xorg"
ModulePath "/usr/lib64/xorg/modules"
EndSection

Section "ServerLayout"
Identifier "layout"
Screen 0 "nvidia"
Inactive "integrated"
EndSection

Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:1:0:0"
Option "Coolbits" "28"
EndSection

Section "Screen"
Identifier "nvidia"
Device "nvidia"
Option "AllowEmptyInitialConfiguration"
EndSection

Section "Device"
Identifier "integrated"
Driver "modesetting"
BusID "PCI:0:2:0"
EndSection

Section "Screen"
Identifier "integrated"
Device "integrated"
EndSection
 
Old 11-24-2021, 07:20 AM   #10
biker_rat
Member
 
Registered: Feb 2010
Posts: 373

Rep: Reputation: 220Reputation: 220Reputation: 220
You might have optimus-manager package from AUR installed. Try to uninstall it to see if that is the case.
 
Old 12-03-2021, 07:53 AM   #11
vladimir1986
Member
 
Registered: Jul 2011
Posts: 112

Original Poster
Rep: Reputation: Disabled
Sorry for late reply: I am atm with exams and doing what I can on my free time. Also had problems with a Gentoo install.

tldr; I found a fix, but only works on Nouveau. If I want to use propietary Nvidia, I can only use optimus-manager.

I did as you said (just deactivated as system service), and got the laptop screen working and external display not working.

I gave up for a while and actually tried getting the secondary screen working on my Slackware partition using Nouveau. It was a success! I found that solution in the Arch wiki, and can't find it again. Will paste at the end of the post what worked for Nouveau (btw, already tried it with Nvidia drivers. It didn't work).

Then I started working on having a GPU passtrough, and was succesful. sadly, adding the hook vfio-pci.ids= tp the Kernel also forces it into single screen mode, forcing my laptop into eternally displaying that the vfio-pci hook loaded correct. If I don't plug an external display, that message is permanently fixed, and can only work into my computer via ssh. I also got an error43, so I might just give up with Igpu passtrough.

Here the xorg.conf I used to make Nouveau to work (saved this as /etc/X11/xorg.conf.d/30-multiple.conf on a Slackware partition)

Section "ServerLayout"
Identifier "layout"
Screen 0 "intel"
Inactive "nvidia"
Option "AllowNVIDIAGPUScreens"
EndSection

Section "Device"
Identifier "nvidia"
Driver "nvidia"
EndSection

Section "Screen"
Identifier "nvidia"
Device "nvidia"
EndSection

Section "Device"
Identifier "intel"
Driver "modesetting"
BusID "PCI:0:2:0"
EndSection

Section "Screen"
Identifier "intel"
Device "intel"
EndSection
 
Old 01-07-2022, 08:42 AM   #12
hatersgottahate
LQ Newbie
 
Registered: Oct 2021
Location: The UK
Distribution: arch btw
Posts: 26
Blog Entries: 8

Rep: Reputation: Disabled
Quote:
Originally Posted by vladimir1986 View Post
Hey there, I would love if someone can find a fix for this annoying problem:

Every time I try to startx on my laptop (with a Quadro M2000M), I just get a black screen. You can actually find the exact same problem here https://wiki.archlinux.org/title/NVI..._at_X_shutdown, but none of the solutions work.

So far I have KDE5 installed with SDDM, and I3. KDE5 always worked (I am using the X11 version, not wayland). I3 is the one who gets a black screen if I use Startx. Using SDDM makes it work (but my goal was to avoid using a graphic manager to start X. Tried other ones, like xdm, but I get a black screen)

I am quite sure It is a Nvidia driver issue, because I have other partitions with different Linux distros and FreeBSD, and using Nouveau I have 0 problems. The thing is that I am sort of using this Arch partition to play videogames, so I want to be able to use the full potential of my GPU.

BTW. I get no warnings: X server starts fine and I can ssh into my system. It is just that I silently get a black screen.
Get an AMD GPU. Nvidia is known to have the worst Linux drivers in existance. Explains your black screen
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why not a forum for 'Balck Hat Hacking' lali.p General 2 05-08-2007 03:57 AM
a complete balck list for filtering baambooli Linux - General 1 11-29-2006 07:53 AM
nvidia full screen videos to TV screen nutz Linux - Software 3 09-21-2005 08:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch

All times are GMT -5. The time now is 03:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration