You are not logged in.

#1 2023-03-11 21:46:49

Nakrule
Member
Registered: 2017-11-23
Posts: 32

After changing monitor, startx shows a blackscreen

Hi all, I just upgraded my HDMI 1080P 240Hz monitor (connected to a RTX2060 Super GPU with Nvidia proprietary drivers) to an Apple Studio Display (5K 60Hz, USB-C input). The new monitor is connected via a DisplayPort to USB-C cable as my GPU do not have a USB-C output. When I turn on the computer, the bios and boot process are properly displayed, and then I have a black screen when arch automatically start Gnome. Going into a tty, I have check the following files:

- startx log:https://pastebin.com/zVBBtMXF
- dmesg:https://pastebin.com/MeQiDNXw
- lspci:https://pastebin.com/BKYdWG9C

Any idea what I could try? I tried both with the default xinitrc and an empty file, and tried to use the nvidia auto generated Xorg config file.

Last edited by Nakrule (2023-03-11 21:48:07)

Offline

#2 2023-03-11 22:19:26

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,354

Re: After changing monitor, startx shows a blackscreen

Please post your Xorg log, https://wiki.archlinux.org/title/Xorg#General

(==) Using config file: "/etc/X11/xorg.conf"

is likely the nvidia-settings generated garbage w/ a static output configuration that does no longer meet your HW, so you can already try to move that away.

Offline

#3 2023-03-13 17:21:51

Nakrule
Member
Registered: 2017-11-23
Posts: 32

Re: After changing monitor, startx shows a blackscreen

Here is my xorg.conf file: https://pastebin.com/N4dSmcGJ.

I tried to remove the monitor section, as newer versions of Xorg are auto-configuring, so manual configuration should not be needed (per the wiki). However after doing so and rebooting, the neither Gnome nor the tty are displayed (I still see the BIOS and Arch boot process). All I have is a single "_" char in the top left of the screen.

Offline

#4 2023-03-13 17:48:57

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,360

Re: After changing monitor, startx shows a blackscreen

