Showing posts with label vgaswitcheroo. Show all posts
Showing posts with label vgaswitcheroo. Show all posts

Sunday, October 9, 2011

Bodenständig - gswitcheroo reached some point.

Gswitcheroo, a small daemon to handle vgaswitcheroo, is now in a state that helps me.



Currently it suggests to switch to the discrete graphics card (an ATI card in my case), if an external monitor is detected non boot. If no external monitor is detected, it suggests to discable the discrete card, to save power. And because hybrid setups just appear in laptops, it usually makes sense to save some watts.

During the last weeks I've learned that it is not possible, to determin if a monitor is connected, when the discrete card is disabled. If I wanted to detect a hot-plugged monitor, I would need to do some polling (including turning the discrete card on and off), but this didn't seem to be to good, so I skipped it and just provided the basic functionality described above.

Thursday, September 29, 2011

DisplayLink and vgaswitcheroo.

DisplayLink: Just something I wanted to share. The problem with current 'modern' laptops can be, that they don't provide a VGA port, which is often required to connect beamers (the reason why I needed one of those adapters). One way to to solve this, is to use some DisplayLink adapter, which allows to connect display via USB.


But it is hard to find real DisplayLink adapters, it took me two random and one informed transaction to get a supported adapter:LogiLink USB to DVI/VGA/HDMI Multi-Display Adapter (UA0077).

This adapter has quite good support in Fedora after installing the xorg-x11-driver-displaylink package.
$ sudo yum install xorg-x11-driver-displaylink
$ sudo modprobe sisusbvga
Use dmesg to find out about the assigned framebuffer-device (fb). Now the driver is available and the appropriate kernel module loaded but you still need to dump the following file into /etc/X11/xorg.conf.d/
# /etc/X11/xorg.conf.d/displaylink.conf
Section "Device"
        Option       "fbdev"     "/dev/fb2"    # use the device given in dmesg
	Identifier   "DLCard"
	Driver       "displaylink"
EndSection

vgaswitcheroo: Well, I didn't find out much more on the vgaswitcheroo side. I didn't find a way to determin if a monitor is connected to the discrete card, when this card is turned of (it seems that on some setups the integrated card get's "infos" about monitors connected to the discrete card, but not on mine). But I wont continue to poll for a monitor on the discrete card, so I'll just provide some trayicon (or how i's called in the shell slang), which enables the user to switch between the cards.

Friday, September 23, 2011

Poll, no poll, poll.

While working on gswitcheroo I needed a reliable way to determine if a monitor get's connected to the HDMI port of the discrete card. But monitoring the HDMI port when the corresponding discrete card is powered off, doesn't seem to work.
A temporary solution is to power on the discrete card once and again, to see if a some monitor got connected. airlied point out, that maybe the integrated card is able to detect connected monitors. But in the first trial it didn't really work.

What also didn't work, was monitoring status changes of the discrete (radeon) card using udev (using udevadm monitor).  Time for more investigations.

Monday, September 19, 2011

Zyklisch - gswitcheroo is up and quasi working.


Cycle Track
Tonight I had a bit of time and got gswitcheroo in a usable state.
gswitcherd is launched by systemd and gswitcher is launched gnome-session-manager. All fine.

If gswitcherd detects a connected HDMI port on boot it tries to turn on the discrete card (effectively turning off the integrated). Sadly there is currently a bug (or so) in vgaswitcheroo which prevents the successful switching from one to another card between plymouth and gdm. Maybe this will be fixed at some point - or not be needed at all ...

Another problem is about looking up the HDMI status (to automagically detect what card to use). This is just possible if the discrete card is powered on, but this ain't the case when we are using the integrated card. The current solution is to power on the discrete card once and again, to determine the HDMI status.

Beside all problems gswitcher will notify you about a freshly connected monitor and will ask you to log out (and back in).

Monday, September 12, 2011

Rollo - gswitcheroo, a small daemon for vgaswitcheroo.

VGA Port
I'm working on a small library/daemo/client which wrap some functionallity of  vgaswitcheroo, a small kernel feature to handle hybrid graphic setups found in some laptops.

The main intention is to allow the user to switch to the required card
Sometimes this switch is required, because just one of the cards is connected to the external output of the laptop - which can be used to connect a beamer.

The current code can be found at https://gitorious.org/valastuff/gswitcheroo.
daemon and client should be working by now, but the installation bits need some work.

My intention is to add some configuration point to gnome-control-center. A first suggestion was to use the "System information" -> Graphics-Tab.
Any suggestions and early adopters?