Laptop only displays graphics on an external monitor

Hi everyone. I am a new OpenSUSE user and I have freshly installed Leap 15.3 (with gnome desktop) on my new HP Pavillion 15 laptop. Currently when I turn on the laptop grub 2 shows up normally, I choose to boot into the OpenSUSE installation, After that a black screen with some logs pops up after which the laptop screen freezes. At that point the graphics get displayed on the external monitor if it is connected. If the monitor is disconnected no more output is shown. The laptop screen remains frozen the whole time.
Here is the info I can give you:


uname -r

5.3.18-59.24-default


lspci -nnk | grep VGA

01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA107M [GeForce RTX 3050 Ti Mobile] [10de:25a0] (rev a1)
05:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne [1002:1638] (rev c5)

The first time I booted the laptop only the built-in display was working although at a lower resolution (1024x768) than possible (1920x1080). In order to get the second monitor working as well as to take advantage of my nvidia card I installed the nvidia drivers as described in https://en.opensuse.org/SDB:NVIDIA_drivers . I still had some problems which led me to install the suse-prime package. This is when the behaviour described in the beginning of the post started. I also have the amdGPU drivers installed.

I believe my problem has something to do with the X server configuration. This is the contents of the config directory.


ls /etc/X11/xorg.conf.d

00-keyboard.conf  10-quirks.conf    50-elotouch.conf    70-vmmouse.conf
10-amdgpu.conf    11-evdev.conf     50-extensions.conf  70-wacom.conf
10-evdev.conf     40-libinput.conf  50-monitor.conf     90-nvidia.conf
10-libvnc.conf    50-device.conf    50-screen.conf

Out of these files I suspect it is the 90-nvidia.conf file managing the most of it.


cat 90-nvidia.conf

Section "ServerLayout"
    Identifier "layout"
    Screen "nvidia"
    Inactive "intel"
    Inactive "modesetting"
EndSection


Section "Screen"
    Identifier "intel"
    Device "intel"
EndSection


Section "Device"
    Identifier "intel"
    Driver "intel"
EndSection


Section "Screen"
    Identifier "modesetting"
    Device "modesetting"
EndSection


Section "Device"
    Identifier "modesetting"
    Driver "modesetting"
EndSection


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


Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:1:0:0"
    Option "DPI" "96 x 96"
    Option "AllowEmptyInitialConfiguration"
    Option "AllowExternalGpus"
EndSection

Some of it is obviously wrong specifically the intel device and screen sections, but I am afraid of touching the config files by myself.
I have also tried deleting the /etc/X11/xorg.conf.d and /usr/share/X11/xorg.conf.d/ folders and running the X -configure command. This resulted in a *VGA Arbitration: cannot restore default device message.

*It also might be worth mentioning that pressing CTRL + ALT + F1 or switching to the multi-user.target (runlevel 3) results in output being displayed on the laptop screen. The built in display is then fully usable in text mode. I also have two keyboards configured: english and croatian with the croatian one being default. When switching to text mode the keyboard automatically switches to the croatian one, even if it was set to english manually while using the external monitor.

I am by no means an expert user so this is all the information I thought was useful, but I am more than happy to provide more. I’ve been breaking my head over this for a couple of days so any help you could provide would be greatly appreciated. ​
Thank you for your time,
Marko.

Try simply removing the “f” or “.” from 90-nvidia.conf (rename the file). Configuring X via /etc/X11/xorg.con*, while valid, is an anachronism, and the vast majority of the time, unnecessary, and it too often it disables functionality. The latter is the common result of trying to use the X -configure command.

What does 10-amdgpu.conf contain?

After renaming the 90-nvidia.conf file to 90-nvidiaconf laptop hangs with a blank screen and there is no display on the external monitor.


cat 10-amdgpu

Section "OutputClass"
    Identifier "AMDgpu"
    MatchDriver "amdgpu"
    Driver "amdgpu"
EndSection

Okay it seems that the X -configure command produced some output I was just stupid enough to oversee it. The command generated a file (content below) that seems to me should work, but the result is still the same as before.


cat xorg.conf

Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	Screen      1  "Screen1" RightOf "Screen0"
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection


Section "Files"
	ModulePath   "/usr/lib64/xorg/modules"
	FontPath     "/usr/share/fonts/misc:unscaled"
	FontPath     "/usr/share/fonts/Type1/"
	FontPath     "/usr/share/fonts/100dpi:unscaled"
	FontPath     "/usr/share/fonts/75dpi:unscaled"
	FontPath     "/usr/share/fonts/ghostscript/"
	FontPath     "/usr/share/fonts/cyrillic:unscaled"
	FontPath     "/usr/share/fonts/misc/sgi:unscaled"
	FontPath     "/usr/share/fonts/truetype/"
	FontPath     "built-ins"
EndSection


Section "Module"
	Load  "glx"
	Load  "vnc"
	Load  "glxserver_nvidia"
