Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Major problems with r128 PCI GPU and 2D xorg (possibly mtrr)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
vexatious
Tux's lil' helper
Tux's lil' helper


Joined: 24 Aug 2010
Posts: 77

PostPosted: Sat Jul 05, 2014 12:34 pm    Post subject: Major problems with r128 PCI GPU and 2D xorg (possibly mtrr) Reply with quote

Seems like CPU is playing a game of catch-up with GPU. Have direct rendering working but CPU is always %100 when rendering opengl. It's like I'm basically using swrast instead of DRI. But DRI shows it's loaded and running fine.

Rage 128 32MB PCI videocard. Kernel 3.11.10. I know gpu is old but I prefer to use primary GPU for passthrough in qemu, and rage 128 works great in legacy OS's like Windows 9X. Doesn't burn up electricity either.

Mesa-7.11.2 is installed (imac g3-g4 users usually have rage128 gpus and recommend this since newer versions dropped r128 DRI). xf86 r128 driver is 6.9.2. It appears I have direct rendering working:
Code:
GL_RENDERER   = Mesa DRI Rage 128
GL_VERSION    = 1.2 Mesa 7.11.2
GL_VENDOR     = VA Linux Systems, Inc.


But it's really slow. If I hover terminal window over glxgears, FPS jumps from 300 FPS to 6000+ FPS. Also, cpu usage is %100 the whole time with glxgears. It actually spikes to %100 the whole time I have audacious or other windows open without moving them. Xorg idles at %25 CPU usage with no windows or programs open.

I'm guessing it's a problem with MTRR since I get these errors:
Xorg startup
Code:
error setting MTRR (base = 0xf8000000, size = 0x02000000, type = 1) Invalid argument (22)

Dmesg
Code:
[   70.921811] mtrr: no MTRR for f8000000,2000000 found
[  266.699259] mtrr: no MTRR for f8000000,2000000 found
[  268.125911] mtrr: no MTRR for f8000000,2000000 found
[  995.208359] mtrr: no MTRR for f8000000,2000000 found
[  997.385475] mtrr: no MTRR for f8000000,2000000 found
[ 1050.478010] mtrr: no MTRR for f8000000,2000000 found
[ 1052.980532] mtrr: no MTRR for f8000000,2000000 found
[ 1114.789212] mtrr: no MTRR for f8000000,2000000 found
[ 1116.467664] mtrr: no MTRR for f8000000,2000000 found
[ 1182.499702] mtrr: no MTRR for f8000000,2000000 found
[ 1185.073290] mtrr: no MTRR for f8000000,2000000 found
[ 1259.876852] mtrr: no MTRR for f8000000,2000000 found
[ 1262.368488] mtrr: no MTRR for f8000000,2000000 found


If I run opengl games with vsync I get:
Code:
do_wait: drmWaitVBlank returned -1, IRQs don't seem to be working correctly.
Try adjusting the vblank_mode configuration parameter.


Also have random corruption on window borders.

How can I fix the MTRR issue? Computer has 16GB Ram and bulldozer2 cpu.

Would appreciate any help!

Kind regards
_________________
Gentoo
Slackware


Last edited by vexatious on Sun Jul 06, 2014 11:40 am; edited 1 time in total
Back to top
View user's profile Send private message
pa1983
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jan 2004
Posts: 100

PostPosted: Sat Jul 05, 2014 9:43 pm    Post subject: Reply with quote

What Xorg version are you running? As you know Meas dropped support for most DRI only GPU's from version 8.0 but Xorg server 1.13 and newer also dropped XAA acceleration. I had big problems with EXA acceleration and my Matrox G450 card since EXA is unstable on at least Matrox cards. So I downgraded to Xorg 1.12.
With EXA I got crashes and lower performance etc, with Xorg 1.12 and XAA performance is better and its stable.

glxgears will always hog a CPU core to 100% so. Never seen anything else in my 13-14 years with linux. CPU is busy doing rendering calls.
_________________
WS: i7 3930K@4Ghz, 32Gb ram, 256Gb NVME & 128Gb sata SSD, GTX780 3Gb & RX 460 2Gb
NAS: i3 4360 3.7Ghz, 20Gb ram, 256Gb SSD, 42Tb HDD, NIC: Intel 2x1Gbit
ROUTER: J1900 2Ghz, 8Gb ram, 128Gb SSD, NIC: 2x1Gbit, WIFI: Atheros AR9462 and AR5005G
Back to top
View user's profile Send private message
vexatious
Tux's lil' helper
Tux's lil' helper


Joined: 24 Aug 2010
Posts: 77

PostPosted: Sun Jul 06, 2014 11:37 am    Post subject: Reply with quote

Ended up making a custom ebuild and installing only the DRI module of r128 in Mesa-7.11.2, alongside mesa-10.0.2. I'm running xorg-server 1.4.13. This wasn't easy as I had to drop LLVM to version 3.0.

I still get exactly the same thing, but I'm using the same xf86-r128 driver from git (05-30-2014; actually cloned git today (07-06-2014) and startx would segmentation fault until I reverted to May's git). I noticed vsync appears to have some functionality with glxgears (it caps the framerate), but it still drops somewhat below the target refresh rate (I'm using 85hz refresh rate and glxgears gets around 79-83 FPS give or take), and doesn't appear to work with anything else.

Also, if I run mame without vsync in opengl mode, the buffer stops updating at different times (looks like screen freezes but mame keeps running with proper sound effects). Opengl is still slow and runs like swrast. I'm using EXA accelmethod for xorg. If I set mame to software rendering, I get no more glitches and speed remains the same. It's like I'm running 2D and 3D mesa rendering simultaneously in sync with any opengl application.

So far this seems the most I can get out of the r128 driver with a hint of hardware DRI opengl rendering. Has no problem with opengl in Windows 9X so I'm almost positive something is capping opengl performance, or it's not really running hardware DRI despite saying it is. MTRR errors are definite suspect to the problem.
_________________
Gentoo
Slackware
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43754
Location: 56N 3W

PostPosted: Sun Jul 06, 2014 12:20 pm    Post subject: Reply with quote

vexatious,

What does
Code:
$ grep MTRR /usr/src/linux/.config
CONFIG_MTRR=y
CONFIG_MTRR_SANITIZER=y
CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=0
CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1
show?

Only the first option there is important.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum