Post GRUB graphics issues after going into Windows

I have a dual boot setup with Windows 11 and Endeavour OS. 5950x+Asus TYF 3090. The graphics card has 3 dvi outputs, and I use two of them to connect to a Dell UP2715K 5K monitor. The monitor shows up as two 2560x2880 panels that are stitched into a screen in nvidia-settings (which writes the config to /etc/X1/xorg.conf). The relevant section is:

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "DELL UP2715K"
    HorizSync       31.0 - 180.0
    VertRefresh     29.0 - 75.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVIDIA GeForce RTX 3090"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "nvidiaXineramaInfoOrder" "DFP-1"
    Option         "Stereo" "0"
    Option         "metamodes" "DP-0: 2560x2880 +2560+0, DP-4: 2560x2880 +0+0; DP-0: nvidia-auto-select +848+0 {viewportout=848x480+0+0}, DP-4: nvidia-auto-select +0+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

I’m using i3wm and lightdm.

Now here’s the issue - if I’m in Linux and I reboot, everything’s fine. However, if I go into Windows, everything works - but - if I then (after shutdown or reboot) go into Linux, I see the Grub screen, select Endeavour, and then the initial logs flash by, but then when I expect it to go into lightdm and show me a login screen, a thin colourful horizontal line appears at the centre of the scren, and then it goes blank. I can see the light bleeding suggesting there’s input to the screen, but it’s just blank. From the motherboard code display, I can see it’s not rebooted or crashed, but there’s no output to be seen on the monitor. At this point, rebooting in Linux doesn’t help… I keep getting the same results every time. If I then switch the displayports (i.e. if I were using port 1,2 and switch to port 2,3), then it works. I can then use nvidia-settings to setup the new config, and things continue to work until I go into Windows again.

I’ve tried setting nomodeset, nvidia.modeset=0 - but none of that’s helped. This makes things really annoying every time I need Windows, and would appreciate any help in identifying and solving the problem.

Can you post both system logs and boot logs when this issue occurs? It will help the people with know-how in this forum diagnose the issue.

1 Like

Nvidia shouldn’t need an xorg.conf file.

Edit: Is usually
/etc/X11/xorg.conf.d/20-nvidia.conf

https://wiki.archlinux.org/title/NVIDIA#Xorg_configuration

I would assume you would use an xorg file to create a monitor setting like using two monitors even though both are connected to the same monitor but it would specify which DP port is which? Not sure if it would work this way? :thinking:

/etc/X11/xorg.conf.d/10-monitor.conf

https://wiki.archlinux.org/title/Multihead

Edit: Maybe I’m totally wrong? @petsam :man_shrugging:

1 Like

Whatever you said is correct per se :rofl:
I would have used the exact same words! :wink:

Also this!!! :laughing:
The answer can only be known from the display/monitor vendors and their firmware developers.

I focus on this:

From a troubleshooting POV, we have two different systems (SW/HW combinations).
My quick (and clean) solution is to use the succeeding method of switching OS/multiboot systems.
If OP does not like this clean and effective solution, it’s his problem, or decision. Maybe needs to read or hear about why Linux is preferred and why it is avoided from normal users.

Hardware vendors don’t provide internal/firmware information to the Linux community.

How many times should we repeat this? We should include a huge banner in all Linux websites with the above warning :person_shrugging: .

Now, for the fun (but come to be exhausting for me) part of investigation, watch and cry or laugh:

"metamodes" \
"DP-0: 2560x2880 +2560+0, DP-4: 2560x2880 +0+0; \
DP-0: nvidia-auto-select +848+0 {viewportout=848x480+0+0}, DP-4: nvidia-auto-select +0+0"

We would need more info to have a better picture (inxi -Ga, xrandr, xrandr --listmonitors), although we can see a 5th DP output (starting from 0), assumed to be created/split inside the monitor firmware.

The 2nd metamode is initially insane, but I suppose nvidia-auto-select is magic and might transform it to something viewable.

If we want to possibly track down what is missing from the failed Xorg (after reboot), we need both a successful and a failed Xorg.?.log to compare the errors and failures :person_shrugging: .

When the PC boots, BIOS starts enumerating HW and assigning names, which then are received from kernel/udevadm and changes (some times) using udev rules. This might be a reason why a failed Xorg with a pair of output names, re-starts successfully using a new pair.

All the above are just speculations from experience and could be partly or completely wrong.

Nvidia settings IIRC, prompt for a save path, which defaults to the fallback (and suggested against, in archlinux) Xorg path, but can and should be changed to the preferred one (as already said). Although, I would not save that file to system, if it were my system, saving in a temp/local folder for investigation and handpicking the absolutely minimum parts, after testing.

Finally, I can see these possible solutions, sorted by easiest first:

  1. Use the succeeding method for rebooting to different OS.
  2. Change output ports after a failing Xorg boot
  3. Ask monitor’s vendor for support
  4. Ask Nvidia for support
  5. Ask support from EnOS forum
  6. Buy a new GPU, other than Nvidia

OP has started in reverse order and… missed the 1st option (in reverse order) :rofl:

