Skip to content

Instantly share code, notes, and snippets.

@fevangelou
Last active June 6, 2026 14:39
Show Gist options
  • Select an option

  • Save fevangelou/46a2885233c45011ad5c8752f18eac73 to your computer and use it in GitHub Desktop.

Select an option

Save fevangelou/46a2885233c45011ad5c8752f18eac73 to your computer and use it in GitHub Desktop.
Bash script to install SiS Mirage 3+ graphics drivers on Linux
#!/bin/bash
# Bash script to install SiS Mirage 3+ graphics drivers on Linux
# Supports 671/672MX graphics cards
#
# Created in March 2019
#
# Tested on:
# - Lubuntu 18.04 (32-bit) with X.Org v1.19
# - Xubuntu 18.04 (64-bit) with X.Org v1.20
# installed on a Fujitsu-Siemens Esprimo Mobile v5535 laptop (specs: https://www.notebookcheck.net/Fujitsu-Siemens-Esprimo-Mobile-V5535.9149.0.html)
#
# Execute as root user with:
#
# $ sudo su
# (then type your password)
# $ cd ~/
# $ wget --no-check-certificate https://gist.githubusercontent.com/fevangelou/46a2885233c45011ad5c8752f18eac73/raw/79b407db60589d98e78cd131b56a1652756fb7b2/install_sis_graphics_on_linux.sh
# $ chmod +x install_sis_graphics_on_linux.sh
# $ ./install_sis_graphics_on_linux.sh
#
# IMPORTANT:
# If you X.Org version is not 1.20, edit the variable "XORG_VERSION" below accordingly and re-run the script.
#
# References:
# https://github.com/rasdark/xf86-video-sis671 (driver)
# https://ubuntuforums.org/showthread.php?t=2350126&page=4&p=13599531#post13599531 (how-to)
XORG_VERSION="1.20"
# Check for /etc/X11/xorg.conf
if [ ! -f "/etc/X11/xorg.conf" ]; then
touch /etc/X11/xorg.conf
fi
# Install required packages
apt-get -y install build-essential xorg-dev autoconf automake git libtool-bin xutils-dev inxi
# Build the driver
cd ~/
git clone https://github.com/rasdark/xf86-video-sis671.git
cd xf86-video-sis671/
git checkout for-xorg-$XORG_VERSION
autoreconf
automake
./configure --prefix=/usr --disable-static
make
make install
# Check if the drivers were installed
ls -la /usr/lib/xorg/modules/drivers/sis671*
echo ""
echo ""
inxi -G
echo ""
echo ""
if [ -f "/usr/lib/xorg/modules/drivers/sis671_drv.so" ]; then
# Setup the SiS graphics driver
cat > "/etc/X11/xorg.conf" <<EOF
Section "Device"
Identifier "Configured Video Device"
Driver "sis671"
EndSection
Section "Monitor"
Identifier "Configured Monitor"
EndSection
Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
EndSection
EOF
# Now reboot
echo ""
echo ""
echo " *** The installation for SiS graphics drivers is now complete *** "
echo ""
echo " === --------------------------------------------------------- === "
echo " === PLEASE REBOOT YOUR SYSTEM NOW === "
echo " === --------------------------------------------------------- === "
echo ""
else
echo ""
echo ""
echo " *** The installation for SiS graphics drivers FAILED *** "
echo ""
echo " === ---------------------------------------------------- === "
echo " === Check your X.Org version! === "
echo " === ---------------------------------------------------- === "
echo ""
fi
@XTRAXTREME

Copy link
Copy Markdown

Please help me I am new to Linux and I don't understand the commands I'm doing this on my Q4OS linux

@XTRAXTREME

XTRAXTREME commented Jul 18, 2023

Copy link
Copy Markdown

1689619217874
After
1688578440872
Before

@impersonator666

Copy link
Copy Markdown

In debian 12 bookworm edit this script line to this version XORG_VERSION="21.1"
worked for me with dwm, i finally can get the resolution 1280x800 in linux

@mpeter50

mpeter50 commented Feb 9, 2024

Copy link
Copy Markdown

Hi!

I have set this up on an old Fujitsi Esprimo Mobile V5555.
When setting UseTiming1366 to "yes", "True" or anything like that, the screen will be blank after a reboot, sometimes colorful lines will be visible, and I'm not even able to switch to an other virtual terminal.
When that line is commented in the config, it works, however its not really usable. A fresh Mint Xfce system is heavily lagging even with just a terminal and btop inside it opened, set to update every 2 seconds. The X.org process is often at 100% on its core when doing this, but never below 50%.

Interestingly, the Mint LiveCD (running from a pendrive, through Ventoy) does not lag from running a terminal alone. With the same "workload", the X.org process is working at around 10% or less (per core, on a single core).
Its also weird that this LiveCD did not even need any drivers to be added manually, it just worked by itself, I only needed this repo's driver for booting the installed system.

Can someone help find out why do I need the driver if the LiveCD worked fine?
And also, the reason for why does the installed system lag while the LiveCD doesnt.

Here is my graphics hardware, to make sure I'm at the right place:

Graphics:
  Device-1: Silicon Integrated Systems [SiS] 771/671 PCIE VGA Display Adapter
    driver: N/A
  Display: x11 server: X.Org v: 1.21.1.4 driver: gpu: N/A
    resolution: 1280x800~60Hz
  OpenGL: renderer: llvmpipe (LLVM 15.0.7 128 bits)
    v: 4.5 Mesa 23.0.4-0ubuntu1~22.04.1 

@Giovannitridente

Copy link
Copy Markdown

Hi everyone, I'm trying this tool on an Olivetti OlivoBook P1500 with Sis Mirage 3 and Zorin OS 17, but I can't make it work, at the end of the procedure the message "Please reboot your system now" appears, I restart the PC but nothing changes, does anyone know how to help me?

@mpeter50

Copy link
Copy Markdown

Oh, forgot about this.

If you have the same graphics device, the final solution for me was not to use this repo's driver, but to tell X to use the VESA driver.
For that, in the Xorg config file, in the Device section, I have repalced the value of the Driver setting with vesa. After a reboot (maybe even a relogin) it should work.

I have found this solution on the Mint forum: https://forums.linuxmint.com/viewtopic.php?t=266554

@Rapozildo57

Copy link
Copy Markdown

Woah, 2025 and another crazy person posting their screenshot?

Yeah, Lubuntu 24.04 LTS running Xorg 1.21.1... I actually used the https://github.com/rasdark/xf86-video-sis671 instructions and files which are just this script but manual. This Lubuntu 24.04 was the only one able to run 1280x800, MX Linux ran 1024x768...

Anyway, here's the screenshot (btw, don't ever try installing this on arch)

screen

@gitflo2000

gitflo2000 commented Dec 20, 2025

Copy link
Copy Markdown

This Script does not work on my Fujitsu-Siemens Esprimo Mobile v5535 with LUbuntu 22.04.5 LTS 64bit with Sis 671 / SiS Mirage 3.
After installation i get these error message when booting (i adapted the script with: XORG_VERSION="21.1") Version XORG_VERSION="1.21"
is wrong, right?

UBBAN: array-index-out-of-bounds in /build/linux-hwe-6.8-dFitJc/linux-hwe-6.8-6.8.0/drivers/net/wireless/ath/ath5k/base.c:1741:20
index 4 is out of range for type 'ieee80211_tx_rate [4]'

@tiolennon

tiolennon commented Jun 6, 2026

Copy link
Copy Markdown

After a few days of debbuging I managed to make this work on Debian 13 LXQt. I followed the steps directly from rasdark/xf86-video-sis671 repo. Modern GCC that ships with Debian 13 complained A LOT about some implicit function declarations on the driver source code. After fixing these and a few headers missing, the driver compiled on Debian 13. At runtime there was a single crash error regarding a pointer that pointed to a garbage address, fixed it and now the SiS 671 driver works perfectly on an old Positivo Mobile Z94 from 2008.

Xorg conf file that worked for me:

/etc/X11/xorg.conf.d/20-sis671.conf
Section "Device"
Identifier "SiS671"
Driver "sis671"
Option "NoAccel" "True" # This is optional, but made desktop feel snappier for me.
EndSection

Don't forget to add "nomodeset" to grub, or else the kernel will not allow Xorg to load the driver.

P.S. For technical reference, this was built against the stock Debian 13 environment running Xorg Server version 1.21.1 and X.Org Video Driver ABI version 25.2. The structural changes in ABI 25 are what trigger the modern compilation errors on the old codebase!

screen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment