LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > antiX / MX Linux
User Name
Password
antiX / MX Linux This forum is for the discussion of antiX and MX Linux.

Notices


Reply
  Search this Thread
Old 11-22-2019, 10:32 AM   #1
hazel
Senior Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 3,681
Blog Entries: 10

Rep: Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017
How to make openchrome driver work with Antix-19


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.
 
Old 11-22-2019, 04:35 PM   #2
mrmazda
Senior Member
 
Registered: Aug 2016
Location: USA
Distribution: openSUSE, Debian, Knoppix, Mageia, Fedora, others
Posts: 1,931

Rep: Reputation: 593Reputation: 593Reputation: 593Reputation: 593Reputation: 593Reputation: 593
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.
 
1 members found this post helpful.
Old 11-23-2019, 06:52 AM   #3
hazel
Senior Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 3,681

Original Poster
Blog Entries: 10

Rep: Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017
"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.
 
Old 11-23-2019, 11:03 AM   #4
hazel
Senior Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 3,681

Original Poster
Blog Entries: 10

Rep: Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017
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.

Thank you very much.
 
Old 11-23-2019, 11:39 AM   #5
mrmazda
Senior Member
 
Registered: Aug 2016
Location: USA
Distribution: openSUSE, Debian, Knoppix, Mageia, Fedora, others
Posts: 1,931

Rep: Reputation: 593Reputation: 593Reputation: 593Reputation: 593Reputation: 593Reputation: 593
What else does xrandr report?
Code:
xrandr
inxi -GxxS
 
Old 11-23-2019, 11:56 AM   #6
hazel
Senior Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 3,681

Original Poster
Blog Entries: 10

Rep: Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017
Using openchrome solves the aspect ratio problem
Code:
$ xrandr
Screen 0: minimum 320 x 200, current 1280 x 800, maximum 2044 x 2048
VGA-1 disconnected primary (normal left inverted right x axis y axis)
FP-1 connected 1280x800+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1280x800      59.81*+
$ inxi -GxxS
System:
  Host: littleboy Kernel: 4.9.193-antix.1-amd64-smp x86_64 bits: 64 
  compiler: gcc v: 8.3.0 Desktop: IceWM 1.5.5+git20190610 dm: SLiM 
  Distro: antiX-19_x64-base Marielle Franco 16 October 2019 
  base: Debian GNU/Linux 10 (buster) 
Graphics:
  Device-1: VIA VX800/VX820 Chrome 9 HC3 Integrated Graphics 
  vendor: Samsung Co driver: N/A bus ID: 00:01.0 chip ID: 1106:1122 
  Display: x11 server: X.Org 1.20.4 driver: openchrome unloaded: vesa 
  resolution: 1280x800~60Hz 
  OpenGL: renderer: llvmpipe (LLVM 7.0 128 bits) v: 3.3 Mesa 18.3.6 
  compat-v: 3.1 direct render: Yes

Last edited by hazel; 11-23-2019 at 12:02 PM.
 
Old 11-23-2019, 04:19 PM   #7
mrmazda
Senior Member
 
Registered: Aug 2016
Location: USA
Distribution: openSUSE, Debian, Knoppix, Mageia, Fedora, others
Posts: 1,931

Rep: Reputation: 593Reputation: 593Reputation: 593Reputation: 593Reputation: 593Reputation: 593
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?
 
Old 11-24-2019, 03:52 AM   #8
hazel
Senior Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 3,681

Original Poster
Blog Entries: 10

Rep: Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017
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
Code:
Section "Device"
   Identifier "Videocard0"
   Driver     "Openchrome"
   VendorName "Via"
EndSection
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.
 
Old 11-24-2019, 05:44 AM   #9
mrmazda
Senior Member
 
Registered: Aug 2016
Location: USA
Distribution: openSUSE, Debian, Knoppix, Mageia, Fedora, others
Posts: 1,931

Rep: Reputation: 593Reputation: 593Reputation: 593Reputation: 593Reputation: 593Reputation: 593
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.
 
Old 11-25-2019, 08:57 AM   #10
anticapitalista
antiX
 
Registered: May 2005
Location: Greece
Distribution: antiX using herbstluftwm, fluxbox, IceWM and jwm.
Posts: 457

Rep: Reputation: 137Reputation: 137
@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
 
Old 11-25-2019, 09:57 AM   #11
hazel
Senior Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 3,681

Original Poster
Blog Entries: 10

Rep: Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017
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:
Code:
Section "Device"
   Identifier "Videocard0"
   Driver     "Openchrome"
   VendorName "Via"
EndSection

Last edited by hazel; 11-25-2019 at 10:04 AM.
 
Old 11-25-2019, 10:16 AM   #12
anticapitalista
antiX
 
Registered: May 2005
Location: Greece
Distribution: antiX using herbstluftwm, fluxbox, IceWM and jwm.
Posts: 457

Rep: Reputation: 137Reputation: 137
Thanks hazel : https://www.antixforum.com/forums/to...x-19/#new-post
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Conky display gets corrupted since updating Antix-16 to Antix-17 hazel Linux - Distributions 3 12-18-2017 09:55 AM
LXer: VIA OpenChrome KMS Driver Finally Goes For Mainline LXer Syndicated Linux News 0 05-27-2013 03:30 AM
LXer: OpenChrome Driver Is Far From Feature Complete LXer Syndicated Linux News 0 04-06-2013 09:03 PM
SW 13.1 X86 have they abandoned openchrome driver for X by now? acummings Slackware 8 09-24-2010 01:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > antiX / MX Linux

All times are GMT -5. The time now is 01:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration