[SOLVED]Cannot set primary display on Mageia 7

[SOLVED]Cannot set primary display on Mageia 7

Postby banjo » Jul 29th, '19, 20:14

I have installed Mageia 7 on my system that has two monitors attached. The graphics card is Nvidia, so I installed the Nvidia driver. All is working well with the two monitors except that the primary display keeps defaulting to the secondary monitor.

Here is the setup: I have a DVI monitor on the left side and an HDMI monitor on the right side. I normally operate with the right-side HDMI as my primary monitor and the left side DVI as my secondary. When I first booted and logged in, the launcher and task bar etc. were displayed on the left side DVI monitor.

I went to System Settings => Hardware => Display and Monitor and the "Primary display" selector showed "No Primary Output". I selected the HDMI as the primary and clicked on the Apply button. The launcher and all that switched over to the right side as expected and all was good.

However, when I log out and then log back in, Plasma reverts back to the original state with the launcher etc. on the left side and the Primary display selector showing "No Primary Output" again.

Anybody know why this setting won't stick? Where is the setting stored? Is there something else that I need to do, or is this a bug?

After setting the display the way I want it, the output from xrandr shows:

Code: Select all
[poobah@localhost X11]$ xrandr
Screen 0: minimum 8 x 8, current 3840 x 1080, maximum 16384 x 16384
DVI-I-0 disconnected (normal left inverted right x axis y axis)
DVI-I-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 509mm x 286mm
   1920x1080     60.00*+
   1440x900      59.89 
   1280x1024     60.02 
   1280x800      59.81 
   1152x864      75.00 
   1024x768      70.07    60.00 
   800x600       60.32    56.25 
   640x480       59.94 
DP-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected primary 1920x1080+1920+0 (normal left inverted right x axis y axis) 509mm x 286mm
   1920x1080     60.00*+  59.94    50.00 
   1680x1050     59.95 
   1440x900      59.89 
   1280x1024     60.02 
   1280x800      59.81 
   1280x720      60.00    59.94    50.00 
   1152x864      75.00 
   1024x768      70.07    60.00 
   800x600       60.32    56.25 
   720x576       50.00 
   720x480       59.94 
   640x480       59.94    59.93 
DP-1 disconnected (normal left inverted right x axis y axis)


Clearly, the HDMI output is primary.

After I log out and then log back in, xrandr shows the following:

Code: Select all
[poobah@localhost ~]$ xrandr
Screen 0: minimum 8 x 8, current 3840 x 1080, maximum 16384 x 16384
DVI-I-0 disconnected primary (normal left inverted right x axis y axis)
DVI-I-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 509mm x 286mm
   1920x1080     60.00*+
   1440x900      59.89 
   1280x1024     60.02 
   1280x800      59.81 
   1152x864      75.00 
   1024x768      70.07    60.00 
   800x600       60.32    56.25 
   640x480       59.94 
DP-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 509mm x 286mm
   1920x1080     60.00*+  59.94    50.00 
   1680x1050     59.95 
   1440x900      59.89 
   1280x1024     60.02 
   1280x800      59.81 
   1280x720      60.00    59.94    50.00 
   1152x864      75.00 
   1024x768      70.07    60.00 
   800x600       60.32    56.25 
   720x576       50.00 
   720x480       59.94 
   640x480       59.94    59.93 
DP-1 disconnected (normal left inverted right x axis y axis)


This shows that a disconnected DVI output is the primary.

Here is the inxi information for the system.

Code: Select all
[poobah@localhost ~]$ inxi -b
System:    Host: localhost Kernel: 5.1.18-desktop-1.mga7 x86_64 bits: 64
           Desktop: KDE Plasma 5.15.4 Distro: Mageia 7 mga7
Machine:   Type: Desktop System: ASUS product: All Series v: N/A serial: <root required>
           Mobo: ASUSTeK model: Z97-A-USB31 v: Rev 1.xx serial: <root required>
           UEFI: American Megatrends v: 2501 date: 06/24/2015