Peace!

I’ll submit the requested logs today… I needed to machine for work this morning, and didn’t want it stuck in limbo.

From journalctl for last failed boot, I get:

May 22 16:59:34 HeartyZenX gmenudbusmenuproxy[1672]: The X11 connection broke (error 1). Did the X11 server die?
May 22 16:59:34 HeartyZenX kwalletd5[1558]: The X11 connection broke (error 1). Did the X11 server die?
May 22 16:59:34 HeartyZenX kdeconnectd[1736]: The X11 connection broke (error 1). Did the X11 server die?
May 22 16:59:34 HeartyZenX kactivitymanagerd[2331]: The X11 connection broke (error 1). Did the X11 server die?
May 22 16:59:34 HeartyZenX klipper[1679]: The X11 connection broke (error 1). Did the X11 server die?
May 22 16:59:34 HeartyZenX kgpg[1737]: The X11 connection broke (error 1). Did the X11 server die?
May 22 16:59:34 HeartyZenX kscreen_backend_launcher[2640]: The X11 connection broke (error 1). Did the X11 server die?
May 22 16:59:34 HeartyZenX org_kde_powerdevil[1750]: The X11 connection broke (error 1). Did the X11 server die?
May 22 16:59:34 HeartyZenX kglobalaccel5[2415]: The X11 connection broke (error 1). Did the X11 server die?
May 22 16:59:34 HeartyZenX kglobalaccel5[2415]: The X11 connection broke: I/O error (code 1)

So it does seem Xorg related.

As for the steps mentioned:

  1. Done that.
  2. Done that. Switching the cables to port 1-3 or 2-3 from 1-2 sometimes fixes it.
  3. Dell have been useless. And they keep saying it works in Windows, so it’s an issue with my setup in Linux. Doesn’t help that the monitor is discontinued, although I doubt they’d be of much use if it weren’t.
  4. Nvidia? They point to it working in Windows.
  5. That’s what I’m doing.
  6. I was making do with a 3060 I could grab off a skimmer off gumtree to get ANY output from new build to the monitor. I managed to find a decently priced 3090 which is why I bought it.

I’ve been making do with switching the output cables and hoping every time I return from Windows. I’ll try removing the screen section from Xorg conf that nvidia-settings writes out and see if that helps. Worth noting that after successful boot after cable swapping, nvidia-settings sees one panel with the other disabled. I then go and configure the panels, resolution, left/right position, save to Xorg conf, and it works ok from there. Well, until the next time I go into Windows.

In terms of dual boot, I’m not using grub to go into windows. The two OSes are completely isolated and I go into Windows or Grub after the machine boots. I do see grub and with “quiet” disabled, I see the tracelog, up until (what I think is) the X11 crash.

I will also start in reverse order… :laughing:

When you reboot, you are in a kind-of not isolated system. Only when you completely shutdown and then power on.

I did not say that this would help. Just don’t (ever) save/use a file at /etc/X11/xorg.conf in general.

Probably a misunderstanding, because of my poor English. I meant to keep one of the first two methods as a final solution, or… go for the next options in order.

Actually, Xorg is the victim of a HW/firmware/SW behavior. If we/Linux knew what the HW/firmware/nvidia do, we might be able to find a solution, but we have no info :person_shrugging: .

Why not changing your workflow and just shutdown when you want to change OS? Can you explain your denial on this? How much does it cost? :thinking:

@petsam

Your reply pointed me to the crazy nvidia auto settings thing… I’ll removing the devide and screen from the xorg.conf file and creating a dedicated one in the conf.d directory, and specify the Monitor(s) and Screen explicitly.

In terms of reboot / shutdown, once I’ve gone into Windows, it doesn’t help if I reboot or shutdown. Until cable swap happens, the X11 crash happens every single time. That’s irrespective of if I shutdown Windows, or power off Linux with the power button on unsuccessful lightdm init.

1 Like

I misunderstood. I apologize.

Post info, it’s fun (when I need a break from coding…):

Here are some files:

journalctl -b -0: https://clbin.com/3pYlG
jounrlactl -b -1: https://clbin.com/ZJZwG
journalctl -b -2: https://clbin.com/oh9MC (I think this has relevant errors)

inxi -Ga: https://clbin.com/vLsBw
Xorg.0.log: https://clbin.com/o1Y8r
Xorg.0.log.old: https://clbin.com/UeKWC
xrandr --listmonitors: https://clbin.com/4fcfK
xrandr: https://clbin.com/RH9cU

I can hit e on grub and go into admin prompt with single. I’ve completely removed the nvidia stuff from xorg, but somehow it’s remembering the stuff. As soon as I try startx or xinit, the screen shows a thin colourful line and the display goes grey (well… turns off).

Getting the logs immediately after the issue is a bit hard, and once it’s crashed, I have to reboot / shutdown to get back to Grub to try something else.

I don’t know what you might mean by that.

If you were lucky, changing a single number in the conf file may fix it.
xineramainfoorder is set to dfp1, which is not connected. OTOH dfp0 exists.

I don’t say this solves all issues, but It’s worth to try.


