[SOLVED] How to make openchrome driver work with Antix-19
antiX / MX LinuxThis forum is for the discussion of antiX and MX Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a laptop with Via electronics and a Via Chrome graphics chip. It used the openchrome driver in AntiX-17 and -18 without problems. When installing AntiX-19, I had to use safe mode to get the installation medium to boot to a graphical screen. During the installation, I noticed some ghost images on the screen. The installed version has ghosts too, a lot of them, especially when the cpu is busy. It uses the vesa driver, which seems not to work very well on this video chip.
I have tried to configure it for openchrome without success. The openchrome driver loads but can't open the framebuffer.
Code:
[ 68.651] (--) CHROME(0): Mapping the frame buffer at address 0xF0000000 with size 131072 KB.
[ 68.651] (EE) CHROME(0): Unable to map the frame buffer.
Error: Invalid argument (22)
[ 68.651] (II) CHROME(0): Exiting viaMapMMIO.
[ 68.651] (II) CHROME(0): VIAFreeRec
[ 68.651] (II) CHROME(0): VIAFreeScreen
[ 68.651] (II) CHROME(0): VIAFreeRec
[ 68.651] (II) UnloadModule: "openchrome"
I then tried the modesetting driver, but got a different error:
Code:
[ 885.581] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 885.581] (II) VESA: driver for VESA chipsets: vesa
[ 885.581] (EE) open /dev/dri/card0: No such file or directory
[ 885.581] (WW) Falling back to old probe method for modesetting
[ 885.581] (EE) open /dev/dri/card0: No such file or directory
[ 885.581] (EE) Screen 0 deleted because of no matching config section.
[ 885.581] (II) UnloadModule: "modesetting"
What configuration options do I need to use to get one of these to work? Having to use vesa is very tiring for my eyes.
I have a vague recollection either iomem=relaxed or one of the iommu parameters is needed for openchrome to work in recent kernels. I suspect openchrome is not in the modesetting DDX support list.
"iomem=relaxed" rings a bell. I think now that this must have happened before, although I had no memory of it before reading your post. I'll try it anyway. Thanks.
You'll laugh! Adding iomem=relaxed makes the vesa driver work almost perfectly. No more tearing and no ghost cursors. Nice sharp background too. The only thing wrong with it is the aspect ratio. According to xrandr, it's using 1280x768. 768 is the height of a standard monitor and I need something lower.
I have edited the option into /etc/grub/defaults and updated grub, so it should boot like that from now on. I have also put an openchrome file into /etc/X11/xorg.conf.d to see if that works now and if it solves the aspect ratio problem.
I was expecting the cmdline option to cause automagic to pick up the propriety of the openchrome driver over fbdev or vesa. What did you have to put in /xorg.conf.d/? With this thread as a search result, the seeker probably would like to know. Was iomem=relaxed what you stuck with? What did you change in /etc/default/grub?
Vesa is the driver named in xorg.conf. I didn't want to edit that file because I'm a bit nervous about video configuration, so I just put a little file for openchrome into xorg.conf.d. I can't remember exactly what I put into it but it was something like
It looks from the Xorg log as if openchrome loads first, then unloads and gives way to vesa. But I don't much care about that as long as everything works. It seems that having openchrome load first solves the aspect ratio problem. You can see that Xrandr now shows 1280x800 compared with 1280x768 for vesa only, and my panel now appears properly at the bottom of the screen without needing to scroll down.
Quote:
Was iomem=relaxed what you stuck with? What did you change in /etc/default/grub?
Yes, iomem=relaxed was all that was necessary. I just added it to the command line options in /etc/default/grub and then updated grub.
I think you are misinterpreting the loading & unloading you see in the log. Try grep -i load /var/log/Xorg.0.log and you should see it tries loading the highest competence drivers before the lower, then unloads in reverse order all but the one selected for use. In yours that means first to load, and thus be utilized, is openchrome, as confirmed by inxi.
Distribution: antiX using herbstluftwm, fluxbox, IceWM and jwm.
Posts: 631
Rep:
@hazel - I'd like to put the fix in our tipsntriks section over at antiX forums.
Could you outline the steps you followed to fix it (again), please - thanks
Problem:
Some old video drivers do not work easily with modern kernels. The openchrome driver, used for Via Chrome graphics is one that does not. The problem is the kernel flag CONFIG_IO_STRICT_DEVMEM which, for security reasons, prevents userspace programs from accessing hardware registers. This prevents these drivers from mapping the framebuffer unless special steps are taken. Symptoms:
The installation disc may fail to start X unless a safe mode boot is selected. In the installed system, the vesa driver is used instead of the chip-specific driver, but it gives very poor results with tearing and ghost cursors, especially when there is a load on the cpu. Solution:
1. Use the kernel command line parameter "iomem=relaxed". This allows proper framebuffer mapping. For a one-off boot in this mode, simply press "e" when you see the GRUB menu, to enter edit mode. Scroll down to the kernel command line and add the required parameter.
2. To make the change permanent, you need to edit (as root) the /etc/default/grub file. There is a line in the file for the kernel command line. Simply add the "iomem=relaxed" parameter to this line. Then run update-grub. Every subsequent update of GRUB will include the new parameter.
3. This change alone makes the vesa driver work much better. The image is sharper, there is no tearing and no ghosts. However there may still be problems with the video mode, causing a mismatch between the picture size and the screen. This disappears when you use the card-specific driver. But because this driver was not in use during installation, you must either edit it into /etc/X11/xorg.conf in place of the vesa driver or add an extra configuration file in /etc/X11/xorg.conf.d, for example:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.