• Welcome to Peterborough Linux User Group (Canada) Forum.
 

Forced convert to Linux Mint on a high dpi iMac

Started by fox, October 15, 2017, 09:17:49 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

fox

#30
I can add a new interesting finding to the saga. I downloaded openSUSE Tumbleweed Live (KDE version) the other day, put it on a USB stick and tried to boot it on my late 2015 5K iMac. And guess what? It booted up right away without any special mode setting options! I had tried openSUSE Leap before and it didn't, but it was some community version because Leap doesn't have a live version. The difference, I think, is that Tumbleweed has the latest kernel (4.15.5-1), and I read earlier that kernel 4.15 included some improvements on the open source AMDGPU driver. Also, the window was fluid. A bunch of dpi settings were available, but unfortunately the 2560x1440 gave something distorted, and several other settings ended up blanking my display. I tried with the Gnome version and got the same results. But in Gnome you can universally scale fonts and in KDE, the same. This gives me hope that the next round of distros, including Ubuntu 18.04, will run well on this iMac, even without a proprietary AMD driver.

Incidentally, openSUSE Tumbleweed live sees my Broadcom wifi; something that Ubuntu and most Debian derivatives don't.
Ubuntu 24.10 on 2019 5k iMac
Ubuntu 24.04 on Dell XPS 13

fox

Further good news on the 5k iMac/AMDGPU front. Ubuntu 18.04 (Bionic Beaver) will use version 4.15 of the Linux kernel, and this kernel does have vastly improved support for the newer AMD GPU's. I just downloaded the daily build and tried the live USB version on my Late 2015 iMac. It boots right up with the default Grub mode settings. Once booted up, the default open source AMDGPU is very functional. You get alternative monitor settings (I can verify that 2560x1440 works), and window movement is smooth! This is actually better performance than I got with the live USB for openSUSE Tumbleweed in that the display setting change actually works. I don't know why there is this difference between Ubuntu and openSUSE, but perhaps the latter is missing a library or some other package needed for proper functioning that is present in the Ubuntu live USB. There was a slight difference in kernel: 4.15.0-10-generic for Ubuntu and 4.15.5.-1 for openSUSE Tumbleweed. I doubt that this difference would be the cause, but I can't rule it out.

All of this is cause for rejoicing! It means that I no longer have to worry that my recent iMac won't function right with newer Linux distros and most important for me, that 18.04 works out of the box. I am no longer a forced convert to Linux Mint. That doesn't necessarily mean I'll stop using it, but now I have choice  :)
Ubuntu 24.10 on 2019 5k iMac
Ubuntu 24.04 on Dell XPS 13

Jason

Nicely done. Maybe they're not loading the same driver? Try this command in the terminal for both and compare the output (assuming that it's in other distros other than LM):

inxi -xG

* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13

fox

#33
Drivers are different.

In openSUSE, I get "modesetting,ati(unloaded fbdev,vesa,radeon)"
In Ubuntu, I get "amdgpu" as well as openGL version 4.5 Mesa 17.3.3, direct rendering: yes

Can you interpret the openSUSE output? What I'm thinking it did was not install amdgpu, but rather an ati driver and it blacklisted fbdev, vesa and radeon drivers that might conflict with it. I seem to recall fbdev being one of the thinks that some usb distro boots were stuck on, and also some advice on the internet to blacklist radeon. If so, then I now have another important piece of information, which is to blacklist those drivers in the grub bootup sequence, after which perhaps any distro will boot on this iMac? What do you think?

Perhaps as well, if I wanted to install openSUSE, I might be able to download and install the open source amdgpu driver, which would add back full modesetting functionality. Or perhaps openSUSE would install this driver automatically if I installed the distro instead of running it from a live USB.
Ubuntu 24.10 on 2019 5k iMac
Ubuntu 24.04 on Dell XPS 13

Jason

Quote from: fox on February 26, 2018, 03:41:04 PM
Drivers are different.

In openSUSE, I get "modesetting,ati(unloaded fbdev,vesa,radeon)"
In Ubuntu, I get "amdgpu" as well as openGL version 4.5 Mesa 17.3.3, direct rendering: yes

Can you interpret the openSUSE output? What I'm thinking it did was not install amdgpu, but rather an ati driver and it blacklisted fbdev, vesa and radeon drivers that might conflict with it. I seem to recall fbdev being one of the thinks that some usb distro boots were stuck on, and also some advice on the internet to blacklist radeon. If so, then I now have another important piece of information, which is to blacklist those drivers in the grub bootup sequence, after which perhaps any distro will boot on this iMac? What do you think?

I only recently found about using the inxi command from Linux Mint forums, incidentally. But what you're saying sounds correct. But you mentioned that it doesn't work as well in OpenSUSE so I'm thinking you don't want to use it's procedure with other distros. Fbdev is related to framebuffer which is essentially a mode that will work with every graphics card/chipset but its performance isn't very good. When Linux distros first start up, before they get to the graphical login(if they have one), it's using framebuffer mode, I believe. Though I might be confusing that with VESA.


QuotePerhaps as well, if I wanted to install openSUSE, I might be able to download and install the open source amdgpu driver, which would add back full modesetting functionality. Or perhaps openSUSE would install this driver automatically if I installed the distro instead of running it from a live USB.

I think that this would be a better approach. If you check the support pages for opensuse, they probably have information on installing it. Their docs can be quite extensive.
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13

fox

#35
Jason, that inxi -xG command is very useful. I just ran it on my Mint 18.3 installation, which as you might recall, was until recently the only distro that booted up right away on this iMac using the less drastic "nointremap" grub parameter. Here is the output:

Graphics:  Card: Advanced Micro Devices [AMD/ATI] Device 6920 bus-ID: 01:00.0
           Display Server: X.Org 1.18.4 drivers: ati,amdgpu (unloaded: fbdev,vesa,radeon)
           Resolution: 2560x1440@59.95hz
           GLX Renderer: AMD RADEON R9 M390X (AMD TONGA / DRM 3.3.0 / 4.8.0-53-generic, LLVM 5.0.0)
           GLX Version: 3.0 Mesa 17.2.8 Direct Rendering: Yes


As you can see, it's a hybrid between the output from Ubuntu 18.04 daily build and openSUSE Tumbleweed. It is using the AMDGPU driver, but it blacklisted (I think that's how you interpret "unloaded") fbdev, vesa and radeon. So thanks to you, I think I finally understand what the problem has been in getting various distros to boot up on this iMac: conflict with other drivers and the absence of the open source AMDGPU driver, which seems to require some other software to work (firmware-linux, clang and llvm). At least the first one isn't necessarily present on a live USB or a default installation of some distros, as it is a closed source firmware blob. For those, the answer seems to be to install them, add the software, and make sure the offending drivers are blacklisted.
Ubuntu 24.10 on 2019 5k iMac
Ubuntu 24.04 on Dell XPS 13

Jason

I don't think "unloaded" means blacklisted. I believe it just means that Linux loaded those modules (drivers, in this case) early on and when it was able to load more modules after mounting the root file system, it saw a better driver, unloaded those and loaded the better one and yes, it had to unload the others because they would likely conflict. But I believe the same thing happens at every boot (loading those modules and then unloading them once the AMDGPU driver was found probably on the root filesystem).
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13

fox

OK, got it. Unfortunately, this brings me back to square one with regarding to getting live USB's to boot correctly. If the distro (like openSUSE) isn't pre-programmed to load the AMDGPU driver, how do I get it working? In the case of openSUSE Tumbleweed, I was partly successful because it loaded "modesetting" and "ati". But I don't know how it did that.
Ubuntu 24.10 on 2019 5k iMac
Ubuntu 24.04 on Dell XPS 13

Jason

#38
Look up how to load and unload modules in Linux. If you know the module you need and it's available it shoudln't be hard to load on the fly. As far as trying to get it with Live versions, I woudln't bother, as long as you get at least some workable display. Live versions are meant to try out Linux distros. They're not really meant to run from permanently from unless you like running on a much slower USB drive. This might help but I admit I haven't tried it. Back in the day you used to have to modprobe to get lots of hardware to work:

https://askubuntu.com/questions/961129/how-can-i-force-the-amdgpu-module-to-load-after-other-modules

Though that question is specifically for Ubuntu (or LM) you can probably find a customized version for other distros.
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13

fox

Interestingly enough, when I checked my Ubuntu 16.04 distro with your inxi -xG command, I got the following:
Graphics:  Card: Advanced Micro Devices [AMD/ATI] Device 6920 bus-ID: 01:00.0
           Display Server: X.Org 1.19.5 drivers: ati,amdgpu (unloaded: fbdev,vesa,radeon)
           Resolution: 2560x1440@59.95hz
           GLX Renderer: AMD RADEON R9 M390X
           GLX Version: 4.5.13505 - CPC 17.50.2.13 Direct Rendering: Yes


This is after I downloaded and installed the AMDGPU-pro driver, but the important part is the same drivers are unloaded. I didn't set up anything to do that other than installed the closed source driver, so it appears that an "AMD-aware" distro does this automatically, at least with a kernel below 4.14. Mint is an oddity. It works fine on kernel 4.8 on my 5k iMac and always has, but upgrade the kernel to 4.13 and it chokes at bootup.
Ubuntu 24.10 on 2019 5k iMac
Ubuntu 24.04 on Dell XPS 13

fox

Quote from: Jason Wallwork on February 26, 2018, 04:27:52 PM
Quote from: fox on February 26, 2018, 03:41:04 PM
Drivers are different.

In openSUSE, I get "modesetting,ati(unloaded fbdev,vesa,radeon)"
In Ubuntu, I get "amdgpu" as well as openGL version 4.5 Mesa 17.3.3, direct rendering: yes

....

....

QuotePerhaps as well, if I wanted to install openSUSE, I might be able to download and install the open source amdgpu driver, which would add back full modesetting functionality. Or perhaps openSUSE would install this driver automatically if I installed the distro instead of running it from a live USB.

I think that this would be a better approach. If you check the support pages for opensuse, they probably have information on installing it. Their docs can be quite extensive.
I took your advice and found that to get the amdgpu driver, you need the file "xf86-video-amdgpu. There is a candidate for this in the openSUSE Tumbleweed, so I downloaded it and installed it. It worked! When I rebooted and checked the video setting with inxi -xG, I got:
Graphics:  Card: Advanced Micro Devices [AMD/ATI] Device 6920
           bus-ID: 01:00.0
           Display Server: x11 (X.org 1.19.6 )
           drivers: ati,amdgpu (unloaded: modesetting,fbdev,vesa,radeon)


Note that the "modesetting" driver was unloaded this time, replaced by amdgpu. Now the modes work, and they work properly! Note that all this is from a live USB; I haven't installed it. What's neat about the openSUSE Tumbleweed live distro is that it saves changes. Colour me very impressed with openSUSE Tumbleweed. I'm actually tempted to install it, and I would be willing to demo it at a future meeting (KDE version even).
Ubuntu 24.10 on 2019 5k iMac
Ubuntu 24.04 on Dell XPS 13

Jason

Interesting! And good job on working it out. I think you might have done enough investigation to do a future presentation on troubleshooting graphics, too.
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13