Score:0

xubuntu / lightdm doesn't detect display properly on first login but works on second login

in flag

I have an xubuntu 20.04 PC connected to a 40" Samsung TV. Xfce / Lightdm is set to autologin. When it logs in, the detected display is wrong (it just says "default"), and the screen resolution is locked to 1024x768 according to Setting Manager -> Display. However, if I logout, then immediately log back in again, the display is correctly detected as 'Samsung 40"' and the resolution is correctly set to 1920x1080. I'm using the proprietary nvidia drivers (from Settings Manager -> Additional Drivers) for my GTX 960 card. I've tried the suggested tricks of putting "xrandr --output HDMI-0 --mode 1920x1080" in the config, but that doesn't fix it. Any ideas?

Score:0
in flag

Ok. Finally figured this out. Apparently the nvidia drivers that ship with ubuntu are broken. An indicator of this was that the nvidia-setting app showed an empty window, even though nvidia-smi worked.

So to fix this issue:

  1. In Settings -> Additional Drivers, select Noveau (just temporarily)
  2. sudo apt-get install libglvnd-dev (needed by nvidia drivers)
  3. Download the latest nvidia driver from their website
  4. Switch to a console (Ctrl+Alt+F1)
  5. Install the downloaded driver
    • Enable installing 32-bit compatibility libraries
    • Enable dkms
  6. sudo vim /etc/modprobe.d/blacklist.conf
    • add "blacklist nvidiafb"
    • add "blacklist nouveau"
  7. reboot

If you happen to check Settings -> Additional Drivers, it will now show "manually installed driver" for the nvidia card.

kanehekili avatar
zw flag
Strange, since my XFCE works with the recommended Nvidia driver on a GTX 760 - maybe I'm just lucky....
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.