Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Monitor gets no signal after exiting X session
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
medaron
n00b
n00b


Joined: 25 Jan 2016
Posts: 16
Location: NY

PostPosted: Sat Jun 22, 2019 1:31 pm    Post subject: Monitor gets no signal after exiting X session Reply with quote

Hello,

I am using the Emacs window manager (exwm) in conjunction with the proprietary Nvidia drivers. The X session is started via `startx` with the following line in my .xinitrc:
Code:
exec ck-launch-session dbus-launch --sh-syntax --exit-with-session emacs


Before I start X or during the X session, I can switch to TTYs without problems. However, when I exit the X session and drop to the TTY my monitor does not get any signal and I have to reboot.
I can still ssh into the machine and neither dmesg nor the X.org log show any unexpected messages. Consequently, I am at a loss how to debug this any further and would appreciate any advise.

Additional information:
Following the Gentoo wiki, I also tried disabling all framebuffer devices besides the simple framebuffer and tried vga=normal to no avail.

emerge --info
Code:

Portage 2.3.67 (python 3.6.8-final-0, default/linux/amd64/17.1, gcc-9.1.0, glibc-2.29-r2, 5.1.12-gentoo x86_64)
=================================================================
System uname: Linux-5.1.12-gentoo-x86_64-AMD_Ryzen_Threadripper_2950X_16-Core_Processor-with-gentoo-2.6
KiB Mem:    32803016 total,   9327868 free
KiB Swap:   33554428 total,  33554428 free
Timestamp of repository gentoo: Sat, 22 Jun 2019 12:30:01 +0000
Head commit of repository gentoo: b8a603506cb2bf061a03f12fc5e206073f903375
sh bash 5.0_p7
ld GNU ld (Gentoo 2.32 p2) 2.32.0
app-shells/bash:          5.0_p7::gentoo
dev-lang/perl:            5.30.0::gentoo
dev-lang/python:          2.7.16::gentoo, 3.6.8::gentoo
dev-util/cmake:           3.14.5::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.41.2::gentoo
sys-apps/sandbox:         2.17::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.32-r1::gentoo
sys-devel/gcc:            9.1.0-r1::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.0-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts:
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1

axel
    location: /var/lib/layman/axel
    sync-type: laymansync
    sync-uri: https://vcs.axel-fischer.net/axel/gentoo-overlay.git
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    sync-type: laymansync
    sync-uri: https://github.com/anyc/steam-overlay.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j32"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X acl acpi alsa alsa-plugin amd64 berkdb branding bzip2 cairo clang cli consolekit crypt cxx dbus device-mapper djvu dri dri3 drm egl emacs exif ffmpeg flac fontconfig gbm gdbm gif git gold harfbuzz hwaccel iconv icu imagemagick ipv6 jit jpeg jpeg2k jumbo-build latex libnotify libtirpc llvm lto lvm mime mp3 mp4 mpeg mpi multilib ncurses network nls nptl nvidia offensive openal opengl openmp pam pango pcre pdf pgo png policykit pulseaudio readline seccomp smp sna sound spell ssl svg syslog taglib tcpd threads tiff truetype udev udisks unicode upower usb vdpau videos vulkan xattr xcb xdg xft xinerama xkb xmpp xscreensaver zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en-US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" QEMU_SOFTMMU_TARGETS="x86_64" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21635

PostPosted: Sat Jun 22, 2019 4:16 pm    Post subject: Reply with quote

If you blindly start a new X session, does the video signal return? Can you reproduce this problem on an untainted kernel?
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6098
Location: Dallas area

PostPosted: Sat Jun 22, 2019 4:46 pm    Post subject: Reply with quote

If you unplug the monitor (pull the hdmi/vga/displayport cable) then replug does it come back?

Edit to add: also which nvidia drivers and make/model of nvidia card and monitor
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
medaron
n00b
n00b


Joined: 25 Jan 2016
Posts: 16
Location: NY

PostPosted: Sat Jun 22, 2019 5:36 pm    Post subject: Reply with quote

Thanks for the replies!

Hu wrote:
If you blindly start a new X session, does the video signal return? Can you reproduce this problem on an untainted kernel?