CPU:       Quad Core: Intel Core i5-4590 type: MCP speed: 1400 MHz min/max: 800/3700 MHz
Graphics:  Device-1: NVIDIA GM107 [GeForce GTX 750 Ti] driver: nvidia v: 430.26
           Display: x11 server: Mageia X.org 1.20.4 driver: nvidia,v4l
           resolution: 1920x1080~60Hz, 1920x1080~60Hz
           OpenGL: renderer: GeForce GTX 750 Ti/PCIe/SSE2 v: 4.6.0 NVIDIA 430.26
Network:   Device-1: Intel Ethernet I218-V driver: e1000e
Drives:    Local Storage: total: 1.38 TiB used: 27.03 GiB (1.9%)
Info:      Processes: 182 Uptime: 1h 01m Memory: 7.73 GiB used: 1022.0 MiB (12.9%)
           Shell: bash inxi: 3.0.33


It looks like the system is using a default order for the ports because the setting I chose was not saved.

Thanks for any help
Banjo
(_)=='=~
Last edited by banjo on Sep 8th, '19, 13:45, edited 2 times in total.
If only the best bird sang, the forest would be a very quiet place.
User avatar
banjo
 
Posts: 200
Joined: May 4th, '11, 03:50
Location: Reading, Massachusetts

Re: Cannot set primary display on Mageia 7

Postby ITA84 » Jul 30th, '19, 09:17

A few places come to mind regarding display settings: for KDE Plasma (kscreen) settings might be in ~/.config/kdeglobals (KScreen section), and there may be some in ~/.config/plasmashellrc as well; I've also read about people having trouble with their display settings solved it by clearing the ~/.local/share/kscreen folder (which I assume caches display settings, but I'm not sure). Lastly, there might be some global X11 settings in /etc/X11/xorg.conf or inside xorg.conf.d that affect connector priority, but I know even less about that
ITA84
 
Posts: 195
Joined: Mar 5th, '13, 18:15

Re: Cannot set primary display on Mageia 7

Postby banjo » Jul 30th, '19, 15:59

Thanks, I will go take a look. This is a brand new installation on a new disk, so there should not be any leftover cruft in those folders, but you never know.
If only the best bird sang, the forest would be a very quiet place.
User avatar
banjo
 
Posts: 200
Joined: May 4th, '11, 03:50
Location: Reading, Massachusetts

Re: Cannot set primary display on Mageia 7

Postby doktor5000 » Jul 30th, '19, 17:35