Try moving xorg.conf out of the way altogether.


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus B550-F Gaming MB, 128Gb Corsair DDR4, Fractal Design Define 7 XL, 5 HD (2 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

/ is the root of all problems.

Offline

#5 2023-03-13 17:56:49

Nakrule
Member
Registered: 2017-11-23
Posts: 32

Re: After changing monitor, startx shows a blackscreen

Is there any way I could do so as I do not have access to tty anymore?

Offline

#6 2023-03-13 18:54:21

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,360

Re: After changing monitor, startx shows a blackscreen

Boot from a live media, and arch-chroot in, then move /etc/xorg.conf to, for example, /etc/xorg.conf.bak, then reboot as normal and see what happens.

I haven't used an xorg.conf for a long time (also NVidia), and have no issues whatsoever.


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus B550-F Gaming MB, 128Gb Corsair DDR4, Fractal Design Define 7 XL, 5 HD (2 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

/ is the root of all problems.

Offline

#7 2023-03-13 19:26:49

Nakrule
Member
Registered: 2017-11-23
Posts: 32

Re: After changing monitor, startx shows a blackscreen

I successfully removed my xorg.conf file and am back to the same result as in the beginning (black screen after startx, but I have access to tty's again). Thanks for the advice about arch-chroot, I forgot about that one.

Here is the latest xorg log: https://pastebin.com/pesKpTD2. As far as I understand it, the few error listed should not be a problem as I don't use nouveau.

Right now, both my xorg.conf and ~/.xinitrc are empty.

Offline

#8 2023-03-13 20:50:51

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,354

Re: After changing monitor, startx shows a blackscreen

The nouveau related "errors" are indeed not relevant.
The problem is this here:

[     6.214] (II) NVIDIA(0): Setting mode "NULL"
[     6.260] (II) NVIDIA(0): Setting mode "DP-2: 2560x2880 @2560x2880 +0+0 {ViewPortIn=2560x2880, ViewPortOut=2560x2880+0+0}"

Some client re-configures the output and configures DP-2 - I'll just doubt that that's DFP-5, notably because the resolution is wrong.

How do we square

when arch automatically start Gnome

startx log

~/.xinitrc are empty

?

iow: how do you automatically start gnome, what does that have to do w/ startx and how's startx supposed to start gnome when your xinitrc is empty?

Offline

#9 2023-03-14 12:55:28

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,360

Re: After changing monitor, startx shows a blackscreen

When you say your xorg.conf is empty, do you mean you have an empty file, or have removed the file? It probably won't help your issue, but if it's there but there's nothing in it, get rid altogether.


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus B550-F Gaming MB, 128Gb Corsair DDR4, Fractal Design Define 7 XL, 5 HD (2 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

/ is the root of all problems.

Offline

#10 2023-03-14 18:10:47

Nakrule
Member
Registered: 2017-11-23
Posts: 32

Re: After changing monitor, startx shows a blackscreen

When you say your xorg.conf is empty, do you mean you have an empty file, or have removed the file? It probably won't help your issue, but if it's there but there's nothing in it, get rid altogether.

I have deleted it.

iow: how do you automatically start gnome, what does that have to do w/ startx and how's startx supposed to start gnome when your xinitrc is empty?

I am confused here. My ~/.xinitrc is indeed empty (only a single line to start imwheel that I put a long time ago). I installed arch & gnome with archinstall back in the days, and I had nothing to configure regarding X/gdm/Gnome. The desktop environment was automatically starting after my first reboot, so I have not checked how it was configured (but my ~/.xinitrc as been empty for as long as I can remember). Now from where X is started is a good question. Both X & gdm are running when I boot.

$ ps -ef | grep gdm
root         479       1  0 18:33 ?        00:00:00 /usr/bin/gdm
root         510     479  0 18:33 ?        00:00:00 gdm-session-worker [pam/gdm-launch-environment]
gdm          517       1  0 18:33 ?        00:00:00 /usr/lib/systemd/systemd --user
gdm          519     517  0 18:33 ?        00:00:00 (sd-pam)
gdm          528     510  0 18:33 tty1     00:00:00 /usr/lib/gdm-x-session dbus-run-session -- gnome-session --autostart /usr/share/gdm/greeter/autostart
root         530     528  0 18:33 tty1     00:00:01 /usr/lib/Xorg vt1 -displayfd 3 -auth /run/user/120/gdm/Xauthority -nolisten tcp -background none -noreset -keeptty -novtswitch -verbose 3
gdm          538     517  0 18:33 ?        00:00:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
gdm          540     528  0 18:33 tty1     00:00:00 dbus-run-session -- gnome-session --autostart /usr/share/gdm/greeter/autostart
gdm          541     540  0 18:33 tty1     00:00:00 dbus-daemon --nofork --print-address 4 --session
gdm          542     540  0 18:33 tty1     00:00:00 /usr/lib/gnome-session-binary --autostart /usr/share/gdm/greeter/autostart
gdm          549       1  0 18:33 tty1     00:00:00 /usr/lib/at-spi-bus-launcher
gdm          555     549  0 18:33 tty1     00:00:00 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 11 --address=unix:path=/run/user/120/at-spi/bus_0
gdm          562     542  0 18:33 tty1     00:00:01 /usr/bin/gnome-shell
gdm          595       1  0 18:33 tty1     00:00:00 /usr/lib/xdg-permission-store
gdm          608     517  0 18:33 ?        00:00:00 /usr/bin/pipewire
gdm          609     517  0 18:33 ?        00:00:00 /usr/bin/wireplumber
gdm          610     517  0 18:33 ?        00:00:00 /usr/bin/pipewire-pulse
gdm          637       1  0 18:33 tty1     00:00:00 /usr/bin/gjs /usr/share/gnome-shell/org.gnome.Shell.Notifications
gdm          640       1  0 18:33 tty1     00:00:00 /usr/lib/at-spi2-registryd --use-gnome-session
gdm          662     542  0 18:33 tty1     00:00:00 /usr/lib/gsd-sharing
gdm          669     542  0 18:33 tty1     00:00:00 /usr/lib/gsd-wacom
gdm          671     542  0 18:33 tty1     00:00:00 /usr/lib/gsd-color
gdm          672     542  0 18:33 tty1     00:00:00 /usr/lib/gsd-keyboard
gdm          675     542  0 18:33 tty1     00:00:00 /usr/lib/gsd-print-notifications
gdm          679     542  0 18:33 tty1     00:00:00 /usr/lib/gsd-rfkill
gdm          680     542  0 18:33 tty1     00:00:00 /usr/lib/gsd-smartcard
gdm          682     542  0 18:33 tty1     00:00:00 /usr/lib/gsd-datetime
gdm          684     542  0 18:33 tty1     00:00:00 /usr/lib/gsd-media-keys
gdm          690     542  0 18:33 tty1     00:00:00 /usr/lib/gsd-screensaver-proxy
gdm          693     542  0 18:33 tty1     00:00:00 /usr/lib/gsd-sound
gdm          695     542  0 18:33 tty1     00:00:00 /usr/lib/gsd-a11y-settings
gdm          698     542  0 18:33 tty1     00:00:00 /usr/lib/gsd-housekeeping
gdm          699     542  0 18:33 tty1     00:00:00 /usr/lib/gsd-power
gdm          759       1  0 18:33 tty1     00:00:00 /usr/lib/gsd-printer
gdm          850       1  0 18:33 tty1     00:00:00 /usr/bin/gjs /usr/share/gnome-shell/org.gnome.ScreenSaver
nakrule     2897    2528  0 18:53 tty2     00:00:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox gdm


$ ps -ef | grep X
root         530     528  0 18:33 tty1     00:00:01 /usr/lib/Xorg vt1 -displayfd 3 -auth /run/user/120/gdm/Xauthority -nolisten tcp -background none -noreset -keeptty -novtswitch -verbose 3
nakrule     3072    2528  0 18:54 tty2     00:00:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox X


$ cat /etc/X11/xorg.conf
cat etc/X11/xorg.conf : No such file of directory


$ cat ~/.xinitrc
/usr/bin/imwheel -d

From my research, I think GDM starts X. The file /etc/gdm/Xsession runs xinitrc which config file located in /usr/etc/X11/xinit/xinitrc.d & /etc/X11/xinit/xinitrc.d. The first folder does not exist, so it should exec the 3 files in /etc/X11/xinit/xinitrc.d/:

- 40-libcanberra-gtk-module.sh
- 50-systemd-user.sh
- 90xbrlapi

However I don't see any startx or related command in whose files. Any idea where I could look next?

Offline

#11 2023-03-14 20:36:00

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,354

Re: After changing monitor, startx shows a blackscreen

GDM doesn't use the xinitrc at all, you can write there whatever you want, it won't do anything.
/etc/gdm/Xsession sources the system-wide xinitrc drop-ins.

GDM is what most likely trashes your output w/ some dated configuration, https://wiki.archlinux.org/title/GDM#Se … r_settings

Offline

#12 2023-03-14 21:30:32

Nakrule
Member
Registered: 2017-11-23
Posts: 32

Re: After changing monitor, startx shows a blackscreen

I do have a ~/.config/monitor.xml file that is configured with my previous display (with a hard coded output to HDMI-1), but as I understand, if this file is not located in /var/lib/gdm/.config/, is should not be used. I don't have any monitor.xml file in /var/lib/gdm/.config/, I tried to place one that is configured with the right resolution, refresh rate and output (DP-2, based on what I see with dmesg) but it still result in a black screen without more hints in Xorg log.

As xrandr is not available (it returns "Can't open display" when I use it), is there a way to generate a new monitor.xml with the right information?

Offline

#13 2023-03-14 21:48:31

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,354

Re: After changing monitor, startx shows a blackscreen

if this file is not located in /var/lib/gdm/.config/, is should not be used

Do you maybe autologin?

is there a way to generate a new monitor.xml with the right information?

Just delete it.

Offline

#14 2023-03-15 07:43:09

Nakrule
Member
Registered: 2017-11-23
Posts: 32

Re: After changing monitor, startx shows a blackscreen

Do you maybe autologin?

No

Just delete it.

I already tried that. I will look more into the config file tonight to find where/how X is started, and otherwise will do a clean install.

Offline

#15 2023-03-15 07:47:49

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,354

Re: After changing monitor, startx shows a blackscreen

Disable GDM or start the multi-user.target and try to actually use startx to start gnome (you'll have to fix your xinitrc as it now becomes relevant, also see the last link below and the notes there)

This way we'll know whether it's indeed GDM that causes this.
You can likewise use the xinitrc to start an openbox session for a cross-test.

Offline

#16 2023-03-15 19:29:35

Nakrule
Member
Registered: 2017-11-23
Posts: 32

Re: After changing monitor, startx shows a blackscreen

I disabled GDM and tried both gnome-session and openbox-session. The former does not work with the error "Cannot open display:" and the latter fails with:

 Failed ot open the display form the DISPLAY environment variable.

I tried to setup $DISPLAY to different variable (not sure what should be the right value as I do not have access to xrandr) and always get the same error.

It is strange as in my Xorg log, the Nvidia driver succesfully find my display and the right resolution, and automatically choose it to go on, without any error.

Offline

#17 2023-03-15 20:19:29

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,354

Re: After changing monitor, startx shows a blackscreen

tried both gnome-session and openbox-session

"Tried" how? In your xinitrc and using startx?

Offline

#18 2023-03-15 20:25:11

Nakrule
Member
Registered: 2017-11-23
Posts: 32

Re: After changing monitor, startx shows a blackscreen

No, I ran the command directly in the terminal after setting up a ~/.xinitrc based on /etc/X11/xinit/xinitrc.

Offline

#19 2023-03-15 20:38:30

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,354

Re: After changing monitor, startx shows a blackscreen

This is fundamentally not how this works at all.
You write the xinitrc and then run startx or xinit which will start an X11 server and execute your session as described in the xinitrc.

Offline

#20 2023-03-15 21:05:07

Nakrule
Member
Registered: 2017-11-23
Posts: 32

Re: After changing monitor, startx shows a blackscreen

Oh my bad, sorry I'm not very experience with xinit. It work with openbox-session, but not with gnome-session (black screen, gdm disabled).

Offline

#21 2023-03-15 21:20:09

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,354

Re: After changing monitor, startx shows a blackscreen

So it's gnome that brings the bogus layout, you removed ~/.config/monitor.xml ? Was it recreated? What does it look like right now?

Offline

#22 2023-03-15 21:25:08

Nakrule
Member
Registered: 2017-11-23
Posts: 32

Re: After changing monitor, startx shows a blackscreen

Right now I do not have any ~/.config/monitor.xml. I tried as well with the following one:

<monitors version="2">
  <configuration>
    <logicalmonitor>
      <x>0</x>
      <y>0</y>
      <scale>1</scale>
      <primary>yes</primary>
      <monitor>
        <monitorspec>
          <connector>DP-1</connector>
          <vendor>Apple</vendor>
          <product>Apple StudioDisplay</product>
        </monitorspec>
        <mode>
          <width>5120</width>
          <height>2880</height>
          <rate>60.00</rate>
        </mode>
      </monitor>
    </logicalmonitor>
  </configuration>
</monitors>

Offline

#23 2023-03-15 21:39:48

Nakrule
Member
Registered: 2017-11-23
Posts: 32

Re: After changing monitor, startx shows a blackscreen

I tried as well to use lightdm to login. The lightdm screen is displayed when I start it, but trying to login gnome gives a black screen for 2-3 seconds before going back to lightdm. This really seems to be a Gnome issue.

Offline

#24 2023-03-15 21:54:19

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,354

Re: After changing monitor, startx shows a blackscreen

Wild guess: do you have a ~/.nvidia-settings-rc ?
You could probably run dconf-editor from openbox and see whether gnome saves stuff in its registry.

Offline

#25 2023-03-17 08:29:09

Nakrule
Member
Registered: 2017-11-23
Posts: 32

Re: After changing monitor, startx shows a blackscreen

Yes I have the following .nvidia-settings-rc:

#
# /home/nakrule/.nvidia-settings-rc
#
# Configuration file for nvidia-settings - the NVIDIA Settings utility
# Generated on Thu Mar 16 08:32:01 2023
#

# ConfigProperties:

RcFileLocale = C
DisplayStatusBar = Yes
SliderTextEntries = Yes
IncludeDisplayNameInConfigFile = No
UpdateRulesOnProfileNameChange = Yes
Timer = Memory_Used_(GPU_0),Yes,3000
Timer = Thermal_Monitor_(GPU_0),Yes,1000
Timer = PowerMizer_Monitor_(GPU_0),Yes,1000

# Attributes:

0/SyncToVBlank=1
0/LogAniso=0
0/FSAA=0
0/TextureClamping=1
0/FXAA=0
0/AllowFlipping=1
0/FSAAAppControlled=1
0/LogAnisoAppControlled=1
0/OpenGLImageSettings=1
0/FSAAAppEnhanced=0
0/ShowGraphicsVisualIndicator=0
[DPY:DVI-D-0]/Dithering=0
[DPY:DVI-D-0]/DitheringMode=0
[DPY:DVI-D-0]/DitheringDepth=0
[DPY:DVI-D-0]/ColorSpace=0
[DPY:DVI-D-0]/ColorRange=0
[DPY:DVI-D-0]/SynchronousPaletteUpdates=0
[DPY:HDMI-0]/Dithering=0
[DPY:HDMI-0]/DitheringMode=0
[DPY:HDMI-0]/DitheringDepth=0
[DPY:HDMI-0]/ColorSpace=0
[DPY:HDMI-0]/ColorRange=0
[DPY:HDMI-0]/SynchronousPaletteUpdates=0
[DPY:DP-0]/Dithering=0
[DPY:DP-0]/DitheringMode=0
[DPY:DP-0]/DitheringDepth=0
[DPY:DP-0]/ColorSpace=0
[DPY:DP-0]/ColorRange=0
[DPY:DP-0]/SynchronousPaletteUpdates=0
[DPY:DP-1]/Dithering=0
[DPY:DP-1]/DitheringMode=0
[DPY:DP-1]/DitheringDepth=0
[DPY:DP-1]/ColorSpace=0
[DPY:DP-1]/ColorRange=0
[DPY:DP-1]/SynchronousPaletteUpdates=0
[DPY:HDMI-1]/Dithering=0
[DPY:HDMI-1]/DitheringMode=0
[DPY:HDMI-1]/DitheringDepth=0
[DPY:HDMI-1]/ColorSpace=0
[DPY:HDMI-1]/ColorRange=0
[DPY:HDMI-1]/SynchronousPaletteUpdates=0
[DPY:DP-2]/RedBrightness=0.000000
[DPY:DP-2]/GreenBrightness=0.000000
[DPY:DP-2]/BlueBrightness=0.000000
[DPY:DP-2]/RedContrast=0.000000
[DPY:DP-2]/GreenContrast=0.000000
[DPY:DP-2]/BlueContrast=0.000000
[DPY:DP-2]/RedGamma=1.000000
[DPY:DP-2]/GreenGamma=1.000000
[DPY:DP-2]/BlueGamma=1.000000
[DPY:DP-2]/Dithering=0
[DPY:DP-2]/DitheringMode=0
[DPY:DP-2]/DitheringDepth=0
[DPY:DP-2]/DigitalVibrance=0
[DPY:DP-2]/ColorSpace=0
[DPY:DP-2]/ColorRange=0
[DPY:DP-2]/SynchronousPaletteUpdates=0
[DPY:DP-3]/Dithering=0
[DPY:DP-3]/DitheringMode=0
[DPY:DP-3]/DitheringDepth=0
[DPY:DP-3]/ColorSpace=0
[DPY:DP-3]/ColorRange=0
[DPY:DP-3]/SynchronousPaletteUpdates=0
[GPU:0]/GPUPowerMizerMode=2

Removing it does not help. I will look into and try dconf tonight.

Last edited by Nakrule (2023-03-17 11:24:11)

Offline

Board footer

Powered by FluxBB