EndSection


Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
EndSection


Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/input/mice"
	Option	    "ZAxisMapping" "4 5 6 7"
EndSection


Section "Monitor"
	Identifier   "Monitor0"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
EndSection


Section "Monitor"
	Identifier   "Monitor1"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
EndSection


Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "Accel"              	# <bool>]
        #Option     "SWcursor"           	# <bool>]
        #Option     "EnablePageFlip"     	# <bool>]
        #Option     "SubPixelOrder"      	# <str>]
        #Option     "ZaphodHeads"        	# <str>
        #Option     "AccelMethod"        	# <str>
        #Option     "DRI3"               	# <bool>]
        #Option     "DRI"                	# <i>
        #Option     "ShadowPrimary"      	# <bool>]
        #Option     "TearFree"           	# <bool>]
        #Option     "DeleteUnusedDP12Displays" 	# <bool>]
	Identifier  "Card0"
	Driver      "amdgpu"
	BusID       "PCI:5:0:0"
EndSection


Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "SWcursor"           	# <bool>]
        #Option     "HWcursor"           	# <bool>]
        #Option     "NoAccel"            	# <bool>]
        #Option     "ShadowFB"           	# <bool>]
        #Option     "VideoKey"           	# <i>
        #Option     "WrappedFB"          	# <bool>]
        #Option     "GLXVBlank"          	# <bool>]
        #Option     "ZaphodHeads"        	# <str>
        #Option     "PageFlip"           	# <bool>]
        #Option     "SwapLimit"          	# <i>
        #Option     "AsyncUTSDFS"        	# <bool>]
        #Option     "AccelMethod"        	# <str>
        #Option     "DRI"                	# <i>
	Identifier  "Card1"
	Driver      "nouveau"
	BusID       "PCI:1:0:0"
EndSection


Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	SubSection "Display"
		Viewport   0 0
		Depth     1
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection


Section "Screen"
	Identifier "Screen1"
	Device     "Card1"
	Monitor    "Monitor1"
	SubSection "Display"
		Viewport   0 0
		Depth     1
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection

Install inxi with

zypper addrepo https://download.opensuse.org/repositories/utilities/openSUSE_Leap_15.3/utilities.repo
zypper refresh
zypper install inxi

Then post

inxi -aFz

ILL you had installed nouveau drivers with OS installation.
Then you installed Nvidia drivers.
Additionally you tried to configure dual graphics with default settings for laptop: integrated Intel + discrete Nvidia.
But you have AMD + Nvidia.
How can it goes wrong? …:wink:

IMHO it is better to perform fresh installation with AMD graphics by default and without installation of nouveau drivers.
Then check your OS - how it runs.
Possibly you’ll need newer kernel than Leap 15.3 is using by default.
Then you’ll try to install Nvidia drivers for dual graphics.

Why do you want to litter the thread with all that noise for a graphics problem? inxi -Gayz or inxi -SGayz (includes kernel cmdline) is all that’s needed, besides the basic graphics diagnostic: Xorg.0.log.

OP, please do

cat /var/log/Xorg.0.log | susepaste

and provide the resulting URLs here. If a file not found results, instead do:

cat ~/.local/share/xorg.Xorg.0.log | susepaste

First of all I’d like to thank you all for the responses so far.

I took Svyatko’s advice and reinstalled the system completely (you were right I installed a bunch of stuff and didn’t know exactly what I was doing).
The state of the system after doing this is that the laptop now displays on the in built monitor though in a lower resolution (1024 x 768).


inxi -Gayz
Graphics:
  Device-1: NVIDIA GA107M [GeForce RTX 3050 Ti Mobile] 
  vendor: Hewlett-Packard driver: N/A bus ID: 01:00.0 chip ID: 10de:25a0 
  Device-2: AMD Cezanne vendor: Hewlett-Packard driver: N/A bus ID: 05:00.0 
  chip ID: 1002:1638 
  Device-3: IMC Networks HP TrueVision HD Camera type: USB driver: uvcvideo 
  bus ID: 3-3:2 chip ID: 13d3:56c9 serial: <filter> 
  Display: x11 server: X.org 1.20.3 compositor: gnome-shell v: 3.34.5 
  driver: nouveau unloaded: amdgpu resolution: <xdpyinfo missing> 
  OpenGL: renderer: llvmpipe (LLVM 11.0.1 256 bits) v: 4.5 Mesa 20.2.4 
  compat-v: 3.1 direct render: Yes 

Although I canceled the noveau driver in the installer it still seems to be here.
Here is the log file output: https://susepaste.org/64585380

That log is from an aborted X session that I doubt could have been responsible for the above inxi output. The last bolding highlights the fact that the nouveau DDX (from xf86-video-nouveau and xorg-x11-driver-video installation) is in use instead of the upstream default modesetting DIX. AFAICT, that inxi is apparently from the broken old version provided by 15.3. It shouldn’t be claiming no kernel driver has loaded for either GPU (previous boldings). Inxi needs to be run with the -U switch, then -Gayz run again - after installing xdpyinfo.