Note: First time for me seeing this listmonitors output. I assume lots of linux devs too. I suggest not being too demanding with broken features, and just use what works. :person_shrugging:

I meant I reverted back to manual xorg conf.

dfp0 didn’t solve it, I’m afraid.

Got some more observations:

  1. There was a motherboard bios update. I applied that and it booted into Linux fine (from Windows reboot just before bios flash). But after the update, if I went into Windows, going back into Linux shows the same thin horizontal line and then no display.

  2. I thought it might be xorg config, but then I completely disabled one panel and ran the other in 4k (I need two panels for 5K). The new xorg.conf is here:

https://clbin.com/TeHgm

Even with that, if two DP cables are plugged in, xinit fails to load. However if one cable is plugged in, it boots fine. And then after log in, if I plug in the second cable and configure displays, I get full 5K.

In fact, even with the 5K dual panel xorg.conf setup, if I have DP-2 plugged in and DP-0 not plugged in, then it boots to EOS just fine, but with a very stretched 2560x2880 display. Once logged in, I can plug in the second cable and configure, and it works perfectly. But then if I reboot / shutdown-start with both cables plugged in, it doesn’t work. If I do it with one cable, it does.

If I switch to DP-0 and DP-4 from DP-0 and DP-2, then it works (after configuring). Going into Windows, it works. Then booting to Linux gives the failure. At which point switching to DP-0 and DP-2 works again (after configuring).

I’m not really looking for anything complicated. If it can be done simpler, I’m all for it. I’d really like to be able to boot to Windows and back without taking out physical cables every time I switch. Till now, I’ve been using Antergos then EOS for 7 years, but now I need to do some things that just don’t work well in Linux (e.g. DaVinvi Resolve Studio… on Linux, mp4 audio doesn’t work and requires a separate step of manually extracting audio to wav, and there are a number of useful Windows only plugins). I much prefer the simplicity of i3wm, but at the same time, if it’s this much hassle, just staying in Windows begins to look tempting. Yes, a native shell is much nicer than WSL2 for dev work, but Windows just doesn’t have this monitor issue. I can plug in to whichever ports with whichever cables, and it figures it out by itself… doesn’t even need me to configure it. So, for the task of getting output to the monitor every time - the only thing that works for me right now seems to be Windows :frowning:

This is probably not what you want to hear, but it’s very simple to identify the problem: your computer is infected with malware called Windows 11. Solution: remove it and use only Linux. If you really need windoze programs, run them in a VM, your computer seems capable enough.

1 Like

Oh I have VMs. Unfortunately there are limitations both with qemu and vmware workstation as to how graphics are handled by the guest. vmware doesn’t expose the gpu directly, but creates a virtual device. qemu can do a passthrough that I’ve never managed to get working - and I’d rather not have yet another graphics card just so a guest vm may use the other one. As a dedicated Linux user for quite some time, getting into photography and videography is really showing just how far behind linux is for media software. Yes, there’s Darktable which I absolutely love, but then the premier noise reduction software to finish off (e.g. Topaz Denoise) is Windows only. Dxo Photolab - although it runs on dotnet - is still Windows only. DaVinvi Resolve is a pride of many a Linux user for video editing, but the fact remains that to use it to its potential, you need Windows or a Mac. That’s the reality, and as such I do need to boot into Windows.

No you don’t. That’s just you speaking from within your comfort zone.

If you force yourself out, sure, it will be unpleasant at first, but then you’ll wonder why were you stuck in there for so long.

People who are stuck in their comfort zone do not realise that they don’t need fancy tools to do a great job. Adopt a more minimalist mindset and figure out how to achieve great results with limited means.

You can use Photoshop under wine, as well as Topaz Denoise :upside_down_face:
It’s not very easy to get a grip on proper setup at first, but i do

But do you really need Topaz Denoise? By properly lighting a scene, you can reduce noise significantly. And some noise can look very nice, if properly controlled.

There are professional photographers and videographers who only use Linux. Sure, they are a tiny minority and most of them speak to frogs or are crazy in some other way, but they do exist.

This is rather amusing. I’ve been using arch as my main dev / media / everything machine since 2015. Dealt with various issues starting from the Dell Precision 5510, through multiple laptops and now the second desktop. Please don’t come preaching to me about comfort zones. If I wanted to leave my comfort zone, I’d go to Windows - I’ve gotten used to Linux and find Windows “uncomfortable”, hence my efforts to stay.

As for limited means - I have a beast of a machine to do half of my work (media processing). Linux DOES NOT HAVE THE SOFTWARE to do this. If BlackmagicDesign made things work on Linux, I’d 100% not boot into Windows right now. But they don’t. And I need to.

If you don’t control the source of image (you’re not actually doing it) - yes you absolutely really need it :frog:

Sometimes work on images is not done by the source…A lot of times in fact, depending on your field of work

I’m pretty sure people were making spectacular movies and videos before AI noise reduction was even considered possible.

We rely on software too much these days. And the results are negative, because the talent and skills have decreased dramatically.

That’s entirely different conversation, if we’re speaking pure art :laughing: