Startx doesn't work in Fedora 35

I run my computers in what used to be called runlevel 3, logging in to a text mode virtual console and starting X11 with the startx command, and I use the KDE desktop.
In November I upgraded my 12-year-old secondary computer from Fedora34 to Fedora35 with dnf system-upgrade. I originally installed Fedora12 when the machine was new, and have always upgraded it with system-upgrade.
After upgrading to Fedora 35, I haven’t been able to use X11. When I do startx, it turns the display off for a while, then instead of showing the graphical interface it returns back to text mode.

I filed a bug report in bugzilla ( 2029404 – X11 doesn't start in Fedora 35 ) in December, but so far it appears that nobody has reacted to it.

Comparing package lists between the old computer and my main one (still runninig F34), I didn’t notice anything relevant missing, but I noticed that the old one had the package fedora-release-identity-basic instead of fedora-release-identity-kde of the new one. I installed fedora-release-identity-kde to see if it would bring some kde dependencies that might be missing, but it didn’t.

To test if the problem was some personal settings in my home directory, I created a test account and when I did startx with that account, it apparently started the gnome desktop. No start menu in the taskbar, in the left there is only “Activities” which changes the display and shows Firefox and file cabinet icons and a 3x3 grid in the bottom and the 3x3 grid brings icons to the screen in alphabetical order with no grouping. I don’t like this. I found the desktop switcher application by typing “sw” in the search bar, but it doesn’t show KDE, only Gnome desktop and System default.

Any idea what I may be missing, and what could prevent startx with my normal user account? There’s a Xorg.0.log file from a failed attempt and rpm package list from December attached to the bugzilla entry I mentioned ( 2029404 – X11 doesn't start in Fedora 35 ), I have updated all rpm packets that have newer versions in the repository, but nothing has helped so far.

I hesitate upgrading my main computer to F35 before I get this thing sorted out, in case it might show the same symptoms.

I guess it has to do with this?! :
Changes/WaylandByDefaultForPlasma - Fedora Project Wiki

3 Likes

Hi, as long as I know, if we run startx in Fedora 35, most likely it will launch Gnome/GTK kind of things.

Maybe you need specific command to launch kde session. For example I want to use Gnome, then I type gnome-session from terminal or I3 wm by typing i3.

I search on internet, found here.

They are named startplasma-wayland and/or startplasma-x11 now.

Or you could try to find it inside bin (/bin, or /usr/share/bin) directory with name related to kde or plasma.

Could be related to the wayland change.
I remember that when I upgraded to Fedora 34, the X11 display didn’t use the whole screen, just part of it, and System settings / System information showed that it was using wayland instead of X11 that it had used before. Some later update fixed that, so X11 was used again with the correct resolution for the monitor.
Both my computers have an Intel processor with builtin graphics adapter, the primary one (still running F34) has Core i5-9400 and the secondary one (upgraded to F35) has Core 2 Duo.
Following the hint in the WaylandDefaultForPlasma page, I uncommented the “DisplayServer=x11” line in /etc/sddm.conf , but it didn’t help. Still startx doesn’t work.

I tried the command startplasma-x11, but it just says
“$DISPLAY is not set or cannot connect to the X server.”

what says xrandr

1 Like

Please also check this:

There are some major changes in recent versions of fedora, and for most that have been just doing the system-upgrade method of updating for as long as you have see issues. That leads me to recommend that you make certain any data you want to keep is in a separate partition such as /home.

Then do a clean install of fedora 35 to clean out all the cruft that has built up in configs over the years. You will also want to make certain that all the old configs that are in /home/username/dot files are not kept. Even the sound system is totally changed and many users are finding that apps that worked on 34, 33, and earlier just don’t without starting a new clean default config for that app.

1 Like

What also works, and I made is, to use a external HD over USB3 or higher and start over there.
If everything works you just exchange the external HD with the internal.

So, any time you have a boot-able backup on hand.

You just have to ensure that your external HD has a own grub loader. I guess you get asked while installing it on a external HD.

P.S. i do have a SATA3 docking station. A usb3 adapter to SATA might be a effort-able alternative.

$ xrandr
Can’t open display

systemctl status sddm

  • sddm.service - Simple Desktop Display Manager
    Loaded: loaded (/usr/lib/systemd/system/sddm.service; enabled; vendor preset: enabled)
    Active: inactive (dead)
    Docs: man:sddm(1)
    man:sddm.conf(5)

I tried the stuff suggested in the “Failed to start Simple Desktop Display Manager” page linked earlier
systemctl stop sddm
systemctl disable sddm
systemctl enable sddm
, but it didn’t help. And ls -lu /etc/sddm.conf shows the last access date at the time I edited the file to uncomment “DisplayServer=x11”.
I also did dnf reinstall to some packets mentioned on that page (I suppose that’s the equivalent to the pacman commands mentioned there), but I don’t have mhwd mentioned and don’t know what is the equivalent (or is some additional packet needed).

Now I have this thing sorted out.

During the weekend I finally gave up trying to get the configuration or packages working to allow kde, and decided to do the clean install. I tend to avoid it whenever possible, because getting the configurations back to the way I want always takes some time and head-scratching. And some trial and error, because I never remember to take notes about every step, and some things may just have been better configured in some earlier version by default.

I had an earlier installation of an older Fedora version on sda1 partition, and the upgraded F35 on sda7 which had been my working installation for some time. The sda1 installation had some network glitch I hadn’t bothered to figure out, so I had used the sda7 installation for some release versions.

I booted to the F35 live image and started the “Install to disk” program, don’t remember the exact name on the icon. I tried to just define the root partition to sda1 and not touch any other partitions, meaning to use the same home and swap partitions I used with the sda7 installation. It started installing, but ended with an error message of not being able to install boot loader.
I launched the command window and tried grub2-install /dev/sda, but it didn’t work, the error message complained about some space problem (don’t remember the exact message).
After some more failed installation trials I finally gave up trying to define the partition the way I wanted and let the installation program do the partitions. I had some unpartitioned space left at the end of the disk anyway. Fortunately it let me define which existing partitins I want to keep and which ones to recycle. I let it recycle the existing sda1 because its earlier contents had probably already been written over in the previous installation trials, and I thougt it might want to use the beginning of that partition to something else.

This time the installation succeeded, but it had created a /boot partition as sda1 and now it had sda4 as the new root partition of the installation.
I had never had a separate /boot partition on that machine before, the /boot directory had always been on the root partition. But it doesn’t really matter. It also created a new /home partition, but it doesn’t matter either.
I created my normal user account and now got X11 and kde started with it!
Next I mounted the old home partition to /home and chowned the user’s home directory with its contents, because the uid had changed.
Again, X11 didn’t start.
Next I began moving some configuration directories and files, ones starting with a dot, out of the way until X11 started again.
And then I started moving things back to figure out which one prevented startx earlier. I noticed a new .config directory had been created, and didn’t move the old one back (there’s probably nothing I really need). I also haven’t moved some program-specific config directories back, I don’t think there is anything in them that I can’t just reconfigure from the programs themselves. I also left directories .fontconfig, .fonts , .gconf, .gconfd, .gnome2, .gnome2_private, .icedteaplugin, .kde, .local, and .pki where I moved them.
I have moved .ICEauthority, .Xauthority, .Xdefaults and .Xresources back, but not .Xclients and .Xclients-default which say that they are created by Red Hat Desktop Switcher and the timestamps are from years 2009 and 2010.

Startx still works… I am not sure what prevented it first, it may be .Xclients or .Xclients-default or one of the config directories I didn’t move back.
When I have got all the configurations on the old machine working as I want them (I still miss apper, however…), and tested that everything works, it’s time to upgrade the newer main computer.
It may be easier than the old one, because I bought it in 2010 so I did the clean install with F32 and have earlier upgraded only to F33 and F34. It also already has separate /boot and /boot/efi partitions on the ssd drive and probably more room where the boot loader stuff goes.

Now I have upgraded my main machine.
Just dnf system-upgrade download --releasever=35
and dnf system-upgrade reboot
as it has been with most distro upgrades so far, no problem, everything works as expected.
This one was built in summer 2020, so I made the original install with F32. The newer hardware and more recent clean install obviously made the difference, but I still would have preferred to have also the secondary machine working all the way with just dnf system-upgrade.