Solved Black Screen with ASUS GeForce GT 1030 under X11

This one is driving me nuts. My HW:
  • Graphics card (bought new): ASUS GeForce GT 1030, low profile silent, GT1030-SL-2G-BRK, 2GB GDDR5, DVI, HDMI.
  • Monitor (two years old): BenQ EW3280U 3840x2160
Symptom: X starts, but results in a black screen, which puts monitor connected via HDMI in such a state, it would not even bring up its on-screen menu (requires HDMI disconnect and monitor power cycle). This is on a newly built PC (AMD Ryzen 5000 without internal GPU), installed with FreeBSD-14.0-CURRENT-amd64-20220317-4f75af31a86-253814-memstick.img

All the usual X11 related procedures have been carried out, such as
  • run nvidia-xconfig to create initial /etc/X11/xorg.conf using nvidia driver
  • kldload nvidia-modeset
  • There are no errors in /var/log/Xorg.0.log (see attached file). In fact the X session is completely up and running as evidenced by ssh'ing into the box and running ps ax

Code:
47247  -  Ss      0:00.01 /usr/bin/ssh-agent startx -- -s 120 -dpi 150 -v
47245 v0  I+      0:00.01 /bin/sh /usr/local/bin/startx -- -s 120 -dpi 150 -v
47246 v0  IC+     0:00.00 tee x.out
47266 v0  I+      0:00.00 xinit /home/schweikh/.xinitrc -- /usr/local/bin/X :0 -s 120 -dpi 150 -v -auth /home/schweikh/.serverauth.47245
47267 v0  S       0:02.39 /usr/local/bin/Xorg :0 -s 120 -dpi 150 -v -auth /home/schweikh/.serverauth.47245
47269 v0  I       0:00.00 sh /home/schweikh/.xinitrc
47324 v0  S       0:00.03 xload -geometry 1558x108+350+1 -nolabel -fg peachpuff -bg burlywood4 -hl rgb:50/30/40
47325 v0  S       0:07.26 xplanet -projection rectangular -wait 300
47330 v0  I       0:00.03 xterm -display :0 -geometry 124x65  -geometry 124x
47331 v0  I       0:00.03 xterm -display :0 -geometry 124x65  -geometry 124x
47332 v0  I       0:00.03 xterm -display :0 -geometry 124x65  -geometry 124x
47333 v0  I       0:00.03 xterm -display :0 -geometry 124x65  -geometry 124x
47334 v0  I       0:00.03 fvwm -f /home/schweikh/.fvwmrc.hal9000
47349 v0  I       0:00.01 /usr/local/libexec/fvwm/2.6.9/FvwmPager 7 4 none 0 8 *

What I've tried:

0. Ctrl-Alt-F1 through F12 to maybe find a console where the screen went.

1. Go back from nvidia-driver-470.86 to older ones.
$ pkg search nvidia-driver nvidia-driver-470.86 NVidia graphics card binary drivers for hardware OpenGL rendering nvidia-driver-304-304.137_9 NVidia graphics card binary drivers for hardware OpenGL rendering nvidia-driver-340-340.108_3 NVidia graphics card binary drivers for hardware OpenGL rendering nvidia-driver-390-390.144 NVidia graphics card binary drivers for hardware OpenGL rendering

$ sudo pkg remove nvidia-driver-470.86 nvidia-xconfig-470.86 $ sudo pkg install nvidia-driver-390-390.144
Same problem.

$ sudo pkg remove nvidia-driver-390-390.144 $ sudo pkg install nvidia-driver-340-340.108_3
Driver too old, reports it does not know the GPU.

2. Compile driver from x11/nvidia-driver and the kernel's /usr/src.
Same problem. (Yes, I pkg removed any nvidia-driver before that).

3. Tried an Ubuntu live CD. Black screen with first grub entry (high-res?) Works when booting second grub entry "Ubuntu (safe graphics)" in a low resolution mode. Don't know if that is X or just the Linux console frame buffer.

Monitor does not have a DVI port to try. Monitor works fine with X11 in 4K mode with my older box with a different nvidia GPU and the nvidia driver.

I'm running out of ideas to try next. Could the monitor be the culprit? It works fine in console mode and I don't have a spare handy.
 

Attachments

  • Xorg.0.log.txt
    12.1 KB · Views: 138