ITA84 wrote:clearing the ~/.local/share/kscreen folder (which I assume caches display settings, but I'm not sure).

It stores the settings, it doesn't cache them. kscreen is basically a frontend to xrandr

And xorg.conf(.d) type settings always require a restart of the X server and they are system-wide, not per user. Also you can't dynamically change those.

What I'd check is if there are any settings in /etc/X11/xorg.conf(.d) regardings modelines and such, and remove them.
Then move away (backup) any existing kscreen settings, and set again as desired. If that still doesn't work, follow the proposal by the developers and file a bugreport
with the old and new kscreen settings: https://bugs.kde.org/show_bug.cgi?id=346961
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 15022
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Cannot set primary display on Mageia 7

Postby banjo » Jul 30th, '19, 20:19

Thanks.

I will look at those options and get back.
If only the best bird sang, the forest would be a very quiet place.
User avatar
banjo
 
Posts: 200
Joined: May 4th, '11, 03:50
Location: Reading, Massachusetts

Re: Cannot set primary display on Mageia 7

Postby banjo » Aug 4th, '19, 16:55

I am still looking into this issue, but my Mageia 7 installation disappeared. The SSD I put it on is seen by the EFI as a block device but it is no longer a bootable drive. I think it is a hardware problem with the SSD. I booted to the Live system, and Gparted can see all the normal partitions on the drive with proper sizes etc. I mounted the drive using an external USB enclosure, and that can access what looks like a normal setup of directories and files. I think that a critical file got corrupted. Not good.

My confidence in the drive has been destroyed, so I need to decide whether to re-install the OS on that drive and see how it goes, or trash the drive and buy another brand.

I will press on and get back when I have a system that I can address the KDE problem on.

Banjo
(_)=='=~
If only the best bird sang, the forest would be a very quiet place.
User avatar
banjo
 
Posts: 200
Joined: May 4th, '11, 03:50
Location: Reading, Massachusetts

Re: Cannot set primary display on Mageia 7

Postby banjo » Aug 28th, '19, 15:38

I finally got my new SSD to appear as a bootable drive. I had to boot the drive using the legacy BIOS for some reason. But that issue is addressed in a different post. This update is about my investigation into why I cannot set a primary display in Mageia 7 Plasma.

I installed Plasma, Gnome, and XFCE using the Classic installer to see if I could determine whether this is a Plasma problem or an xorg problem, basically does it work in other desktop environments.

I logged into Plasma and set the primary display, then logged out and logged back in. Plasma failed to remember the setting, and it defaulted to "No Primary Display".

Then, I logged into Gnome. In Gnome I did not have to set the primary display at all. Gnome came up with the correct display as primary. So the primary display setting done in Plasma was, in fact, stored somewhere. Plasma is not looking at it, but Gnome is.

I logged into XFCE, and the Settings tool indicated that the proper primary display was set, but it seems to have ignored the setting. The menus etc. were still on the wrong display. I will not try to figure that out since XFCE is of no interest to me. I just wanted to see if it would retain the setting.

I tried to run xrandr to see what that tool thinks is primary. Xrandr was not installed. There is no ~/.local/share/kscreen folder at all.

I installed arandr, which brought in xrandr as a dependency. Arandr is a small GUI front end for xrandr with a nice utility that allows me to save a bash script to set up the screens. Executing the following command after a new login set the screens up properly.

Code: Select all
xrandr --output HDMI-0 --primary


Since xrandr was able to fix the problem, I used arandr to create the following script.

Code: Select all
#!/bin/sh
xrandr --output DVI-I-0 --off --output DVI-I-1 --mode 1920x1080 --pos 0x0 --rotate normal --output DP-0 --off --output HDMI-0 --primary --mode 1920x1080 --pos 1920x0 --rotate normal --output DP-1 --off


The script uses an xrandr call to turn off the unconnected ports and set up the connected ports according to my desires.... making HDMI-0 the primary display. The script works.

I stored the script in ~/.screenlayout/SetHDMI-0-primary.sh and added it to the Autostart list in Settings. That seems to have worked, and when I log into Plasma the screens show up properly configured. So this is a workaround that actually works.

However, I do not want to flag this issue as SOLVED yet because of another issue. Each time I log into Plasma, the dialog box shown below pops up. I don't know what tool is displaying the box, but I suspect that it is Plasma thinking that is has not been configured for the displays.

WhatIsThisBox.png
What is posting this box?
WhatIsThisBox.png (79.28 KiB) Viewed 205 times


I have always been clicking on the "Leave unchanged" button on the far right so as not to create chaos in my screens. It is not totally clear what the buttons do. However, I think I will boot it up and select one of the other options to see if that is required to initiate/configure a storage mechanism that will make Plasma remember my settings. I don't know. It is all a black box to me at this point.

Although I have a workaround to use in fixing the screens, I do not want to see that ugly box appear each time I log in. So I am continuing my search for solutions.

Stay tuned. I will get back once I have more progress to report.

Banjo
(_)=='=~
If only the best bird sang, the forest would be a very quiet place.
User avatar
banjo
 
Posts: 200
Joined: May 4th, '11, 03:50
Location: Reading, Massachusetts

Re: Cannot set primary display on Mageia 7

Postby banjo » Sep 8th, '19, 13:44

I think I figured out what is going on. I did a complete re-installation of Mageia 7.1 for reasons not related to this issue (I re-partitioned the disk and it threw an error, so I started over).

As I mentioned before, after the installation was done, there was no directory ~/.local/share/kscreen and xrandr was not installed. When I logged into Plasma, the large screen config dialog was posted again. There is no explanation of what this is or why it has been displayed. So I told it to leave things unchanged and used System Settings to set up the screens properly. When I logged out and logged back in, Plasma forgot my settings.

So, just to see what would happen, I logged in and clicked on the button highlighted in the image below.

PlasmaScreenConfigDialog.png
Screen Configuration Dialog
PlasmaScreenConfigDialog.png (131.84 KiB) Viewed 178 times


None of the buttons were appropriate for my configuration, and it set up the screens incorrectly, but it did remember the setup across logins. It also created the directory ~/.local/share/kscreen with its normal cryptic file named 95254f114b92fb359e4f83d0d0531fd8. So I guess Plasma is looking for ~/.local/share/kscreen, and if it is not there, it assumes that the displays are not configured. The dialog box must the way that it tells the user that the screens are not configured.

I confirmed that it is ~/.local/share/kscreen that is driving the dialog box by deleting the directory and logging out/in. The old behavior returned, and clicking on the button once again created the directory ~/.local/share/kscreen.

It is unclear to me why Plasma would not simply create a default directory and use it, or put a message in the dialog box to explain what is going on. But then I am sure that the platform has many complicated parts that I am not aware of which might make that more difficult to do than it is to request. It is also unclear to me what Gnome and XFCE are looking at which told them which monitor was primary. It certainly wasn't ~/.local/share/kscreen. At some level xorg had that information, but Plasma was not looking at it.

Anyway, the problem is resolved without recourse to cryptic file edits or xrandr scripts that need to be run every time I log in.

Here is the summary of the resolution:

If you see the dialog box shown above the first time you log into Plasma, click on one of the options even it is isn't appropriate to your setup. That will initialize the ~/.local/share/kscreen directory. Then you can go back into System Settings=>Hardware=>Display and Monitor and set it up the way you want it. Once the directory ~/.local/share/kscreen exists, the settings will be remembered properly.

Banjo
(_)=='=~
If only the best bird sang, the forest would be a very quiet place.
User avatar
banjo
 
Posts: 200
Joined: May 4th, '11, 03:50
Location: Reading, Massachusetts

Re: Cannot set primary display on Mageia 7

Postby doktor5000 » Sep 9th, '19, 16:49

Regarding your complaints/concerns about the kscreen OSD popup, read through https://bugs.kde.org/show_bug.cgi?id=398816

banjo wrote:It is also unclear to me what Gnome and XFCE are looking at which told them which monitor was primary. It certainly wasn't ~/.local/share/kscreen. At some level xorg had that information, but Plasma was not looking at it.

I believe that was already explained earlier to you. Xorg controls the display, and X offers the so-called XRandR extension - https://www.x.org/wiki/Projects/XRandR/
Each desktop environment usually offers its own randr frontend to control monitors and displays. Under GNOME that information would be stored in ~/.config/monitors.xml and would be directly used by GDM when starting your session iirc.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 15022
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: [SOLVED]Cannot set primary display on Mageia 7

Postby banjo » Sep 9th, '19, 18:44

Doktor,

Thanks for the pointer to the bugzilla. I did not find that one in my search, so I had not seen it. It is exactly what I was seeing on my installation.

My comments were not really a complaint. I was puzzled as to why explicitly setting the display configuration in System Settings would be ignored, and the only way to initialize the configuration would be through the popup box at login. After reading through the report, it seems that others were puzzled by that as well, and that those issues are being addressed.

After the installation was done, xrandr was not installed on the system. That confused me a bit as well.

Anyway, it works now. Thanks for the info on Gnome and XFCE. I have little to no experience with those systems.

Banjo
If only the best bird sang, the forest would be a very quiet place.
User avatar
banjo
 
Posts: 200
Joined: May 4th, '11, 03:50
Location: Reading, Massachusetts


Return to Video

Who is online

Users browsing this forum: No registered users and 1 guest

cron