You are not logged in.

#1 2019-11-12 23:52:03

_dodger_
Member
Registered: 2019-11-12
Posts: 3

Lenovo T490: Issue getting NVidia card to work (black screen)

Hi,

I have a Lenovo T490 with a NVidia MX250 and an integrated Intel card.

I have trouble getting the NVidia card to work. I'm using X (starting it manually using startx) with bspwm (no Wayland) and I have followed the manual from the Wiki (I believe).

1. Installed the nvidia package
2. Created a xorg.conf file with the contents from the Wiki (converted hex to dec etc.)
3. Added the xrandr lines to .xinitrc

But every time I run startx all I get is a black screen. When I mess up the pci bus id for example I get an error message so I believe all of that to be correct.

I think I've tried every solution/troubleshooting hint I could find so now I'm turning here in the hopes that someone can help me.

I'm happy to provide any logs/config files that might help.

Thank you!

Offline

#2 2019-11-13 06:58:21

_dodger_
Member
Registered: 2019-11-12
Posts: 3

Re: Lenovo T490: Issue getting NVidia card to work (black screen)

This is a link to a Xorg.0.log file from one of those runs: https://pastebin.com/ubPaDJKw

And this is the contents of my 20-nvidia.conf file for Xorg:

Section "Module"
    Load "modesetting"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:60:00:0"
    Option "AllowEmptyInitialConfiguration"
EndSection

Last edited by _dodger_ (2019-11-13 07:04:43)

Offline

#3 2019-11-13 08:16:45

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 7,973

Re: Lenovo T490: Issue getting NVidia card to work (black screen)

Please post your .xinitrc as well as

lspci | egrep 'VGA|3D'

FWIW from that xorg log runs correctly but you don't give it anything to execute. You probably also want to generally enable modesetting instead of disabling, it helps with a few corner cases.

Offline

#4 2019-11-13 08:38:27

_dodger_
Member
Registered: 2019-11-12
Posts: 3

Re: Lenovo T490: Issue getting NVidia card to work (black screen)

.xinitrc

#!/bin/sh
# Copied over and adapted from /etc/X11/xinit/xinitrc
#
# Ansible managed
#

xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then
    xrdb -merge "$userresources"
fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi

exec bspwm
➜  ~ lspci | egrep 'VGA|3D'
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (Whiskey Lake) (rev 02)
3c:00.0 3D controller: NVIDIA Corporation GP108M [GeForce MX250] (rev a1)

And for reference the bspwmrc file

#! /bin/sh

sxhkd -m 1 &


bspc monitor -d 1 2 3 4 5 6 7 8 9 10

bspc config border_width         2
bspc config window_gap          12

bspc config split_ratio          0.52
bspc config borderless_monocle   true
bspc config gapless_monocle      true

bspc rule -a VLC state=floating
bspc rule -a firefox desktop='^1'
firefox &

bspc rule -a Google Chrome desktop='^2'

bspc rule -a URxvt desktop='^3' 
urxvt &

setxkbmap de neo -option

xrandr --output eDP-1 --scale 0.9x0.9

redshift-gtk &
compton &
$HOME/.config/polybar/launch.sh

I see that a firefox process is running and as soon as I remove the 20-nvidia.conf file (and don't change anything else) everything works.

I believe to have modesetting enabled now. The run from the log I've shown was another experiment (found on the Wiki). I added the nvidia modules to mkinitcpio

MODULES=(nvidia nvidia_modeset nvidia_drm nvidia_uvm)

Thank you for looking at this!

Offline

#5 2019-11-19 16:41:21

kwiatek87
Member
Registered: 2019-11-19
Posts: 1

Re: Lenovo T490: Issue getting NVidia card to work (black screen)

Hello, I had the same problem several months ago when I was trying to install Arch on my Lenovo T480 for a first time.
When I was "pointing" for a NVIDIA as my default card I was getting black screen.
This was because hybrid graphic card. Try to install and configure Bumblebee.
This video helped me out https://www.youtube.com/watch?v=BKxarfdsvCI

Last edited by kwiatek87 (2019-11-19 16:45:25)

Offline

#6 2019-11-19 17:08:56

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 7,973

Re: Lenovo T490: Issue getting NVidia card to work (black screen)

@kwaltek We know, that's why we do the configuration we are doing here, this will have more perf than bbswitch/bumblebee

@_dodger_

Looks alrightish, FWIW try omitting the xorg.conf completely, and moving the xrandr calls directly before your exec bpwsm

Offline

Board footer

Powered by FluxBB