Just install "x11/nvidia-driver", and add
Code:
kld_list="nvidia-modeset"
to your /etc/rc.conf. Don't use an auto-generated xorg.conf, instead just add the driver to help X11 starting up:
Code:
jo@freya ~>  cat /usr/local/etc/X11/xorg.conf.d/10-nvidia.conf
Section "Device"
        Identifier "NVIDIA Card"
        VendorName "NVIDIA Corporation"
        Driver "nvidia"
EndSection
That's it.
 
Thanks.

What's the content of your ~/.xinitrc?

If you remove (or set aside) the file then install SDDM, does a user session work? (On FreeBSD, it's designed to work without the file.)

If you preset (I don't know how) to 1920x1080 before starting X, is there blackness?



Comparisons

Do you get the desktop environment if you boot from the installer for GhostBSD? <https://www.ghostbsd.org/download>

There's also NomadBSD <https://nomadbsd.org/download.html>.

Of the two, GhostBSD might be quicker to download and test.
 
Here's my .xinitrc. Nothing funky in there, I guess.
#!/bin/sh
#
# $Revision: 1.25 $
set -x
cd || echo "cd failed..."
. ./.envars

# A hack to determine FACENAME's ($1) character cell size in pixels:
# Start two short-lived terminals with different geometries, ask
# for dimensions and compute the difference in dimensions.
#
determine_term_cell_dimensions () {
face=$1
tmpfile=$(mktemp -t xinit.XXXXXX)
cmd="xwininfo -id \$WINDOWID | awk '/Width:|Height:/ {print \$2}' >> $tmpfile"
xterm -fa "$face" -geometry 20x10 -iconic -e "$cmd"
xterm -fa "$face" -geometry 21x11 -iconic -e "$cmd"
# shellcheck disable=2046
set -- $(cat "$tmpfile")
rm "$tmpfile"
unset cmd face tmpfile
export TERM_CELL_WIDTH=$(($3-$1))
export TERM_CELL_HEIGHT=$(($4-$2))
}

set_font_path () {
# Don't rely on xorg.conf for fonts because it gets stale quickly.
# Tell X about system and local fonts, if any.
xset fp= "$HOME/.fonts,built-ins"
find /usr/local/share/fonts "$HOME/lib/fonts" -name fonts.dir |
while IFS= read -r w; do
xset fp+ "${w%/fonts.dir}"
done
xset fp rehash
xsetroot -cursor_name left_ptr
#xset +fp "$HOME/lib/fonts" # For the bigger cursor font.
}

load_xdefaults () {
if test -r .Xdefaults; then
xrdb -merge .Xdefaults
fi
}

determine_X11_dimensions () {
# Initialize some environment variables with display characteristics.
eval "$(xdpyinfo | awk '
/^ dimensions:/ {print "export X11_DIMENSIONS="$2;}
/^ depth of root window:/ {print "export X11_DEPTH="$5;}'
)"
export X11_WIDTH="${X11_DIMENSIONS%x*}"
export X11_HEIGHT="${X11_DIMENSIONS#*x}"
export TOP_MARGIN=126
}

tune_mouse () {
case $X11_WIDTH in
(3840|4096)
xset m 8 8 # Tune the mouse; m [acceleration [threshold]]
#mouse1=$(xinput list --id-only Mouse1)
#xinput set-prop "$mouse1" 263 30 Complains, does not work.
#unset mouse1
;;
(*)
xset m 2 3 # Tune the mouse; m [acceleration [threshold]]
esac
}

determine_term_dimensions () {
# Unavailable height (pixels):
# TOP_MARGIN + 2*WMBorder + WMTitle + XTermMenuBar
export TERM_LINES=$(((X11_HEIGHT - TOP_MARGIN - 70) / TERM_CELL_HEIGHT))
# Unavailable width per xterm (pixels):
# 2*WMBorder + 2*XtermBorder + XTermScrollbar + Margin.
unavail=$((2*7 + 2*1 + 36 + 2))
num_xterms=2
export TERM_COLUMNS=$(((X11_WIDTH/num_xterms - unavail) / TERM_CELL_WIDTH))
unset unavail num_xterms
}

set_tool_geometries () {
case $X11_WIDTH in
(4096)
TIN_GEOMETRY="${TERM_COLUMNS}x${TERM_LINES}+2064+${TOP_MARGIN}"
XLOAD_GEOMETRY="1680x108+350+1"
CONSOLE_GEOMETRY="$(((X11_WIDTH - 2100) / 10))x5+$((X11_WIDTH / 2))+1"
TERM1_GEOMETRY="${TERM_COLUMNS}x${TERM_LINES}+8+${TOP_MARGIN}"
TERM2_GEOMETRY="${TERM_COLUMNS}x${TERM_LINES}+2056+${TOP_MARGIN}"
;;
(3840)
TIN_GEOMETRY="${TERM_COLUMNS}x${TERM_LINES}+1940+${TOP_MARGIN}"
XLOAD_GEOMETRY="1558x108+350+1"
CONSOLE_GEOMETRY="$(((X11_WIDTH - 2000) / 10))x5+$((X11_WIDTH / 2))+1"
TERM1_GEOMETRY="${TERM_COLUMNS}x${TERM_LINES}+2+${TOP_MARGIN}"
TERM2_GEOMETRY="${TERM_COLUMNS}x${TERM_LINES}+1922+${TOP_MARGIN}"
;;
(*)
TIN_GEOMETRY="${TERM_COLUMNS}x${TERM_LINES}+976+${TOP_MARGIN}"
XLOAD_GEOMETRY="640x108+350+1"
CONSOLE_GEOMETRY="86x5+1004+1"
TERM1_GEOMETRY="${TERM_COLUMNS}x${TERM_LINES}+1+${TOP_MARGIN}"
TERM2_GEOMETRY="${TERM_COLUMNS}x${TERM_LINES}+961+${TOP_MARGIN}"
;;
esac
export TIN_GEOMETRY XLOAD_GEOMETRY CONSOLE_GEOMETRY
export TERM1_GEOMETRY TERM2_GEOMETRY
}

tune_keyboard () {
# Keyboard config for Xorg 7.3 is buggy, xorg.conf settings are ignored.
# Hald also starts up with the english layout by default.
setxkbmap -model pc105 -layout de -variant nodeadkeys
# Xorg 7.4 does not set this by default, as 7.3 did.
# This is equivalent to Option "DontZap" "off"
# in the section "ServerFlags" of "/etc/X11/xorg.conf".
setxkbmap -option terminate:ctrl_alt_bksp
setxkbmap -option srvrkeys:none # Enable DontVTSwitch.
setxkbmap -option caps:none # Disable caps lock. It gets in the way too often.
xset r on # Turn on key repetition.
}

################################################################################

#export FACENAME="Bitstream Vera Sans Mono:size=12"
#export FACENAME="DejaVu Sans Mono:size=12"
#export FACENAME="Go Mono:size=12"
export FACENAME="Iosevka Fixed Curly Light:size=12"
determine_X11_dimensions
set_font_path
load_xdefaults
tune_mouse
determine_term_cell_dimensions "$FACENAME"
determine_term_dimensions
set_tool_geometries
tune_keyboard

xset -dpms # No standby or suspend modes; interferes with movies.

# Start some nice programs.

xload -geometry "$XLOAD_GEOMETRY" -nolabel \
-fg peachpuff -bg burlywood4 -hl rgb:50/30/40 &

xplanet -projection rectangular -wait 300 &
#xsetroot -cursor_name X_cursor

firefox -geometry 2910x1800+2+${TOP_MARGIN} &
myxterm -geometry "$CONSOLE_GEOMETRY" \
-fn '-bitstream-*-medium-r-*-*-*-120-*-*-m-*-iso10646-*' \
-xrm '*RenderFont:false' -name Console &
myxterm -geometry "${TERM1_GEOMETRY}" -name zshell1 &
mytin &
# The Foo and Bar refer to "Style" declarations in .fvwmrc.<hostname>.
myxterm -geometry "${TERM1_GEOMETRY}" -name Foo &
myxterm -geometry "${TERM2_GEOMETRY}" -name Foo &
myxterm -geometry "${TERM1_GEOMETRY}" -name Bar &
myxterm -geometry "${TERM2_GEOMETRY}" -name Bar &

# Window manager specific stuff.
#WINDOW_MANAGER="startxfce4"
#WINDOW_MANAGER="fvwm-themes-start"
WINDOW_MANAGER="fvwm -f $HOME/.fvwmrc.$PROFILE_HOST"
echo "WINDOW_MANAGER=$WINDOW_MANAGER"
$WINDOW_MANAGER

# vim: tabstop=2 shiftwidth=2 expandtab syntax=sh

I tested booting GhostBSD-22.01.12-XFCE.iso. Once it starts X, black screen and "hung up" monitor as with FreeBSD and Ubuntu.
 
Thanks, but the install and load mechanism are not a problem. The kernel loads nvidia-modeset
I know. I wrote that to be complete (threads can be found by others). But what if you're following the second part of my reply? Also always good for tests: Reduce your ~/.xinitrc or ~/.xsession just to start f.e. a xterm as "window manager replacement" - nothing complex, and it helps to debug.
 
I know. I wrote that to be complete (threads can be found by others). But what if you're following the second part of my reply? Also always good for tests: Reduce your ~/.xinitrc or ~/.xsession just to start f.e. a xterm as "window manager replacement" - nothing complex, and it helps to debug.
I'm positive we have already ruled out a problem in .xinitrc. Both Ubuntu and GhostBSD Live CDs show a black screen and they don't use any of my files. Nevertheless I did it, echo xterm -fullscreen > ~/.xinitrc. Black screen as ever.
 
I got my hands on another monitor, BenQ V2400W (1920x1080), HDMI and DVI, and can report that I get an X11 screen via DVI, but not via HDMI. I believe that reduces the possible issues to either the graphic card's HDMI output or the HDMI cable. This is consistent with the observation that the X server runs and Xorg.0.log reports no errors.

I'll try swapping HDMI cables next.
 
Problem persists after swapping HDMI cables and physically reseating the graphics card in its PCI slot. Thus I conclude the graphics card's HDMI output signal is lost upon leaving VGA mode.
 
I get an X11 screen via DVI, but not via HDMI. I believe that reduces the possible issues to either the graphic card's HDMI output or the HDMI cable.
Or your auto-generated and unknown xorg.conf. Is there a reason why you don't try my second hint?
 
Or your auto-generated and unknown xorg.conf. Is there a reason why you don't try my second hint?
No other reason than time, fellow maze lover. Just replaced the /etc/X11/xorg.conf as you suggested and the alternative monitor reports "no signal" on the HDMI port. On the DVI I get X11 but mouse and keyboard are dead compared to my usable xorg.conf. Here it is.

Section "ServerLayout"
Identifier "Simple Layout"
Screen "Screen 1" 0 0
InputDevice "Mouse1" "CorePointer"
InputDevice "Keyboard1" "CoreKeyboard"
EndSection

Section "Module"
Load "glx"
EndSection

Section "ServerFlags"

# Option "AutoAddDevices" "boolean"
# If this option is disabled, then no devices will be added from
# HAL events. Enabled by default.
Option "AutoAddDevices" "false"
#Option "DontVTSwitch"
EndSection

Section "InputDevice"
Identifier "Keyboard1"
Driver "kbd"
Option "AutoRepeat" "500 30"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "de"
Option "XkbVariant" "nodeadkeys"
EndSection

Section "InputDevice"

# horizontal wheel to buttons 6 & 7. Change if your mouse has more than
# 3 buttons and you need to map the wheel to different button ids to avoid
# conflicts.
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "Auto" # Auto detect
Option "Device" "/dev/sysmouse"
# Mouse wheel mapping. Default is to map vertical wheel to buttons 4 & 5,
Option "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
Identifier "BenQ-1920"
VendorName "BenQ"
ModelName "V2400W"
EndSection

Section "Monitor"
Identifier "BenQ-3840"
VendorName "BenQ"
ModelName "EW3280U"
#DisplaySize 700 400 reported by "xrandr -q", pretty good.
EndSection

Section "Device"
Identifier "GeForce 7900 GS"
Driver "nvidia"
EndSection

Section "Screen"
Identifier "Screen 1"
Device "GeForce 7900 GS"
Monitor "BenQ-3840"
DefaultDepth 24
# Option "ModeValidation" "NoVertRefreshCheck, NoHorizSyncCheck, NoMaxSizeCheck, NoMaxPClkCheck, AllowNonEdidModes, NoEdidMaxPClkCheck"
Option "UseEdidDpi" "False"
SubSection "Display"
Depth 24
Modes "3840x2160" "1920x1080"
EndSubSection
EndSection
 
Does the same hardware combination (display + card + HDMI) work with a non-Ubuntu Linux?
No. I tried today's CentOS 9 Stream iso. Black Screen on both monitors with intermittent "no signal" reports from the monitors, good X11 on the BenQ V2400W with DVI the moment I connect it. Is there any theory other than "the card's HDMI port does not work correctly"?
 
Is there any theory other than "the card's HDMI port does not work correctly"?
Yes there is. I swapped the input port of the monitor to the other HDMI, lo and behold, everything works. Aaah, shoot me. There was a clue in my first posting that the monitor could be the culprit. Wedging it so the on-screen display would no longer work should have been a tell.

Thanks everyone for your suggestions!
 
Back
Top