Yes, the signal returns if I blindly start a new X session. The problem does not occur with the Nouveau drivers.

Anon-E-moose wrote:
If you unplug the monitor (pull the hdmi/vga/displayport cable) then replug does it come back?

Edit to add: also which nvidia drivers and make/model of nvidia card and monitor


Unplugging and replugging the HDMI cable does not bring the signal back. I am using version 430.26 of the nvidia-drivers package. The card is an Asus Strix RTX 2080TI. The monitor is an LG 27UK850-W.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54244
Location: 56N 3W

PostPosted: Sat Jun 22, 2019 6:45 pm    Post subject: Reply with quote

medaron,

Is the system failing to return to the console tty?

If you do Ctl-Alt-F1 do you get your video signal back?
Then Ctl-Alt-F7 makes it go away again?

Which console driver are you using?

All of dmesg and your kernel .config on two pastebins would be good.
Do you use UEFI mode or BIOS mode to boot?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6098
Location: Dallas area

PostPosted: Sat Jun 22, 2019 7:12 pm    Post subject: Reply with quote

medaron wrote:
Thanks for the replies!

Hu wrote:
If you blindly start a new X session, does the video signal return? Can you reproduce this problem on an untainted kernel?


Yes, the signal returns if I blindly start a new X session. The problem does not occur with the Nouveau drivers.

Anon-E-moose wrote:
If you unplug the monitor (pull the hdmi/vga/displayport cable) then replug does it come back?

Edit to add: also which nvidia drivers and make/model of nvidia card and monitor


Unplugging and replugging the HDMI cable does not bring the signal back. I am using version 430.26 of the nvidia-drivers package. The card is an Asus Strix RTX 2080TI. The monitor is an LG 27UK850-W.