After updating inxi the output is:


inxi -U
inxi -Gayz

Graphics:
  Device-1: NVIDIA GA107M [GeForce RTX 3050 Ti Mobile] vendor: Hewlett-Packard 
  driver: N/A alternate: nouveau bus-ID: 01:00.0 chip-ID: 10de:25a0 
  class-ID: 0300 
  Device-2: AMD Cezanne vendor: Hewlett-Packard driver: N/A bus-ID: 05:00.0 
  chip-ID: 1002:1638 class-ID: 0300 
  Device-3: IMC Networks HP TrueVision HD Camera type: USB driver: uvcvideo 
  bus-ID: 3-3:2 chip-ID: 13d3:56c9 class-ID: 0e02 serial: <filter> 
  Display: x11 server: X.org 1.20.3 compositor: gnome-shell v: 3.34.5 driver: 
  loaded: nouveau unloaded: amdgpu resolution: <missing: xdpyinfo> 
  OpenGL: renderer: llvmpipe (LLVM 11.0.1 256 bits) v: 4.5 Mesa 20.2.4 
  compat-v: 3.1 direct render: Yes 



Are kernel-default-extra and kernel-firmware installed? If not, install them.

If IceWM is not installed, install it, and try it instead of a Gnome session, to see whether Gnome is involved at all.

Has the new installation been tried with no /etc/X11/xorg.conf file? Much of the one generated by X --configure is just noise. Module, files and inputdevice sections can be discarded. Driver lines can be removed from device sections, may need to be. All the comment lines can go too.

https://unix.stackexchange.com/questions/16407/how-to-check-which-gpu-is-active-in-linux

and

glxinfo -B

may help to understand what exactly GPU OS is using.

IMHO in OP case OS uses Nvidia GPU, not builtin AMD.

Kernel-default-extra and kernel-firmware are both installed. The same problem ocured with iceWM. I tried booting without an xorg.conf file and xorg.conf.d folder and it led to a text only interface. I also tried removing any irrelevant lines from the xorg.conf file but it led to the same low resolution boot.

Is there any more info i could post? Should I install another kernel version as suggested above (if so which one)? What would be the topics I should read up on to get a better grasp of my problem?


glxinfo -B

name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Mesa/X.org (0xffffffff)
    Device: llvmpipe (LLVM 11.0.1, 256 bits) (0xffffffff)
    Version: 20.2.4
    Accelerated: no
    Video memory: 7290MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 4.5
    Max compat profile version: 3.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
OpenGL vendor string: Mesa/X.org
OpenGL renderer string: llvmpipe (LLVM 11.0.1, 256 bits)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 20.2.4
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 3.1 Mesa 20.2.4
OpenGL shading language version string: 1.40
OpenGL context flags: (none)

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 20.2.4
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20


glxinfo|egrep "OpenGL vendor|OpenGL renderer"

OpenGL vendor string: Mesa/X.org
OpenGL renderer string: llvmpipe (LLVM 11.0.1, 256 bits)

You could be right about the laptop using the nvidia card, I just assumed it was amd because the external monitor started working after installing the nvidia drivers.

inxi -Cy will ID the CPU.

Should I install another kernel version as suggested above (if so which one)?
https://download.opensuse.org/repositories/Kernel:/stable:/Backport/standard has probably the most appropriate kernel to upgrade to. You may also need the kernel-firmware from that repo.

What would be the topics I should read up on to get a better grasp of my problem?
In short, the distro needs to be newer than the hardware, or else the distro needs to be modified to include support for the newer hardware. The kernel is the usual first step. I’m not sure there is anything specific to read on this subject. Maybe search for “hardware newer than the distro” or “upgrade kernel for newer GPU” would find something more elaborate.

Saving https://download.opensuse.org/repositories/Kernel:/stable:/Backport/standard/Kernel:stable:Backport.repo to /etc/zypp/repos.d/ is a shortcut to enabling the repo. While zypper ar and yast are the official ways to add a new repo, I rarely add a new repo except via shortcut. Typos are hard to come by using the shortcut. :slight_smile:

For the newest AMD open drivers or nouveau use the newest Mesa 3D from Experimental branch: https://software.opensuse.org/package/Mesa

Also user may perform Full repository Vendor change to update all X11 stuff from X11:XOrg repo.
But Nvidia proprietary driver may not work with too new kernel and X11.
So try to use Nvidia proprietary driver with default Leap packages, but without nouveau.

With new kernel AMD GPU may work natively.
With Nvidia or nouveau drivers Nvidia GPU may work natively.
Right now I cannot understand what GPU is in use because of software rendering.

With

inxi -aGz

we will get chip ID.

Chip ID 1002:1638 appeared in OP.

Gay provides the most complete inxi information about graphics. z has no impact I’ve noticed on G*. y shortens output line length of all options.