Sounds like the nvidia driver isn't resetting the LG monitor when changing back to console mode.
Have you looked to see if nvidia-settings (or whatever they're calling it nowadays) can tell the card to reset.
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
medaron
n00b
n00b


Joined: 25 Jan 2016
Posts: 16
Location: NY

PostPosted: Sun Jun 23, 2019 1:20 pm    Post subject: Reply with quote

NeddySeagoon wrote:
medaron,

Is the system failing to return to the console tty?

If you do Ctl-Alt-F1 do you get your video signal back?
Then Ctl-Alt-F7 makes it go away again?

Which console driver are you using?

All of dmesg and your kernel .config on two pastebins would be good.
Do you use UEFI mode or BIOS mode to boot?


Yes, the system is failing to return to the console TTY. After exiting X, Ctrl-Alt-F1 to F7 all don't receive any signal.

dmesg: https://pastebin.com/DYTeBzaZ
kernel config: https://pastebin.com/1EhfKYiE

I am using UEFI mode to boot. I am not quite sure to check, which console driver is actually in use. I assumed it would have a link to the driver in /sys/class/tty1, but that is not the case.

Anon-E-moose wrote:

Sounds like the nvidia driver isn't resetting the LG monitor when changing back to console mode.
Have you looked to see if nvidia-settings (or whatever they're calling it nowadays) can tell the card to reset.


I looked through the nvidia-settings application and the available documentation. Unfortunately, I was not able to find any setting regarding this.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6098
Location: Dallas area

PostPosted: Sun Jun 23, 2019 4:13 pm    Post subject: Reply with quote

if you have nvidia-smi built (I assume it's still in the nvidia drivers package) then look at the man page on it.

There should be an option to reset the card. Might or might not work, I've seen posts going either way.

Or if you've got nvidia loaded as modules
Code:
sudo rmmod nvidia_uvm ; sudo modprobe nvidia_uvm


Again might or might not work, if it works I would alias it to something easy to remember and easy to type blind. ;)

Edit to add: re: removing modules, I'm not sure what they're called nowadays, as I haven't run nvidia in a long time, but whatever they are might be able to be removed and readded (which theoretically should reset the card)
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54244
Location: 56N 3W

PostPosted: Sun Jun 23, 2019 6:24 pm    Post subject: Reply with quote

medaron,

I can tell what's happening but not why.

Your kernel is using simpleframebuffer for the console.
dmesg:
[    0.757638] simple-framebuffer simple-framebuffer.0: fb0: simplefb registered!

Its so simple that the kernel can only draw on it after something else has set it up.

I suspect that exiting Xorg makes nvidia-drivers reset the GPU, so the settings for simpleframebuffer are lost.
vesafb should work.
Its listed in your kernel
Code:
CONFIG_FB_VESA=y
but its not in dmesg, which makes me think the kernel you are running did not come from the .config you posted.
Your running kernel is
Code:
[    0.000000] Linux version 5.1.12-gentoo (root@planck) (gcc version 9.1.0 (Gentoo 9.1.0-r1 p1.1)) #1 SMP Fri Jun 21 08:41:36 EDT 2019

So that kernel was built at Fri Jun 21 08:41:36 EDT 2019. Have you made another kernel since then?

If you boot in EFI mode, then
Code:
# CONFIG_FB_EFI is not set
is also an option for you.
You have EFI
Code:
[    0.000000] efi: EFI v2.60 by American Megatrends

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
medaron
n00b
n00b


Joined: 25 Jan 2016
Posts: 16
Location: NY

PostPosted: Sat Jun 29, 2019 7:18 pm    Post subject: Reply with quote

Thanks again for your help, NeddySeagoon and Anon-E-moose!

Anon-E-moose wrote:
if you have nvidia-smi built (I assume it's still in the nvidia drivers package) then look at the man page on it.

There should be an option to reset the card. Might or might not work, I've seen posts going either way.

Or if you've got nvidia loaded as modules
Code:
sudo rmmod nvidia_uvm ; sudo modprobe nvidia_uvm


Again might or might not work, if it works I would alias it to something easy to remember and easy to type blind. ;)

Edit to add: re: removing modules, I'm not sure what they're called nowadays, as I haven't run nvidia in a long time, but whatever they are might be able to be removed and readded (which theoretically should reset the card)


I tried and removed the nvidia modules and loaded them again. Unfortunately, it didn't bring the signal back.

NeddySeagoon wrote:
medaron,

I can tell what's happening but not why.

Your kernel is using simpleframebuffer for the console.
dmesg:
[    0.757638] simple-framebuffer simple-framebuffer.0: fb0: simplefb registered!

Its so simple that the kernel can only draw on it after something else has set it up.

I suspect that exiting Xorg makes nvidia-drivers reset the GPU, so the settings for simpleframebuffer are lost.
vesafb should work.
Its listed in your kernel
Code:
CONFIG_FB_VESA=y
but its not in dmesg, which makes me think the kernel you are running did not come from the .config you posted.
Your running kernel is
Code:
[    0.000000] Linux version 5.1.12-gentoo (root@planck) (gcc version 9.1.0 (Gentoo 9.1.0-r1 p1.1)) #1 SMP Fri Jun 21 08:41:36 EDT 2019

So that kernel was built at Fri Jun 21 08:41:36 EDT 2019. Have you made another kernel since then?

If you boot in EFI mode, then
Code:
# CONFIG_FB_EFI is not set
is also an option for you.
You have EFI
Code:
[    0.000000] efi: EFI v2.60 by American Megatrends


I am fairly certain that this config was used to build the kernel from which the dmesg was posted. The modification date and time of the .config matched the build time and I also now checked if CONFIG_FB_VESA=y was in /proc/config.gz. It was.
I now built 5.1.15 with different configs. Twice with the simple framebuffer disabled and one of uvesa and efifb enabled. In both cases I don't see any additional output on the monitor after "Loading initial ramdisk". With the simple framebuffer enabled, it works again but the original problem persists.

The Gentoo wiki also says the following:
Quote:

For (U)EFI systems, uvesafb will not work. Be warned that enabling efifb support in kernel (CONFIG_FB_EFI=y) causes intermittent problems with the initialization of the NVIDIA drivers. There are reports of success from marking legacy framebuffers as generic and enabling the simple framebuffer while disabling all others:

This was the reason why I did not enable efifb.

Edit: When I only had uvesafb or efifb enabled, I didn't see any message regarding those framebuffers through dmesg. Maybe they are indeed incompatible with the proprietary nvidia-drivers and don't get loaded?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum